From 18430e2020b70a7b2a758067884f12b73c96598b Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 25 Sep 2026 19:16:37 -0700 Subject: [PATCH 1/5] [Rust] Let a plugin link a Rust crate as a static library of its own A static Rust crate was always built from a generated variant of its Cargo.toml, and internal builds folded it into the umbrella the core links. Neither suited a crate linked into a single plugin, and nothing linked the system libraries Rust's std needs. Now a crate marked `STANDALONE` is built as written, with its own cargo invocation and target directory, and `bn_rust_native_static_libs` asks rustc which system libraries to link beside it. --- cmake/RustBuild.cmake | 58 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/cmake/RustBuild.cmake b/cmake/RustBuild.cmake index f8503a2d3..5afa82b05 100644 --- a/cmake/RustBuild.cmake +++ b/cmake/RustBuild.cmake @@ -22,6 +22,12 @@ # For STATIC crates, a static variant of the Cargo.toml is auto-generated # at configure time (cdylib -> rlib, workspace deps resolved, features added). # +# A STATIC crate marked STANDALONE skips both. It keeps its own Cargo.toml and +# gets its own cargo invocation and target directory. Use it for a crate linked +# into a single plugin rather than the core, since the umbrella deduplicates only +# within one binary. For a crate outside this repository's workspaces, WORKSPACE +# names the workspace to run cargo from. +# # Public API: # bn_add_rust_crate() - Register a Rust crate for building # bn_add_rust_crate_group() - Create a group target (combined mode) @@ -62,8 +68,8 @@ endif() # Combined builds (BN_INTERNAL_BUILD without CARGO_ARGS) share BN_RUST_TARGET_DIR # Every other crate builds in a per-target directory to avoid lock contention function(bn_get_rust_target_dir TARGET_NAME OUT_VAR) - cmake_parse_arguments(ARG "" "CARGO_ARGS" "" ${ARGN}) - if(BN_INTERNAL_BUILD AND NOT ARG_CARGO_ARGS) + cmake_parse_arguments(ARG "STANDALONE" "CARGO_ARGS" "" ${ARGN}) + if(BN_INTERNAL_BUILD AND NOT ARG_CARGO_ARGS AND NOT ARG_STANDALONE) set(${OUT_VAR} ${BN_RUST_TARGET_DIR} PARENT_SCOPE) else() set(${OUT_VAR} ${CMAKE_BINARY_DIR}/rust-target-${TARGET_NAME} PARENT_SCOPE) @@ -80,6 +86,42 @@ endif() set(BN_CARGO_COMMAND ${BN_RUSTUP_PATH} run ${CARGO_STABLE_VERSION} cargo) +# Set OUT_VAR to the system libraries a Rust static library needs linked alongside it. They come +# from std, so they depend only on the toolchain and target, and compiling an empty crate reports +# them. Leave out the C runtime, which CMake already chooses. +function(bn_rust_native_static_libs OUT_VAR) + set(CACHE_VAR BN_RUST_NATIVE_STATIC_LIBS_${CARGO_STABLE_VERSION}) + if(NOT DEFINED CACHE{${CACHE_VAR}}) + set(PROBE_DIR ${CMAKE_BINARY_DIR}/rust-native-static-libs) + file(WRITE ${PROBE_DIR}/empty.rs "") + execute_process( + COMMAND ${BN_RUSTUP_PATH} run ${CARGO_STABLE_VERSION} rustc --crate-type=staticlib + --crate-name=empty --print=native-static-libs --out-dir ${PROBE_DIR} ${PROBE_DIR}/empty.rs + RESULT_VARIABLE PROBE_RESULT + OUTPUT_VARIABLE PROBE_OUTPUT + ERROR_VARIABLE PROBE_OUTPUT) + if(NOT PROBE_RESULT EQUAL 0 OR NOT PROBE_OUTPUT MATCHES "native-static-libs: ([^\r\n]*)") + message(FATAL_ERROR "rustc did not report the native libraries std needs:\n${PROBE_OUTPUT}") + endif() + + string(REPLACE " " ";" ITEMS "${CMAKE_MATCH_1}") + set(LIBS) + foreach(ITEM ${ITEMS}) + # A MATCHES that fails clears CMAKE_MATCH_1, so each form needs a test of its own. + if(ITEM MATCHES "^-l(.+)$") + list(APPEND LIBS ${CMAKE_MATCH_1}) + elseif(ITEM MATCHES "^(.+)\\.lib$") + list(APPEND LIBS ${CMAKE_MATCH_1}) + elseif(NOT ITEM MATCHES "^/defaultlib:") + list(APPEND LIBS ${ITEM}) + endif() + endforeach() + set(${CACHE_VAR} "${LIBS}" CACHE INTERNAL "") + endif() + + set(${OUT_VAR} ${${CACHE_VAR}} PARENT_SCOPE) +endfunction() + # Derive api path from this file's location (api/cmake/RustBuild.cmake -> api/) get_filename_component(_BN_RUST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) get_filename_component(_BN_API_PATH "${_BN_RUST_CMAKE_DIR}" DIRECTORY) @@ -635,7 +677,7 @@ function(bn_add_rust_static_umbrella UMBRELLA_TARGET) endfunction() function(bn_add_rust_crate) - cmake_parse_arguments(ARG "DEMO_STATIC" "TARGET;CRATE;WORKSPACE;OUTPUT_TYPE;OUTPUT_DIR;GROUP;CARGO_ARGS;CRATE_PATH;BN_FEATURE;CRATE_FEATURE;RPATH_KIND" "SOURCES;EXTRA_SOURCES;DEPENDS;BYPRODUCTS" ${ARGN}) + cmake_parse_arguments(ARG "DEMO_STATIC;STANDALONE" "TARGET;CRATE;WORKSPACE;OUTPUT_TYPE;OUTPUT_DIR;GROUP;CARGO_ARGS;CRATE_PATH;BN_FEATURE;CRATE_FEATURE;RPATH_KIND" "SOURCES;EXTRA_SOURCES;DEPENDS;BYPRODUCTS" ${ARGN}) if(NOT ARG_TARGET) message(FATAL_ERROR "bn_add_rust_crate: TARGET is required") @@ -675,7 +717,8 @@ function(bn_add_rust_crate) endif() # OUTPUT_TYPE STATIC: Generate a static variant of the crate - if(ARG_OUTPUT_TYPE STREQUAL "STATIC") + # STANDALONE crates are taken as written and built on their own, so no variant is generated + if(ARG_OUTPUT_TYPE STREQUAL "STATIC" AND NOT ARG_STANDALONE) if(NOT ARG_BN_FEATURE) set(ARG_BN_FEATURE "no_exports") endif() @@ -726,7 +769,7 @@ function(bn_add_rust_crate) endif() set(USE_COMBINED_BUILD FALSE) - if(BN_INTERNAL_BUILD AND NOT ARG_CARGO_ARGS) + if(BN_INTERNAL_BUILD AND NOT ARG_CARGO_ARGS AND NOT ARG_STANDALONE) set(USE_COMBINED_BUILD TRUE) endif() @@ -798,7 +841,10 @@ function(bn_add_rust_crate) endif() else() - bn_get_rust_target_dir(${TARGET_NAME} STANDALONE_TARGET_DIR CARGO_ARGS ${ARG_CARGO_ARGS}) + if(ARG_STANDALONE) + set(_TARGET_DIR_ARGS STANDALONE) + endif() + bn_get_rust_target_dir(${TARGET_NAME} STANDALONE_TARGET_DIR ${_TARGET_DIR_ARGS} CARGO_ARGS ${ARG_CARGO_ARGS}) _bn_get_cargo_opts(CARGO_OPTS ${STANDALONE_TARGET_DIR}) _bn_compute_cargo_paths(${STANDALONE_TARGET_DIR} ${PROFILE_DIR} ${OUTPUT_FILE_NAME}) From 569fd7dfee397bf4257f2a218e45613d7b733077 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 25 Sep 2026 19:16:37 -0700 Subject: [PATCH 2/5] [aarch64] Switch to the exarmo disassembler The old disassembler could not disassemble over a third of aarch64's encodings. That included nearly all of SME2 and SVE2.1 onwards, and all of MOPS, LSFE, D128, THE, LSE128, LSUI, FPRCVT, CMPBR, LRCPC3 and a dozen smaller extensions. Its generator also could not process the new ASL pseudocode Arm's specifications have used since 2025-12, and adapting it would take significant effort. Now `Arm64Architecture` uses exarmo, a new aarch64 disassembler generated from Arm's machine-readable ISA specification. It covers every aarch64 encoding in the 2026-09 specification. Disassembly text comes from exarmo's token stream and branch information from its control-flow reading. The lifter reads operands as provided by exarmo. Intrinsics, and the instructions they map to, come from exarmo, which derives them from Arm's ACLE dataset. System registers, system operations and PSTATE fields come from exarmo's tables too, so every instruction naming a system operation lifts, with its register read or written at the width the operation takes. Lifting coverage is otherwise unchanged. Most of the changes to arm64test.py are intrinsic names and types that now follow ACLE. For single-precision forms that the old intrinsic table covered but ACLE has no intrinsic for, the lifter emits IL where there is a concise representation for the operation, and a custom intrinsic otherwise. Others are due to different formatting choices made by exarmo, which writes immediates in hex, x29 and x30 as fp and lr, and conditions as cc and cs rather than lo and hs. The rest correct the old disassembler, which omitted the register of a TLBI operation that takes one when it was xzr, and wrote a SYS as a TLBI alias even where the operation takes no register. apple_vendor.cpp now holds the names of Apple's system registers, which were hard-coded in the old disassembler. It no longer claims the SPTM monitor entry, which exarmo correctly recognises as TENTER from FEAT_TEV. --- Cargo.toml | 2 + arch/arm64/CMakeLists.txt | 94 +- arch/arm64/Cargo.lock | 35 + arch/arm64/Cargo.toml | 22 + arch/arm64/README.md | 19 +- arch/arm64/acle_intrinsics.cpp | 213 + arch/arm64/acle_intrinsics.h | 36 + arch/arm64/apple_vendor.cpp | 741 +- arch/arm64/apple_vendor.h | 27 +- arch/arm64/arch_arm64.cpp | 983 +- arch/arm64/arm64test.py | 2936 +- arch/arm64/build.rs | 42 + arch/arm64/disassembler/.gitignore | 134 - arch/arm64/disassembler/Makefile-asan | 21 - arch/arm64/disassembler/Makefile-local | 50 - arch/arm64/disassembler/arm64dis.h | 4 - arch/arm64/disassembler/context_layout.h | 429 - arch/arm64/disassembler/decode.c | 39 - arch/arm64/disassembler/decode.h | 574 - arch/arm64/disassembler/decode0.c | 2950 - arch/arm64/disassembler/decode1.c | 8788 -- arch/arm64/disassembler/decode1.h | 635 - arch/arm64/disassembler/decode2.c | 72168 ---------------- arch/arm64/disassembler/decode2.h | 2294 - arch/arm64/disassembler/decode_fields32.c | 10167 --- arch/arm64/disassembler/decode_fields32.h | 3 - arch/arm64/disassembler/decode_scratchpad.c | 11247 --- arch/arm64/disassembler/disasm_test.py | 240 - arch/arm64/disassembler/encodings_dec.c | 6533 -- arch/arm64/disassembler/encodings_dec.h | 5458 -- arch/arm64/disassembler/encodings_fmt.c | 10089 --- arch/arm64/disassembler/encodings_fmt.h | 4 - arch/arm64/disassembler/feature_flags.h | 355 - arch/arm64/disassembler/format.c | 608 - arch/arm64/disassembler/format.h | 57 - arch/arm64/disassembler/gofer.c | 28 - arch/arm64/disassembler/operations.c | 1715 - arch/arm64/disassembler/operations.h | 1707 - arch/arm64/disassembler/pcode.c | 971 - arch/arm64/disassembler/pcode.h | 495 - arch/arm64/disassembler/sysregs_fmt_gen.c | 1992 - arch/arm64/disassembler/sysregs_fmt_gen.h | 13 - arch/arm64/disassembler/sysregs_gen.c | 1990 - arch/arm64/disassembler/sysregs_gen.h | 1992 - arch/arm64/disassembler/test.c | 427 - arch/arm64/disassembler/test_cases.txt | 46060 ---------- arch/arm64/il.cpp | 3953 +- arch/arm64/il.h | 37 +- arch/arm64/il_macros.h | 32 +- arch/arm64/misc/mte.txt | 33 - arch/arm64/misc/neon_intrins.c | 5038 -- arch/arm64/misc/neon_intrins.py | 261 - arch/arm64/neon_intrinsics.cpp | 25035 ------ arch/arm64/neon_intrinsics.h | 3998 - arch/arm64/operands.cpp | 99 + arch/arm64/operands.h | 35 + .../{disassembler/regs.c => registers.cpp} | 121 +- .../{disassembler/regs.h => registers.h} | 41 +- arch/arm64/src/lib.rs | 2 + arch/arm64/sysregs_enum.cpp | 3988 - arch/arm64/sysregs_enum.h | 17 - arch/arm64/system_operations.cpp | 230 + arch/arm64/system_operations.h | 67 + arch/arm64/system_registers.cpp | 85 + arch/arm64/system_registers.h | 37 + arch/arm64/test_disasm.py | 58 - arch/arm64/test_gen.py | 67 +- arch/arm64/unpack_lookup.c | 454 - 68 files changed, 5697 insertions(+), 233378 deletions(-) create mode 100644 arch/arm64/Cargo.lock create mode 100644 arch/arm64/Cargo.toml create mode 100644 arch/arm64/acle_intrinsics.cpp create mode 100644 arch/arm64/acle_intrinsics.h create mode 100644 arch/arm64/build.rs delete mode 100644 arch/arm64/disassembler/.gitignore delete mode 100644 arch/arm64/disassembler/Makefile-asan delete mode 100644 arch/arm64/disassembler/Makefile-local delete mode 100644 arch/arm64/disassembler/arm64dis.h delete mode 100644 arch/arm64/disassembler/context_layout.h delete mode 100644 arch/arm64/disassembler/decode.c delete mode 100644 arch/arm64/disassembler/decode.h delete mode 100644 arch/arm64/disassembler/decode0.c delete mode 100644 arch/arm64/disassembler/decode1.c delete mode 100644 arch/arm64/disassembler/decode1.h delete mode 100644 arch/arm64/disassembler/decode2.c delete mode 100644 arch/arm64/disassembler/decode2.h delete mode 100644 arch/arm64/disassembler/decode_fields32.c delete mode 100644 arch/arm64/disassembler/decode_fields32.h delete mode 100644 arch/arm64/disassembler/decode_scratchpad.c delete mode 100755 arch/arm64/disassembler/disasm_test.py delete mode 100644 arch/arm64/disassembler/encodings_dec.c delete mode 100644 arch/arm64/disassembler/encodings_dec.h delete mode 100644 arch/arm64/disassembler/encodings_fmt.c delete mode 100644 arch/arm64/disassembler/encodings_fmt.h delete mode 100644 arch/arm64/disassembler/feature_flags.h delete mode 100644 arch/arm64/disassembler/format.c delete mode 100644 arch/arm64/disassembler/format.h delete mode 100644 arch/arm64/disassembler/gofer.c delete mode 100644 arch/arm64/disassembler/operations.c delete mode 100644 arch/arm64/disassembler/operations.h delete mode 100644 arch/arm64/disassembler/pcode.c delete mode 100644 arch/arm64/disassembler/pcode.h delete mode 100644 arch/arm64/disassembler/sysregs_fmt_gen.c delete mode 100644 arch/arm64/disassembler/sysregs_fmt_gen.h delete mode 100644 arch/arm64/disassembler/sysregs_gen.c delete mode 100644 arch/arm64/disassembler/sysregs_gen.h delete mode 100644 arch/arm64/disassembler/test.c delete mode 100644 arch/arm64/disassembler/test_cases.txt delete mode 100644 arch/arm64/misc/mte.txt delete mode 100644 arch/arm64/misc/neon_intrins.c delete mode 100755 arch/arm64/misc/neon_intrins.py delete mode 100644 arch/arm64/neon_intrinsics.cpp delete mode 100644 arch/arm64/neon_intrinsics.h create mode 100644 arch/arm64/operands.cpp create mode 100644 arch/arm64/operands.h rename arch/arm64/{disassembler/regs.c => registers.cpp} (83%) rename arch/arm64/{disassembler/regs.h => registers.h} (91%) create mode 100644 arch/arm64/src/lib.rs delete mode 100644 arch/arm64/sysregs_enum.cpp delete mode 100644 arch/arm64/sysregs_enum.h create mode 100644 arch/arm64/system_operations.cpp create mode 100644 arch/arm64/system_operations.h create mode 100644 arch/arm64/system_registers.cpp create mode 100644 arch/arm64/system_registers.h delete mode 100755 arch/arm64/test_disasm.py delete mode 100644 arch/arm64/unpack_lookup.c diff --git a/Cargo.toml b/Cargo.toml index 8c48cad6d..705a2c3b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,8 @@ # binaryninja-api will result in this root workspace being picked up and used for LSP and cargo commands automatically. [workspace] resolver = "2" +# arm64-exarmo is a workspace of its own +exclude = ["arch/arm64"] members = [ "rust", "arch/riscv", diff --git a/arch/arm64/CMakeLists.txt b/arch/arm64/CMakeLists.txt index b038c0057..101b3074c 100644 --- a/arch/arm64/CMakeLists.txt +++ b/arch/arm64/CMakeLists.txt @@ -1,28 +1,10 @@ cmake_minimum_required(VERSION 3.28 FATAL_ERROR) -project(arch_arm64 CXX C) +project(arch_arm64 CXX) file(GLOB SOURCES CONFIGURE_DEPENDS *.cpp - *.c - *.h - disassembler/decode.c - disassembler/format.c - disassembler/sysregs_gen.c - disassembler/sysregs_fmt_gen.c - disassembler/regs.c - disassembler/encodings_dec.c - disassembler/encodings_fmt.c - disassembler/operations.c - disassembler/pcode.c - disassembler/decode0.c - disassembler/decode1.c - disassembler/decode2.c - disassembler/decode_fields32.c - disassembler/decode_scratchpad.c - disassembler/*.h) - -list(FILTER SOURCES EXCLUDE REGEX "sysregs\\.(h|cpp)$") + *.h) if(DEMO) add_library(${PROJECT_NAME} STATIC ${SOURCES}) @@ -31,13 +13,8 @@ else() endif() -if(NOT WIN32) - set_source_files_properties(disassembler/arm64dis.c PROPERTIES COMPILE_FLAGS -fno-strict-aliasing) -endif() - target_include_directories(${PROJECT_NAME} - PRIVATE ${PROJECT_SOURCE_DIR} - PRIVATE ${PROJECT_SOURCE_DIR}/disassembler) + PRIVATE ${PROJECT_SOURCE_DIR}) if((NOT BN_API_BUILD_EXAMPLES) AND (NOT BN_INTERNAL_BUILD)) add_subdirectory(${PROJECT_SOURCE_DIR}/../.. ${PROJECT_BINARY_DIR}/api) @@ -52,6 +29,68 @@ else() endif() endif() +if(NOT BN_INTERNAL_BUILD) + get_target_property(BN_API_SOURCE_DIR binaryninjaapi SOURCE_DIR) + list(APPEND CMAKE_MODULE_PATH "${BN_API_SOURCE_DIR}/cmake") + include(RustBuild) +endif() + +# Build exarmo, the AArch64 disassembler, from crates.io through the arm64-exarmo crate in this +# directory. Its build script copies the headers of the exarmo it links into the Rust target +# directory, where the plugin includes them from. +if(DEMO) + bn_get_rust_target_dir(exarmo_aarch64 EXARMO_TARGET_DIR) +else() + bn_get_rust_target_dir(exarmo_aarch64 EXARMO_TARGET_DIR STANDALONE) +endif() +set(EXARMO_INCLUDE_DIR ${EXARMO_TARGET_DIR}/arm64-exarmo/include) +set(EXARMO_HEADERS + ${EXARMO_INCLUDE_DIR}/exarmo/aarch64.h + ${EXARMO_INCLUDE_DIR}/exarmo/aarch64_generated.h) +target_include_directories(${PROJECT_NAME} PRIVATE ${EXARMO_INCLUDE_DIR}) + +if(DEMO) + # arch_arm64 is linked into the core here, so exarmo goes through the umbrella + # that holds one copy of the Rust runtime for that binary. + bn_add_rust_crate( + TARGET exarmo_aarch64 + CRATE arm64-exarmo + OUTPUT_TYPE STATIC + OUTPUT_DIR ${CMAKE_BINARY_DIR} + GROUP plugins + EXTRA_SOURCES ${PROJECT_SOURCE_DIR}/Cargo.lock + BYPRODUCTS ${EXARMO_HEADERS}) +else() + bn_add_rust_crate( + TARGET exarmo_aarch64 + CRATE arm64-exarmo + OUTPUT_TYPE STATIC + STANDALONE + OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} + EXTRA_SOURCES ${PROJECT_SOURCE_DIR}/Cargo.lock + BYPRODUCTS ${EXARMO_HEADERS}) + + get_target_property(EXARMO_LIBRARY exarmo_aarch64 OUTPUT_FILE_PATH) + add_library(exarmo_aarch64_capi STATIC IMPORTED GLOBAL) + set_target_properties(exarmo_aarch64_capi PROPERTIES IMPORTED_LOCATION ${EXARMO_LIBRARY}) + add_dependencies(exarmo_aarch64_capi exarmo_aarch64) + + bn_rust_native_static_libs(EXARMO_NATIVE_LIBS) + set_property(TARGET exarmo_aarch64_capi APPEND PROPERTY + INTERFACE_LINK_LIBRARIES ${EXARMO_NATIVE_LIBS}) + + target_link_libraries(${PROJECT_NAME} exarmo_aarch64_capi) +endif() + +# Build exarmo first, since the plugin's sources include the headers its build script copies. +add_dependencies(${PROJECT_NAME} exarmo_aarch64) + +# Keep the symbols of the static libraries linked in, exarmo and Rust's std among them, from being +# exported alongside the plugin's own. +if(UNIX AND NOT APPLE) + target_link_options(${PROJECT_NAME} PRIVATE "LINKER:--exclude-libs,ALL") +endif() + IF(DEFINED ENV{ARM64_WARNINGS}) MESSAGE(STATUS "ARM64 WARNINGS ON") target_compile_options(${PROJECT_NAME} PRIVATE -Wall) @@ -63,9 +102,6 @@ set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20 CXX_VISIBILITY_PRESET hidden CXX_STANDARD_REQUIRED ON - C_STANDARD 11 - C_STANDARD_REQUIRED ON - C_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON POSITION_INDEPENDENT_CODE ON) diff --git a/arch/arm64/Cargo.lock b/arch/arm64/Cargo.lock new file mode 100644 index 000000000..1b9a2d026 --- /dev/null +++ b/arch/arm64/Cargo.lock @@ -0,0 +1,35 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "arm64-exarmo" +version = "0.1.0" +dependencies = [ + "exarmo-aarch64-capi", +] + +[[package]] +name = "exarmo-aarch64" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9ef159557f010f6cd425a9053c7578084a230937f7d74d7457d00c79438189a" +dependencies = [ + "exarmo-core", +] + +[[package]] +name = "exarmo-aarch64-capi" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "705a7b359cdfdba91f7c24a0b2cf76311ac5d2b23f6dfa7b9a33978ef566bb62" +dependencies = [ + "exarmo-aarch64", + "exarmo-core", +] + +[[package]] +name = "exarmo-core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3848e1a04c30a61cd2e290340c7c720202783e405d86d5edd276804f6fca0005" diff --git a/arch/arm64/Cargo.toml b/arch/arm64/Cargo.toml new file mode 100644 index 000000000..f82e45008 --- /dev/null +++ b/arch/arm64/Cargo.toml @@ -0,0 +1,22 @@ +# Build exarmo, the AArch64 disassembler, as the static library the plugin links. build.rs copies +# the C API's headers from the exarmo-aarch64-capi this crate links. +[package] +name = "arm64-exarmo" +version = "0.1.0" +edition = "2024" +publish = false + +[lib] +crate-type = ["staticlib"] + +[dependencies] +# Pin the exact version so that the demo umbrella, which resolves without this crate's Cargo.lock, +# builds the same exarmo as every other build. +exarmo-aarch64-capi = "=0.2.1" + +# Make this crate its own workspace to keep exarmo out of the api workspace's lock file. +[workspace] + +[profile.release] +opt-level = 2 +debug = "line-tables-only" diff --git a/arch/arm64/README.md b/arch/arm64/README.md index 74ff7cc36..3fbb7a150 100644 --- a/arch/arm64/README.md +++ b/arch/arm64/README.md @@ -6,14 +6,16 @@ This is the AArch64 plugin that ships with Binary Ninja. - [arch_arm64.cpp](./arch_arm64.cpp) implements the Architecture class - [il.cpp](./il.cpp) contains the lifter, the translator from disassembly to intermediate language -- [disassembler/*](./disassembler/) is the disassembler +- [operands.cpp](./operands.cpp) reads the operands exarmo decodes the way the lifter needs them +- [registers.cpp](./registers.cpp) and [system_registers.cpp](./system_registers.cpp) are the two register namespaces, and map exarmo's registers into them +- [acle_intrinsics.cpp](./acle_intrinsics.cpp) lifts an instruction as the ACLE intrinsic exarmo says it implements +- [system_operations.cpp](./system_operations.cpp) names the intrinsics for AT, DC, TLBI and the other SYS aliases +- [apple_vendor.cpp](./apple_vendor.cpp) covers the Apple instructions and system registers ARM does not define -## Testing +Disassembly comes from [exarmo](https://crates.io/crates/exarmo-aarch64-capi), through its C API. -There are three tests: +## Testing -- [./disassembler/test.py](./disassembler/test.py) test of disassembler module, isolated from the architecture module or Binary Ninja -- [./test_disasm.py](./test_disasm.py) test of disassembler, using the architecture module through the binaryninja API - [./arm64test.py](./arm64test.py) runs a very basic "lift to string and compare" test Personal Binary Ninja users can test via the built in console: @@ -35,7 +37,7 @@ And, of course, you can open a test binary in Binary Ninja with this architectur 1. **TEST!** If you're making an architecture or lifter change, add a test case to [arm64test.py](./arm64test.py) that fails before your change and succeeds after your change. -2. **TEST!** If you're making a disassembler change, add a test case to [disassembler/test.py](./disassembler/test.py) that fails before your change and succeeds after your change. +2. Disassembly comes from exarmo, so report disassembly bugs as issues rather than changing the plugin. 3. Compile with warnings enabled. Do this cmake invocation: `ARM64_WARNINGS=1 cmake .` Please follow whatever formatting conventions are present in the file you edit. Pay attention to curly brackets, spacing, tabs vs. spaces, etc. @@ -46,7 +48,10 @@ When you submit your first PR to one of Vector 35's repositories, you'll receive ## Building Building the architecture plugin requires `cmake` 3.9 or above. You will also need the -[Binary Ninja API source](https://github.com/Vector35/binaryninja-api). +[Binary Ninja API source](https://github.com/Vector35/binaryninja-api). You also need `rustup` and +Python 3 to build exarmo. Cargo fetches exarmo from crates.io at the version [Cargo.toml](./Cargo.toml) +pins. The build uses the Rust toolchain named by `CARGO_STABLE_VERSION` in +[RustBuild.cmake](../../cmake/RustBuild.cmake). Run `cmake`. This can be done either from a separate build directory or from the source directory. Once that is complete, run `make` in the build directory to compile the plugin. diff --git a/arch/arm64/acle_intrinsics.cpp b/arch/arm64/acle_intrinsics.cpp new file mode 100644 index 000000000..91457ae9b --- /dev/null +++ b/arch/arm64/acle_intrinsics.cpp @@ -0,0 +1,213 @@ +#include "acle_intrinsics.h" + +#include "il_macros.h" +#include "lowlevelilinstruction.h" +#include "operands.h" + +#include + +using namespace BinaryNinja; +using namespace std; + +namespace { +// Represent an ACLE vector as one integer or float as wide as the whole vector, ignoring its +// element type. +Ref AcleType(exarmo_aarch64_intrinsic_type type, uint8_t& vectors) +{ + vectors = 1; + exarmo_aarch64_intrinsic_type_def def; + if (!exarmo_aarch64_intrinsic_type_at(type, &def)) + return nullptr; + + vectors = def.vectors ? def.vectors : 1; + + switch (def.kind) + { + case EXARMO_AARCH64_INTRINSIC_KIND_VOID: + return nullptr; + // A compile-time constant argument, such as a lane index. + case EXARMO_AARCH64_INTRINSIC_KIND_CONST_INT: + return Type::IntegerType(4, true); + default: + break; + } + + // `width` is one vector. The caller expands a structure of vectors into `vectors` values of this + // type. A pointer points to a single element. + size_t width = (size_t)def.element_bits * def.lanes / 8; + if (!width) + return nullptr; + + Ref value; + switch (def.kind) + { + case EXARMO_AARCH64_INTRINSIC_KIND_FLOAT: + case EXARMO_AARCH64_INTRINSIC_KIND_BRAIN_FLOAT: + case EXARMO_AARCH64_INTRINSIC_KIND_MICRO_FLOAT: + value = Type::FloatType(width); + break; + case EXARMO_AARCH64_INTRINSIC_KIND_INT: + value = Type::IntegerType(width, true); + break; + default: + value = Type::IntegerType(width, false); + break; + } + + if (!def.pointer) + return value; + + if (def.readonly) + value = TypeBuilder(value.GetPtr()).SetConst(true).Finalize(); + + return Type::PointerType(8, value); +} + + +bool AcleIntrinsicAt(uint32_t intrinsic, exarmo_aarch64_intrinsic_def& def) +{ + return IsAcleIntrinsic(intrinsic) + && exarmo_aarch64_intrinsic_at(intrinsic - AcleIntrinsicBase, &def); +} +} + + +string AcleIntrinsicName(uint32_t intrinsic) +{ + exarmo_aarch64_intrinsic_def def; + if (!AcleIntrinsicAt(intrinsic, def)) + return ""; + + return string(def.name.data, def.name.length); +} + + +uint32_t AcleIntrinsicNamed(string_view name) +{ + static const unordered_map intrinsics = [] { + unordered_map all; + exarmo_aarch64_intrinsic_def def; + for (uint32_t id = 0; id < EXARMO_AARCH64_INTRINSIC_COUNT; id++) + { + if (exarmo_aarch64_intrinsic_at(id, &def)) + all.emplace(string_view(def.name.data, def.name.length), AcleIntrinsicBase + id); + } + + return all; + }(); + + auto found = intrinsics.find(name); + return found == intrinsics.end() ? ARM64_INTRIN_INVALID : found->second; +} + + +vector AcleIntrinsicInputs(uint32_t intrinsic) +{ + exarmo_aarch64_intrinsic_def def; + if (!AcleIntrinsicAt(intrinsic, def)) + return {}; + + vector result; + for (uint8_t i = 0; i < def.parameter_count; i++) + { + uint8_t vectors = 1; + Ref type = AcleType(def.parameters[i], vectors); + for (uint8_t v = 0; type && v < vectors; v++) + result.push_back(NameAndType(type)); + } + + return result; +} + + +vector>> AcleIntrinsicOutputs(uint32_t intrinsic) +{ + exarmo_aarch64_intrinsic_def def; + if (!AcleIntrinsicAt(intrinsic, def)) + return {}; + + uint8_t vectors = 1; + Ref type = AcleType(def.result, vectors); + if (!type) + return {}; + + vector>> result; + for (uint8_t v = 0; v < vectors; v++) + result.push_back(type); + + return result; +} + + +bool AcleGetLowLevelILForInstruction( + LowLevelILFunction& il, const exarmo_aarch64_instruction& instr, exarmo_aarch64_operand* operands) +{ + // When exarmo lists several intrinsics, the encoding can't tell them apart. Use the first, which + // exarmo orders as the one a reader expects. + exarmo_aarch64_intrinsic realised; + if (exarmo_aarch64_instruction_intrinsics(&instr, &realised, 1) == 0) + return false; + + // Skip a result that is one element of a structure of vectors. An intrinsic call would claim to + // write the whole structure. + if (realised.result.kind == EXARMO_AARCH64_INTRINSIC_OUTPUT_ELEMENT) + return false; + + vector inputs; + for (uint8_t i = 0; i < realised.argument_count; i++) + { + const exarmo_aarch64_intrinsic_source& source = realised.arguments[i]; + exarmo_aarch64_operand& operand = operands[source.operand]; + switch (source.kind) + { + // A register list is one operand but supplies one argument per register. + case EXARMO_AARCH64_INTRINSIC_SOURCE_OPERAND: + if (operand.kind == EXARMO_AARCH64_OPERAND_LIST) + { + for (uint8_t member = 0; member < operand.list.len; member++) + { + Register reg = OperandRegisterAt(operand, member); + inputs.push_back(il.Register(RegisterSize(reg), reg)); + } + break; + } + + inputs.push_back(ILREG_O(operand)); + break; + // The intrinsic takes the operand's lane index as a separate argument. + case EXARMO_AARCH64_INTRINSIC_SOURCE_INDEX: + { + int32_t index = OperandLaneIndex(operand); + inputs.push_back(il.Const(1, index < 0 ? 0 : index)); + break; + } + case EXARMO_AARCH64_INTRINSIC_SOURCE_IMMEDIATE: + inputs.push_back(il.Const(8, OperandImmediate(operand) >> source.shift)); + break; + // FPMR is not modelled, and an UNUSED argument is fixed by the intrinsic. Pass zero for both. + case EXARMO_AARCH64_INTRINSIC_SOURCE_FPMR: + case EXARMO_AARCH64_INTRINSIC_SOURCE_UNUSED: + default: + inputs.push_back(il.Const(1, 0)); + break; + } + } + + // A register-list result writes one output per register. + vector outputs; + if (realised.result.kind != EXARMO_AARCH64_INTRINSIC_OUTPUT_NONE) + { + exarmo_aarch64_operand& result = operands[realised.result.operand]; + size_t members = result.kind == EXARMO_AARCH64_OPERAND_LIST ? result.list.len : 1; + for (size_t member = 0; member < members; member++) + { + Register reg = OperandRegisterAt(result, member); + if (reg != REG_NONE) + outputs.push_back(RegisterOrFlag::Register(reg)); + } + } + + il.AddInstruction(il.Intrinsic(outputs, AcleIntrinsicBase + realised.id, inputs)); + return true; +} + diff --git a/arch/arm64/acle_intrinsics.h b/arch/arm64/acle_intrinsics.h new file mode 100644 index 000000000..7f9422977 --- /dev/null +++ b/arch/arm64/acle_intrinsics.h @@ -0,0 +1,36 @@ +#pragma once + +#include "binaryninjaapi.h" +#include "system_operations.h" + +#include "exarmo/aarch64.h" + +#include +#include +#include + +// Lift instructions to the intrinsics Arm's C Language Extensions (ACLE) define. exarmo supplies +// each intrinsic's name and types, which intrinsic an instruction implements, and which operand +// supplies each argument. + +constexpr uint32_t AcleIntrinsicBase = SysOpIntrinsicEnd; +constexpr uint32_t AcleIntrinsicEnd = AcleIntrinsicBase + EXARMO_AARCH64_INTRINSIC_COUNT; + +inline bool IsAcleIntrinsic(uint32_t intrinsic) +{ + return intrinsic >= AcleIntrinsicBase && intrinsic < AcleIntrinsicEnd; +} + +std::string AcleIntrinsicName(uint32_t intrinsic); +std::vector AcleIntrinsicInputs(uint32_t intrinsic); +std::vector>> AcleIntrinsicOutputs( + uint32_t intrinsic); + +// Look up an ACLE intrinsic by name, for an instruction exarmo maps to none. Returns +// ARM64_INTRIN_INVALID if no intrinsic has the name. +uint32_t AcleIntrinsicNamed(std::string_view name); + +// Lift the instruction as the intrinsic it implements, where exarmo names one. False where it +// names none, leaving the caller to lift the instruction itself. +bool AcleGetLowLevelILForInstruction(BinaryNinja::LowLevelILFunction& il, + const exarmo_aarch64_instruction& instr, exarmo_aarch64_operand* operands); diff --git a/arch/arm64/apple_vendor.cpp b/arch/arm64/apple_vendor.cpp index 93eec078a..8c8895d5b 100644 --- a/arch/arm64/apple_vendor.cpp +++ b/arch/arm64/apple_vendor.cpp @@ -20,9 +20,13 @@ #include "apple_vendor.h" +#include + #include -#include "disassembler/regs.h" +#include "lowlevelilinstruction.h" + +#include "registers.h" using namespace BinaryNinja; using namespace std; @@ -41,7 +45,6 @@ enum AppleVendorOp AV_MUL53LO, AV_MUL53HI, AV_AMX, - AV_APPLE_UNKNOWN_SPTM, }; struct AppleVendorInsn @@ -52,6 +55,684 @@ struct AppleVendorInsn uint32_t rs = 0; // source register field }; +// Apple's system registers, in the S3__c11_* and S3__c15_* encodings that ARM leaves +// IMPLEMENTATION DEFINED. +// +// TODO: No source is recorded for these names, and some look specific to one SoC revision. Check +// each against documentation, starting with the AsahiLinux register notes, and remove any that +// can't be sourced. +const std::pair VENDOR_SYSTEM_REGISTERS[] = { + {0xC580, "ctrr_c_lwr_el1"}, // S3_0_c11_c0_0 + {0xC581, "ctrr_c_upr_el1"}, // S3_0_c11_c0_1 + {0xC582, "ctrr_d_lwr_el1"}, // S3_0_c11_c0_2 + {0xC583, "ctrr_d_upr_el1"}, // S3_0_c11_c0_3 + {0xC584, "ctrr_c_lwr_el12"}, // S3_0_c11_c0_4 + {0xC585, "ctrr_c_upr_el12"}, // S3_0_c11_c0_5 + {0xC586, "ctrr_d_lwr_el12"}, // S3_0_c11_c0_6 + {0xC587, "ctrr_d_upr_el12"}, // S3_0_c11_c0_7 + {0xC588, "ctrr_c_lwr_el2"}, // S3_0_c11_c1_0 + {0xC589, "ctrr_c_upr_el2"}, // S3_0_c11_c1_1 + {0xC58A, "ctrr_d_lwr_el2"}, // S3_0_c11_c1_2 + {0xC58B, "ctrr_d_upr_el2"}, // S3_0_c11_c1_3 + {0xC58C, "ctrr_c_ctl_el1"}, // S3_0_c11_c1_4 + {0xC58D, "ctrr_d_ctl_el1"}, // S3_0_c11_c1_5 + {0xC58E, "ctrr_c_ctl_el12"}, // S3_0_c11_c1_6 + {0xC58F, "ctrr_d_ctl_el12"}, // S3_0_c11_c1_7 + {0xC590, "ctrr_c_ctl_el2"}, // S3_0_c11_c2_0 + {0xC591, "ctrr_d_ctl_el2"}, // S3_0_c11_c2_1 + {0xC592, "ctxr_a_lwr_el1"}, // S3_0_c11_c2_2 + {0xC593, "ctxr_a_upr_el1"}, // S3_0_c11_c2_3 + {0xC594, "ctxr_b_lwr_el1"}, // S3_0_c11_c2_4 + {0xC595, "ctxr_b_upr_el1"}, // S3_0_c11_c2_5 + {0xC596, "ctxr_c_lwr_el1"}, // S3_0_c11_c2_6 + {0xC597, "ctxr_c_upr_el1"}, // S3_0_c11_c2_7 + {0xC598, "ctxr_d_lwr_el1"}, // S3_0_c11_c3_0 + {0xC599, "ctxr_d_upr_el1"}, // S3_0_c11_c3_1 + {0xC59A, "ctxr_a_lwr_el12"}, // S3_0_c11_c3_2 + {0xC59B, "ctxr_a_upr_el12"}, // S3_0_c11_c3_3 + {0xC59C, "ctxr_b_lwr_el12"}, // S3_0_c11_c3_4 + {0xC59D, "ctxr_b_upr_el12"}, // S3_0_c11_c3_5 + {0xC59E, "ctxr_c_lwr_el12"}, // S3_0_c11_c3_6 + {0xC59F, "ctxr_c_upr_el12"}, // S3_0_c11_c3_7 + {0xC5A0, "ctxr_d_lwr_el12"}, // S3_0_c11_c4_0 + {0xC5A1, "ctxr_d_upr_el12"}, // S3_0_c11_c4_1 + {0xC5A2, "ctxr_a_lwr_el2"}, // S3_0_c11_c4_2 + {0xC5A3, "ctxr_a_upr_el2"}, // S3_0_c11_c4_3 + {0xC5A4, "ctxr_b_lwr_el2"}, // S3_0_c11_c4_4 + {0xC5A5, "ctxr_b_upr_el2"}, // S3_0_c11_c4_5 + {0xC5A6, "ctxr_c_lwr_el2"}, // S3_0_c11_c4_6 + {0xC5A7, "ctxr_c_upr_el2"}, // S3_0_c11_c4_7 + {0xC5A8, "ctxr_d_lwr_el2"}, // S3_0_c11_c5_0 + {0xC5A9, "ctxr_d_upr_el2"}, // S3_0_c11_c5_1 + {0xC5AA, "ctxr_a_ctl_el1"}, // S3_0_c11_c5_2 + {0xC5AB, "ctxr_b_ctl_el1"}, // S3_0_c11_c5_3 + {0xC5AC, "ctxr_c_ctl_el1"}, // S3_0_c11_c5_4 + {0xC5AD, "ctxr_d_ctl_el1"}, // S3_0_c11_c5_5 + {0xC5AE, "ctxr_a_ctl_el12"}, // S3_0_c11_c5_6 + {0xC5AF, "ctxr_b_ctl_el12"}, // S3_0_c11_c5_7 + {0xC5B0, "ctxr_c_ctl_el12"}, // S3_0_c11_c6_0 + {0xC5B1, "ctxr_d_ctl_el12"}, // S3_0_c11_c6_1 + {0xC5B2, "ctxr_a_ctl_el2"}, // S3_0_c11_c6_2 + {0xC5B3, "ctxr_b_ctl_el2"}, // S3_0_c11_c6_3 + {0xC5B4, "ctxr_c_ctl_el2"}, // S3_0_c11_c6_4 + {0xC5B5, "ctxr_d_ctl_el2"}, // S3_0_c11_c6_5 + {0xC5B6, "acc_ctrr_c_lwr_el2"}, // S3_0_c11_c6_6 + {0xC5B7, "acc_ctrr_c_upr_el2"}, // S3_0_c11_c6_7 + {0xC5B8, "acc_ctrr_d_lwr_el2"}, // S3_0_c11_c7_0 + {0xC5B9, "acc_ctrr_d_upr_el2"}, // S3_0_c11_c7_1 + {0xC5BA, "acc_ctxr_a_lwr_el2"}, // S3_0_c11_c7_2 + {0xC5BB, "acc_ctxr_a_upr_el2"}, // S3_0_c11_c7_3 + {0xC5BC, "acc_ctxr_b_lwr_el2"}, // S3_0_c11_c7_4 + {0xC5BD, "acc_ctxr_b_upr_el2"}, // S3_0_c11_c7_5 + {0xC5BE, "acc_ctxr_c_lwr_el2"}, // S3_0_c11_c7_6 + {0xC5BF, "acc_ctxr_c_upr_el2"}, // S3_0_c11_c7_7 + {0xC5C0, "acc_ctxr_d_lwr_el2"}, // S3_0_c11_c8_0 + {0xC5C1, "acc_ctxr_d_upr_el2"}, // S3_0_c11_c8_1 + {0xC5C2, "acc_ctrr_c_ctl_el2"}, // S3_0_c11_c8_2 + {0xC5C3, "acc_ctrr_d_ctl_el2"}, // S3_0_c11_c8_3 + {0xC5C4, "acc_ctxr_a_ctl_el2"}, // S3_0_c11_c8_4 + {0xC5C5, "acc_ctxr_b_ctl_el2"}, // S3_0_c11_c8_5 + {0xC5C6, "acc_ctxr_c_ctl_el2"}, // S3_0_c11_c8_6 + {0xC5C7, "acc_ctxr_d_ctl_el2"}, // S3_0_c11_c8_7 + {0xC780, "hid0"}, // S3_0_c15_c0_0 + {0xC782, "hid25"}, // S3_0_c15_c0_2 + {0xC783, "hid26"}, // S3_0_c15_c0_3 + {0xC784, "hid27"}, // S3_0_c15_c0_4 + {0xC785, "hid28"}, // S3_0_c15_c0_5 + {0xC786, "hid29"}, // S3_0_c15_c0_6 + {0xC787, "hid34"}, // S3_0_c15_c0_7 + {0xC788, "hid1"}, // S3_0_c15_c1_0 + {0xC78B, "hid21"}, // S3_0_c15_c1_3 + {0xC78C, "biuvcscupcmdcrd"}, // S3_0_c15_c1_4 + {0xC78D, "biuvcscupdatcrd"}, // S3_0_c15_c1_5 + {0xC790, "hid2"}, // S3_0_c15_c2_0 + {0xC793, "hid30"}, // S3_0_c15_c2_3 + {0xC794, "hid31"}, // S3_0_c15_c2_4 + {0xC795, "hid32"}, // S3_0_c15_c2_5 + {0xC797, "hid33"}, // S3_0_c15_c2_7 + {0xC798, "hid3"}, // S3_0_c15_c3_0 + {0xC79A, "biuvcscupcmdcrdc2"}, // S3_0_c15_c3_2 + {0xC79B, "biuvcscupdatcrdc2"}, // S3_0_c15_c3_3 + {0xC7A0, "hid4"}, // S3_0_c15_c4_0 + {0xC7A8, "hid5"}, // S3_0_c15_c5_0 + {0xC7B0, "hid6"}, // S3_0_c15_c6_0 + {0xC7B8, "hid7"}, // S3_0_c15_c7_0 + {0xC7C0, "hid8"}, // S3_0_c15_c8_0 + {0xC7C8, "hid9"}, // S3_0_c15_c9_0 + {0xC7D0, "hid10"}, // S3_0_c15_c10_0 + {0xC7D2, "block_cmaint_cfg"}, // S3_0_c15_c10_2 + {0xC7D8, "hid11"}, // S3_0_c15_c11_0 + {0xC7DA, "hid18"}, // S3_0_c15_c11_2 + {0xC7DC, "hid36"}, // S3_0_c15_c11_4 + {0xC7DD, "hid37"}, // S3_0_c15_c11_5 + {0xC7E0, "hid12"}, // S3_0_c15_c12_0 + {0xC7E1, "hid15"}, // S3_0_c15_c12_1 + {0xC7E2, "hid19"}, // S3_0_c15_c12_2 + {0xC7E8, "biu_tlimit"}, // S3_0_c15_c13_0 + {0xC7F0, "hid13"}, // S3_0_c15_c14_0 + {0xC7F2, "hid_rctx_g0ctl"}, // S3_0_c15_c14_2 + {0xC7F3, "hid_rctx_g1ctl"}, // S3_0_c15_c14_3 + {0xC7F8, "hid14"}, // S3_0_c15_c15_0 + {0xC7FA, "hid16"}, // S3_0_c15_c15_2 + {0xC7FB, "llc_wrr2"}, // S3_0_c15_c15_3 + {0xC7FC, "biu_afi_cfg"}, // S3_0_c15_c15_4 + {0xC7FD, "hid17"}, // S3_0_c15_c15_5 + {0xC7FE, "hid24"}, // S3_0_c15_c15_6 + {0xC7FF, "hid35"}, // S3_0_c15_c15_7 + {0xCF80, "pmcr0_el1"}, // S3_1_c15_c0_0 + {0xCF81, "appl_contextptr"}, // S3_1_c15_c0_1 + {0xCF82, "ld_latprof_ctl_el1"}, // S3_1_c15_c0_2 + {0xCF83, "aon_cpu_mstall_ctl01_el1"}, // S3_1_c15_c0_3 + {0xCF84, "pm_memflt_ctl23_el1"}, // S3_1_c15_c0_4 + {0xCF85, "agtcntv_ctl_el0"}, // S3_1_c15_c0_5 + {0xCF86, "agtcntvctss_noredir_el0"}, // S3_1_c15_c0_6 + {0xCF88, "pmcr1_el1"}, // S3_1_c15_c1_0 + {0xCF8A, "ld_latprof_ctr_el1"}, // S3_1_c15_c1_2 + {0xCF8B, "aon_cpu_mstall_ctl23_el1"}, // S3_1_c15_c1_3 + {0xCF8C, "pm_memflt_ctl45_el1"}, // S3_1_c15_c1_4 + {0xCF8D, "agtcntrdir_el1"}, // S3_1_c15_c1_5 + {0xCF8E, "agtcntkctl_noredir_el1"}, // S3_1_c15_c1_6 + {0xCF90, "pmcr2_el1"}, // S3_1_c15_c2_0 + {0xCF92, "ld_latprof_sts_el1"}, // S3_1_c15_c2_2 + {0xCF93, "aon_cpu_mstall_ctl45_el1"}, // S3_1_c15_c2_3 + {0xCF94, "agtcnthp_cval_el2"}, // S3_1_c15_c2_4 + {0xCF95, "cntvct_noredir_el0"}, // S3_1_c15_c2_5 + {0xCF96, "agtcntp_cval_noredir_el0"}, // S3_1_c15_c2_6 + {0xCF98, "pmcr3_el1"}, // S3_1_c15_c3_0 + {0xCF9A, "ld_latprof_inf_el1"}, // S3_1_c15_c3_2 + {0xCF9B, "aon_cpu_mstall_ctl67_el1"}, // S3_1_c15_c3_3 + {0xCF9C, "agtcnthp_tval_el2"}, // S3_1_c15_c3_4 + {0xCF9D, "cntpctss_noredir_el0"}, // S3_1_c15_c3_5 + {0xCF9E, "agtcntp_tval_noredir_el0"}, // S3_1_c15_c3_6 + {0xCFA0, "pmcr4_el1"}, // S3_1_c15_c4_0 + {0xCFA2, "ld_latprof_ctl_el2"}, // S3_1_c15_c4_2 + {0xCFA3, "aon_cpu_memflt_ctl01_el1"}, // S3_1_c15_c4_3 + {0xCFA4, "agtcnthp_ctl_el2"}, // S3_1_c15_c4_4 + {0xCFA5, "cntvctss_noredir_el0"}, // S3_1_c15_c4_5 + {0xCFA6, "agtcntp_ctl_noredir_el0"}, // S3_1_c15_c4_6 + {0xCFA8, "pmesr0_el1"}, // S3_1_c15_c5_0 + {0xCFAA, "ld_latprof_cmd_el1"}, // S3_1_c15_c5_2 + {0xCFAB, "aon_cpu_memflt_ctl23_el1"}, // S3_1_c15_c5_3 + {0xCFAC, "agtcnthv_cval_el2"}, // S3_1_c15_c5_4 + {0xCFAE, "agtcntv_cval_noredir_el0"}, // S3_1_c15_c5_6 + {0xCFB0, "pmesr1_el1"}, // S3_1_c15_c6_0 + {0xCFB2, "pmcr1_el2"}, // S3_1_c15_c6_2 + {0xCFB3, "aon_cpu_memflt_ctl45_el1"}, // S3_1_c15_c6_3 + {0xCFB4, "agtcnthv_tval_el2"}, // S3_1_c15_c6_4 + {0xCFB5, "cntkctl_noredir_el1"}, // S3_1_c15_c6_5 + {0xCFB6, "agtcntv_tval_noredir_el0"}, // S3_1_c15_c6_6 + {0xCFB8, "opmat0_el1"}, // S3_1_c15_c7_0 + {0xCFBA, "pmcr1_el12"}, // S3_1_c15_c7_2 + {0xCFBB, "aon_cpu_memflt_ctl67_el1"}, // S3_1_c15_c7_3 + {0xCFBC, "agtcnthv_ctl_el2"}, // S3_1_c15_c7_4 + {0xCFBD, "cntp_cval_noredir_el0"}, // S3_1_c15_c7_5 + {0xCFBE, "agtcntv_ctl_noredir_el0"}, // S3_1_c15_c7_6 + {0xCFC0, "opmat1_el1"}, // S3_1_c15_c8_0 + {0xCFC2, "pmcr1_gl12"}, // S3_1_c15_c8_2 + {0xCFC3, "aon_cpu_mstall_ctr0_el1"}, // S3_1_c15_c8_3 + {0xCFC4, "agtcntfrq_el0"}, // S3_1_c15_c8_4 + {0xCFC5, "cntp_tval_noredir_el0"}, // S3_1_c15_c8_5 + {0xCFC6, "cntpct_noredir_el0"}, // S3_1_c15_c8_6 + {0xCFC8, "opmsk0_el1"}, // S3_1_c15_c9_0 + {0xCFCA, "ld_latprof_ctl_el12"}, // S3_1_c15_c9_2 + {0xCFCB, "aon_cpu_mstall_ctr1_el1"}, // S3_1_c15_c9_3 + {0xCFCC, "agtcntvoff_el2"}, // S3_1_c15_c9_4 + {0xCFCD, "cntp_ctl_noredir_el0"}, // S3_1_c15_c9_5 + {0xCFCE, "cntv_ctl_noredir_el0"}, // S3_1_c15_c9_6 + {0xCFD0, "opmsk1_el1"}, // S3_1_c15_c10_0 + {0xCFD2, "ld_latprof_inf_el2"}, // S3_1_c15_c10_2 + {0xCFD3, "aon_cpu_mstall_ctr2_el1"}, // S3_1_c15_c10_3 + {0xCFD4, "agtcntp_cval_el0"}, // S3_1_c15_c10_4 + {0xCFD5, "cntv_cval_noredir_el0"}, // S3_1_c15_c10_5 + {0xCFD6, "agtcntpct_noredir_el0"}, // S3_1_c15_c10_6 + {0xCFDB, "aon_cpu_mstall_ctr3_el1"}, // S3_1_c15_c11_3 + {0xCFDC, "agtcntp_tval_el0"}, // S3_1_c15_c11_4 + {0xCFDD, "cntv_tval_noredir_el0"}, // S3_1_c15_c11_5 + {0xCFDE, "vmsa_hv_lock_el2"}, // S3_1_c15_c11_6 + {0xCFE0, "pmswctrl_el1"}, // S3_1_c15_c12_0 + {0xCFE1, "pmcr5_el0"}, // S3_1_c15_c12_1 + {0xCFE3, "aon_cpu_mstall_ctr4_el1"}, // S3_1_c15_c12_3 + {0xCFE4, "pmcompare0_el1"}, // S3_1_c15_c12_4 + {0xCFE5, "pmcompare1_el1"}, // S3_1_c15_c12_5 + {0xCFE6, "vmsa_nv_lock_el2"}, // S3_1_c15_c12_6 + {0xCFE8, "pmsr_el1"}, // S3_1_c15_c13_0 + {0xCFEB, "aon_cpu_mstall_ctr5_el1"}, // S3_1_c15_c13_3 + {0xCFEC, "agtcntp_ctl_el0"}, // S3_1_c15_c13_4 + {0xCFED, "pmcompare5_el1"}, // S3_1_c15_c13_5 + {0xCFEE, "pmcompare6_el1"}, // S3_1_c15_c13_6 + {0xCFEF, "pmcompare7_el1"}, // S3_1_c15_c13_7 + {0xCFF0, "pmcr_bvrng4_el1"}, // S3_1_c15_c14_0 + {0xCFF1, "pm_pmi_pc"}, // S3_1_c15_c14_1 + {0xCFF3, "aon_cpu_mstall_ctr6_el1"}, // S3_1_c15_c14_3 + {0xCFF4, "agtcntv_cval_el0"}, // S3_1_c15_c14_4 + {0xCFF5, "agtcntvct_noredir_el0"}, // S3_1_c15_c14_5 + {0xCFF8, "pmcr_bvrng5_el1"}, // S3_1_c15_c15_0 + {0xCFFB, "aon_cpu_mstall_ctr7_el1"}, // S3_1_c15_c15_3 + {0xCFFC, "agtcntv_tval_el0"}, // S3_1_c15_c15_4 + {0xCFFD, "agtcntpctss_noredir_el0"}, // S3_1_c15_c15_5 + {0xD780, "pmc0"}, // S3_2_c15_c0_0 + {0xD781, "upmcfilter0"}, // S3_2_c15_c0_1 + {0xD782, "upmcfilter1"}, // S3_2_c15_c0_2 + {0xD783, "upmcfilter2"}, // S3_2_c15_c0_3 + {0xD784, "upmcfilter3"}, // S3_2_c15_c0_4 + {0xD785, "upmcfilter4"}, // S3_2_c15_c0_5 + {0xD786, "upmcfilter5"}, // S3_2_c15_c0_6 + {0xD787, "upmcfilter6"}, // S3_2_c15_c0_7 + {0xD788, "pmc1"}, // S3_2_c15_c1_0 + {0xD789, "upmcfilter7"}, // S3_2_c15_c1_1 + {0xD790, "pmc2"}, // S3_2_c15_c2_0 + {0xD798, "pmc3"}, // S3_2_c15_c3_0 + {0xD7A0, "pmc4"}, // S3_2_c15_c4_0 + {0xD7A8, "pmc5"}, // S3_2_c15_c5_0 + {0xD7B0, "pmc6"}, // S3_2_c15_c6_0 + {0xD7B8, "pmc7"}, // S3_2_c15_c7_0 + {0xD7C8, "pmc8"}, // S3_2_c15_c9_0 + {0xD7D0, "pmc9"}, // S3_2_c15_c10_0 + {0xD7E0, "pmtrhld6_el1"}, // S3_2_c15_c12_0 + {0xD7E8, "pmtrhld4_el1"}, // S3_2_c15_c13_0 + {0xD7F0, "pmtrhld2_el1"}, // S3_2_c15_c14_0 + {0xD7F8, "pmmmap_el1"}, // S3_2_c15_c15_0 + {0xDF80, "lsu_err_sts"}, // S3_3_c15_c0_0 + {0xDF84, "aflatctl1_el1"}, // S3_3_c15_c0_4 + {0xDF85, "aflatvalbin0_el1"}, // S3_3_c15_c0_5 + {0xDF86, "aflatinflo_el1"}, // S3_3_c15_c0_6 + {0xDF88, "lsu_err_ctl"}, // S3_3_c15_c1_0 + {0xDF8C, "aflatctl2_el1"}, // S3_3_c15_c1_4 + {0xDF8D, "aflatvalbin1_el1"}, // S3_3_c15_c1_5 + {0xDF8E, "aflatinfhi_el1"}, // S3_3_c15_c1_6 + {0xDF94, "aflatctl3_el1"}, // S3_3_c15_c2_4 + {0xDF95, "aflatvalbin2_el1"}, // S3_3_c15_c2_5 + {0xDF9C, "aflatctl4_el1"}, // S3_3_c15_c3_4 + {0xDF9D, "aflatvalbin3_el1"}, // S3_3_c15_c3_5 + {0xDFA0, "llc_fill_ctl"}, // S3_3_c15_c4_0 + {0xDFA4, "aflatctl5_lo_el1"}, // S3_3_c15_c4_4 + {0xDFA5, "aflatvalbin4_el1"}, // S3_3_c15_c4_5 + {0xDFA6, "aflatctl5_hi_el1"}, // S3_3_c15_c4_6 + {0xDFA8, "llc_fill_dat"}, // S3_3_c15_c5_0 + {0xDFAD, "aflatvalbin5_el1"}, // S3_3_c15_c5_5 + {0xDFB5, "aflatvalbin6_el1"}, // S3_3_c15_c6_5 + {0xDFB8, "llc_ram_config"}, // S3_3_c15_c7_0 + {0xDFBD, "aflatvalbin7_el1"}, // S3_3_c15_c7_5 + {0xDFC0, "llc_err_sts"}, // S3_3_c15_c8_0 + {0xDFC1, "cmaint_bcast_list_0"}, // S3_3_c15_c8_1 + {0xDFC2, "cmaint_bcast_list_1"}, // S3_3_c15_c8_2 + {0xDFC3, "cmaint_bcast_ctl"}, // S3_3_c15_c8_3 + {0xDFC8, "llc_err_adr"}, // S3_3_c15_c9_0 + {0xDFC9, "llc_err_ctl"}, // S3_3_c15_c9_1 + {0xDFCA, "llc_err_inj"}, // S3_3_c15_c9_2 + {0xDFD0, "llc_err_inf"}, // S3_3_c15_c10_0 + {0xDFD1, "usertagsel_el1"}, // S3_3_c15_c10_1 + {0xDFD2, "uusertag_el0"}, // S3_3_c15_c10_2 + {0xDFD3, "kusertag_el1"}, // S3_3_c15_c10_3 + {0xDFD4, "husertag_el2"}, // S3_3_c15_c10_4 + {0xDFD8, "llc_trace_ctl0"}, // S3_3_c15_c11_0 + {0xDFE0, "llc_trace_ctl1"}, // S3_3_c15_c12_0 + {0xDFE8, "llc_up_req_vc"}, // S3_3_c15_c13_0 + {0xDFE9, "llc_up_req_vc_thresh"}, // S3_3_c15_c13_1 + {0xDFEA, "llc_up_req_vc_2"}, // S3_3_c15_c13_2 + {0xDFEB, "llc_up_req_vc_thresh_2"}, // S3_3_c15_c13_3 + {0xDFEC, "llc_dram_hash0"}, // S3_3_c15_c13_4 + {0xDFED, "llc_dram_hash1"}, // S3_3_c15_c13_5 + {0xDFEE, "llc_dram_hash2"}, // S3_3_c15_c13_6 + {0xDFEF, "llc_dram_hash3"}, // S3_3_c15_c13_7 + {0xDFF0, "llc_trace_ctl2"}, // S3_3_c15_c14_0 + {0xDFF1, "llc_dram_hash4"}, // S3_3_c15_c14_1 + {0xDFF2, "llc_up_req_vc_3"}, // S3_3_c15_c14_2 + {0xDFF3, "llc_up_req_vc_thresh_3"}, // S3_3_c15_c14_3 + {0xDFF4, "llc_up_req_vc_4"}, // S3_3_c15_c14_4 + {0xDFF5, "llc_up_req_vc_thresh_4"}, // S3_3_c15_c14_5 + {0xDFF8, "llc_hash0"}, // S3_3_c15_c15_0 + {0xDFF9, "llc_hash1"}, // S3_3_c15_c15_1 + {0xDFFA, "llc_hash2"}, // S3_3_c15_c15_2 + {0xDFFB, "llc_hash3"}, // S3_3_c15_c15_3 + {0xDFFC, "llc_wrr"}, // S3_3_c15_c15_4 + {0xDFFD, "llc_dram_hash5"}, // S3_3_c15_c15_5 + {0xDFFE, "llc_dram_hash6"}, // S3_3_c15_c15_6 + {0xE780, "fed_err_sts"}, // S3_4_c15_c0_0 + {0xE781, "fed_err_ctl"}, // S3_4_c15_c0_1 + {0xE784, "apctl_el1"}, // S3_4_c15_c0_4 + {0xE788, "kernkeylo_el1"}, // S3_4_c15_c1_0 + {0xE789, "kernkeyhi_el1"}, // S3_4_c15_c1_1 + {0xE78A, "vmsa_lock_el1"}, // S3_4_c15_c1_2 + {0xE78B, "amx_state_t_el1"}, // S3_4_c15_c1_3 + {0xE78C, "amx_config_el1"}, // S3_4_c15_c1_4 + {0xE78D, "vmsa_lock_el2"}, // S3_4_c15_c1_5 + {0xE78E, "ctrr_b_upr_el1"}, // S3_4_c15_c1_6 + {0xE78F, "ctrr_b_lwr_el1"}, // S3_4_c15_c1_7 + {0xE790, "sp_setup_gl1"}, // S3_4_c15_c2_0 + {0xE791, "sp_setup_gl2"}, // S3_4_c15_c2_1 + {0xE792, "ctrr_b_ctl_el1"}, // S3_4_c15_c2_2 + {0xE793, "ctrr_a_lwr_el1"}, // S3_4_c15_c2_3 + {0xE794, "ctrr_a_upr_el1"}, // S3_4_c15_c2_4 + {0xE795, "ctrr_a_ctl_el1"}, // S3_4_c15_c2_5 + {0xE796, "vmsa_lock_el12"}, // S3_4_c15_c2_6 + {0xE797, "agtcntv_ctl_el02"}, // S3_4_c15_c2_7 + {0xE798, "amx_state_el1"}, // S3_4_c15_c3_0 + {0xE79E, "amx_status_el1"}, // S3_4_c15_c3_6 + {0xE7A1, "agtcntp_cval_el02"}, // S3_4_c15_c4_1 + {0xE7A2, "redir_acntp_tval_el02"}, // S3_4_c15_c4_2 + {0xE7A3, "agtcntp_ctl_el02"}, // S3_4_c15_c4_3 + {0xE7A4, "agtcntv_cval_el02"}, // S3_4_c15_c4_4 + {0xE7A5, "agtcntv_tval_el02"}, // S3_4_c15_c4_5 + {0xE7A6, "amx_config_el12"}, // S3_4_c15_c4_6 + {0xE7A7, "amx_config_el2"}, // S3_4_c15_c4_7 + {0xE7A9, "sprr_huperm_el0"}, // S3_4_c15_c5_1 + {0xE7AA, "sprr_vuperm_el0"}, // S3_4_c15_c5_2 + {0xE7B2, "ctrr_a_ctl_el2"}, // S3_4_c15_c6_2 + {0xE7B3, "ctrr_b_ctl_el2"}, // S3_4_c15_c6_3 + {0xE7B4, "ctrr_a_lwr_el2"}, // S3_4_c15_c6_4 + {0xE7B5, "ctrr_a_upr_el2"}, // S3_4_c15_c6_5 + {0xE7B6, "ctrr_b_lwr_el2"}, // S3_4_c15_c6_6 + {0xE7B7, "ctrr_b_upr_el2"}, // S3_4_c15_c6_7 + {0xE7B8, "sprr_humprr_el2"}, // S3_4_c15_c7_0 + {0xE7B9, "sprr_huperm_sh01_el2"}, // S3_4_c15_c7_1 + {0xE7BA, "sprr_huperm_sh02_el2"}, // S3_4_c15_c7_2 + {0xE7BB, "sprr_huperm_sh03_el2"}, // S3_4_c15_c7_3 + {0xE7BC, "sprr_huperm_sh04_el2"}, // S3_4_c15_c7_4 + {0xE7BD, "sprr_huperm_sh05_el2"}, // S3_4_c15_c7_5 + {0xE7BE, "sprr_huperm_sh06_el2"}, // S3_4_c15_c7_6 + {0xE7BF, "sprr_huperm_sh07_el2"}, // S3_4_c15_c7_7 + {0xE7C0, "sprr_vumprr_el1"}, // S3_4_c15_c8_0 + {0xE7C1, "sprr_vuperm_sh01_el1"}, // S3_4_c15_c8_1 + {0xE7C2, "sprr_vuperm_sh02_el1"}, // S3_4_c15_c8_2 + {0xE7C3, "sprr_vuperm_sh03_el1"}, // S3_4_c15_c8_3 + {0xE7C4, "sprr_vuperm_sh04_el1"}, // S3_4_c15_c8_4 + {0xE7C5, "sprr_vuperm_sh05_el1"}, // S3_4_c15_c8_5 + {0xE7C6, "sprr_vuperm_sh06_el1"}, // S3_4_c15_c8_6 + {0xE7C7, "sprr_vuperm_sh07_el1"}, // S3_4_c15_c8_7 + {0xE7C8, "ctrr_a_lwr_el12"}, // S3_4_c15_c9_0 + {0xE7C9, "ctrr_a_upr_el12"}, // S3_4_c15_c9_1 + {0xE7CA, "ctrr_b_lwr_el12"}, // S3_4_c15_c9_2 + {0xE7CB, "ctrr_b_upr_el12"}, // S3_4_c15_c9_3 + {0xE7CC, "ctrr_a_ctl_el12"}, // S3_4_c15_c9_4 + {0xE7CD, "ctrr_b_ctl_el12"}, // S3_4_c15_c9_5 + {0xE7CE, "agtcntkctl_el1"}, // S3_4_c15_c9_6 + {0xE7CF, "agtcntkctl_el12"}, // S3_4_c15_c9_7 + {0xE7D0, "predakeylo_el1"}, // S3_4_c15_c10_0 + {0xE7D1, "predakeyhi_el1"}, // S3_4_c15_c10_1 + {0xE7D2, "predbkeylo_el1"}, // S3_4_c15_c10_2 + {0xE7D3, "predbkeyhi_el1"}, // S3_4_c15_c10_3 + {0xE7D4, "siq_cfg_el1"}, // S3_4_c15_c10_4 + {0xE7D5, "agtcntpctss_el0"}, // S3_4_c15_c10_5 + {0xE7D6, "agtcntvctss_el0"}, // S3_4_c15_c10_6 + {0xE7D7, "avncr_el2"}, // S3_4_c15_c10_7 + {0xE7D8, "acc_ctrr_a_lwr_el2"}, // S3_4_c15_c11_0 + {0xE7D9, "acc_ctrr_a_upr_el2"}, // S3_4_c15_c11_1 + {0xE7DA, "acc_ctrr_b_lwr_el2"}, // S3_4_c15_c11_2 + {0xE7DB, "acc_ctrr_b_upr_el2"}, // S3_4_c15_c11_3 + {0xE7DC, "acc_ctrr_a_ctl_el2"}, // S3_4_c15_c11_4 + {0xE7DD, "acc_ctrr_b_ctl_el2"}, // S3_4_c15_c11_5 + {0xE7DE, "agtcntpct_el0"}, // S3_4_c15_c11_6 + {0xE7DF, "agtcntvct_el0"}, // S3_4_c15_c11_7 + {0xE7E0, "acfg_el1"}, // S3_4_c15_c12_0 + {0xE7E1, "ahcr_el2"}, // S3_4_c15_c12_1 + {0xE7E2, "apl_intstatus_el1"}, // S3_4_c15_c12_2 + {0xE7E3, "apl_intstatus_el2"}, // S3_4_c15_c12_3 + {0xE7E6, "agtcnthctl_el2"}, // S3_4_c15_c12_6 + {0xE7E8, "japiakeylo_el2"}, // S3_4_c15_c13_0 + {0xE7E9, "japiakeyhi_el2"}, // S3_4_c15_c13_1 + {0xE7EA, "japibkeylo_el2"}, // S3_4_c15_c13_2 + {0xE7EB, "japibkeyhi_el2"}, // S3_4_c15_c13_3 + {0xE7EC, "japiakeylo_el1"}, // S3_4_c15_c13_4 + {0xE7ED, "japiakeyhi_el1"}, // S3_4_c15_c13_5 + {0xE7EE, "japibkeylo_el1"}, // S3_4_c15_c13_6 + {0xE7EF, "japibkeyhi_el1"}, // S3_4_c15_c13_7 + {0xE7F0, "japiakeylo_el12"}, // S3_4_c15_c14_0 + {0xE7F1, "japiakeyhi_el12"}, // S3_4_c15_c14_1 + {0xE7F2, "japibkeylo_el12"}, // S3_4_c15_c14_2 + {0xE7F3, "japibkeyhi_el12"}, // S3_4_c15_c14_3 + {0xE7F5, "agtcntrdir_el2"}, // S3_4_c15_c14_5 + {0xE7F6, "agtcntrdir_el12"}, // S3_4_c15_c14_6 + {0xE7F8, "jrange_el2"}, // S3_4_c15_c15_0 + {0xE7F9, "jrange_el1"}, // S3_4_c15_c15_1 + {0xE7FA, "jrange_el12"}, // S3_4_c15_c15_2 + {0xE7FB, "jctl_el2"}, // S3_4_c15_c15_3 + {0xE7FC, "jctl_el1"}, // S3_4_c15_c15_4 + {0xE7FD, "jctl_el12"}, // S3_4_c15_c15_5 + {0xE7FE, "jctl_el0"}, // S3_4_c15_c15_6 + {0xE7FF, "amdscr_el1"}, // S3_4_c15_c15_7 + {0xEF80, "ipi_rr_local_el1"}, // S3_5_c15_c0_0 + {0xEF81, "ipi_rr_global_el1"}, // S3_5_c15_c0_1 + {0xEF82, "af_err_cfg0"}, // S3_5_c15_c0_2 + {0xEF83, "ap_err_cfg0"}, // S3_5_c15_c0_3 + {0xEF84, "af_err_src_ids"}, // S3_5_c15_c0_4 + {0xEF85, "dpc_err_sts"}, // S3_5_c15_c0_5 + {0xEF86, "dpc_err_ctl"}, // S3_5_c15_c0_6 + {0xEF87, "prod_trc_core_cfg_el1"}, // S3_5_c15_c0_7 + {0xEF88, "trace_core_cfg"}, // S3_5_c15_c1_0 + {0xEF89, "ipi_sr"}, // S3_5_c15_c1_1 + {0xEF8A, "apl_lrtmr_el2"}, // S3_5_c15_c1_2 + {0xEF8B, "apl_intenable_el2"}, // S3_5_c15_c1_3 + {0xEF8C, "ktrace_message"}, // S3_5_c15_c1_4 + {0xEF8D, "trace_core_cfg_ext"}, // S3_5_c15_c1_5 + {0xEF8E, "prod_trc_core_cfg_el2"}, // S3_5_c15_c1_6 + {0xEF8F, "hid_prod_trc_core_cfg_el1"}, // S3_5_c15_c1_7 + {0xEF90, "dbg_wrap_glb"}, // S3_5_c15_c2_0 + {0xEF91, "trace_stream_base"}, // S3_5_c15_c2_1 + {0xEF92, "trace_stream_fill"}, // S3_5_c15_c2_2 + {0xEF93, "trace_stream_base1"}, // S3_5_c15_c2_3 + {0xEF94, "trace_stream_fill1"}, // S3_5_c15_c2_4 + {0xEF95, "trace_stream_irq"}, // S3_5_c15_c2_5 + {0xEF96, "watchdogdiag0"}, // S3_5_c15_c2_6 + {0xEF97, "watchdogdiag1"}, // S3_5_c15_c2_7 + {0xEF98, "trace_aux_ctl"}, // S3_5_c15_c3_0 + {0xEF99, "ipi_cr"}, // S3_5_c15_c3_1 + {0xEF9A, "utrig_event"}, // S3_5_c15_c3_2 + {0xEF9B, "hid_prod_trc_mask_el1"}, // S3_5_c15_c3_3 + {0xEF9C, "trace_ctl"}, // S3_5_c15_c3_4 + {0xEF9D, "trace_dat"}, // S3_5_c15_c3_5 + {0xEF9E, "prod_trc_strm_base0_gl2"}, // S3_5_c15_c3_6 + {0xEF9F, "prod_trc_strm_base1_gl2"}, // S3_5_c15_c3_7 + {0xEFA0, "cpu_cfg"}, // S3_5_c15_c4_0 + {0xEFA1, "pblk_sts"}, // S3_5_c15_c4_1 + {0xEFA3, "prod_trc_ctl_el1"}, // S3_5_c15_c4_3 + {0xEFA4, "prod_trc_strm_base0_gl1"}, // S3_5_c15_c4_4 + {0xEFA5, "prod_trc_strm_base1_gl1"}, // S3_5_c15_c4_5 + {0xEFA6, "prod_trc_strm_fiq_el1"}, // S3_5_c15_c4_6 + {0xEFA8, "cpu_ovrd"}, // S3_5_c15_c5_0 + {0xEFAA, "pblk_exe_st"}, // S3_5_c15_c5_2 + {0xEFAD, "prod_trc_core_gl_ctl_gl1"}, // S3_5_c15_c5_5 + {0xEFAE, "prod_trc_core_gl_ctl_gl2"}, // S3_5_c15_c5_6 + {0xEFB0, "acc_ovrd"}, // S3_5_c15_c6_0 + {0xEFB1, "acc_ovrd1"}, // S3_5_c15_c6_1 + {0xEFB2, "cpm_pwrdn_ctl"}, // S3_5_c15_c6_2 + {0xEFB4, "prod_trc_buf_restore0_gl1"}, // S3_5_c15_c6_4 + {0xEFB5, "prod_trc_buf_restore1_gl1"}, // S3_5_c15_c6_5 + {0xEFB6, "prod_trc_en_gl1"}, // S3_5_c15_c6_6 + {0xEFB8, "pre_llcflush_tmr"}, // S3_5_c15_c7_0 + {0xEFBC, "biuintfctl_cfg"}, // S3_5_c15_c7_4 + {0xEFBD, "biuintfwrr_cfg"}, // S3_5_c15_c7_5 + {0xEFC0, "pre_td_tmr"}, // S3_5_c15_c8_0 + {0xEFC1, "acc_slp_wake_up_tmr"}, // S3_5_c15_c8_1 + {0xEFC8, "pblk_psw_dly"}, // S3_5_c15_c9_0 + {0xEFD0, "cpu_sts"}, // S3_5_c15_c10_0 + {0xEFD1, "hist_trig"}, // S3_5_c15_c10_1 + {0xEFD4, "prod_trc_buf_restore0_gl2"}, // S3_5_c15_c10_4 + {0xEFD5, "prod_trc_buf_restore1_gl2"}, // S3_5_c15_c10_5 + {0xEFD6, "prod_trc_strm_fill0_el1"}, // S3_5_c15_c10_6 + {0xEFD7, "prod_trc_strm_fill1_el1"}, // S3_5_c15_c10_7 + {0xEFD8, "array_index"}, // S3_5_c15_c11_0 + {0xEFD9, "prod_trc_ctl_el2"}, // S3_5_c15_c11_1 + {0xEFDA, "prod_trc_en_gl2"}, // S3_5_c15_c11_2 + {0xEFDB, "prod_trc_strm_fiq_el2"}, // S3_5_c15_c11_3 + {0xEFDC, "prod_trc_cpmu_dump_trig_el1"}, // S3_5_c15_c11_4 + {0xEFDD, "prod_loss_count_el1"}, // S3_5_c15_c11_5 + {0xEFDE, "sw_trace_data_el0"}, // S3_5_c15_c11_6 + {0xEFE0, "il1_data0"}, // S3_5_c15_c12_0 + {0xEFE1, "il1_data1"}, // S3_5_c15_c12_1 + {0xEFE2, "dl1_data0"}, // S3_5_c15_c12_2 + {0xEFE3, "dl1_data1"}, // S3_5_c15_c12_3 + {0xEFE4, "mmudata0"}, // S3_5_c15_c12_4 + {0xEFE5, "mmudata1"}, // S3_5_c15_c12_5 + {0xEFE6, "dl1_data2"}, // S3_5_c15_c12_6 + {0xEFE7, "il1_data2"}, // S3_5_c15_c12_7 + {0xEFEC, "llc_data0"}, // S3_5_c15_c13_4 + {0xEFED, "llc_data1"}, // S3_5_c15_c13_5 + {0xF780, "mmu_err_sts"}, // S3_6_c15_c0_0 + {0xF781, "afsr1_gl1"}, // S3_6_c15_c0_1 + {0xF782, "afsr1_gl2"}, // S3_6_c15_c0_2 + {0xF783, "afsr1_gl12"}, // S3_6_c15_c0_3 + {0xF784, "bp_objc_adr_el1"}, // S3_6_c15_c0_4 + {0xF785, "bp_objc_ctl_el1"}, // S3_6_c15_c0_5 + {0xF786, "sp_gl11"}, // S3_6_c15_c0_6 + {0xF787, "mmu_sesr_el2"}, // S3_6_c15_c0_7 + {0xF788, "sprr_config_el1"}, // S3_6_c15_c1_0 + {0xF789, "hpfar_gl2"}, // S3_6_c15_c1_1 + {0xF78A, "gxf_config_el1"}, // S3_6_c15_c1_2 + {0xF78B, "sprr_amrange_el1"}, // S3_6_c15_c1_3 + {0xF78C, "gxf_config_el2"}, // S3_6_c15_c1_4 + {0xF78D, "sprr_uperm_el0"}, // S3_6_c15_c1_5 + {0xF78E, "sprr_pperm_el1"}, // S3_6_c15_c1_6 + {0xF78F, "sprr_pperm_el2"}, // S3_6_c15_c1_7 + {0xF791, "apgakeylo_el12"}, // S3_6_c15_c2_1 + {0xF792, "apgakeyhi_el12"}, // S3_6_c15_c2_2 + {0xF793, "kernkeylo_el12"}, // S3_6_c15_c2_3 + {0xF794, "kernkeyhi_el12"}, // S3_6_c15_c2_4 + {0xF795, "afpcr_el0"}, // S3_6_c15_c2_5 + {0xF796, "sp_gl22"}, // S3_6_c15_c2_6 + {0xF797, "amxidr_el1"}, // S3_6_c15_c2_7 + {0xF798, "sprr_umprr_el1"}, // S3_6_c15_c3_0 + {0xF799, "sprr_pmprr_el1"}, // S3_6_c15_c3_1 + {0xF79A, "sprr_pmprr_el2"}, // S3_6_c15_c3_2 + {0xF79B, "sprr_uperm_sh01_el1"}, // S3_6_c15_c3_3 + {0xF79C, "sprr_uperm_sh02_el1"}, // S3_6_c15_c3_4 + {0xF79D, "sprr_uperm_sh03_el1"}, // S3_6_c15_c3_5 + {0xF79E, "sprr_uperm_sh04_el1"}, // S3_6_c15_c3_6 + {0xF79F, "sprr_uperm_sh05_el1"}, // S3_6_c15_c3_7 + {0xF7A0, "sprr_uperm_sh06_el1"}, // S3_6_c15_c4_0 + {0xF7A1, "sprr_uperm_sh07_el1"}, // S3_6_c15_c4_1 + {0xF7A2, "sprr_pperm_sh01_el1"}, // S3_6_c15_c4_2 + {0xF7A3, "sprr_pperm_sh02_el1"}, // S3_6_c15_c4_3 + {0xF7A4, "sprr_pperm_sh03_el1"}, // S3_6_c15_c4_4 + {0xF7A5, "sprr_pperm_sh04_el1"}, // S3_6_c15_c4_5 + {0xF7A6, "sprr_pperm_sh05_el1"}, // S3_6_c15_c4_6 + {0xF7A7, "sprr_pperm_sh06_el1"}, // S3_6_c15_c4_7 + {0xF7A8, "sprr_pperm_sh07_el1"}, // S3_6_c15_c5_0 + {0xF7A9, "sprr_pperm_sh01_el2"}, // S3_6_c15_c5_1 + {0xF7AA, "sprr_pperm_sh02_el2"}, // S3_6_c15_c5_2 + {0xF7AB, "sprr_pperm_sh03_el2"}, // S3_6_c15_c5_3 + {0xF7AC, "sprr_pperm_sh04_el2"}, // S3_6_c15_c5_4 + {0xF7AD, "sprr_pperm_sh05_el2"}, // S3_6_c15_c5_5 + {0xF7AE, "sprr_pperm_sh06_el2"}, // S3_6_c15_c5_6 + {0xF7AF, "sprr_pperm_sh07_el2"}, // S3_6_c15_c5_7 + {0xF7B0, "sprr_pmprr_el12"}, // S3_6_c15_c6_0 + {0xF7B1, "sprr_pperm_sh01_el12"}, // S3_6_c15_c6_1 + {0xF7B2, "sprr_pperm_sh02_el12"}, // S3_6_c15_c6_2 + {0xF7B3, "sprr_pperm_sh03_el12"}, // S3_6_c15_c6_3 + {0xF7B4, "sprr_pperm_sh04_el12"}, // S3_6_c15_c6_4 + {0xF7B5, "sprr_pperm_sh05_el12"}, // S3_6_c15_c6_5 + {0xF7B6, "sprr_pperm_sh06_el12"}, // S3_6_c15_c6_6 + {0xF7B7, "sprr_pperm_sh07_el12"}, // S3_6_c15_c6_7 + {0xF7B8, "apiakeylo_el12"}, // S3_6_c15_c7_0 + {0xF7B9, "apiakeyhi_el12"}, // S3_6_c15_c7_1 + {0xF7BA, "apibkeylo_el12"}, // S3_6_c15_c7_2 + {0xF7BB, "apibkeyhi_el12"}, // S3_6_c15_c7_3 + {0xF7BC, "apdakeylo_el12"}, // S3_6_c15_c7_4 + {0xF7BD, "apdakeyhi_el12"}, // S3_6_c15_c7_5 + {0xF7BE, "apdbkeylo_el12"}, // S3_6_c15_c7_6 + {0xF7BF, "apdbkeyhi_el12"}, // S3_6_c15_c7_7 + {0xF7C0, "currentg"}, // S3_6_c15_c8_0 + {0xF7C1, "gxf_entry_el1"}, // S3_6_c15_c8_1 + {0xF7C2, "gxf_pabentry_el1"}, // S3_6_c15_c8_2 + {0xF7C3, "aspsr_el1"}, // S3_6_c15_c8_3 + {0xF7C4, "adspsr_el0"}, // S3_6_c15_c8_4 + {0xF7C5, "pmcr1_gl2"}, // S3_6_c15_c8_5 + {0xF7C6, "aspsr_el2"}, // S3_6_c15_c8_6 + {0xF7C7, "pmcr1_gl1"}, // S3_6_c15_c8_7 + {0xF7CA, "vbar_gl12"}, // S3_6_c15_c9_2 + {0xF7CB, "spsr_gl12"}, // S3_6_c15_c9_3 + {0xF7CC, "aspsr_gl12"}, // S3_6_c15_c9_4 + {0xF7CD, "esr_gl12"}, // S3_6_c15_c9_5 + {0xF7CE, "elr_gl12"}, // S3_6_c15_c9_6 + {0xF7CF, "far_gl12"}, // S3_6_c15_c9_7 + {0xF7D0, "sp_gl1"}, // S3_6_c15_c10_0 + {0xF7D1, "tpidr_gl1"}, // S3_6_c15_c10_1 + {0xF7D2, "vbar_gl1"}, // S3_6_c15_c10_2 + {0xF7D3, "spsr_gl1"}, // S3_6_c15_c10_3 + {0xF7D4, "aspsr_gl1"}, // S3_6_c15_c10_4 + {0xF7D5, "esr_gl1"}, // S3_6_c15_c10_5 + {0xF7D6, "elr_gl1"}, // S3_6_c15_c10_6 + {0xF7D7, "far_gl1"}, // S3_6_c15_c10_7 + {0xF7D8, "sp_gl2"}, // S3_6_c15_c11_0 + {0xF7D9, "tpidr_gl2"}, // S3_6_c15_c11_1 + {0xF7DA, "vbar_gl2"}, // S3_6_c15_c11_2 + {0xF7DB, "spsr_gl2"}, // S3_6_c15_c11_3 + {0xF7DC, "aspsr_gl2"}, // S3_6_c15_c11_4 + {0xF7DD, "esr_gl2"}, // S3_6_c15_c11_5 + {0xF7DE, "elr_gl2"}, // S3_6_c15_c11_6 + {0xF7DF, "far_gl2"}, // S3_6_c15_c11_7 + {0xF7E0, "gxf_entry_el2"}, // S3_6_c15_c12_0 + {0xF7E1, "gxf_pabentry_el2"}, // S3_6_c15_c12_1 + {0xF7E2, "apctl_el2"}, // S3_6_c15_c12_2 + {0xF7E3, "apsts_el2"}, // S3_6_c15_c12_3 + {0xF7E4, "apsts_el1"}, // S3_6_c15_c12_4 + {0xF7E5, "kernkeylo_el2"}, // S3_6_c15_c12_5 + {0xF7E6, "kernkeyhi_el2"}, // S3_6_c15_c12_6 + {0xF7E7, "aspsr_el12"}, // S3_6_c15_c12_7 + {0xF7E8, "apiakeylo_el2"}, // S3_6_c15_c13_0 + {0xF7E9, "apiakeyhi_el2"}, // S3_6_c15_c13_1 + {0xF7EA, "apibkeylo_el2"}, // S3_6_c15_c13_2 + {0xF7EB, "apibkeyhi_el2"}, // S3_6_c15_c13_3 + {0xF7EC, "apdakeylo_el2"}, // S3_6_c15_c13_4 + {0xF7ED, "apdakeyhi_el2"}, // S3_6_c15_c13_5 + {0xF7EE, "apdbkeylo_el2"}, // S3_6_c15_c13_6 + {0xF7EF, "apdbkeyhi_el2"}, // S3_6_c15_c13_7 + {0xF7F0, "apgakeylo_el2"}, // S3_6_c15_c14_0 + {0xF7F1, "apgakeyhi_el2"}, // S3_6_c15_c14_1 + {0xF7F2, "sprr_config_el2"}, // S3_6_c15_c14_2 + {0xF7F3, "sprr_amrange_el2"}, // S3_6_c15_c14_3 + {0xF7F4, "vmkeylo_el2"}, // S3_6_c15_c14_4 + {0xF7F5, "vmkeyhi_el2"}, // S3_6_c15_c14_5 + {0xF7F6, "mmu_sfar_el2"}, // S3_6_c15_c14_6 + {0xF7F7, "apsts_el12"}, // S3_6_c15_c14_7 + {0xF7F8, "apctl_el12"}, // S3_6_c15_c15_0 + {0xF7F9, "gxf_config_el12"}, // S3_6_c15_c15_1 + {0xF7FA, "gxf_entry_el12"}, // S3_6_c15_c15_2 + {0xF7FB, "gxf_pabentry_el12"}, // S3_6_c15_c15_3 + {0xF7FC, "sprr_config_el12"}, // S3_6_c15_c15_4 + {0xF7FD, "sprr_amrange_el12"}, // S3_6_c15_c15_5 + {0xF7FE, "mmu_sesr_ctl_el2"}, // S3_6_c15_c15_6 + {0xF7FF, "sprr_pperm_el12"}, // S3_6_c15_c15_7 + {0xFF80, "pwrdnsave0"}, // S3_7_c15_c0_0 + {0xFF81, "nrg_acc_ctl"}, // S3_7_c15_c0_1 + {0xFF82, "aon_cnt0"}, // S3_7_c15_c0_2 + {0xFF83, "cpu_cnt0"}, // S3_7_c15_c0_3 + {0xFF84, "upmcr0_el1"}, // S3_7_c15_c0_4 + {0xFF85, "upmc8"}, // S3_7_c15_c0_5 + {0xFF86, "aon_cnt8"}, // S3_7_c15_c0_6 + {0xFF88, "pwrdnsave1"}, // S3_7_c15_c1_0 + {0xFF89, "core_nrg_acc_dat"}, // S3_7_c15_c1_1 + {0xFF8A, "aon_cnt_ctl0"}, // S3_7_c15_c1_2 + {0xFF8B, "cpu_cnt_ctl0"}, // S3_7_c15_c1_3 + {0xFF8C, "upmesr0_el1"}, // S3_7_c15_c1_4 + {0xFF8D, "upmc9"}, // S3_7_c15_c1_5 + {0xFF8E, "aon_cnt_ctl8"}, // S3_7_c15_c1_6 + {0xFF90, "acc_pwr_dn_save"}, // S3_7_c15_c2_0 + {0xFF91, "cpm_nrg_acc_dat"}, // S3_7_c15_c2_1 + {0xFF92, "aon_cnt1"}, // S3_7_c15_c2_2 + {0xFF93, "cpu_cnt1"}, // S3_7_c15_c2_3 + {0xFF94, "upmswctrl_el1"}, // S3_7_c15_c2_4 + {0xFF95, "upmc10"}, // S3_7_c15_c2_5 + {0xFF96, "aon_cnt9"}, // S3_7_c15_c2_6 + {0xFF99, "core_srm_nrg_acc_dat"}, // S3_7_c15_c3_1 + {0xFF9A, "aon_cnt_ctl1"}, // S3_7_c15_c3_2 + {0xFF9B, "cpu_cnt_ctl1"}, // S3_7_c15_c3_3 + {0xFF9C, "upmecm0_el1"}, // S3_7_c15_c3_4 + {0xFF9D, "upmc11"}, // S3_7_c15_c3_5 + {0xFF9E, "aon_cnt_ctl9"}, // S3_7_c15_c3_6 + {0xFFA0, "aon_cnt_ctl"}, // S3_7_c15_c4_0 + {0xFFA1, "cpm_srm_nrg_acc_dat"}, // S3_7_c15_c4_1 + {0xFFA2, "aon_cnt2"}, // S3_7_c15_c4_2 + {0xFFA3, "cpu_cnt2"}, // S3_7_c15_c4_3 + {0xFFA4, "upmecm1_el1"}, // S3_7_c15_c4_4 + {0xFFA5, "upmc12"}, // S3_7_c15_c4_5 + {0xFFA6, "aon_cnt10"}, // S3_7_c15_c4_6 + {0xFFA8, "cpu_cnt_ctl"}, // S3_7_c15_c5_0 + {0xFFAA, "aon_cnt_ctl2"}, // S3_7_c15_c5_2 + {0xFFAB, "cpu_cnt_ctl2"}, // S3_7_c15_c5_3 + {0xFFAC, "upmpcm_el1"}, // S3_7_c15_c5_4 + {0xFFAD, "upmc13"}, // S3_7_c15_c5_5 + {0xFFAE, "aon_cnt_ctl10"}, // S3_7_c15_c5_6 + {0xFFB2, "aon_cnt3"}, // S3_7_c15_c6_2 + {0xFFB3, "cpu_cnt3"}, // S3_7_c15_c6_3 + {0xFFB4, "upmsr_el1"}, // S3_7_c15_c6_4 + {0xFFB5, "upmc14"}, // S3_7_c15_c6_5 + {0xFFB6, "aon_cnt11"}, // S3_7_c15_c6_6 + {0xFFBA, "aon_cnt_ctl3"}, // S3_7_c15_c7_2 + {0xFFBB, "cpu_cnt_ctl3"}, // S3_7_c15_c7_3 + {0xFFBC, "upmc0"}, // S3_7_c15_c7_4 + {0xFFBD, "upmc15"}, // S3_7_c15_c7_5 + {0xFFBE, "aon_cnt_ctl11"}, // S3_7_c15_c7_6 + {0xFFC2, "aon_cnt4"}, // S3_7_c15_c8_2 + {0xFFC3, "cpu_cnt4"}, // S3_7_c15_c8_3 + {0xFFC4, "upmc1"}, // S3_7_c15_c8_4 + {0xFFC5, "upmecm2_el1"}, // S3_7_c15_c8_5 + {0xFFCA, "aon_cnt_ctl4"}, // S3_7_c15_c9_2 + {0xFFCB, "cpu_cnt_ctl4"}, // S3_7_c15_c9_3 + {0xFFCC, "upmc2"}, // S3_7_c15_c9_4 + {0xFFCD, "upmecm3_el1"}, // S3_7_c15_c9_5 + {0xFFD2, "aon_cnt5"}, // S3_7_c15_c10_2 + {0xFFD3, "cpu_cnt5"}, // S3_7_c15_c10_3 + {0xFFD4, "upmc3"}, // S3_7_c15_c10_4 + {0xFFD5, "upmcr1_el1"}, // S3_7_c15_c10_5 + {0xFFDA, "aon_cnt_ctl5"}, // S3_7_c15_c11_2 + {0xFFDB, "cpu_cnt_ctl5"}, // S3_7_c15_c11_3 + {0xFFDC, "upmc4"}, // S3_7_c15_c11_4 + {0xFFDD, "upmesr1_el1"}, // S3_7_c15_c11_5 + {0xFFE2, "aon_cnt6"}, // S3_7_c15_c12_2 + {0xFFE3, "cpu_cnt6"}, // S3_7_c15_c12_3 + {0xFFE4, "upmc5"}, // S3_7_c15_c12_4 + {0xFFEA, "aon_cnt_ctl6"}, // S3_7_c15_c13_2 + {0xFFEB, "cpu_cnt_ctl6"}, // S3_7_c15_c13_3 + {0xFFEC, "upmc6"}, // S3_7_c15_c13_4 + {0xFFF2, "aon_cnt7"}, // S3_7_c15_c14_2 + {0xFFF3, "cpu_cnt7"}, // S3_7_c15_c14_3 + {0xFFF4, "upmc7"}, // S3_7_c15_c14_4 + {0xFFFA, "aon_cnt_ctl7"}, // S3_7_c15_c15_2 + {0xFFFB, "cpu_cnt_ctl7"}, // S3_7_c15_c15_3 +}; + + const char* const SDSB_DOMAIN[4] = {"osh", "nsh", "ish", "sy"}; // AMX operation names indexed by the op field (bits [9:5]) @@ -123,30 +804,9 @@ bool Decode(uint32_t insn, AppleVendorInsn& out) out.rs = (insn >> 5) & 0x1f; return true; } - if ((insn & 0xffe0001f) == 0xd4e00000) // Apple exception-generation instruction (opc 0b111) - { - // An SPTM/TXM monitor entry, per kernelcache symbols such as _txm_enter. It is an - // exception-based alternative to genter, chosen at runtime by _libsptm_has_perms_overlay, and - // occupies the opc == 0b111 slot that ARM leaves unallocated in the encoding class holding - // svc/hvc/smc/brk. The imm16 at bits [20:5] is zero in every observed use, with the selector - // passed in x16 as it is for genter. - // - // TODO: `apple_unknown_sptm` is a temporary name. Replace it and add lifting once there's more - // information available. - out.op = AV_APPLE_UNKNOWN_SPTM; - out.imm = (insn >> 5) & 0xffff; - return true; - } return false; } -// Immediates render the way the base disassembler's `%#x` format does: a bare `0` for zero, and a -// `0x` prefix otherwise. -string ImmText(uint32_t imm) -{ - return imm ? fmt::format("{:#x}", imm) : "0"; -} - string GprName(uint32_t field) { return field == 31 ? "xzr" : "x" + to_string(field); @@ -193,9 +853,8 @@ bool AppleVendorGetInstructionInfo(uint32_t insn, uint64_t addr, InstructionInfo switch (decoded.op) { case AV_GENTER: - case AV_APPLE_UNKNOWN_SPTM: - // These enter the monitor like an exception entry. Control returns after the handler for the - // common (non-terminal) selectors. + // genter enters the monitor like an exception entry. Control returns after the handler for + // the common (non-terminal) selectors. result.AddBranch(SystemCall); break; case AV_GEXIT: @@ -219,7 +878,7 @@ bool AppleVendorGetInstructionText(uint32_t insn, vector& case AV_GENTER: EmitMnemonic("genter", result); result.emplace_back(TextToken, "#"); - result.emplace_back(IntegerToken, ImmText(decoded.imm), decoded.imm); + result.emplace_back(IntegerToken, fmt::format("{:#x}", decoded.imm), decoded.imm); break; case AV_GEXIT: EmitMnemonic("gexit", result); @@ -259,11 +918,6 @@ bool AppleVendorGetInstructionText(uint32_t insn, vector& EmitRegister(GprName(decoded.rd), result); break; } - case AV_APPLE_UNKNOWN_SPTM: - EmitMnemonic("apple_unknown_sptm", result); - result.emplace_back(TextToken, "#"); - result.emplace_back(IntegerToken, ImmText(decoded.imm), decoded.imm); - break; default: return false; } @@ -308,7 +962,6 @@ optional AppleVendorGetInstructionLowLevelIL(uint32_t insn, LowLevelILFunc {il.Register(16, VecReg(decoded.rd)), il.Register(16, VecReg(decoded.rs))})); break; case AV_AMX: - case AV_APPLE_UNKNOWN_SPTM: // Not yet lifted. il.AddInstruction(il.Unimplemented()); break; @@ -318,6 +971,28 @@ optional AppleVendorGetInstructionLowLevelIL(uint32_t insn, LowLevelILFunc return true; } +std::string_view AppleVendorSystemRegisterName(uint32_t reg) +{ + auto found = std::lower_bound(std::begin(VENDOR_SYSTEM_REGISTERS), + std::end(VENDOR_SYSTEM_REGISTERS), reg, + [](const std::pair& entry, uint32_t value) { + return entry.first < value; + }); + + if (found == std::end(VENDOR_SYSTEM_REGISTERS) || found->first != reg) + return {}; + + return found->second; +} + + +void AppleVendorGetSystemRegisters(std::vector& result) +{ + for (const auto& entry : VENDOR_SYSTEM_REGISTERS) + result.push_back(entry.first); +} + + bool AppleVendorIsIntrinsic(uint32_t intrinsic) { return intrinsic >= APPLE_INTRIN_GENTER && intrinsic < APPLE_INTRIN_END; diff --git a/arch/arm64/apple_vendor.h b/arch/arm64/apple_vendor.h index b6498360f..f29123dd9 100644 --- a/arch/arm64/apple_vendor.h +++ b/arch/arm64/apple_vendor.h @@ -23,25 +23,26 @@ #include #include #include +#include #include #include "binaryninjaapi.h" -#include "neon_intrinsics.h" // for ARM64_INTRIN_NEON_END +#include "acle_intrinsics.h" // for AcleIntrinsicEnd // Apple vendor-specific AArch64 instructions occupy the 0x0020xxxx encoding space (bits [31:16] == // 0x0020), which is unallocated in the base ARM A64 instruction set. They appear in Apple firmware -// such as the iOS kernelcache and SPTM. This module decodes, renders, and lifts them independently -// of the generated ARM disassembler, so no generated file or ARM spec data is touched. +// such as the iOS kernelcache and SPTM. exarmo decodes only what ARM defines, so this module decodes, +// renders and lifts them itself. // // Encodings follow the AsahiLinux reverse-engineering documentation // (https://asahilinux.org/docs/hw/cpu/apple-instructions/). -// Vendor intrinsic IDs begin immediately after the base ARM64 intrinsic range (NEON included) so +// Vendor intrinsic IDs begin immediately after the base ARM64 intrinsic range (ACLE included) so // they never collide with the base architecture's intrinsics. They are session-local (IL is // regenerated per session and intrinsic IDs are not persisted). enum AppleVendorIntrinsic : uint32_t { - APPLE_INTRIN_GENTER = ARM64_INTRIN_NEON_END + 1, + APPLE_INTRIN_GENTER = AcleIntrinsicEnd + 1, APPLE_INTRIN_GEXIT, APPLE_INTRIN_SDSB, APPLE_INTRIN_WKDMC, @@ -52,13 +53,12 @@ enum AppleVendorIntrinsic : uint32_t APPLE_INTRIN_END, }; -// True if the instruction word might be an Apple vendor instruction. Most live in the 0x0020xxxx -// space (bits [31:16] == 0x0020), but at least one occupies the exception-generation encoding class -// in the opc == 0b111 slot (0xd4e0_0000) that ARM leaves unallocated. -// This is only a cheap pre-filter. The decoder makes the precise determination. +// True if the instruction word might be an Apple vendor instruction, all of which live in the +// 0x0020xxxx space (bits [31:16] == 0x0020). This is only a cheap pre-filter. The decoder makes the +// precise determination. inline bool IsAppleVendorEncoding(uint32_t insn) { - return (insn & 0xffff0000) == 0x00200000 || (insn & 0xffe00000) == 0xd4e00000; + return (insn & 0xffff0000) == 0x00200000; } // The info and text paths return false if the word is not a recognized Apple vendor instruction. On @@ -70,6 +70,13 @@ bool AppleVendorGetInstructionText(uint32_t insn, std::vector AppleVendorGetInstructionLowLevelIL(uint32_t insn, BinaryNinja::LowLevelILFunction& il); +// The name Apple gives a system register in the encodings ARM leaves IMPLEMENTATION DEFINED. +// Empty for any other number. +std::string_view AppleVendorSystemRegisterName(uint32_t reg); + +// Append every vendor system register number to `result`. +void AppleVendorGetSystemRegisters(std::vector& result); + // Metadata for vendor intrinsics. bool AppleVendorIsIntrinsic(uint32_t intrinsic); void AppleVendorGetAllIntrinsics(std::vector& result); diff --git a/arch/arm64/arch_arm64.cpp b/arch/arm64/arch_arm64.cpp index 1a3af980f..90f5bdb4b 100644 --- a/arch/arm64/arch_arm64.cpp +++ b/arch/arm64/arch_arm64.cpp @@ -4,16 +4,21 @@ #include #include #include -#include +#include #include #include +#include "acle_intrinsics.h" #include "apple_vendor.h" -#include "arm64dis.h" +#include "base/assertions.h" #include "binaryninjaapi.h" +#include "exarmo/aarch64.h" #include "il.h" #include "lowlevelilinstruction.h" -#include "neon_intrinsics.h" +#include "operands.h" +#include "registers.h" +#include "system_operations.h" +#include "system_registers.h" using namespace BinaryNinja; using namespace std; @@ -307,455 +312,260 @@ static const char* GetRelocationString(ElfArm64RelocationType rel) } -class Arm64Architecture : public Architecture -{ - protected: - size_t m_bits; - bool m_onlyDisassembleOnAlignedAddresses; - bool m_preferIntrinsics; - - virtual bool Disassemble(const uint8_t* data, uint64_t addr, size_t maxLen, Instruction& result) - { - (void)addr; - (void)maxLen; - memset(&result, 0, sizeof(result)); - - if (m_onlyDisassembleOnAlignedAddresses && (addr % 4 != 0)) - return false; - - if (aarch64_decompose(*(uint32_t*)data, &result, addr) != 0) - return false; - return true; - } - - - virtual size_t GetAddressSize() const override { return 8; } - +namespace { +// exarmo's maximums cover every encoding, so these buffers fit any instruction. +// EXARMO_AARCH64_MAX_TEXT excludes the NUL. +constexpr size_t MaxTokens = EXARMO_AARCH64_MAX_TOKENS; +constexpr size_t TextCapacity = EXARMO_AARCH64_MAX_TEXT + 1; +} - virtual size_t GetInstructionAlignment() const override { return 4; } +// Translate exarmo's tokens into Binary Ninja's. Rejoin a mnemonic that exarmo splits around a +// condition, pad the mnemonic to column 8 in place of exarmo's tab, and add memory operand markers +// inside a memory operand's brackets. +static bool TokenizeInstruction( + const exarmo_aarch64_instruction& instr, uint64_t addr, vector& result) +{ + char text[TextCapacity]; + exarmo_aarch64_token tokens[MaxTokens]; + exarmo_aarch64_text_size size = + exarmo_aarch64_instruction_tokens(&instr, addr, text, sizeof(text), tokens, MaxTokens); + if (size.tokens == 0 || size.tokens > MaxTokens || size.length >= sizeof(text)) + return false; - virtual size_t GetMaxInstructionLength() const override { return 4; } + exarmo_aarch64_operand operands[EXARMO_AARCH64_MAX_OPERANDS]; + size_t operandCount = + exarmo_aarch64_instruction_operands(&instr, operands, EXARMO_AARCH64_MAX_OPERANDS); + size_t index = 0; + string mnemonic; + for (; index < size.tokens && tokens[index].kind == EXARMO_AARCH64_TOKEN_MNEMONIC; index++) + mnemonic.append(text + tokens[index].offset, tokens[index].length); - bool IsTestAndBranch(const Instruction& instr) - { - return instr.operation == ARM64_TBZ || instr.operation == ARM64_TBNZ; - } + if (mnemonic.empty()) + return false; + result.emplace_back(InstructionToken, mnemonic); - bool IsCompareAndBranch(const Instruction& instr) + for (; index < size.tokens; index++) { - return instr.operation == ARM64_CBZ || instr.operation == ARM64_CBNZ; - } - + const exarmo_aarch64_token& token = tokens[index]; + const char* begin = text + token.offset; + size_t length = token.length; - bool IsConditionalBranch(const Instruction& instr) - { - switch (instr.operation) + if (length && *begin == '\t') { - case ARM64_B_EQ: - case ARM64_B_NE: - case ARM64_B_CS: - case ARM64_B_CC: - case ARM64_B_MI: - case ARM64_B_PL: - case ARM64_B_VS: - case ARM64_B_VC: - case ARM64_B_HI: - case ARM64_B_LS: - case ARM64_B_GE: - case ARM64_B_LT: - case ARM64_B_GT: - case ARM64_B_LE: - case ARM64_B_AL: - case ARM64_B_NV: - return true; - default: - return false; + result.emplace_back( + TextToken, string(mnemonic.size() < 8 ? 8 - mnemonic.size() : 1, ' ')); + begin++; + length--; + if (!length) + continue; } - } - - - bool IsConditionalJump(const Instruction& instr) - { - return IsConditionalBranch(instr) || IsTestAndBranch(instr) || IsCompareAndBranch(instr); - } - - void SetInstructionInfoForInstruction( - uint64_t addr, const Instruction& instr, InstructionInfo& result) - { - result.length = 4; - switch (instr.operation) + string value(begin, length); + switch (token.kind) { - case ARM64_BL: - if (instr.operands[0].operandClass == LABEL) - result.AddBranch(CallDestination, instr.operands[0].immediate); - break; - - case ARM64_B_AL: - case ARM64_B: - if (instr.operands[0].operandClass == LABEL) - result.AddBranch(UnconditionalBranch, instr.operands[0].immediate); - else - result.AddBranch(UnresolvedBranch); + case EXARMO_AARCH64_TOKEN_SEPARATOR: + result.emplace_back(OperandSeparatorToken, value); break; + case EXARMO_AARCH64_TOKEN_REGISTER: + { + // exarmo prints an IMPLEMENTATION DEFINED system register by its fields. Use Apple's + // name where there is one. + string_view vendor; + if (token.operand < operandCount + && operands[token.operand].kind == EXARMO_AARCH64_OPERAND_SYSREG) + vendor = AppleVendorSystemRegisterName(operands[token.operand].sysreg.encoding); - case ARM64_B_EQ: - case ARM64_B_NE: - case ARM64_B_CS: - case ARM64_B_CC: - case ARM64_B_MI: - case ARM64_B_PL: - case ARM64_B_VS: - case ARM64_B_VC: - case ARM64_B_HI: - case ARM64_B_LS: - case ARM64_B_GE: - case ARM64_B_LT: - case ARM64_B_GT: - case ARM64_B_LE: - result.AddBranch(TrueBranch, instr.operands[0].immediate); - case ARM64_B_NV: - result.AddBranch(FalseBranch, addr + 4); - break; - case ARM64_TBZ: - case ARM64_TBNZ: - result.AddBranch(TrueBranch, instr.operands[2].immediate); - result.AddBranch(FalseBranch, addr + 4); - break; - case ARM64_CBZ: - case ARM64_CBNZ: - result.AddBranch(TrueBranch, instr.operands[1].immediate); - result.AddBranch(FalseBranch, addr + 4); + result.emplace_back(RegisterToken, vendor.empty() ? value : string(vendor)); break; - case ARM64_BR: - case ARM64_BRAA: - case ARM64_BRAAZ: - case ARM64_BRAB: - case ARM64_BRABZ: - case ARM64_DRPS: - result.AddBranch(UnresolvedBranch); + } + case EXARMO_AARCH64_TOKEN_IMMEDIATE: + case EXARMO_AARCH64_TOKEN_INTEGER: + result.emplace_back(IntegerToken, value, token.value); break; - case ARM64_ERET: - case ARM64_ERETAA: - case ARM64_ERETAB: - case ARM64_RET: - case ARM64_RETAA: - case ARM64_RETAB: - case ARM64_RETAASPPC: - case ARM64_RETABSPPC: - case ARM64_RETAASPPCR: - case ARM64_RETABSPPCR: - result.AddBranch(FunctionReturn); + case EXARMO_AARCH64_TOKEN_ADDRESS: + result.emplace_back(PossibleAddressToken, value, token.value); break; - case ARM64_SVC: - case ARM64_HVC: - case ARM64_SMC: - result.AddBranch(SystemCall); + case EXARMO_AARCH64_TOKEN_FLOAT: + result.emplace_back(FloatingPointToken, value); break; - case ARM64_UDF: - result.AddBranch(ExceptionBranch); + case EXARMO_AARCH64_TOKEN_BRACKET: + { + // Only a memory operand's brackets get memory operand markers. A lane index's brackets + // and a register list's braces belong to other operand kinds. + bool memory = token.operand < operandCount + && operands[token.operand].kind == EXARMO_AARCH64_OPERAND_MEM; + if (memory && *begin == '[') + { + result.emplace_back(BraceToken, value); + result.emplace_back(BeginMemoryOperandToken, ""); + } + else if (memory && *begin == ']') + { + result.emplace_back(EndMemoryOperandToken, ""); + result.emplace_back(BraceToken, value); + } + else + result.emplace_back(BraceToken, value); break; - + } default: + result.emplace_back(TextToken, value); break; } } + return true; +} - uint32_t tokenize_shift( - const InstructionOperand* __restrict operand, vector& result) - { - if (operand->shiftType != ShiftType_NONE) - { - const char* shiftStr = aarch64_get_shift(operand->shiftType); - if (shiftStr == NULL) - return FAILED_TO_DISASSEMBLE_OPERAND; - result.emplace_back(TextToken, ", "); - result.emplace_back(TextToken, shiftStr); - if (operand->shiftValueUsed != 0) - { - char buf[64] = {0}; - snprintf(buf, sizeof(buf), "%#x", (uint32_t)operand->shiftValue); - result.emplace_back(OperationToken, " #"); - result.emplace_back(IntegerToken, buf, operand->shiftValue); - } - } - return DISASM_SUCCESS; - } +class Arm64Architecture : public Architecture +{ + protected: + size_t m_bits; + bool m_onlyDisassembleOnAlignedAddresses; + bool m_preferIntrinsics; + virtual size_t GetAddressSize() const override { return 8; } - uint32_t tokenize_shifted_immediate( - const InstructionOperand* __restrict operand, vector& result) - { - char buf[64] = {0}; - const char* sign = ""; - if (operand == NULL) - return FAILED_TO_DISASSEMBLE_OPERAND; - uint64_t imm = operand->immediate; - if (operand->signedImm == 1 && ((int64_t)imm) < 0) - { - sign = "-"; - imm = -(int64_t)imm; - } + virtual size_t GetInstructionAlignment() const override { return 4; } - switch (operand->operandClass) - { - case FIMM32: - { - union - { - uint32_t intValue; - float floatValue; - } f; - f.intValue = (uint32_t)operand->immediate; - snprintf(buf, sizeof(buf), "%.08f", f.floatValue); - result.emplace_back(OperationToken, "#"); - result.emplace_back(FloatingPointToken, buf); - break; - } - case IMM32: - snprintf(buf, sizeof(buf), "%s%#x", sign, (uint32_t)imm); - result.emplace_back(OperationToken, "#"); - result.emplace_back(IntegerToken, buf, operand->immediate); - break; - case IMM64: - snprintf(buf, sizeof(buf), "%s%#" PRIx64, sign, imm); - result.emplace_back(OperationToken, "#"); - result.emplace_back(IntegerToken, buf, operand->immediate); - break; - case LABEL: - snprintf(buf, sizeof(buf), "%#" PRIx64, operand->immediate); - result.emplace_back(PossibleAddressToken, buf, operand->immediate); - break; - default: - return FAILED_TO_DISASSEMBLE_OPERAND; - } - tokenize_shift(operand, result); - return DISASM_SUCCESS; - } + virtual size_t GetMaxInstructionLength() const override { return 4; } - uint32_t tokenize_shifted_register(const InstructionOperand* restrict operand, - uint32_t registerNumber, vector& result) + // Read the instruction word at `addr`. Returns nullopt if fewer than 4 bytes are available, or if + // `addr` is misaligned and only aligned addresses are disassembled. + std::optional ReadInstructionWord(const uint8_t* data, uint64_t addr, size_t maxLen) { - const char* reg = aarch64_get_register_name(operand->reg[registerNumber]); - if (EMPTY(reg)) - return FAILED_TO_DISASSEMBLE_REGISTER; + if (maxLen < 4) + return std::nullopt; - result.emplace_back(RegisterToken, reg); - tokenize_shift(operand, result); - return DISASM_SUCCESS; - } + if (m_onlyDisassembleOnAlignedAddresses && (addr % 4 != 0)) + return std::nullopt; - uint32_t tokenize_register(const InstructionOperand* restrict operand, uint32_t registerNumber, - vector& result) - { - char buf[64] = {0}; + uint32_t insn; + memcpy(&insn, data, sizeof(insn)); + return insn; + } - /* case: system registers */ - if (operand->operandClass == SYS_REG) - { - auto name = get_system_register_name((SystemReg)(operand->sysreg)); - if (name && name[0]) - { - snprintf(buf, sizeof(buf), "%s", get_system_register_name((SystemReg)(operand->sysreg))); - result.emplace_back(RegisterToken, buf); - return DISASM_SUCCESS; - } - else - { - return tokenize_implementation_specific(operand, result); - } - } - if (operand->operandClass != REG && operand->operandClass != MULTI_REG) - return OPERAND_IS_NOT_REGISTER; + bool DecodeInstruction( + const uint8_t* data, uint64_t addr, size_t maxLen, exarmo_aarch64_instruction& result) + { + std::optional insn = ReadInstructionWord(data, addr, maxLen); + return insn && exarmo_aarch64_decode(*insn, &result) == EXARMO_AARCH64_STATUS_OK; + } - /* case: shifted registers */ - if (operand->shiftType != ShiftType_NONE) - { - return tokenize_shifted_register(operand, registerNumber, result); - } - const char* reg = aarch64_get_register_name(operand->reg[registerNumber]); - if (EMPTY(reg)) - return FAILED_TO_DISASSEMBLE_REGISTER; + bool IsTestAndBranch(const exarmo_aarch64_instruction& instr) + { + exarmo_aarch64_mnemonic mnemonic = exarmo_aarch64_instruction_mnemonic(&instr); + return mnemonic == EXARMO_AARCH64_TBZ || mnemonic == EXARMO_AARCH64_TBNZ; + } - /* case: predicate registers */ - if (operand->pred_qual && operand->reg[registerNumber] >= REG_P0 && - operand->reg[registerNumber] <= REG_P31) - { - result.emplace_back(RegisterToken, reg); - result.emplace_back(TextToken, "/"); - result.emplace_back(TextToken, string(1, operand->pred_qual)); - return DISASM_SUCCESS; - } - /* case other regs */ - result.emplace_back(RegisterToken, reg); - const char* arrspec = get_register_arrspec(operand->reg[registerNumber], operand); - if (arrspec) - result.emplace_back(TextToken, arrspec); + bool IsCompareAndBranch(const exarmo_aarch64_instruction& instr) + { + exarmo_aarch64_mnemonic mnemonic = exarmo_aarch64_instruction_mnemonic(&instr); + return mnemonic == EXARMO_AARCH64_CBZ || mnemonic == EXARMO_AARCH64_CBNZ; + } - /* only use index if this is isolated REG (not, for example, MULTIREG */ - if (operand->operandClass == REG && operand->laneUsed) - { - snprintf(buf, sizeof(buf), "%u", operand->lane); - result.emplace_back(BraceToken, "["); - result.emplace_back(IntegerToken, buf); - result.emplace_back(BraceToken, "]"); - } - return DISASM_SUCCESS; + // Whether this is B.cond or BC.cond, including b.al and b.nv. + bool IsConditionalBranch(const exarmo_aarch64_instruction& instr) + { + exarmo_aarch64_encoding encoding = exarmo_aarch64_instruction_encoding(&instr); + return encoding == EXARMO_AARCH64_ENC_BOnlyCondbranch + || encoding == EXARMO_AARCH64_ENC_BcOnlyCondbranch; } - uint32_t tokenize_memory_operand( - const InstructionOperand* restrict operand, vector& result) + // Whether AlwaysBranch and InvertBranch can rewrite this branch. CB also branches + // conditionally but has a different encoding. + bool IsConditionalJump(const exarmo_aarch64_instruction& instr) { - char immBuff[32] = {0}; - char paramBuff[32] = {0}; - const char *reg0, *reg1; + return IsConditionalBranch(instr) || IsTestAndBranch(instr) || IsCompareAndBranch(instr); + } - reg0 = aarch64_get_register_name(operand->reg[0]); - if (EMPTY(reg0)) - return FAILED_TO_DISASSEMBLE_REGISTER; - const char* sign = ""; - int64_t imm = operand->immediate; - if (operand->signedImm && (int64_t)imm < 0) - { - sign = "-"; - imm = -imm; - } - const char* startToken = "["; - const char* endToken = ""; - result.emplace_back(BraceToken, startToken); - result.emplace_back(BeginMemoryOperandToken, ""); - result.emplace_back(RegisterToken, reg0); - result.emplace_back(TextToken, get_register_arrspec(operand->reg[0], operand)); + void SetInstructionInfoForInstruction( + uint64_t addr, const exarmo_aarch64_instruction& instr, InstructionInfo& result) + { + result.length = 4; - switch (operand->operandClass) + exarmo_aarch64_branch branch = exarmo_aarch64_instruction_branch(&instr, addr); + switch (branch.kind) { - case MEM_REG: - break; - case MEM_PRE_IDX: - endToken = "!"; - snprintf(immBuff, sizeof(immBuff), "%s%#" PRIx64, sign, (uint64_t)imm); - result.emplace_back(TextToken, ", "); - result.emplace_back(OperationToken, "#"); - result.emplace_back(IntegerToken, immBuff, operand->immediate); + case EXARMO_AARCH64_BRANCH_DIRECT_CALL: + if (branch.has_target) + result.AddBranch(CallDestination, branch.target); break; - case MEM_POST_IDX: // [], - endToken = NULL; - if (operand->reg[1] == REG_NONE) + + case EXARMO_AARCH64_BRANCH_DIRECT: + if (!branch.has_target) { - snprintf(paramBuff, sizeof(paramBuff), "%s%#" PRIx64, sign, (uint64_t)imm); - result.emplace_back(EndMemoryOperandToken, ""); - result.emplace_back(BraceToken, "]"); - result.emplace_back(TextToken, ", "); - result.emplace_back(OperationToken, "#"); - result.emplace_back(IntegerToken, paramBuff, operand->immediate); + result.AddBranch(UnresolvedBranch); + break; } - else + + // b.nv is read as never taken, so only the instruction after it follows. B.cond and + // BC.cond write their condition as their first operand. + exarmo_aarch64_operand condition; + if (IsConditionalBranch(instr) && exarmo_aarch64_instruction_operands(&instr, &condition, 1) + && condition.cond == EXARMO_AARCH64_COND_NV) { - reg1 = aarch64_get_register_name(operand->reg[1]); - if (EMPTY(reg1)) - return FAILED_TO_DISASSEMBLE_REGISTER; - result.emplace_back(EndMemoryOperandToken, ""); - result.emplace_back(BraceToken, "]"); - result.emplace_back(TextToken, ", "); - result.emplace_back(RegisterToken, reg1); - result.emplace_back(TextToken, get_register_arrspec(operand->reg[1], operand)); + result.AddBranch(FalseBranch, addr + 4); + break; } - break; - case MEM_OFFSET: // [ optional(imm)] - if (operand->immediate != 0) - { - snprintf(immBuff, sizeof(immBuff), "%s%#" PRIx64, sign, (uint64_t)imm); - result.emplace_back(TextToken, ", "); - result.emplace_back(OperationToken, "#"); - result.emplace_back(IntegerToken, immBuff, operand->immediate); - if (operand->mul_vl) - result.emplace_back(TextToken, ", mul vl"); + if (!branch.conditional) + { + result.AddBranch(UnconditionalBranch, branch.target); + break; } - break; - case MEM_EXTENDED: // [, optional(shift optional(imm))] - result.emplace_back(TextToken, ", "); - reg1 = aarch64_get_register_name(operand->reg[1]); - if (EMPTY(reg1)) - return FAILED_TO_DISASSEMBLE_REGISTER; - result.emplace_back(RegisterToken, reg1); - result.emplace_back(TextToken, get_register_arrspec(operand->reg[1], operand)); - tokenize_shift(operand, result); - break; - default: - return NOT_MEMORY_OPERAND; - } - if (endToken != NULL) - { - result.emplace_back(EndMemoryOperandToken, ""); - result.emplace_back(BraceToken, "]"); - result.emplace_back(TextToken, endToken); - } - return DISASM_SUCCESS; - } - - - uint32_t tokenize_multireg_operand( - const InstructionOperand* restrict operand, vector& result) - { - char index[32] = {0}; - uint32_t elementCount = 0; - result.emplace_back(TextToken, "{"); - for (; elementCount < 4 && operand->reg[elementCount] != REG_NONE; elementCount++) - { - if (elementCount != 0) - result.emplace_back(TextToken, ", "); + result.AddBranch(TrueBranch, branch.target); + result.AddBranch(FalseBranch, addr + 4); + break; - if (tokenize_register(operand, elementCount, result) != 0) - return FAILED_TO_DISASSEMBLE_OPERAND; - } - result.emplace_back(TextToken, "}"); + case EXARMO_AARCH64_BRANCH_INDIRECT: + result.AddBranch(UnresolvedBranch); + break; - if (operand->laneUsed) - { - result.emplace_back(BraceToken, "["); - snprintf(index, sizeof(index), "%d", operand->lane); - result.emplace_back(IntegerToken, index, operand->lane); - result.emplace_back(BraceToken, "]"); - } - return DISASM_SUCCESS; - } + case EXARMO_AARCH64_BRANCH_EXCEPTION_RETURN: + // DRPS is UNDEFINED outside debug state, so where it goes is not known. + if (exarmo_aarch64_instruction_mnemonic(&instr) == EXARMO_AARCH64_DRPS) + { + result.AddBranch(UnresolvedBranch); + break; + } + result.AddBranch(FunctionReturn); + break; - uint32_t tokenize_condition( - const InstructionOperand* restrict operand, vector& result) - { - const char* condStr = aarch64_get_condition((Condition)operand->cond); - if (condStr == NULL) - return FAILED_TO_DISASSEMBLE_OPERAND; + case EXARMO_AARCH64_BRANCH_RETURN: + result.AddBranch(FunctionReturn); + break; - result.emplace_back(TextToken, condStr); - return DISASM_SUCCESS; - } + case EXARMO_AARCH64_BRANCH_SYSTEM_CALL: + result.AddBranch(SystemCall); + break; + // Of the instructions that raise an exception, only UDF ends the block. + case EXARMO_AARCH64_BRANCH_EXCEPTION: + if (exarmo_aarch64_instruction_mnemonic(&instr) == EXARMO_AARCH64_UDF) + result.AddBranch(ExceptionBranch); + break; - uint32_t tokenize_implementation_specific( - const InstructionOperand* restrict operand, vector& result) - { - char buf[32] = {0}; - get_implementation_specific(operand, buf, sizeof(buf)); - result.emplace_back(RegisterToken, buf); - return DISASM_SUCCESS; + // An indirect call returns to the instruction after it, so it ends no block. + case EXARMO_AARCH64_BRANCH_INDIRECT_CALL: + default: + break; + } } @@ -829,18 +639,15 @@ class Arm64Architecture : public Architecture virtual bool GetInstructionInfo( const uint8_t* data, uint64_t addr, size_t maxLen, InstructionInfo& result) override { - if (maxLen < 4) + std::optional insn = ReadInstructionWord(data, addr, maxLen); + if (!insn) return false; - if (m_onlyDisassembleOnAlignedAddresses && (addr % 4 != 0)) - return false; - - uint32_t insn = *(const uint32_t*)data; - if (IsAppleVendorEncoding(insn) && AppleVendorGetInstructionInfo(insn, addr, result)) + if (IsAppleVendorEncoding(*insn) && AppleVendorGetInstructionInfo(*insn, addr, result)) return true; - Instruction instr; - if (!Disassemble(data, addr, maxLen, instr)) + exarmo_aarch64_instruction instr; + if (exarmo_aarch64_decode(*insn, &instr) != EXARMO_AARCH64_STATUS_OK) return false; SetInstructionInfoForInstruction(addr, instr, result); @@ -851,152 +658,27 @@ class Arm64Architecture : public Architecture virtual bool GetInstructionText(const uint8_t* data, uint64_t addr, size_t& len, vector& result) override { + std::optional insn = ReadInstructionWord(data, addr, len); len = 4; - - if (m_onlyDisassembleOnAlignedAddresses && (addr % 4 != 0)) + if (!insn) return false; - uint32_t insn = *(const uint32_t*)data; - if (IsAppleVendorEncoding(insn) && AppleVendorGetInstructionText(insn, result)) + if (IsAppleVendorEncoding(*insn) && AppleVendorGetInstructionText(*insn, result)) return true; - Instruction instr; - bool tokenizeSuccess = false; - char buf[9]; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (exarmo_aarch64_decode(*insn, &instr) != EXARMO_AARCH64_STATUS_OK) return false; - memset(buf, 0x20, sizeof(buf)); - const char* operation = aarch64_get_operation(&instr); - if (operation == nullptr) - return false; - - size_t operationLen = strlen(operation); - if (operationLen < 8) - { - buf[8 - operationLen] = '\0'; - } - else - buf[1] = '\0'; - - result.emplace_back(InstructionToken, operation); - result.emplace_back(TextToken, buf); - for (size_t i = 0; i < MAX_OPERANDS; i++) - { - if (instr.operands[i].operandClass == NONE) - return true; - - struct InstructionOperand *operand = &(instr.operands[i]); - - if (i != 0) - result.emplace_back(OperandSeparatorToken, ", "); - - switch (instr.operands[i].operandClass) - { - case FIMM32: - case IMM32: - case IMM64: - case LABEL: - tokenizeSuccess = tokenize_shifted_immediate(&instr.operands[i], result) == 0; - break; - case MEM_REG: - case MEM_PRE_IDX: - case MEM_POST_IDX: - case MEM_OFFSET: - case MEM_EXTENDED: - tokenizeSuccess = tokenize_memory_operand(&instr.operands[i], result) == 0; - break; - case REG: - case SYS_REG: - tokenizeSuccess = tokenize_register(&instr.operands[i], 0, result) == 0; - break; - case MULTI_REG: - tokenizeSuccess = tokenize_multireg_operand(&instr.operands[i], result) == 0; - break; - case CONDITION: - tokenizeSuccess = tokenize_condition(&instr.operands[i], result) == 0; - break; - case IMPLEMENTATION_SPECIFIC: - tokenizeSuccess = tokenize_implementation_specific(&instr.operands[i], result) == 0; - break; - case NAME: - result.emplace_back(TextToken, instr.operands[i].name); - tokenizeSuccess = true; - break; - case STR_IMM: /* eg: "mul #0xe" */ - result.emplace_back(TextToken, instr.operands[i].name); - result.emplace_back(OperationToken, " #"); - snprintf(buf, sizeof(buf), "0x%" PRIx64, instr.operands[i].immediate); - result.emplace_back(IntegerToken, buf); - tokenizeSuccess = true; - break; - case ACCUM_ARRAY: /* eg: "za[w12, #0x6]" */ - result.emplace_back(TextToken, "ZA"); - result.emplace_back(BraceToken, "["); - snprintf(buf, sizeof(buf), "%s", aarch64_get_register_name(operand->reg[0])); - result.emplace_back(RegisterToken, buf); - result.emplace_back(OperandSeparatorToken, ", "); - result.emplace_back(OperationToken, " #"); - snprintf(buf, sizeof(buf), "0x%" PRIx64, operand->immediate); - result.emplace_back(IntegerToken, buf); - result.emplace_back(BraceToken, "]"); - tokenizeSuccess = true; - break; - case SME_TILE: /* eg: "z0v.b[w12, #0xb]" */ - snprintf(buf, sizeof(buf), "Z%d", operand->tile); - result.emplace_back(TextToken, buf); - if (operand->slice == SLICE_HORIZONTAL) - result.emplace_back(TextToken, "h"); - else if (operand->slice == SLICE_VERTICAL) - result.emplace_back(TextToken, "v"); - result.emplace_back(TextToken, get_arrspec_str_truncated(operand->arrSpec)); - if (operand->reg[0] != REG_NONE) - { - result.emplace_back(BraceToken, "["); - snprintf(buf, sizeof(buf), "%s", aarch64_get_register_name(operand->reg[0])); - result.emplace_back(RegisterToken, buf); - if (operand->arrSpec != ARRSPEC_FULL) - { - result.emplace_back(OperandSeparatorToken, ", "); - result.emplace_back(OperationToken, " #"); - snprintf(buf, sizeof(buf), "0x%" PRIx64, instr.operands[i].immediate); - result.emplace_back(IntegerToken, buf); - } - result.emplace_back(BraceToken, "]"); - } - tokenizeSuccess = true; - break; - case INDEXED_ELEMENT: /* eg: "p12.d[w15, #0xf]" */ - result.emplace_back(RegisterToken, aarch64_get_register_name(operand->reg[0])); - result.emplace_back(TextToken, get_arrspec_str_truncated(operand->arrSpec)); - result.emplace_back(BraceToken, "["); - result.emplace_back(RegisterToken, aarch64_get_register_name(operand->reg[1])); - if (operand->immediate) - { - result.emplace_back(OperandSeparatorToken, ", "); - result.emplace_back(OperationToken, "#"); - snprintf(buf, sizeof(buf), "0x%" PRIx64, operand->immediate); - result.emplace_back(IntegerToken, buf); - } - result.emplace_back(BraceToken, "]"); - tokenizeSuccess = true; - break; - default: - LogError("operandClass %x\n", instr.operands[i].operandClass); - return false; - } - if (!tokenizeSuccess) - { - LogError("tokenize failed operandClass %x\n", instr.operands[i].operandClass); - return false; - } - } - return true; + return TokenizeInstruction(instr, addr, result); } virtual string GetIntrinsicName(uint32_t intrinsic) override { + if (IsSysOpIntrinsic(intrinsic)) + return SysOpIntrinsicName(intrinsic); + if (AppleVendorIsIntrinsic(intrinsic)) return AppleVendorGetIntrinsicName(intrinsic); @@ -1026,6 +708,8 @@ class Arm64Architecture : public Architecture return "__wfi"; case ARM64_INTRIN_MSR: return "_WriteMSR"; + case ARM64_INTRIN_MSR_IMM: + return "_WritePSTATE"; case ARM64_INTRIN_MRS: return "_ReadMSR"; case ARM64_INTRIN_HINT_DGH: @@ -1056,8 +740,6 @@ class Arm64Architecture : public Architecture return "__sev"; case ARM64_INTRIN_SEVL: return "__sevl"; - case ARM64_INTRIN_DC: - return "__dc"; case ARM64_INTRIN_DMB: return "__dmb"; case ARM64_INTRIN_DSB: @@ -1072,6 +754,32 @@ class Arm64Architecture : public Architecture return "__xpaci"; case ARM64_INTRIN_ERET: return "_eret"; + case ARM64_INTRIN_FMAX: + return "__fmax"; + case ARM64_INTRIN_FMIN: + return "__fmin"; + case ARM64_INTRIN_FMAXNM: + return "__fmaxnm"; + case ARM64_INTRIN_FMINNM: + return "__fminnm"; + case ARM64_INTRIN_FRINTA: + return "__frinta"; + case ARM64_INTRIN_FRINTI: + return "__frinti"; + case ARM64_INTRIN_FRINTX: + return "__frintx"; + case ARM64_INTRIN_FRINT32X: + return "__frint32x"; + case ARM64_INTRIN_FRINT32Z: + return "__frint32z"; + case ARM64_INTRIN_FRINT64X: + return "__frint64x"; + case ARM64_INTRIN_FRINT64Z: + return "__frint64z"; + case ARM64_INTRIN_FMADD: + return "__fmadd"; + case ARM64_INTRIN_FMSUB: + return "__fmsub"; case ARM64_INTRIN_CNT: return "_PopulationCount"; case ARM64_INTRIN_CLREX: @@ -1114,11 +822,6 @@ class Arm64Architecture : public Architecture return "__stlxrb"; case ARM64_INTRIN_STLXRH: return "__stlxrh"; - case ARM64_INTRIN_TLBI: - case ARM64_INTRIN_TLBI_REG: - return "__tlbi"; - case ARM64_INTRIN_AT: - return "__at"; case ARM64_INTRIN_ADDG: return "__addg"; case ARM64_INTRIN_CMPP: @@ -1155,15 +858,13 @@ class Arm64Architecture : public Architecture break; } - return NeonGetIntrinsicName(intrinsic); + return AcleIntrinsicName(intrinsic); } virtual std::vector GetAllIntrinsics() override { - // Highest intrinsic number currently is ARM64_INTRIN_NEON_END. - // If new extensions are added please update this code. - std::vector result{ARM64_INTRIN_NEON_END}; + std::vector result; // Double check someone didn't insert a new intrinsic at the beginning of our enum since we rely // on it to fill the next array. @@ -1175,8 +876,12 @@ class Arm64Architecture : public Architecture result.push_back(id); } - // Finish populating our container with neon specific intrinsic IDs - for (uint32_t id = NeonIntrinsic::ARM64_INTRIN_VADD_S8; id < NeonIntrinsic::ARM64_INTRIN_NEON_END; id++) { + // The AT, DC, TLBI and other system operation intrinsics that a lift can produce. + const vector& sysOps = SysOpLiftedIntrinsics(); + result.insert(result.end(), sysOps.begin(), sysOps.end()); + + // ACLE intrinsics. + for (uint32_t id = AcleIntrinsicBase; id < AcleIntrinsicEnd; id++) { result.push_back(id); } @@ -1188,24 +893,50 @@ class Arm64Architecture : public Architecture virtual vector GetIntrinsicInputs(uint32_t intrinsic) override { + if (IsSysOpIntrinsic(intrinsic)) + return SysOpIntrinsicInputs(this, intrinsic); + if (AppleVendorIsIntrinsic(intrinsic)) return AppleVendorGetIntrinsicInputs(intrinsic); switch (intrinsic) { case ARM64_INTRIN_MRS: - return {NameAndType("SystemReg", Confidence>(Type::EnumerationType(this, get_system_register_enum(), 4, false), BN_FULL_CONFIDENCE))}; + return {NameAndType("SystemReg", Confidence>(Type::EnumerationType(this, SystemRegisterEnumeration(), 4, false), BN_FULL_CONFIDENCE))}; break; case ARM64_INTRIN_MSR: return { - NameAndType("SystemReg", Confidence>(Type::EnumerationType(this, get_system_register_enum(), 4, false), BN_FULL_CONFIDENCE)), + NameAndType("SystemReg", Confidence>(Type::EnumerationType(this, SystemRegisterEnumeration(), 4, false), BN_FULL_CONFIDENCE)), NameAndType(Type::IntegerType(8, false)) }; break; + case ARM64_INTRIN_MSR_IMM: + return { + NameAndType("field", Confidence>(Type::EnumerationType(this, PstateFieldEnumeration(), 4, false), BN_FULL_CONFIDENCE)), + NameAndType(Type::IntegerType(4, false)) + }; + break; case ARM64_INTRIN_CNT: // reads case ARM64_INTRIN_PRFM: case ARM64_INTRIN_REV16: // reads return {NameAndType(Type::IntegerType(8, false))}; + case ARM64_INTRIN_FMAX: // reads , + case ARM64_INTRIN_FMIN: // reads , + case ARM64_INTRIN_FMAXNM: // reads , + case ARM64_INTRIN_FMINNM: // reads , + return {NameAndType(Type::FloatType(4)), NameAndType(Type::FloatType(4))}; + case ARM64_INTRIN_FRINTA: // reads + case ARM64_INTRIN_FRINTI: // reads + case ARM64_INTRIN_FRINTX: // reads + case ARM64_INTRIN_FRINT32X: // reads + case ARM64_INTRIN_FRINT32Z: // reads + case ARM64_INTRIN_FRINT64X: // reads + case ARM64_INTRIN_FRINT64Z: // reads + return {NameAndType(Type::FloatType(4))}; + case ARM64_INTRIN_FMADD: // reads , , + case ARM64_INTRIN_FMSUB: // reads , , + return {NameAndType(Type::FloatType(4)), NameAndType(Type::FloatType(4)), + NameAndType(Type::FloatType(4))}; case ARM64_INTRIN_AUTDA: // reads , case ARM64_INTRIN_AUTDB: // reads , case ARM64_INTRIN_AUTIA: // reads , @@ -1222,25 +953,6 @@ class Arm64Architecture : public Architecture case ARM64_INTRIN_PACIB2: // reads , modifier, modifier2 return {NameAndType(Type::IntegerType(8, false)), NameAndType(Type::IntegerType(8, false)), NameAndType(Type::IntegerType(8, false))}; - case ARM64_INTRIN_TLBI: // reads , - return { - NameAndType("tlbi_op", Confidence>(Type::EnumerationType(this, get_tlbi_op_enum(), 4, false), BN_FULL_CONFIDENCE)) - }; - case ARM64_INTRIN_TLBI_REG: // reads , - return { - NameAndType("tlbi_op", Confidence>(Type::EnumerationType(this, get_tlbi_op_enum(), 4, false), BN_FULL_CONFIDENCE)), - NameAndType(Type::IntegerType(8, false)) - }; - case ARM64_INTRIN_AT: // reads , - return { - NameAndType("at_op", Confidence>(Type::EnumerationType(this, get_at_op_enum(), 4, false), BN_FULL_CONFIDENCE)), - NameAndType(Type::IntegerType(8, false)) - }; - case ARM64_INTRIN_DC: // reads , - return { - NameAndType("dc_op", Confidence>(Type::EnumerationType(this, get_dc_op_enum(), 4, false), BN_FULL_CONFIDENCE)), - NameAndType(Type::IntegerType(8, false)) - }; case ARM64_INTRIN_AESD: case ARM64_INTRIN_AESE: return {NameAndType(Type::IntegerType(16, false)), NameAndType(Type::IntegerType(16, false))}; @@ -1248,18 +960,22 @@ class Arm64Architecture : public Architecture break; } - return NeonGetIntrinsicInputs(intrinsic); + return AcleIntrinsicInputs(intrinsic); } virtual vector>> GetIntrinsicOutputs(uint32_t intrinsic) override { + if (IsSysOpIntrinsic(intrinsic)) + return SysOpIntrinsicOutputs(intrinsic); + if (AppleVendorIsIntrinsic(intrinsic)) return AppleVendorGetIntrinsicOutputs(intrinsic); switch (intrinsic) { case ARM64_INTRIN_MSR: + case ARM64_INTRIN_MSR_IMM: return {}; case ARM64_INTRIN_MRS: case ARM64_INTRIN_AUTDA: // writes @@ -1280,6 +996,20 @@ class Arm64Architecture : public Architecture case ARM64_INTRIN_CNT: // writes case ARM64_INTRIN_REV16: // writes return {Type::IntegerType(8, false)}; + case ARM64_INTRIN_FMAX: // writes + case ARM64_INTRIN_FMIN: // writes + case ARM64_INTRIN_FMAXNM: // writes + case ARM64_INTRIN_FMINNM: // writes + case ARM64_INTRIN_FRINTA: // writes + case ARM64_INTRIN_FRINTI: // writes + case ARM64_INTRIN_FRINTX: // writes + case ARM64_INTRIN_FRINT32X: // writes + case ARM64_INTRIN_FRINT32Z: // writes + case ARM64_INTRIN_FRINT64X: // writes + case ARM64_INTRIN_FRINT64Z: // writes + case ARM64_INTRIN_FMADD: // writes + case ARM64_INTRIN_FMSUB: // writes + return {Type::FloatType(4)}; case ARM64_INTRIN_AESD: case ARM64_INTRIN_AESE: return {Type::IntegerType(16, false)}; @@ -1287,7 +1017,7 @@ class Arm64Architecture : public Architecture break; } - return NeonGetIntrinsicOutputs(intrinsic); + return AcleIntrinsicOutputs(intrinsic); } @@ -1302,8 +1032,8 @@ class Arm64Architecture : public Architecture virtual bool IsNeverBranchPatchAvailable(const uint8_t* data, uint64_t addr, size_t len) override { - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (!DecodeInstruction(data, addr, len, instr)) return false; return IsConditionalJump(instr); } @@ -1311,8 +1041,8 @@ class Arm64Architecture : public Architecture virtual bool IsAlwaysBranchPatchAvailable(const uint8_t* data, uint64_t addr, size_t len) override { - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (!DecodeInstruction(data, addr, len, instr)) return false; return IsConditionalJump(instr); } @@ -1320,8 +1050,8 @@ class Arm64Architecture : public Architecture virtual bool IsInvertBranchPatchAvailable(const uint8_t* data, uint64_t addr, size_t len) override { - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (!DecodeInstruction(data, addr, len, instr)) return false; return IsConditionalJump(instr); } @@ -1330,22 +1060,24 @@ class Arm64Architecture : public Architecture virtual bool IsSkipAndReturnZeroPatchAvailable( const uint8_t* data, uint64_t addr, size_t len) override { - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (!DecodeInstruction(data, addr, len, instr)) return false; - return instr.operation == ARM64_BL || instr.operation == ARM64_BR || - instr.operation == ARM64_BLR; + exarmo_aarch64_mnemonic mnemonic = exarmo_aarch64_instruction_mnemonic(&instr); + return mnemonic == EXARMO_AARCH64_BL || mnemonic == EXARMO_AARCH64_BR || + mnemonic == EXARMO_AARCH64_BLR; } virtual bool IsSkipAndReturnValuePatchAvailable( const uint8_t* data, uint64_t addr, size_t len) override { - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (!DecodeInstruction(data, addr, len, instr)) return false; - return instr.operation == ARM64_BL || instr.operation == ARM64_BR || - instr.operation == ARM64_BLR; + exarmo_aarch64_mnemonic mnemonic = exarmo_aarch64_instruction_mnemonic(&instr); + return mnemonic == EXARMO_AARCH64_BL || mnemonic == EXARMO_AARCH64_BR || + mnemonic == EXARMO_AARCH64_BLR; } @@ -1362,16 +1094,20 @@ class Arm64Architecture : public Architecture virtual bool AlwaysBranch(uint8_t* data, uint64_t addr, size_t len) override { - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (!DecodeInstruction(data, addr, len, instr)) return false; uint32_t* value = (uint32_t*)data; if (IsConditionalBranch(instr)) { - // Combine the immediate in the first operand with the unconditional branch opcode to form - // an unconditional branch instruction - *value = (5 << 26) | (((uint32_t)((instr.operands[0].immediate - addr) >> 2)) & 0x03ffffff); + exarmo_aarch64_branch branch = exarmo_aarch64_instruction_branch(&instr, addr); + if (!branch.has_target) + return false; + + // Combine the branch target with the unconditional branch opcode to form an + // unconditional branch instruction. + *value = (5 << 26) | (((uint32_t)((branch.target - addr) >> 2)) & 0x03ffffff); } else { @@ -1384,8 +1120,8 @@ class Arm64Architecture : public Architecture virtual bool InvertBranch(uint8_t* data, uint64_t addr, size_t len) override { - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (!DecodeInstruction(data, addr, len, instr)) return false; uint32_t* value = (uint32_t*)data; @@ -1420,24 +1156,24 @@ class Arm64Architecture : public Architecture virtual bool GetInstructionLowLevelIL( const uint8_t* data, uint64_t addr, size_t& len, LowLevelILFunction& il) override { - if (m_onlyDisassembleOnAlignedAddresses && (addr % 4 != 0)) + std::optional insn = ReadInstructionWord(data, addr, len); + if (!insn) { il.AddInstruction(il.Undefined()); return false; } - uint32_t insn = *(const uint32_t*)data; - if (IsAppleVendorEncoding(insn)) + if (IsAppleVendorEncoding(*insn)) { - if (optional handled = AppleVendorGetInstructionLowLevelIL(insn, il)) + if (optional handled = AppleVendorGetInstructionLowLevelIL(*insn, il)) { len = 4; return *handled; } } - Instruction instr; - if (!Disassemble(data, addr, len, instr)) + exarmo_aarch64_instruction instr; + if (exarmo_aarch64_decode(*insn, &instr) != EXARMO_AARCH64_STATUS_OK) { il.AddInstruction(il.Undefined()); return false; @@ -1794,10 +1530,10 @@ class Arm64Architecture : public Architecture virtual string GetRegisterName(uint32_t reg_) override { if (reg_ > REG_NONE && reg_ < REG_END) - return aarch64_get_register_name((enum Register)reg_); + return string(RegisterName((enum Register)reg_)); if (reg_ > SYSREG_NONE && reg_ < SYSREG_END) - return get_system_register_name((enum SystemReg)reg_); + return string(SystemRegisterName(SystemRegister(reg_))); if (reg_ == FAKEREG_SYSREG_UNKNOWN) return "sysreg_unknown"; @@ -2388,7 +2124,7 @@ class Arm64Architecture : public Architecture if (reg == FAKEREG_SYSCALL_INFO) return RegisterInfo(reg, 0, 4); - if (has_system_register_name((SystemReg)reg)) + if (!SystemRegisterName(SystemRegister(reg)).empty()) LogDebug("GetRegisterInfo called on sysreg %#x/%d", reg, reg); return RegisterInfo(0, 0, 0); @@ -2405,11 +2141,13 @@ class Arm64Architecture : public Architecture virtual vector GetSystemRegisters() override { - static vector system_regs(get_system_registers()); - static std::once_flag once; - std::call_once(once, []() { - system_regs.push_back(FAKEREG_SYSREG_UNKNOWN); - }); + static vector system_regs = [] { + vector numbers; + for (SystemRegister reg : SystemRegisters()) + numbers.push_back(reg.Value()); + numbers.push_back(FAKEREG_SYSREG_UNKNOWN); + return numbers; + }(); return system_regs; } }; @@ -3039,10 +2777,6 @@ class Arm64MachoRelocationHandler : public RelocationHandler uint32_t insword = *(uint32_t*)dest; auto info = reloc->GetInfo(); - // printf("insword: 0x%X\n", insword); - // printf("reloc->GetTarget(): 0x%llX\n", reloc->GetTarget()); - // printf("reloc->GetAddress(): 0x%llX\n", reloc->GetAddress()); - if (info.nativeType == BINARYNINJA_MANUAL_RELOCATION) { // Magic number defined in MachOView.cpp for chained fixups *(uint64_t*)dest = info.target + info.addend; @@ -3277,7 +3011,6 @@ class Arm64ElfRelocationHandler : public RelocationHandler }; uint64_t target = reloc->GetTarget(); - Instruction inst; switch (info.nativeType) { case R_ARM_NONE: @@ -3308,7 +3041,6 @@ class Arm64ElfRelocationHandler : public RelocationHandler case R_AARCH64_ADD_ABS_LO12_NC: { ADD_SUB_IMM* decode = (ADD_SUB_IMM*)dest; - aarch64_decompose(*(uint32_t*)dest, &inst, reloc->GetAddress()); decode->imm = target + info.addend; break; } @@ -3316,7 +3048,6 @@ class Arm64ElfRelocationHandler : public RelocationHandler case R_AARCH64_JUMP26: { UNCONDITIONAL_BRANCH* decode = (UNCONDITIONAL_BRANCH*)dest; - aarch64_decompose(*(uint32_t*)dest, &inst, 0); decode->imm = (target + info.addend - reloc->GetAddress()) >> 2; break; } @@ -3739,6 +3470,33 @@ class Arm64PeRelocationHandler : public RelocationHandler }; +// The addend already encoded in `insn`, which is a branch's label offset or otherwise its first +// immediate, as in ADD. Zero if `insn` doesn't decode. Search by operand kind because B.cond and +// TBZ put other operands before the label. +static int64_t RelocationAddend(uint32_t insn) +{ + exarmo_aarch64_instruction instr; + if (exarmo_aarch64_decode(insn, &instr) != EXARMO_AARCH64_STATUS_OK) + return 0; + + exarmo_aarch64_operand operands[EXARMO_AARCH64_MAX_OPERANDS]; + size_t count = exarmo_aarch64_instruction_operands(&instr, operands, EXARMO_AARCH64_MAX_OPERANDS); + for (size_t i = 0; i < count; i++) + { + if (operands[i].kind == EXARMO_AARCH64_OPERAND_LABEL) + return operands[i].label.offset; + } + + for (size_t i = 0; i < count; i++) + { + if (operands[i].kind == EXARMO_AARCH64_OPERAND_IMM) + return OperandImmediate(operands[i]); + } + + return 0; +} + + class Arm64COFFRelocationHandler: public RelocationHandler { public: @@ -3760,7 +3518,6 @@ class Arm64COFFRelocationHandler: public RelocationHandler (void)base; (void)dest16; (void)dest64; - Instruction inst; Ref associatedArch = arch->GetAssociatedArchitectureByAddress(address); @@ -3790,8 +3547,7 @@ class Arm64COFFRelocationHandler: public RelocationHandler case PE_IMAGE_REL_ARM64_PAGEOFFSET_12A: { ADD_SUB_IMM* decode = (ADD_SUB_IMM*)dest; - aarch64_decompose(dest32[0], &inst, reloc->GetAddress()); - decode->imm = inst.operands[2].immediate + target; + decode->imm = RelocationAddend(dest32[0]) + target; break; } case PE_IMAGE_REL_ARM64_PAGEOFFSET_12L: @@ -3803,24 +3559,21 @@ class Arm64COFFRelocationHandler: public RelocationHandler case PE_IMAGE_REL_ARM64_BRANCH26: { UNCONDITIONAL_BRANCH* decode = (UNCONDITIONAL_BRANCH*)dest; - aarch64_decompose(dest32[0], &inst, 0); - decode->imm = (inst.operands[0].immediate + target - reloc->GetAddress()) >> 2; + decode->imm = (RelocationAddend(dest32[0]) + target - reloc->GetAddress()) >> 2; break; } case PE_IMAGE_REL_ARM64_BRANCH19: { // B.cond (CONDITIONAL_BRANCH) & CBZ / CBNZ (COMPARE_AND_BRANCH) CONDITIONAL_BRANCH* decode = (CONDITIONAL_BRANCH*)dest; - aarch64_decompose(dest32[0], &inst, 0); - decode->imm = (inst.operands[0].immediate + target - reloc->GetAddress()) >> 2; + decode->imm = (RelocationAddend(dest32[0]) + target - reloc->GetAddress()) >> 2; break; } case PE_IMAGE_REL_ARM64_BRANCH14: { // TBZ / TBNZ TEST_AND_BRANCH* decode = (TEST_AND_BRANCH*)dest; - aarch64_decompose(dest32[0], &inst, 0); - decode->imm = (inst.operands[0].immediate + target - reloc->GetAddress()) >> 2; + decode->imm = (RelocationAddend(dest32[0]) + target - reloc->GetAddress()) >> 2; break; } case PE_IMAGE_REL_ARM64_SECTION: @@ -3964,6 +3717,10 @@ extern "C" BINARYNINJAPLUGIN bool CorePluginInit() #endif { + // A decode writes into storage this plugin reserves, so the library it is + // linked against must agree with the header it was compiled against. + BN_RELEASE_ASSERT(exarmo_aarch64_instruction_size() <= sizeof(exarmo_aarch64_instruction)); + InitAArch64Settings(); Architecture* arm64 = new Arm64Architecture(); diff --git a/arch/arm64/arm64test.py b/arch/arm64/arm64test.py index 73d29f139..3386ba640 100755 --- a/arch/arm64/arm64test.py +++ b/arch/arm64/arm64test.py @@ -9,7 +9,7 @@ import binaryninja from binaryninja import binaryview from binaryninja import lowlevelil -from binaryninja.enums import LowLevelILOperation, ILInstructionAttribute +from binaryninja.enums import LowLevelILOperation, ILInstructionAttribute, InstructionTextTokenType path_here = pathlib.Path(__file__).parent.absolute() path_il_h = os.path.join(path_here, 'il.h') @@ -18,9 +18,9 @@ tests_udf = [ - # udf #0 + # udf #0x0 (b'\x00\x00\x00\x00', 'LLIL_TRAP(0)'), - # udf #1 + # udf #0x1 (b'\x01\x00\x00\x00', 'LLIL_TRAP(1)'), ] @@ -97,7 +97,7 @@ # mixed instructions from old tests # BLRAA_64P_branch_reg 1101011100111111000010xxxxxxxxxx (b'\x14\x0B\x3F\xD7', 'LLIL_CALL(LLIL_REG.q(x24))', ATTR_PTR_AUTH), # blraa x24, x20 - (b'\xFD\x0A\x3F\xD7', 'LLIL_CALL(LLIL_REG.q(x23))', ATTR_PTR_AUTH), # blraa x23, x29 + (b'\xFD\x0A\x3F\xD7', 'LLIL_CALL(LLIL_REG.q(x23))', ATTR_PTR_AUTH), # blraa x23, fp # BLRAAZ_64_branch_reg 1101011000111111000010xxxxx11111 (b'\xDF\x09\x3F\xD6', 'LLIL_CALL(LLIL_REG.q(x14))', ATTR_PTR_AUTH), # blraaz x14 (b'\xDF\x08\x3F\xD6', 'LLIL_CALL(LLIL_REG.q(x6))', ATTR_PTR_AUTH), # blraaz x6 @@ -125,16 +125,16 @@ (b'\x63\x6E\x62\xF8', 'LLIL_SET_REG.q(x19,LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0xFFFFFFFFFFFFF130)));' + \ ' LLIL_SET_REG.q(x3,LLIL_LOAD.q(LLIL_REG.q(x19)))', ATTR_PTR_AUTH), # ldraa x3, [x19, #-3792]! # LDRAA_64_ldst_pac 111110000x1xxxxxxxxxxxxxxxxxxxxx - (b'\x90\x15\x62\xF8', 'LLIL_SET_REG.q(x16,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0xFFFFFFFFFFFFF108))))', ATTR_PTR_AUTH), # ldraa x16, [x12, #-3832] - (b'\x52\x26\x73\xF8', 'LLIL_SET_REG.q(x18,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0xFFFFFFFFFFFFF990))))', ATTR_PTR_AUTH), # ldraa x18, [x18, #-1648] + (b'\x90\x15\x62\xF8', 'LLIL_SET_REG.q(x16,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0xFFFFFFFFFFFFF108))))', ATTR_PTR_AUTH), # ldraa x16, [x12, #-0xef8] + (b'\x52\x26\x73\xF8', 'LLIL_SET_REG.q(x18,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0xFFFFFFFFFFFFF990))))', ATTR_PTR_AUTH), # ldraa x18, [x18, #-0x670] # LDRAB_64W_ldst_pac 111110001x1xxxxxxxxx11xxxxxxxxxx (b'\x68\xDE\xB8\xF8', 'LLIL_SET_REG.q(x19,LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0xC68)));' + \ ' LLIL_SET_REG.q(x8,LLIL_LOAD.q(LLIL_REG.q(x19)))', ATTR_PTR_AUTH), # ldrab x8, [x19, #3176]! (b'\x8D\x0D\xFF\xF8', 'LLIL_SET_REG.q(x12,LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0xFFFFFFFFFFFFFF80)));' + \ ' LLIL_SET_REG.q(x13,LLIL_LOAD.q(LLIL_REG.q(x12)))', ATTR_PTR_AUTH), # ldrab x13, [x12, #-o]! # LDRAB_64_ldst_pac 111110001x1xxxxxxxxxxxxxxxxxxxxx - (b'\x94\xF5\xA1\xF8', 'LLIL_SET_REG.q(x20,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0xF8))))', ATTR_PTR_AUTH), # ldrab x20, [x12, #248] - (b'\x2B\x35\xAA\xF8', 'LLIL_SET_REG.q(x11,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x518))))', ATTR_PTR_AUTH), # ldrab x11, [x9, #1304] + (b'\x94\xF5\xA1\xF8', 'LLIL_SET_REG.q(x20,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0xF8))))', ATTR_PTR_AUTH), # ldrab x20, [x12, #0xf8] + (b'\x2B\x35\xAA\xF8', 'LLIL_SET_REG.q(x11,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x518))))', ATTR_PTR_AUTH), # ldrab x11, [x9, #0x518] (b'\x28\x1B\x02\x90', 'LLIL_SET_REG.q(x8,LLIL_CONST.q(0x4364000))'), # ldrsw x8, 0x100008000 # RETAA_64E_branch_reg 11010110010111110000101111111111 (b'\xFF\x0B\x5F\xD6', 'LLIL_RET(LLIL_REG.q(lr))', ATTR_PTR_AUTH), # retaa @@ -164,7 +164,7 @@ (b'\xE1\x3F\xC1\xDA', 'LLIL_INTRINSIC([x1],__autdb,[LLIL_REG.q(x1),LLIL_CONST.q(0x0)])'), # autia x26, x9 (example of encoding: AUTIA_64P_dp_1src) (b'\x3A\x11\xC1\xDA', 'LLIL_INTRINSIC([x26],__autia,[LLIL_REG.q(x26),LLIL_REG.q(x9)])'), - # autiza x30 (example of encoding: AUTIZA_64Z_dp_1src) + # autiza lr (example of encoding: AUTIZA_64Z_dp_1src) (b'\xFE\x33\xC1\xDA', 'LLIL_INTRINSIC([lr],__autia,[LLIL_REG.q(lr),LLIL_CONST.q(0x0)])'), # autib x18, x21 (example of encoding: AUTIB_64P_dp_1src) (b'\xB2\x16\xC1\xDA', 'LLIL_INTRINSIC([x18],__autib,[LLIL_REG.q(x18),LLIL_REG.q(x21)])'), @@ -192,7 +192,7 @@ (b'\xC6\x01\xC1\xDA', 'LLIL_INTRINSIC([x6],__pacia,[LLIL_REG.q(x6),LLIL_REG.q(x14)])'), # paciza x21 (example of encoding: PACIZA_64Z_dp_1src) (b'\xF5\x23\xC1\xDA', 'LLIL_INTRINSIC([x21],__pacia,[LLIL_REG.q(x21),LLIL_CONST.q(0x0)])'), - # pacib x29, x4 (example of encoding: PACIB_64P_dp_1src) + # pacib fp, x4 (example of encoding: PACIB_64P_dp_1src) (b'\x9D\x04\xC1\xDA', 'LLIL_INTRINSIC([fp],__pacib,[LLIL_REG.q(fp),LLIL_REG.q(x4)])'), # pacizb x14 (example of encoding: PACIZB_64Z_dp_1src) (b'\xEE\x27\xC1\xDA', 'LLIL_INTRINSIC([x14],__pacib,[LLIL_REG.q(x14),LLIL_CONST.q(0x0)])'), @@ -223,7 +223,7 @@ # mixed instructions from old tests # PACDA_64P_dp_1src 1101101011000001000010xxxxxxxxxx - (b'\xAC\x0B\xC1\xDA', 'LLIL_INTRINSIC([x12],__pacda,[LLIL_REG.q(x12),LLIL_REG.q(fp)])'), # pacda x12, x29 + (b'\xAC\x0B\xC1\xDA', 'LLIL_INTRINSIC([x12],__pacda,[LLIL_REG.q(x12),LLIL_REG.q(fp)])'), # pacda x12, fp (b'\xD2\x09\xC1\xDA', 'LLIL_INTRINSIC([x18],__pacda,[LLIL_REG.q(x18),LLIL_REG.q(x14)])'), # pacda x18, x14 # PACDB_64P_dp_1src 1101101011000001000011xxxxxxxxxx (b'\xF9\x0E\xC1\xDA', 'LLIL_INTRINSIC([x25],__pacdb,[LLIL_REG.q(x25),LLIL_REG.q(x23)])'), # pacdb x25, x23 @@ -258,7 +258,7 @@ (b'\x61\x06\xC1\xDA', 'LLIL_INTRINSIC([x1],__pacib,[LLIL_REG.q(x1),LLIL_REG.q(x19)])'), # pacib x1, x19 # PACIZA_64Z_dp_1src 110110101100000100100xxxxxxxxxxx (b'\xE3\x23\xC1\xDA', 'LLIL_INTRINSIC([x3],__pacia,[LLIL_REG.q(x3),LLIL_CONST.q(0x0)])'), # paciza x3 - (b'\xFE\x23\xC1\xDA', 'LLIL_INTRINSIC([lr],__pacia,[LLIL_REG.q(lr),LLIL_CONST.q(0x0)])'), # paciza x30 + (b'\xFE\x23\xC1\xDA', 'LLIL_INTRINSIC([lr],__pacia,[LLIL_REG.q(lr),LLIL_CONST.q(0x0)])'), # paciza lr # PACIZB_64Z_dp_1src 11011010110000010010xxxxxxxxxxxx (b'\xE3\x27\xC1\xDA', 'LLIL_INTRINSIC([x3],__pacib,[LLIL_REG.q(x3),LLIL_CONST.q(0x0)])'), # pacizb x3 (b'\xE7\x27\xC1\xDA', 'LLIL_INTRINSIC([x7],__pacib,[LLIL_REG.q(x7),LLIL_CONST.q(0x0)])'), # pacizb x7 @@ -321,7 +321,7 @@ (b'\xFF\x47\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), (b'\xF9\x43\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # mixed instructions from old tests - (b'\xAC\x0B\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacda x12, x29 + (b'\xAC\x0B\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacda x12, fp (b'\xD2\x09\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacda x18, x14 (b'\xF9\x0E\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacdb x25, x23 (b'\xBA\x0C\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacdb x26, x5 @@ -342,7 +342,7 @@ (b'\x84\x06\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacib x4, x20 (b'\x61\x06\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacib x1, x19 (b'\xE3\x23\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # paciza x3 - (b'\xFE\x23\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # paciza x30 + (b'\xFE\x23\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # paciza lr (b'\xE3\x27\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacizb x3 (b'\xE7\x27\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # pacizb x7 (b'\xF8\x47\xC1\xDA', 'LLIL_NOP()', ATTR_PTR_AUTH), # xpacd x24 @@ -383,7 +383,7 @@ # LDAPURSB , [{, #}] (b'\x00\x72\x9D\x19', 'LLIL_SET_REG.q(x0,LLIL_SX.q(LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x16),LLIL_CONST.q(0xFFFFFFFFFFFFFFD7)))))'), # ldapursb x0, [x16, #-0x29] (b'\xB0\x40\x8A\x19', 'LLIL_SET_REG.q(x16,LLIL_SX.q(LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0xA4)))))'), # ldapursb x16, [x5, #0xa4] - (b'\x9E\xC2\x84\x19', 'LLIL_SET_REG.q(lr,LLIL_SX.q(LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x4C)))))'), # ldapursb x30, [x20, #0x4c] + (b'\x9E\xC2\x84\x19', 'LLIL_SET_REG.q(lr,LLIL_SX.q(LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x4C)))))'), # ldapursb lr, [x20, #0x4c] (b'\x2B\x63\x81\x19', 'LLIL_SET_REG.q(x11,LLIL_SX.q(LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x16)))))'), # ldapursb x11, [x25, #0x16] # LDAPURH , [{, #}] (b'\x21\x72\x40\x59', 'LLIL_SET_REG.d(w1,LLIL_ZX.d(LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x7)))))'), # ldapurh w1, [x17, #0x7] @@ -401,7 +401,7 @@ (b'\x19\x01\x91\x59', 'LLIL_SET_REG.q(x25,LLIL_SX.q(LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0xFFFFFFFFFFFFFF10)))))'), # ldapursh x25, [x8, #-0xf0] (b'\x4F\xE1\x8D\x59', 'LLIL_SET_REG.q(x15,LLIL_SX.q(LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x10),LLIL_CONST.q(0xDE)))))'), # ldapursh x15, [x10, #0xde] # LDAPURSW , [{, #}] - (b'\x1D\xA1\x80\x99', 'LLIL_SET_REG.q(fp,LLIL_SX.q(LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0xA)))))'), # ldapursw x29, [x8, #0xa] + (b'\x1D\xA1\x80\x99', 'LLIL_SET_REG.q(fp,LLIL_SX.q(LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0xA)))))'), # ldapursw fp, [x8, #0xa] (b'\xD8\xD2\x83\x99', 'LLIL_SET_REG.q(x24,LLIL_SX.q(LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x3D)))))'), # ldapursw x24, [x22, #0x3d] (b'\xBA\xD2\x9E\x99', 'LLIL_SET_REG.q(x26,LLIL_SX.q(LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x21),LLIL_CONST.q(0xFFFFFFFFFFFFFFED)))))'), # ldapursw x26, [x21, #-0x13] (b'\x45\x43\x89\x99', 'LLIL_SET_REG.q(x5,LLIL_SX.q(LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x26),LLIL_CONST.q(0x94)))))'), # ldapursw x5, [x26, #0x94] @@ -462,8 +462,37 @@ ' LLIL_SET_REG.q(x9,LLIL_OR.q(LLIL_REG.q(x9),LLIL_CONST.q(0xBD770000)))'), # movk x9, #0xbd77, lsl #0x10 ] +tests_mte_tags = [ + # stg x1, [x2], #0x20 + (b'\x41\x24\x20\xD9', 'LLIL_INTRINSIC([],__stg,[LLIL_REG.q(x1),LLIL_REG.q(x2)]);' + \ + ' LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20)))'), + # stg x1, [x2, #0x20]! + (b'\x41\x2C\x20\xD9', 'LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20)));' + \ + ' LLIL_INTRINSIC([],__stg,[LLIL_REG.q(x1),LLIL_REG.q(x2)])'), + # stg x1, [x2, #0x20] + (b'\x41\x28\x20\xD9', 'LLIL_INTRINSIC([],__stg,[LLIL_REG.q(x1),LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20))])'), + # stg x1, [x2] + (b'\x41\x08\x20\xD9', 'LLIL_INTRINSIC([],__stg,[LLIL_REG.q(x1),LLIL_REG.q(x2)])'), + # stgp x1, x3, [x2, #0x20] + (b'\x41\x0C\x01\x69', 'LLIL_INTRINSIC([],__stgp,[LLIL_REG.q(x1),LLIL_REG.q(x3),LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20))])'), + # stgp x1, x3, [x2, #0x20]! + (b'\x41\x0C\x81\x69', 'LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20)));' + \ + ' LLIL_INTRINSIC([],__stgp,[LLIL_REG.q(x1),LLIL_REG.q(x3),LLIL_REG.q(x2)])'), + # stgp x1, x3, [x2], #0x20 + (b'\x41\x0C\x81\x68', 'LLIL_INTRINSIC([],__stgp,[LLIL_REG.q(x1),LLIL_REG.q(x3),LLIL_REG.q(x2)]);' + \ + ' LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20)))'), + # ldg x1, [x2, #0x20] + (b'\x41\x20\x60\xD9', 'LLIL_INTRINSIC([x1],__ldg,[LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20))])'), + # st2g x1, [x2, #0x20]! + (b'\x41\x2C\xA0\xD9', 'LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20)));' + \ + ' LLIL_INTRINSIC([],__st2g,[LLIL_REG.q(x1),LLIL_REG.q(x2)])'), + # stz2g x1, [x2], #0x20 + (b'\x41\x24\xE0\xD9', 'LLIL_INTRINSIC([],__stz2g,[LLIL_REG.q(x1),LLIL_REG.q(x2)]);' + \ + ' LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x20)))'), +] + tests_mvni = [ - (b'\xE2\x05\x01\x6F', 'LLIL_SET_REG.o(v2,LLIL_NOT.o(LLIL_CONST.o(0x2F)))'), # mvni v2.4s, #0x2f + (b'\xE2\x05\x01\x6F', 'LLIL_SET_REG.o(v2,LLIL_NOT.o(LLIL_CONST.o(0x2F)))'), # mvni v2.4s, #0x2f ] # https://github.com/Vector35/binaryninja-api/issues/2791 @@ -472,31 +501,31 @@ ] tests_msr = [ - # mrs x23, s3_7_c14_c2_4 MOV_MOVA_ZA_P_RZ_Q + # mrs x23, s3_7_c14_c2_4 MRS_RS_systemmove (b'\x97\xE2\x3F\xD5', 'LLIL_INTRINSIC([x23],_ReadMSR,[LLIL_CONST.d(0xFF14)])'), - # mrs x28, trcstallctlr MOV_MOVA_ZA_P_RZ_Q + # mrs x28, trcstallctlr MRS_RS_systemmove (b'\x1C\x0B\x31\xD5', 'LLIL_INTRINSIC([x28],_ReadMSR,[LLIL_CONST.d(0x8858)])'), - # mrs x17, trccidcvr0 MOV_MOVA_ZA_P_RZ_Q + # mrs x17, trccidcvr0 MRS_RS_systemmove (b'\x11\x30\x31\xD5', 'LLIL_INTRINSIC([x17],_ReadMSR,[LLIL_CONST.d(0x8980)])'), - # mrs x29, pmevcntr24_el0 MOV_MOVA_ZA_P_RZ_Q + # mrs fp, pmevcntr24_el0 MRS_RS_systemmove (b'\x1D\xEB\x3B\xD5', 'LLIL_INTRINSIC([fp],_ReadMSR,[LLIL_CONST.d(0xDF58)])'), - # mrs x30, s3_1_c5_c3_1 MRS_RS_systemmove + # mrs lr, s3_1_c5_c3_1 MRS_RS_systemmove (b'\x3E\x53\x39\xD5', 'LLIL_INTRINSIC([lr],_ReadMSR,[LLIL_CONST.d(0xCA99)])'), - # mrs x29, s3_4_c9_c3_2 MRS_RS_systemmove + # mrs fp, s3_4_c9_c3_2 MRS_RS_systemmove (b'\x5D\x93\x3C\xD5', 'LLIL_INTRINSIC([fp],_ReadMSR,[LLIL_CONST.d(0xE49A)])'), # mrs x16, s2_4_c0_c14_1 MRS_RS_systemmove (b'\x30\x0E\x34\xD5', 'LLIL_INTRINSIC([x16],_ReadMSR,[LLIL_CONST.d(0xA071)])'), # mrs x26, s2_3_c8_c14_1 MRS_RS_systemmove (b'\x3A\x8E\x33\xD5', 'LLIL_INTRINSIC([x26],_ReadMSR,[LLIL_CONST.d(0x9C71)])'), # msr spsel, #0x9 MSR_SI_pstate - (b'\xBF\x49\x00\xD5', 'LLIL_INTRINSIC([],_WriteMSR,[LLIL_CONST.d(0x205),LLIL_CONST.d(0x9)])'), - # msr s0_0_c4_c5_4, xzr MSR_SI_pstate - (b'\x9F\x45\x00\xD5', 'LLIL_INTRINSIC([],_WriteMSR,[LLIL_CONST.d(0xC213),LLIL_CONST.d(0x5)])'), + (b'\xBF\x49\x00\xD5', 'LLIL_INTRINSIC([],_WritePSTATE,[LLIL_CONST.d(0x205),LLIL_CONST.d(0x9)])'), + # msr pan, #0x5 MSR_SI_pstate + (b'\x9F\x45\x00\xD5', 'LLIL_INTRINSIC([],_WritePSTATE,[LLIL_CONST.d(0x204),LLIL_CONST.d(0x5)])'), # msr daifset, #0xe MSR_SI_pstate - (b'\xDF\x4E\x03\xD5', 'LLIL_INTRINSIC([],_WriteMSR,[LLIL_CONST.d(0x1A06),LLIL_CONST.d(0xE)])'), + (b'\xDF\x4E\x03\xD5', 'LLIL_INTRINSIC([],_WritePSTATE,[LLIL_CONST.d(0x1A06),LLIL_CONST.d(0xE)])'), # msr dit, #0x5 MSR_SI_pstate - (b'\x5F\x45\x03\xD5', 'LLIL_INTRINSIC([],_WriteMSR,[LLIL_CONST.d(0xDA15),LLIL_CONST.d(0x5)])'), + (b'\x5F\x45\x03\xD5', 'LLIL_INTRINSIC([],_WritePSTATE,[LLIL_CONST.d(0x1A02),LLIL_CONST.d(0x5)])'), # msr s3_3_c1_c9_1, x11 MSR_SR_systemmove (b'\x2B\x19\x1B\xD5', 'LLIL_INTRINSIC([],_WriteMSR,[LLIL_CONST.d(0xD8C9),LLIL_REG.q(x11)])'), # msr s3_6_c4_c7_7, x14 MSR_SR_systemmove @@ -583,7 +612,7 @@ (b'\xB2\x02\xE3\x9E', 'LLIL_SET_REG.w(h18,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.q(x21))))'), # ucvtf h18, x7 UCVTF_H64_float2int (b'\xF2\x00\xE3\x9E', 'LLIL_SET_REG.w(h18,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.q(x7))))'), - # ucvtf h27, x29 UCVTF_H64_float2int + # ucvtf h27, fp UCVTF_H64_float2int (b'\xBB\x03\xE3\x9E', 'LLIL_SET_REG.w(h27,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.q(fp))))'), # 32-bit GPR to 64-bit FP # ucvtf d0, w7 UCVTF_D32_float2int @@ -598,11 +627,11 @@ (b'\xE0\x00\x63\x1E', 'LLIL_SET_REG.q(d0,LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.d(w7))))'), # 32-bit GPR to 64-bit FP + # # ucvtf d25, w5, #0x1c UCVTF_D32_float2fix - (b'\xB9\x90\x43\x1E', 'LLIL_INTRINSIC([d25],vcvtd_n_f64_u32,[LLIL_REG.d(w5),LLIL_CONST.q(0x1C)])'), + (b'\xB9\x90\x43\x1E', 'LLIL_SET_REG.q(d25,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.d(w5))),LLIL_FLOAT_CONST.q(268435456.0)))'), # ucvtf d22, w9, #0x2 UCVTF_D32_float2fix - (b'\x36\xF9\x43\x1E', 'LLIL_INTRINSIC([d22],vcvtd_n_f64_u32,[LLIL_REG.d(w9),LLIL_CONST.q(0x2)])'), + (b'\x36\xF9\x43\x1E', 'LLIL_SET_REG.q(d22,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.d(w9))),LLIL_FLOAT_CONST.q(4.0)))'), # ucvtf d12, w28, #0x3 UCVTF_D32_float2fix - (b'\x8C\xF7\x43\x1E', 'LLIL_INTRINSIC([d12],vcvtd_n_f64_u32,[LLIL_REG.d(w28),LLIL_CONST.q(0x3)])'), + (b'\x8C\xF7\x43\x1E', 'LLIL_SET_REG.q(d12,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.d(w28))),LLIL_FLOAT_CONST.q(8.0)))'), # 32-bit GPR to 32-bit FP # ucvtf s29, w24 UCVTF_S32_float2int (b'\x1D\x03\x23\x1E', 'LLIL_SET_REG.d(s29,LLIL_INT_TO_FLOAT.d(LLIL_ZX.d(LLIL_REG.d(w24))))'), @@ -626,37 +655,37 @@ tests_ucvtf2 = [ # UCVTF_D32_float2fix 00011110010000111xxxxxxxxxxxxxxx # ucvtf d18, w3, #0x1f UCVTF_D32_float2fix - (b'\x72\x84\x43\x1E', 'LLIL_INTRINSIC([d18],vcvtd_n_f64_u32,[LLIL_REG.d(w3),LLIL_CONST.q(0x1F)])'), + (b'\x72\x84\x43\x1E', 'LLIL_SET_REG.q(d18,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.d(w3))),LLIL_FLOAT_CONST.q(2147483648.0)))'), # UCVTF_D32_float2int 0001111001100011000000xxxxxxxxxx # ucvtf d0, w7 (b'\xE0\x00\x63\x1E', 'LLIL_SET_REG.q(d0,LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.d(w7))))'), # UCVTF_D64_float2fix 1001111001000011xxxxxxxxxxxxxxxx # ucvtf d19, x26, #0x23 - (b'\x53\x77\x43\x9E', 'LLIL_INTRINSIC([d19],vcvtd_n_f64_u64,[LLIL_REG.q(x26),LLIL_CONST.q(0x23)])'), + (b'\x53\x77\x43\x9E', 'LLIL_SET_REG.q(d19,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.q(x26)),LLIL_FLOAT_CONST.q(34359738368.0)))'), # UCVTF_D64_float2int 1001111001100011000000xxxxxxxxxx # ucvtf d30, x19 (b'\x7E\x02\x63\x9E', 'LLIL_SET_REG.q(d30,LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.q(x19))))'), # UCVTF_H32_float2fix 00011110110000111xxxxxxxxxxxxxxx # ucvtf h3, w29, #0x13 - (b'\xA3\xB7\xC3\x1E', 'LLIL_INTRINSIC([h3],vcvth_n_f16_u32,[LLIL_REG.d(w29),LLIL_CONST.q(0x13)])'), + (b'\xA3\xB7\xC3\x1E', 'LLIL_SET_REG.w(h3,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_ZX.q(LLIL_REG.d(w29))),LLIL_FLOAT_CONST.d(524288.0))))'), # UCVTF_H32_float2int 0001111011100011000000xxxxxxxxxx # ucvtf h5, w12 (b'\x85\x01\xE3\x1E', 'LLIL_SET_REG.w(h5,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.d(w12))))'), # UCVTF_H64_float2fix 1001111011000011xxxxxxxxxxxxxxxx # ucvtf h5, x13, #0x16 - (b'\xA5\xA9\xC3\x9E', 'LLIL_INTRINSIC([h5],vcvth_n_f16_u64,[LLIL_REG.q(x13),LLIL_CONST.q(0x16)])'), + (b'\xA5\xA9\xC3\x9E', 'LLIL_SET_REG.w(h5,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x13)),LLIL_FLOAT_CONST.d(4194304.0))))'), # UCVTF_H64_float2int 1001111011100011000000xxxxxxxxxx # ucvtf h3, x2 (b'\x43\x00\xE3\x9E', 'LLIL_SET_REG.w(h3,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.q(x2))))'), # UCVTF_S32_float2fix 00011110000000111xxxxxxxxxxxxxxx # ucvtf s1, w22, #0x1 - (b'\xC1\xFE\x03\x1E', 'LLIL_INTRINSIC([s1],vcvts_n_f32_u32,[LLIL_REG.d(w22),LLIL_CONST.q(0x1)])'), + (b'\xC1\xFE\x03\x1E', 'LLIL_SET_REG.d(s1,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_ZX.q(LLIL_REG.d(w22))),LLIL_FLOAT_CONST.d(2.0)))'), # UCVTF_S32_float2int 0001111000100011000000xxxxxxxxxx # ucvtf s29, w24 (b'\x1D\x03\x23\x1E', 'LLIL_SET_REG.d(s29,LLIL_INT_TO_FLOAT.d(LLIL_ZX.d(LLIL_REG.d(w24))))'), # UCVTF_S64_float2fix 1001111000000011xxxxxxxxxxxxxxxx # ucvtf s2, x27, #0xf UCVTF_S64_float2fix - (b'\x62\xC7\x03\x9E', 'LLIL_INTRINSIC([s2],vcvts_n_f32_u64,[LLIL_REG.q(x27),LLIL_CONST.q(0xF)])'), + (b'\x62\xC7\x03\x9E', 'LLIL_SET_REG.d(s2,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x27)),LLIL_FLOAT_CONST.d(32768.0)))'), # UCVTF_S64_float2int 1001111000100011000000xxxxxxxxxx # ucvtf s29, x5 (b'\xBD\x00\x23\x9E', 'LLIL_SET_REG.d(s29,LLIL_INT_TO_FLOAT.d(LLIL_ZX.d(LLIL_REG.q(x5))))'), @@ -671,7 +700,10 @@ (b'\x6B\xD9\x61\x6E', 'LLIL_INTRINSIC([v11],vcvtq_f64_u64,[LLIL_REG.o(v11)])'), # UCVTF_asimdmiscfp16_R 0x1011100111100111011xxxxxxxxxxx # ucvtf v31.4h, v29.4h - (b'\xBF\xDB\x79\x2E', 'LLIL_INTRINSIC([v31],vcvt_f16_u16,[LLIL_REG.o(v29)])'), + (b'\xBF\xDB\x79\x2E', 'LLIL_SET_REG.w(v31.h[0],LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.w(v29.h[0]))));' + \ + ' LLIL_SET_REG.w(v31.h[1],LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.w(v29.h[1]))));' + \ + ' LLIL_SET_REG.w(v31.h[2],LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.w(v29.h[2]))));' + \ + ' LLIL_SET_REG.w(v31.h[3],LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.w(v29.h[3]))))'), # UCVTF_asisdmisc_R 011111100x100001110110xxxxxxxxxx # ucvtf s16, s7 (b'\xF0\xD8\x21\x7E', 'LLIL_SET_REG.d(s16,LLIL_INT_TO_FLOAT.d(LLIL_ZX.d(LLIL_REG.d(s7))))'), @@ -684,31 +716,31 @@ # ucvtf d19, w25 UCVTF_D32_float2int (b'\x33\x03\x63\x1E', 'LLIL_SET_REG.q(d19,LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.d(w25))))'), # ucvtf d9, x12, #0x38 UCVTF_D64_float2fix - (b'\x89\x21\x43\x9E', 'LLIL_INTRINSIC([d9],vcvtd_n_f64_u64,[LLIL_REG.q(x12),LLIL_CONST.q(0x38)])'), + (b'\x89\x21\x43\x9E', 'LLIL_SET_REG.q(d9,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.q(x12)),LLIL_FLOAT_CONST.q(7.205759403792794e+16)))'), # ucvtf d30, x19 UCVTF_D64_float2int (b'\x7E\x02\x63\x9E', 'LLIL_SET_REG.q(d30,LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.q(x19))))'), # ucvtf d10, x28 UCVTF_D64_float2int (b'\x8A\x03\x63\x9E', 'LLIL_SET_REG.q(d10,LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.q(x28))))'), # ucvtf h16, w7, #0x1d UCVTF_H32_float2fix - (b'\xF0\x8C\xC3\x1E', 'LLIL_INTRINSIC([h16],vcvth_n_f16_u32,[LLIL_REG.d(w7),LLIL_CONST.q(0x1D)])'), + (b'\xF0\x8C\xC3\x1E', 'LLIL_SET_REG.w(h16,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_ZX.q(LLIL_REG.d(w7))),LLIL_FLOAT_CONST.d(536870912.0))))'), # ucvtf h5, w12 UCVTF_H32_float2int (b'\x85\x01\xE3\x1E', 'LLIL_SET_REG.w(h5,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.d(w12))))'), # ucvtf h30, w15 UCVTF_H32_float2int (b'\xFE\x01\xE3\x1E', 'LLIL_SET_REG.w(h30,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.d(w15))))'), # ucvtf h12, x18, #0x1c UCVTF_H64_float2fix - (b'\x4C\x92\xC3\x9E', 'LLIL_INTRINSIC([h12],vcvth_n_f16_u64,[LLIL_REG.q(x18),LLIL_CONST.q(0x1C)])'), + (b'\x4C\x92\xC3\x9E', 'LLIL_SET_REG.w(h12,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x18)),LLIL_FLOAT_CONST.d(268435456.0))))'), # ucvtf h3, x2 UCVTF_H64_float2int (b'\x43\x00\xE3\x9E', 'LLIL_SET_REG.w(h3,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.q(x2))))'), # ucvtf h18, x21 UCVTF_H64_float2int (b'\xB2\x02\xE3\x9E', 'LLIL_SET_REG.w(h18,LLIL_INT_TO_FLOAT.w(LLIL_ZX.w(LLIL_REG.q(x21))))'), # ucvtf s6, w24, #0x8 UCVTF_S32_float2fix - (b'\x06\xE3\x03\x1E', 'LLIL_INTRINSIC([s6],vcvts_n_f32_u32,[LLIL_REG.d(w24),LLIL_CONST.q(0x8)])'), + (b'\x06\xE3\x03\x1E', 'LLIL_SET_REG.d(s6,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_ZX.q(LLIL_REG.d(w24))),LLIL_FLOAT_CONST.d(256.0)))'), # ucvtf s29, w24 UCVTF_S32_float2int (b'\x1D\x03\x23\x1E', 'LLIL_SET_REG.d(s29,LLIL_INT_TO_FLOAT.d(LLIL_ZX.d(LLIL_REG.d(w24))))'), # ucvtf s6, w7 UCVTF_S32_float2int (b'\xE6\x00\x23\x1E', 'LLIL_SET_REG.d(s6,LLIL_INT_TO_FLOAT.d(LLIL_ZX.d(LLIL_REG.d(w7))))'), # ucvtf s8, x27, #0xf UCVTF_S64_float2fix - (b'\x68\xC7\x03\x9E', 'LLIL_INTRINSIC([s8],vcvts_n_f32_u64,[LLIL_REG.q(x27),LLIL_CONST.q(0xF)])'), + (b'\x68\xC7\x03\x9E', 'LLIL_SET_REG.d(s8,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x27)),LLIL_FLOAT_CONST.d(32768.0)))'), # ucvtf s29, x5 UCVTF_S64_float2int (b'\xBD\x00\x23\x9E', 'LLIL_SET_REG.d(s29,LLIL_INT_TO_FLOAT.d(LLIL_ZX.d(LLIL_REG.q(x5))))'), # ucvtf s23, x8 UCVTF_S64_float2int @@ -724,7 +756,7 @@ # ucvtf d26, d30 UCVTF_asisdmisc_R (b'\xDA\xDB\x61\x7E', 'LLIL_SET_REG.q(d26,LLIL_INT_TO_FLOAT.q(LLIL_ZX.q(LLIL_REG.q(d30))))'), # ucvtf h13, h28, #0x4 UCVTF_asisdshf_C - (b'\x8D\xE7\x1C\x7F', 'LLIL_INTRINSIC([h13],vcvt_n_f64_u64,[LLIL_REG.w(h28),LLIL_CONST.q(0x4)])'), + (b'\x8D\xE7\x1C\x7F', 'LLIL_INTRINSIC([h13],vcvth_n_f16_u16,[LLIL_REG.w(h28),LLIL_CONST.q(0x4)])'), ] tests_ret = [ @@ -794,750 +826,774 @@ # xtn v13.2s, v10.2d XTN_ASIMDMISC_N (b'\x4D\x29\xA1\x0E', 'LLIL_INTRINSIC([v13],vmovn_s64,[LLIL_REG.o(v10)])'), # xtn2 v27.8h, v19.4s XTN_ASIMDMISC_N - (b'\x7B\x2A\x61\x4E', 'LLIL_INTRINSIC([v27],vmovn_high_s32,[LLIL_REG.o(v19)])'), + (b'\x7B\x2A\x61\x4E', 'LLIL_INTRINSIC([v27],vmovn_high_s32,[LLIL_REG.o(v27),LLIL_REG.o(v19)])'), # xtn2 v26.4s, v7.2d XTN_ASIMDMISC_N - (b'\xFA\x28\xA1\x4E', 'LLIL_INTRINSIC([v26],vmovn_high_s64,[LLIL_REG.o(v7)])'), + (b'\xFA\x28\xA1\x4E', 'LLIL_INTRINSIC([v26],vmovn_high_s64,[LLIL_REG.o(v26),LLIL_REG.o(v7)])'), # xtn2 v3.4s, v22.2d XTN_ASIMDMISC_N - (b'\xC3\x2A\xA1\x4E', 'LLIL_INTRINSIC([v3],vmovn_high_s64,[LLIL_REG.o(v22)])'), + (b'\xC3\x2A\xA1\x4E', 'LLIL_INTRINSIC([v3],vmovn_high_s64,[LLIL_REG.o(v3),LLIL_REG.o(v22)])'), # xtn2 v13.8h, v23.4s XTN_ASIMDMISC_N - (b'\xED\x2A\x61\x4E', 'LLIL_INTRINSIC([v13],vmovn_high_s32,[LLIL_REG.o(v23)])'), + (b'\xED\x2A\x61\x4E', 'LLIL_INTRINSIC([v13],vmovn_high_s32,[LLIL_REG.o(v13),LLIL_REG.o(v23)])'), ] tests_dc_tlbi_at = [ # tlbi alle3 TLBI_SYS_CR_systeminstrs - (b'\x1F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3438)])'), + (b'\x1F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7438)])'), # tlbi vmalle1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x408),LLIL_REG.q(x21)])'), + (b'\x15\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4408),LLIL_REG.q(x21)])'), # tlbi vae1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x409),LLIL_REG.q(x21)])'), + (b'\x35\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4409),LLIL_REG.q(x21)])'), # tlbi aside1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40A),LLIL_REG.q(x21)])'), + (b'\x55\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440A),LLIL_REG.q(x21)])'), # tlbi vaae1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40B),LLIL_REG.q(x21)])'), + (b'\x75\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440B),LLIL_REG.q(x21)])'), # tlbi vale1os, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40D),LLIL_REG.q(x21)])'), + (b'\xB5\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440D),LLIL_REG.q(x21)])'), # tlbi vaale1os, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40F),LLIL_REG.q(x21)])'), + (b'\xF5\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440F),LLIL_REG.q(x21)])'), # tlbi rvae1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x411),LLIL_REG.q(x21)])'), + (b'\x35\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4411),LLIL_REG.q(x21)])'), # tlbi rvaae1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x413),LLIL_REG.q(x21)])'), + (b'\x75\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4413),LLIL_REG.q(x21)])'), # tlbi rvale1is, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x415),LLIL_REG.q(x21)])'), + (b'\xB5\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4415),LLIL_REG.q(x21)])'), # tlbi rvaale1is, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x417),LLIL_REG.q(x21)])'), + (b'\xF5\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4417),LLIL_REG.q(x21)])'), # tlbi vmalle1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x418),LLIL_REG.q(x21)])'), + (b'\x15\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4418),LLIL_REG.q(x21)])'), # tlbi vae1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x419),LLIL_REG.q(x21)])'), + (b'\x35\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4419),LLIL_REG.q(x21)])'), + # tlbip vae1is, x0, x1 TLBIP_SYSP_CR_syspairinstrs + (b'\x20\x83\x48\xD5', 'LLIL_INTRINSIC([],__tlbip,[LLIL_CONST.d(0x4419),LLIL_REG_SPLIT.q(x1,x0)])'), # tlbi aside1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41A),LLIL_REG.q(x21)])'), + (b'\x55\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441A),LLIL_REG.q(x21)])'), # tlbi vaae1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41B),LLIL_REG.q(x21)])'), + (b'\x75\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441B),LLIL_REG.q(x21)])'), # tlbi vale1is, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41D),LLIL_REG.q(x21)])'), + (b'\xB5\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441D),LLIL_REG.q(x21)])'), # tlbi vaale1is, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41F),LLIL_REG.q(x21)])'), + (b'\xF5\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441F),LLIL_REG.q(x21)])'), # tlbi rvae1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x429),LLIL_REG.q(x21)])'), + (b'\x35\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4429),LLIL_REG.q(x21)])'), # tlbi rvaae1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x42B),LLIL_REG.q(x21)])'), + (b'\x75\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x442B),LLIL_REG.q(x21)])'), # tlbi rvale1os, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x42D),LLIL_REG.q(x21)])'), + (b'\xB5\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x442D),LLIL_REG.q(x21)])'), # tlbi rvaale1os, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x42F),LLIL_REG.q(x21)])'), + (b'\xF5\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x442F),LLIL_REG.q(x21)])'), # tlbi rvae1, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x431),LLIL_REG.q(x21)])'), + (b'\x35\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4431),LLIL_REG.q(x21)])'), # tlbi rvaae1, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x433),LLIL_REG.q(x21)])'), + (b'\x75\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4433),LLIL_REG.q(x21)])'), # tlbi rvale1, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x435),LLIL_REG.q(x21)])'), + (b'\xB5\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4435),LLIL_REG.q(x21)])'), # tlbi rvaale1, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x437),LLIL_REG.q(x21)])'), - # tlbi vmalle1, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x438),LLIL_REG.q(x21)])'), + (b'\xF5\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4437),LLIL_REG.q(x21)])'), + # sys #0x0, c8, c7, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4438)])'), # tlbi vae1, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x439),LLIL_REG.q(x21)])'), + (b'\x35\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4439),LLIL_REG.q(x21)])'), # tlbi aside1, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43A),LLIL_REG.q(x21)])'), + (b'\x55\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443A),LLIL_REG.q(x21)])'), # tlbi vaae1, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43B),LLIL_REG.q(x21)])'), + (b'\x75\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443B),LLIL_REG.q(x21)])'), # tlbi vale1, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43D),LLIL_REG.q(x21)])'), + (b'\xB5\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443D),LLIL_REG.q(x21)])'), # tlbi vaale1, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43F),LLIL_REG.q(x21)])'), + (b'\xF5\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443F),LLIL_REG.q(x21)])'), # tlbi vmalle1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x488),LLIL_REG.q(x21)])'), + (b'\x15\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4488),LLIL_REG.q(x21)])'), # tlbi vae1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x489),LLIL_REG.q(x21)])'), + (b'\x35\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4489),LLIL_REG.q(x21)])'), # tlbi aside1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48A),LLIL_REG.q(x21)])'), + (b'\x55\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448A),LLIL_REG.q(x21)])'), # tlbi vaae1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48B),LLIL_REG.q(x21)])'), + (b'\x75\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448B),LLIL_REG.q(x21)])'), # tlbi vale1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48D),LLIL_REG.q(x21)])'), + (b'\xB5\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448D),LLIL_REG.q(x21)])'), # tlbi vaale1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48F),LLIL_REG.q(x21)])'), + (b'\xF5\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448F),LLIL_REG.q(x21)])'), # tlbi rvae1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x491),LLIL_REG.q(x21)])'), + (b'\x35\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4491),LLIL_REG.q(x21)])'), # tlbi rvaae1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x493),LLIL_REG.q(x21)])'), + (b'\x75\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4493),LLIL_REG.q(x21)])'), # tlbi rvale1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x495),LLIL_REG.q(x21)])'), + (b'\xB5\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4495),LLIL_REG.q(x21)])'), # tlbi rvaale1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x497),LLIL_REG.q(x21)])'), + (b'\xF5\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4497),LLIL_REG.q(x21)])'), # tlbi vmalle1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x498),LLIL_REG.q(x21)])'), + (b'\x15\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4498),LLIL_REG.q(x21)])'), # tlbi vae1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x499),LLIL_REG.q(x21)])'), + (b'\x35\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4499),LLIL_REG.q(x21)])'), # tlbi aside1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49A),LLIL_REG.q(x21)])'), + (b'\x55\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449A),LLIL_REG.q(x21)])'), # tlbi vaae1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49B),LLIL_REG.q(x21)])'), + (b'\x75\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449B),LLIL_REG.q(x21)])'), # tlbi vale1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49D),LLIL_REG.q(x21)])'), + (b'\xB5\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449D),LLIL_REG.q(x21)])'), # tlbi vaale1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49F),LLIL_REG.q(x21)])'), + (b'\xF5\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449F),LLIL_REG.q(x21)])'), # tlbi rvae1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4A9),LLIL_REG.q(x21)])'), + (b'\x35\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44A9),LLIL_REG.q(x21)])'), # tlbi rvaae1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4AB),LLIL_REG.q(x21)])'), + (b'\x75\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44AB),LLIL_REG.q(x21)])'), # tlbi rvale1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4AD),LLIL_REG.q(x21)])'), + (b'\xB5\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44AD),LLIL_REG.q(x21)])'), # tlbi rvaale1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4AF),LLIL_REG.q(x21)])'), + (b'\xF5\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44AF),LLIL_REG.q(x21)])'), # tlbi rvae1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B1),LLIL_REG.q(x21)])'), + (b'\x35\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B1),LLIL_REG.q(x21)])'), # tlbi rvaae1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B3),LLIL_REG.q(x21)])'), + (b'\x75\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B3),LLIL_REG.q(x21)])'), # tlbi rvale1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B5),LLIL_REG.q(x21)])'), + (b'\xB5\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B5),LLIL_REG.q(x21)])'), # tlbi rvaale1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B7),LLIL_REG.q(x21)])'), - # tlbi vmalle1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B8),LLIL_REG.q(x21)])'), + (b'\xF5\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B7),LLIL_REG.q(x21)])'), + # sys #0x0, c9, c7, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B8)])'), # tlbi vae1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B9),LLIL_REG.q(x21)])'), + (b'\x35\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B9),LLIL_REG.q(x21)])'), # tlbi aside1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BA),LLIL_REG.q(x21)])'), + (b'\x55\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BA),LLIL_REG.q(x21)])'), # tlbi vaae1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BB),LLIL_REG.q(x21)])'), + (b'\x75\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BB),LLIL_REG.q(x21)])'), # tlbi vale1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BD),LLIL_REG.q(x21)])'), + (b'\xB5\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BD),LLIL_REG.q(x21)])'), # tlbi vaale1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BF),LLIL_REG.q(x21)])'), + (b'\xF5\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BF),LLIL_REG.q(x21)])'), # tlbi ipas2e1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2401),LLIL_REG.q(x21)])'), + (b'\x35\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6401),LLIL_REG.q(x21)])'), # tlbi ripas2e1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2402),LLIL_REG.q(x21)])'), + (b'\x55\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6402),LLIL_REG.q(x21)])'), # tlbi ipas2le1is, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2405),LLIL_REG.q(x21)])'), + (b'\xB5\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6405),LLIL_REG.q(x21)])'), # tlbi ripas2le1is, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2406),LLIL_REG.q(x21)])'), + (b'\xD5\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6406),LLIL_REG.q(x21)])'), # tlbi alle2os, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2408),LLIL_REG.q(x21)])'), + (b'\x15\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6408),LLIL_REG.q(x21)])'), # tlbi vae2os, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2409),LLIL_REG.q(x21)])'), + (b'\x35\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6409),LLIL_REG.q(x21)])'), # tlbi alle1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x240C),LLIL_REG.q(x21)])'), + (b'\x95\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x640C),LLIL_REG.q(x21)])'), # tlbi vale2os, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x240D),LLIL_REG.q(x21)])'), + (b'\xB5\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x640D),LLIL_REG.q(x21)])'), # tlbi vmalls12e1os, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x240E),LLIL_REG.q(x21)])'), + (b'\xD5\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x640E),LLIL_REG.q(x21)])'), # tlbi rvae2is, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2411),LLIL_REG.q(x21)])'), + (b'\x35\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6411),LLIL_REG.q(x21)])'), # tlbi vmallws2e1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2412),LLIL_REG.q(x21)])'), + (b'\x55\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6412),LLIL_REG.q(x21)])'), # tlbi rvale2is, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2415),LLIL_REG.q(x21)])'), + (b'\xB5\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6415),LLIL_REG.q(x21)])'), # tlbi alle2is, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2418),LLIL_REG.q(x21)])'), + (b'\x15\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6418),LLIL_REG.q(x21)])'), # tlbi vae2is, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2419),LLIL_REG.q(x21)])'), + (b'\x35\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6419),LLIL_REG.q(x21)])'), # tlbi alle1is, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x241C),LLIL_REG.q(x21)])'), + (b'\x95\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x641C),LLIL_REG.q(x21)])'), # tlbi vale2is, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x241D),LLIL_REG.q(x21)])'), + (b'\xB5\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x641D),LLIL_REG.q(x21)])'), # tlbi vmalls12e1is, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x241E),LLIL_REG.q(x21)])'), + (b'\xD5\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x641E),LLIL_REG.q(x21)])'), # tlbi ipas2e1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2420),LLIL_REG.q(x21)])'), + (b'\x15\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6420),LLIL_REG.q(x21)])'), # tlbi ipas2e1, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2421),LLIL_REG.q(x21)])'), + (b'\x35\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6421),LLIL_REG.q(x21)])'), # tlbi ripas2e1, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2422),LLIL_REG.q(x21)])'), + (b'\x55\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6422),LLIL_REG.q(x21)])'), # tlbi ripas2e1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2423),LLIL_REG.q(x21)])'), + (b'\x75\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6423),LLIL_REG.q(x21)])'), # tlbi ipas2le1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2424),LLIL_REG.q(x21)])'), + (b'\x95\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6424),LLIL_REG.q(x21)])'), # tlbi ipas2le1, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2425),LLIL_REG.q(x21)])'), + (b'\xB5\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6425),LLIL_REG.q(x21)])'), # tlbi ripas2le1, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2426),LLIL_REG.q(x21)])'), + (b'\xD5\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6426),LLIL_REG.q(x21)])'), # tlbi ripas2le1os, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2427),LLIL_REG.q(x21)])'), + (b'\xF5\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6427),LLIL_REG.q(x21)])'), # tlbi rvae2os, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2429),LLIL_REG.q(x21)])'), + (b'\x35\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6429),LLIL_REG.q(x21)])'), # tlbi vmallws2e1os, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x242A),LLIL_REG.q(x21)])'), + (b'\x55\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x642A),LLIL_REG.q(x21)])'), # tlbi rvale2os, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x242D),LLIL_REG.q(x21)])'), + (b'\xB5\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x642D),LLIL_REG.q(x21)])'), # tlbi rvae2, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2431),LLIL_REG.q(x21)])'), - # tlbi vmallws2e1, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2432),LLIL_REG.q(x21)])'), + (b'\x35\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6431),LLIL_REG.q(x21)])'), + # sys #0x4, c8, c6, #0x2, x21 TLBI_SYS_CR_systeminstrs + (b'\x55\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6432)])'), # tlbi rvale2, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2435),LLIL_REG.q(x21)])'), - # tlbi alle2, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2438),LLIL_REG.q(x21)])'), + (b'\xB5\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6435),LLIL_REG.q(x21)])'), + # sys #0x4, c8, c7, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6438)])'), # tlbi vae2, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2439),LLIL_REG.q(x21)])'), - # tlbi alle1, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x243C),LLIL_REG.q(x21)])'), + (b'\x35\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6439),LLIL_REG.q(x21)])'), + # sys #0x4, c8, c7, #0x4, x21 TLBI_SYS_CR_systeminstrs + (b'\x95\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x643C)])'), # tlbi vale2, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x243D),LLIL_REG.q(x21)])'), - # tlbi vmalls12e1, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x243E),LLIL_REG.q(x21)])'), + (b'\xB5\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x643D),LLIL_REG.q(x21)])'), + # sys #0x4, c8, c7, #0x6, x21 TLBI_SYS_CR_systeminstrs + (b'\xD5\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x643E)])'), # tlbi ipas2e1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2481),LLIL_REG.q(x21)])'), + (b'\x35\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6481),LLIL_REG.q(x21)])'), # tlbi ripas2e1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2482),LLIL_REG.q(x21)])'), + (b'\x55\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6482),LLIL_REG.q(x21)])'), # tlbi ipas2le1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2485),LLIL_REG.q(x21)])'), + (b'\xB5\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6485),LLIL_REG.q(x21)])'), # tlbi ripas2le1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2486),LLIL_REG.q(x21)])'), + (b'\xD5\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6486),LLIL_REG.q(x21)])'), # tlbi alle2osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2488),LLIL_REG.q(x21)])'), + (b'\x15\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6488),LLIL_REG.q(x21)])'), # tlbi vae2osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2489),LLIL_REG.q(x21)])'), + (b'\x35\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6489),LLIL_REG.q(x21)])'), # tlbi alle1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x248C),LLIL_REG.q(x21)])'), + (b'\x95\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x648C),LLIL_REG.q(x21)])'), # tlbi vale2osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x248D),LLIL_REG.q(x21)])'), + (b'\xB5\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x648D),LLIL_REG.q(x21)])'), # tlbi vmalls12e1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x248E),LLIL_REG.q(x21)])'), + (b'\xD5\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x648E),LLIL_REG.q(x21)])'), # tlbi rvae2isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2491),LLIL_REG.q(x21)])'), + (b'\x35\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6491),LLIL_REG.q(x21)])'), # tlbi vmallws2e1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2492),LLIL_REG.q(x21)])'), + (b'\x55\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6492),LLIL_REG.q(x21)])'), # tlbi rvale2isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2495),LLIL_REG.q(x21)])'), + (b'\xB5\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6495),LLIL_REG.q(x21)])'), # tlbi alle2isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2498),LLIL_REG.q(x21)])'), + (b'\x15\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6498),LLIL_REG.q(x21)])'), # tlbi vae2isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2499),LLIL_REG.q(x21)])'), + (b'\x35\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6499),LLIL_REG.q(x21)])'), # tlbi alle1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x249C),LLIL_REG.q(x21)])'), + (b'\x95\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x649C),LLIL_REG.q(x21)])'), # tlbi vale2isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x249D),LLIL_REG.q(x21)])'), + (b'\xB5\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x649D),LLIL_REG.q(x21)])'), # tlbi vmalls12e1isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x249E),LLIL_REG.q(x21)])'), + (b'\xD5\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x649E),LLIL_REG.q(x21)])'), # tlbi ipas2e1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A0),LLIL_REG.q(x21)])'), + (b'\x15\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A0),LLIL_REG.q(x21)])'), # tlbi ipas2e1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A1),LLIL_REG.q(x21)])'), + (b'\x35\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A1),LLIL_REG.q(x21)])'), # tlbi ripas2e1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A2),LLIL_REG.q(x21)])'), + (b'\x55\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A2),LLIL_REG.q(x21)])'), # tlbi ripas2e1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A3),LLIL_REG.q(x21)])'), + (b'\x75\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A3),LLIL_REG.q(x21)])'), # tlbi ipas2le1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A4),LLIL_REG.q(x21)])'), + (b'\x95\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A4),LLIL_REG.q(x21)])'), # tlbi ipas2le1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A5),LLIL_REG.q(x21)])'), + (b'\xB5\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A5),LLIL_REG.q(x21)])'), # tlbi ripas2le1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A6),LLIL_REG.q(x21)])'), + (b'\xD5\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A6),LLIL_REG.q(x21)])'), # tlbi ripas2le1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A7),LLIL_REG.q(x21)])'), + (b'\xF5\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A7),LLIL_REG.q(x21)])'), # tlbi rvae2osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A9),LLIL_REG.q(x21)])'), + (b'\x35\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A9),LLIL_REG.q(x21)])'), # tlbi vmallws2e1osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24AA),LLIL_REG.q(x21)])'), + (b'\x55\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64AA),LLIL_REG.q(x21)])'), # tlbi rvale2osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24AD),LLIL_REG.q(x21)])'), + (b'\xB5\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64AD),LLIL_REG.q(x21)])'), # tlbi rvae2nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B1),LLIL_REG.q(x21)])'), - # tlbi vmallws2e1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x55\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B2),LLIL_REG.q(x21)])'), + (b'\x35\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B1),LLIL_REG.q(x21)])'), + # sys #0x4, c9, c6, #0x2, x21 TLBI_SYS_CR_systeminstrs + (b'\x55\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B2)])'), # tlbi rvale2nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B5),LLIL_REG.q(x21)])'), - # tlbi alle2nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B8),LLIL_REG.q(x21)])'), + (b'\xB5\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B5),LLIL_REG.q(x21)])'), + # sys #0x4, c9, c7, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B8)])'), # tlbi vae2nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B9),LLIL_REG.q(x21)])'), - # tlbi alle1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24BC),LLIL_REG.q(x21)])'), + (b'\x35\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B9),LLIL_REG.q(x21)])'), + # sys #0x4, c9, c7, #0x4, x21 TLBI_SYS_CR_systeminstrs + (b'\x95\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64BC)])'), # tlbi vale2nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24BD),LLIL_REG.q(x21)])'), - # tlbi vmalls12e1nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xD5\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24BE),LLIL_REG.q(x21)])'), - # tlbi alle3os, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3408),LLIL_REG.q(x21)])'), + (b'\xB5\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64BD),LLIL_REG.q(x21)])'), + # sys #0x4, c9, c7, #0x6, x21 TLBI_SYS_CR_systeminstrs + (b'\xD5\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64BE)])'), + # sys #0x6, c8, c1, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7408)])'), # tlbi vae3os, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3409),LLIL_REG.q(x21)])'), - # tlbi paallos, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x340C),LLIL_REG.q(x21)])'), + (b'\x35\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7409),LLIL_REG.q(x21)])'), + # sys #0x6, c8, c1, #0x4, x21 TLBI_SYS_CR_systeminstrs + (b'\x95\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x740C)])'), # tlbi vale3os, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x340D),LLIL_REG.q(x21)])'), + (b'\xB5\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x740D),LLIL_REG.q(x21)])'), # tlbi rvae3is, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3411),LLIL_REG.q(x21)])'), + (b'\x35\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7411),LLIL_REG.q(x21)])'), # tlbi rvale3is, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3415),LLIL_REG.q(x21)])'), - # tlbi alle3is, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3418),LLIL_REG.q(x21)])'), + (b'\xB5\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7415),LLIL_REG.q(x21)])'), + # sys #0x6, c8, c3, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7418)])'), # tlbi vae3is, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3419),LLIL_REG.q(x21)])'), + (b'\x35\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7419),LLIL_REG.q(x21)])'), # tlbi vale3is, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x341D),LLIL_REG.q(x21)])'), + (b'\xB5\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x741D),LLIL_REG.q(x21)])'), # tlbi rpaos, x21 TLBI_SYS_CR_systeminstrs - (b'\x75\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3423),LLIL_REG.q(x21)])'), + (b'\x75\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7423),LLIL_REG.q(x21)])'), # tlbi rpalos, x21 TLBI_SYS_CR_systeminstrs - (b'\xF5\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3427),LLIL_REG.q(x21)])'), + (b'\xF5\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7427),LLIL_REG.q(x21)])'), # tlbi rvae3os, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3429),LLIL_REG.q(x21)])'), + (b'\x35\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7429),LLIL_REG.q(x21)])'), # tlbi rvale3os, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x342D),LLIL_REG.q(x21)])'), + (b'\xB5\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x742D),LLIL_REG.q(x21)])'), # tlbi rvae3, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3431),LLIL_REG.q(x21)])'), + (b'\x35\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7431),LLIL_REG.q(x21)])'), # tlbi rvale3, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3435),LLIL_REG.q(x21)])'), - # tlbi alle3, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3438),LLIL_REG.q(x21)])'), + (b'\xB5\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7435),LLIL_REG.q(x21)])'), + # sys #0x6, c8, c7, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7438)])'), # tlbi vae3, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3439),LLIL_REG.q(x21)])'), - # tlbi paall, x21 TLBI_SYS_CR_systeminstrs - (b'\x95\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x343C),LLIL_REG.q(x21)])'), + (b'\x35\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7439),LLIL_REG.q(x21)])'), + # sys #0x6, c8, c7, #0x4, x21 TLBI_SYS_CR_systeminstrs + (b'\x95\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x743C)])'), # tlbi vale3, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x343D),LLIL_REG.q(x21)])'), - # tlbi alle3osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3488),LLIL_REG.q(x21)])'), + (b'\xB5\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x743D),LLIL_REG.q(x21)])'), + # sys #0x6, c9, c1, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7488)])'), # tlbi vae3osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3489),LLIL_REG.q(x21)])'), + (b'\x35\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7489),LLIL_REG.q(x21)])'), # tlbi vale3osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x348D),LLIL_REG.q(x21)])'), + (b'\xB5\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x748D),LLIL_REG.q(x21)])'), # tlbi rvae3isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3491),LLIL_REG.q(x21)])'), + (b'\x35\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7491),LLIL_REG.q(x21)])'), # tlbi rvale3isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3495),LLIL_REG.q(x21)])'), - # tlbi alle3isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3498),LLIL_REG.q(x21)])'), + (b'\xB5\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7495),LLIL_REG.q(x21)])'), + # sys #0x6, c9, c3, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7498)])'), # tlbi vae3isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3499),LLIL_REG.q(x21)])'), + (b'\x35\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7499),LLIL_REG.q(x21)])'), # tlbi vale3isnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x349D),LLIL_REG.q(x21)])'), + (b'\xB5\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x749D),LLIL_REG.q(x21)])'), # tlbi rvae3osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34A9),LLIL_REG.q(x21)])'), + (b'\x35\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74A9),LLIL_REG.q(x21)])'), # tlbi rvale3osnxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34AD),LLIL_REG.q(x21)])'), + (b'\xB5\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74AD),LLIL_REG.q(x21)])'), # tlbi rvae3nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B1),LLIL_REG.q(x21)])'), + (b'\x35\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B1),LLIL_REG.q(x21)])'), # tlbi rvale3nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B5),LLIL_REG.q(x21)])'), - # tlbi alle3nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x15\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B8),LLIL_REG.q(x21)])'), + (b'\xB5\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B5),LLIL_REG.q(x21)])'), + # sys #0x6, c9, c7, #0x0, x21 TLBI_SYS_CR_systeminstrs + (b'\x15\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B8)])'), # tlbi vae3nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\x35\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B9),LLIL_REG.q(x21)])'), + (b'\x35\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B9),LLIL_REG.q(x21)])'), # tlbi vale3nxs, x21 TLBI_SYS_CR_systeminstrs - (b'\xB5\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34BD),LLIL_REG.q(x21)])'), + (b'\xB5\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74BD),LLIL_REG.q(x21)])'), # tlbi vmalle1os TLBI_SYS_CR_systeminstrs - (b'\x1F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x408)])'), - # tlbi vae1os TLBI_SYS_CR_systeminstrs - (b'\x3F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x409)])'), - # tlbi aside1os TLBI_SYS_CR_systeminstrs - (b'\x5F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40A)])'), - # tlbi vaae1os TLBI_SYS_CR_systeminstrs - (b'\x7F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40B)])'), - # tlbi vale1os TLBI_SYS_CR_systeminstrs - (b'\xBF\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40D)])'), - # tlbi vaale1os TLBI_SYS_CR_systeminstrs - (b'\xFF\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x40F)])'), - # tlbi rvae1is TLBI_SYS_CR_systeminstrs - (b'\x3F\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x411)])'), - # tlbi rvaae1is TLBI_SYS_CR_systeminstrs - (b'\x7F\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x413)])'), - # tlbi rvale1is TLBI_SYS_CR_systeminstrs - (b'\xBF\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x415)])'), - # tlbi rvaale1is TLBI_SYS_CR_systeminstrs - (b'\xFF\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x417)])'), + (b'\x1F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4408)])'), + # tlbi vae1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4409),LLIL_CONST.q(0x0)])'), + # tlbi aside1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440A),LLIL_CONST.q(0x0)])'), + # tlbi vaae1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440B),LLIL_CONST.q(0x0)])'), + # tlbi vale1os, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440D),LLIL_CONST.q(0x0)])'), + # tlbi vaale1os, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x81\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x440F),LLIL_CONST.q(0x0)])'), + # tlbi rvae1is, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4411),LLIL_CONST.q(0x0)])'), + # tlbi rvaae1is, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4413),LLIL_CONST.q(0x0)])'), + # tlbi rvale1is, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4415),LLIL_CONST.q(0x0)])'), + # tlbi rvaale1is, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x82\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4417),LLIL_CONST.q(0x0)])'), # tlbi vmalle1is TLBI_SYS_CR_systeminstrs - (b'\x1F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x418)])'), - # tlbi vae1is TLBI_SYS_CR_systeminstrs - (b'\x3F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x419)])'), - # tlbi aside1is TLBI_SYS_CR_systeminstrs - (b'\x5F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41A)])'), - # tlbi vaae1is TLBI_SYS_CR_systeminstrs - (b'\x7F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41B)])'), - # tlbi vale1is TLBI_SYS_CR_systeminstrs - (b'\xBF\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41D)])'), - # tlbi vaale1is TLBI_SYS_CR_systeminstrs - (b'\xFF\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x41F)])'), - # tlbi rvae1os TLBI_SYS_CR_systeminstrs - (b'\x3F\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x429)])'), - # tlbi rvaae1os TLBI_SYS_CR_systeminstrs - (b'\x7F\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x42B)])'), - # tlbi rvale1os TLBI_SYS_CR_systeminstrs - (b'\xBF\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x42D)])'), - # tlbi rvaale1os TLBI_SYS_CR_systeminstrs - (b'\xFF\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x42F)])'), - # tlbi rvae1 TLBI_SYS_CR_systeminstrs - (b'\x3F\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x431)])'), - # tlbi rvaae1 TLBI_SYS_CR_systeminstrs - (b'\x7F\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x433)])'), - # tlbi rvale1 TLBI_SYS_CR_systeminstrs - (b'\xBF\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x435)])'), - # tlbi rvaale1 TLBI_SYS_CR_systeminstrs - (b'\xFF\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x437)])'), + (b'\x1F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4418)])'), + # tlbi vae1is, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4419),LLIL_CONST.q(0x0)])'), + # tlbi aside1is, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441A),LLIL_CONST.q(0x0)])'), + # tlbi vaae1is, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441B),LLIL_CONST.q(0x0)])'), + # tlbi vale1is, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441D),LLIL_CONST.q(0x0)])'), + # tlbi vaale1is, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x83\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x441F),LLIL_CONST.q(0x0)])'), + # tlbi rvae1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4429),LLIL_CONST.q(0x0)])'), + # tlbi rvaae1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x442B),LLIL_CONST.q(0x0)])'), + # tlbi rvale1os, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x442D),LLIL_CONST.q(0x0)])'), + # tlbi rvaale1os, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x85\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x442F),LLIL_CONST.q(0x0)])'), + # tlbi rvae1, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4431),LLIL_CONST.q(0x0)])'), + # tlbi rvaae1, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4433),LLIL_CONST.q(0x0)])'), + # tlbi rvale1, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4435),LLIL_CONST.q(0x0)])'), + # tlbi rvaale1, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x86\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4437),LLIL_CONST.q(0x0)])'), # tlbi vmalle1 TLBI_SYS_CR_systeminstrs - (b'\x1F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x438)])'), - # tlbi vae1 TLBI_SYS_CR_systeminstrs - (b'\x3F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x439)])'), - # tlbi aside1 TLBI_SYS_CR_systeminstrs - (b'\x5F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43A)])'), - # tlbi vaae1 TLBI_SYS_CR_systeminstrs - (b'\x7F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43B)])'), - # tlbi vale1 TLBI_SYS_CR_systeminstrs - (b'\xBF\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43D)])'), - # tlbi vaale1 TLBI_SYS_CR_systeminstrs - (b'\xFF\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x43F)])'), + (b'\x1F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4438)])'), + # tlbi vae1, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4439),LLIL_CONST.q(0x0)])'), + # tlbi aside1, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443A),LLIL_CONST.q(0x0)])'), + # tlbi vaae1, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443B),LLIL_CONST.q(0x0)])'), + # tlbi vale1, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443D),LLIL_CONST.q(0x0)])'), + # tlbi vaale1, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x87\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x443F),LLIL_CONST.q(0x0)])'), # tlbi vmalle1osnxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x488)])'), - # tlbi vae1osnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x489)])'), - # tlbi aside1osnxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48A)])'), - # tlbi vaae1osnxs TLBI_SYS_CR_systeminstrs - (b'\x7F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48B)])'), - # tlbi vale1osnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48D)])'), - # tlbi vaale1osnxs TLBI_SYS_CR_systeminstrs - (b'\xFF\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x48F)])'), - # tlbi rvae1isnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x491)])'), - # tlbi rvaae1isnxs TLBI_SYS_CR_systeminstrs - (b'\x7F\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x493)])'), - # tlbi rvale1isnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x495)])'), - # tlbi rvaale1isnxs TLBI_SYS_CR_systeminstrs - (b'\xFF\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x497)])'), + (b'\x1F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4488)])'), + # tlbi vae1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4489),LLIL_CONST.q(0x0)])'), + # tlbi aside1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448A),LLIL_CONST.q(0x0)])'), + # tlbi vaae1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448B),LLIL_CONST.q(0x0)])'), + # tlbi vale1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448D),LLIL_CONST.q(0x0)])'), + # tlbi vaale1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x91\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x448F),LLIL_CONST.q(0x0)])'), + # tlbi rvae1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4491),LLIL_CONST.q(0x0)])'), + # tlbi rvaae1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4493),LLIL_CONST.q(0x0)])'), + # tlbi rvale1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4495),LLIL_CONST.q(0x0)])'), + # tlbi rvaale1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x92\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4497),LLIL_CONST.q(0x0)])'), # tlbi vmalle1isnxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x498)])'), - # tlbi vae1isnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x499)])'), - # tlbi aside1isnxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49A)])'), - # tlbi vaae1isnxs TLBI_SYS_CR_systeminstrs - (b'\x7F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49B)])'), - # tlbi vale1isnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49D)])'), - # tlbi vaale1isnxs TLBI_SYS_CR_systeminstrs - (b'\xFF\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x49F)])'), - # tlbi rvae1osnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4A9)])'), - # tlbi rvaae1osnxs TLBI_SYS_CR_systeminstrs - (b'\x7F\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4AB)])'), - # tlbi rvale1osnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4AD)])'), - # tlbi rvaale1osnxs TLBI_SYS_CR_systeminstrs - (b'\xFF\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4AF)])'), - # tlbi rvae1nxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B1)])'), - # tlbi rvaae1nxs TLBI_SYS_CR_systeminstrs - (b'\x7F\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B3)])'), - # tlbi rvale1nxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B5)])'), - # tlbi rvaale1nxs TLBI_SYS_CR_systeminstrs - (b'\xFF\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B7)])'), + (b'\x1F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4498)])'), + # tlbi vae1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4499),LLIL_CONST.q(0x0)])'), + # tlbi aside1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449A),LLIL_CONST.q(0x0)])'), + # tlbi vaae1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449B),LLIL_CONST.q(0x0)])'), + # tlbi vale1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449D),LLIL_CONST.q(0x0)])'), + # tlbi vaale1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x93\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x449F),LLIL_CONST.q(0x0)])'), + # tlbi rvae1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44A9),LLIL_CONST.q(0x0)])'), + # tlbi rvaae1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44AB),LLIL_CONST.q(0x0)])'), + # tlbi rvale1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44AD),LLIL_CONST.q(0x0)])'), + # tlbi rvaale1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x95\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44AF),LLIL_CONST.q(0x0)])'), + # tlbi rvae1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B1),LLIL_CONST.q(0x0)])'), + # tlbi rvaae1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B3),LLIL_CONST.q(0x0)])'), + # tlbi rvale1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B5),LLIL_CONST.q(0x0)])'), + # tlbi rvaale1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x96\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B7),LLIL_CONST.q(0x0)])'), # tlbi vmalle1nxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B8)])'), - # tlbi vae1nxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4B9)])'), - # tlbi aside1nxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BA)])'), - # tlbi vaae1nxs TLBI_SYS_CR_systeminstrs - (b'\x7F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BB)])'), - # tlbi vale1nxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BD)])'), - # tlbi vaale1nxs TLBI_SYS_CR_systeminstrs - (b'\xFF\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x4BF)])'), - # tlbi ipas2e1is TLBI_SYS_CR_systeminstrs - (b'\x3F\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2401)])'), - # tlbi ripas2e1is TLBI_SYS_CR_systeminstrs - (b'\x5F\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2402)])'), - # tlbi ipas2le1is TLBI_SYS_CR_systeminstrs - (b'\xBF\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2405)])'), - # tlbi ripas2le1is TLBI_SYS_CR_systeminstrs - (b'\xDF\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2406)])'), + (b'\x1F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B8)])'), + # tlbi vae1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44B9),LLIL_CONST.q(0x0)])'), + # tlbi aside1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BA),LLIL_CONST.q(0x0)])'), + # tlbi vaae1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BB),LLIL_CONST.q(0x0)])'), + # tlbi vale1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BD),LLIL_CONST.q(0x0)])'), + # tlbi vaale1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x97\x08\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x44BF),LLIL_CONST.q(0x0)])'), + # tlbi ipas2e1is, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6401),LLIL_CONST.q(0x0)])'), + # tlbi ripas2e1is, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6402),LLIL_CONST.q(0x0)])'), + # tlbi ipas2le1is, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6405),LLIL_CONST.q(0x0)])'), + # tlbi ripas2le1is, xzr TLBI_SYS_CR_systeminstrs + (b'\xDF\x80\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6406),LLIL_CONST.q(0x0)])'), # tlbi alle2os TLBI_SYS_CR_systeminstrs - (b'\x1F\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2408)])'), - # tlbi vae2os TLBI_SYS_CR_systeminstrs - (b'\x3F\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2409)])'), + (b'\x1F\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6408)])'), + # tlbi vae2os, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6409),LLIL_CONST.q(0x0)])'), # tlbi alle1os TLBI_SYS_CR_systeminstrs - (b'\x9F\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x240C)])'), - # tlbi vale2os TLBI_SYS_CR_systeminstrs - (b'\xBF\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x240D)])'), + (b'\x9F\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x640C)])'), + # tlbi vale2os, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x640D),LLIL_CONST.q(0x0)])'), # tlbi vmalls12e1os TLBI_SYS_CR_systeminstrs - (b'\xDF\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x240E)])'), - # tlbi rvae2is TLBI_SYS_CR_systeminstrs - (b'\x3F\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2411)])'), + (b'\xDF\x81\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x640E)])'), + # tlbi rvae2is, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6411),LLIL_CONST.q(0x0)])'), # tlbi vmallws2e1is TLBI_SYS_CR_systeminstrs - (b'\x5F\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2412)])'), - # tlbi rvale2is TLBI_SYS_CR_systeminstrs - (b'\xBF\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2415)])'), + (b'\x5F\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6412)])'), + # tlbi rvale2is, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x82\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6415),LLIL_CONST.q(0x0)])'), # tlbi alle2is TLBI_SYS_CR_systeminstrs - (b'\x1F\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2418)])'), - # tlbi vae2is TLBI_SYS_CR_systeminstrs - (b'\x3F\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2419)])'), + (b'\x1F\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6418)])'), + # tlbi vae2is, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6419),LLIL_CONST.q(0x0)])'), # tlbi alle1is TLBI_SYS_CR_systeminstrs - (b'\x9F\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x241C)])'), - # tlbi vale2is TLBI_SYS_CR_systeminstrs - (b'\xBF\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x241D)])'), + (b'\x9F\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x641C)])'), + # tlbi vale2is, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x641D),LLIL_CONST.q(0x0)])'), # tlbi vmalls12e1is TLBI_SYS_CR_systeminstrs - (b'\xDF\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x241E)])'), - # tlbi ipas2e1os TLBI_SYS_CR_systeminstrs - (b'\x1F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2420)])'), - # tlbi ipas2e1 TLBI_SYS_CR_systeminstrs - (b'\x3F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2421)])'), - # tlbi ripas2e1 TLBI_SYS_CR_systeminstrs - (b'\x5F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2422)])'), - # tlbi ripas2e1os TLBI_SYS_CR_systeminstrs - (b'\x7F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2423)])'), - # tlbi ipas2le1os TLBI_SYS_CR_systeminstrs - (b'\x9F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2424)])'), - # tlbi ipas2le1 TLBI_SYS_CR_systeminstrs - (b'\xBF\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2425)])'), - # tlbi ripas2le1 TLBI_SYS_CR_systeminstrs - (b'\xDF\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2426)])'), - # tlbi ripas2le1os TLBI_SYS_CR_systeminstrs - (b'\xFF\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2427)])'), - # tlbi rvae2os TLBI_SYS_CR_systeminstrs - (b'\x3F\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2429)])'), + (b'\xDF\x83\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x641E)])'), + # tlbi ipas2e1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x1F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6420),LLIL_CONST.q(0x0)])'), + # tlbi ipas2e1, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6421),LLIL_CONST.q(0x0)])'), + # tlbi ripas2e1, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6422),LLIL_CONST.q(0x0)])'), + # tlbi ripas2e1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6423),LLIL_CONST.q(0x0)])'), + # tlbi ipas2le1os, xzr TLBI_SYS_CR_systeminstrs + (b'\x9F\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6424),LLIL_CONST.q(0x0)])'), + # tlbi ipas2le1, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6425),LLIL_CONST.q(0x0)])'), + # tlbi ripas2le1, xzr TLBI_SYS_CR_systeminstrs + (b'\xDF\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6426),LLIL_CONST.q(0x0)])'), + # tlbi ripas2le1os, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x84\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6427),LLIL_CONST.q(0x0)])'), + # tlbi rvae2os, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6429),LLIL_CONST.q(0x0)])'), # tlbi vmallws2e1os TLBI_SYS_CR_systeminstrs - (b'\x5F\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x242A)])'), - # tlbi rvale2os TLBI_SYS_CR_systeminstrs - (b'\xBF\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x242D)])'), - # tlbi rvae2 TLBI_SYS_CR_systeminstrs - (b'\x3F\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2431)])'), + (b'\x5F\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x642A)])'), + # tlbi rvale2os, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x85\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x642D),LLIL_CONST.q(0x0)])'), + # tlbi rvae2, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6431),LLIL_CONST.q(0x0)])'), # tlbi vmallws2e1 TLBI_SYS_CR_systeminstrs - (b'\x5F\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2432)])'), - # tlbi rvale2 TLBI_SYS_CR_systeminstrs - (b'\xBF\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2435)])'), + (b'\x5F\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6432)])'), + # tlbi rvale2, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x86\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6435),LLIL_CONST.q(0x0)])'), # tlbi alle2 TLBI_SYS_CR_systeminstrs - (b'\x1F\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2438)])'), - # tlbi vae2 TLBI_SYS_CR_systeminstrs - (b'\x3F\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2439)])'), + (b'\x1F\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6438)])'), + # tlbi vae2, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6439),LLIL_CONST.q(0x0)])'), # tlbi alle1 TLBI_SYS_CR_systeminstrs - (b'\x9F\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x243C)])'), - # tlbi vale2 TLBI_SYS_CR_systeminstrs - (b'\xBF\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x243D)])'), + (b'\x9F\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x643C)])'), + # tlbi vale2, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x643D),LLIL_CONST.q(0x0)])'), # tlbi vmalls12e1 TLBI_SYS_CR_systeminstrs - (b'\xDF\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x243E)])'), - # tlbi ipas2e1isnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2481)])'), - # tlbi ripas2e1isnxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2482)])'), - # tlbi ipas2le1isnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2485)])'), - # tlbi ripas2le1isnxs TLBI_SYS_CR_systeminstrs - (b'\xDF\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2486)])'), + (b'\xDF\x87\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x643E)])'), + # tlbi ipas2e1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6481),LLIL_CONST.q(0x0)])'), + # tlbi ripas2e1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6482),LLIL_CONST.q(0x0)])'), + # tlbi ipas2le1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6485),LLIL_CONST.q(0x0)])'), + # tlbi ripas2le1isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xDF\x90\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6486),LLIL_CONST.q(0x0)])'), # tlbi alle2osnxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2488)])'), - # tlbi vae2osnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2489)])'), + (b'\x1F\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6488)])'), + # tlbi vae2osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6489),LLIL_CONST.q(0x0)])'), # tlbi alle1osnxs TLBI_SYS_CR_systeminstrs - (b'\x9F\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x248C)])'), - # tlbi vale2osnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x248D)])'), + (b'\x9F\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x648C)])'), + # tlbi vale2osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x648D),LLIL_CONST.q(0x0)])'), # tlbi vmalls12e1osnxs TLBI_SYS_CR_systeminstrs - (b'\xDF\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x248E)])'), - # tlbi rvae2isnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2491)])'), + (b'\xDF\x91\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x648E)])'), + # tlbi rvae2isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6491),LLIL_CONST.q(0x0)])'), # tlbi vmallws2e1isnxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2492)])'), - # tlbi rvale2isnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2495)])'), + (b'\x5F\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6492)])'), + # tlbi rvale2isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x92\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6495),LLIL_CONST.q(0x0)])'), # tlbi alle2isnxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2498)])'), - # tlbi vae2isnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x2499)])'), + (b'\x1F\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6498)])'), + # tlbi vae2isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x6499),LLIL_CONST.q(0x0)])'), # tlbi alle1isnxs TLBI_SYS_CR_systeminstrs - (b'\x9F\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x249C)])'), - # tlbi vale2isnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x249D)])'), + (b'\x9F\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x649C)])'), + # tlbi vale2isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x649D),LLIL_CONST.q(0x0)])'), # tlbi vmalls12e1isnxs TLBI_SYS_CR_systeminstrs - (b'\xDF\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x249E)])'), - # tlbi ipas2e1osnxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A0)])'), - # tlbi ipas2e1nxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A1)])'), - # tlbi ripas2e1nxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A2)])'), - # tlbi ripas2e1osnxs TLBI_SYS_CR_systeminstrs - (b'\x7F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A3)])'), - # tlbi ipas2le1osnxs TLBI_SYS_CR_systeminstrs - (b'\x9F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A4)])'), - # tlbi ipas2le1nxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A5)])'), - # tlbi ripas2le1nxs TLBI_SYS_CR_systeminstrs - (b'\xDF\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A6)])'), - # tlbi ripas2le1osnxs TLBI_SYS_CR_systeminstrs - (b'\xFF\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A7)])'), - # tlbi rvae2osnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24A9)])'), + (b'\xDF\x93\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x649E)])'), + # tlbi ipas2e1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x1F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A0),LLIL_CONST.q(0x0)])'), + # tlbi ipas2e1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A1),LLIL_CONST.q(0x0)])'), + # tlbi ripas2e1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x5F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A2),LLIL_CONST.q(0x0)])'), + # tlbi ripas2e1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A3),LLIL_CONST.q(0x0)])'), + # tlbi ipas2le1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x9F\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A4),LLIL_CONST.q(0x0)])'), + # tlbi ipas2le1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A5),LLIL_CONST.q(0x0)])'), + # tlbi ripas2le1nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xDF\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A6),LLIL_CONST.q(0x0)])'), + # tlbi ripas2le1osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x94\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A7),LLIL_CONST.q(0x0)])'), + # tlbi rvae2osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64A9),LLIL_CONST.q(0x0)])'), # tlbi vmallws2e1osnxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24AA)])'), - # tlbi rvale2osnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24AD)])'), - # tlbi rvae2nxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B1)])'), + (b'\x5F\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64AA)])'), + # tlbi rvale2osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x95\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64AD),LLIL_CONST.q(0x0)])'), + # tlbi rvae2nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B1),LLIL_CONST.q(0x0)])'), # tlbi vmallws2e1nxs TLBI_SYS_CR_systeminstrs - (b'\x5F\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B2)])'), - # tlbi rvale2nxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B5)])'), + (b'\x5F\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B2)])'), + # tlbi rvale2nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x96\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B5),LLIL_CONST.q(0x0)])'), # tlbi alle2nxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B8)])'), - # tlbi vae2nxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24B9)])'), + (b'\x1F\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B8)])'), + # tlbi vae2nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64B9),LLIL_CONST.q(0x0)])'), # tlbi alle1nxs TLBI_SYS_CR_systeminstrs - (b'\x9F\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24BC)])'), - # tlbi vale2nxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24BD)])'), + (b'\x9F\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64BC)])'), + # tlbi vale2nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64BD),LLIL_CONST.q(0x0)])'), # tlbi vmalls12e1nxs TLBI_SYS_CR_systeminstrs - (b'\xDF\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x24BE)])'), + (b'\xDF\x97\x0C\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x64BE)])'), # tlbi alle3os TLBI_SYS_CR_systeminstrs - (b'\x1F\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3408)])'), - # tlbi vae3os TLBI_SYS_CR_systeminstrs - (b'\x3F\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3409)])'), + (b'\x1F\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7408)])'), + # tlbi vae3os, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7409),LLIL_CONST.q(0x0)])'), # tlbi paallos TLBI_SYS_CR_systeminstrs - (b'\x9F\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x340C)])'), - # tlbi vale3os TLBI_SYS_CR_systeminstrs - (b'\xBF\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x340D)])'), - # tlbi rvae3is TLBI_SYS_CR_systeminstrs - (b'\x3F\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3411)])'), - # tlbi rvale3is TLBI_SYS_CR_systeminstrs - (b'\xBF\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3415)])'), + (b'\x9F\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x740C)])'), + # tlbi vale3os, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x81\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x740D),LLIL_CONST.q(0x0)])'), + # tlbi rvae3is, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7411),LLIL_CONST.q(0x0)])'), + # tlbi rvale3is, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x82\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7415),LLIL_CONST.q(0x0)])'), # tlbi alle3is TLBI_SYS_CR_systeminstrs - (b'\x1F\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3418)])'), - # tlbi vae3is TLBI_SYS_CR_systeminstrs - (b'\x3F\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3419)])'), - # tlbi vale3is TLBI_SYS_CR_systeminstrs - (b'\xBF\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x341D)])'), - # tlbi rpaos TLBI_SYS_CR_systeminstrs - (b'\x7F\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3423)])'), - # tlbi rpalos TLBI_SYS_CR_systeminstrs - (b'\xFF\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3427)])'), - # tlbi rvae3os TLBI_SYS_CR_systeminstrs - (b'\x3F\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3429)])'), - # tlbi rvale3os TLBI_SYS_CR_systeminstrs - (b'\xBF\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x342D)])'), - # tlbi rvae3 TLBI_SYS_CR_systeminstrs - (b'\x3F\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3431)])'), - # tlbi rvale3 TLBI_SYS_CR_systeminstrs - (b'\xBF\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3435)])'), + (b'\x1F\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7418)])'), + # tlbi vae3is, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7419),LLIL_CONST.q(0x0)])'), + # tlbi vale3is, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x83\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x741D),LLIL_CONST.q(0x0)])'), + # tlbi rpaos, xzr TLBI_SYS_CR_systeminstrs + (b'\x7F\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7423),LLIL_CONST.q(0x0)])'), + # tlbi rpalos, xzr TLBI_SYS_CR_systeminstrs + (b'\xFF\x84\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7427),LLIL_CONST.q(0x0)])'), + # tlbi rvae3os, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7429),LLIL_CONST.q(0x0)])'), + # tlbi rvale3os, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x85\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x742D),LLIL_CONST.q(0x0)])'), + # tlbi rvae3, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7431),LLIL_CONST.q(0x0)])'), + # tlbi rvale3, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x86\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7435),LLIL_CONST.q(0x0)])'), # tlbi alle3 TLBI_SYS_CR_systeminstrs - (b'\x1F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3438)])'), - # tlbi vae3 TLBI_SYS_CR_systeminstrs - (b'\x3F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3439)])'), + (b'\x1F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7438)])'), + # tlbi vae3, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7439),LLIL_CONST.q(0x0)])'), # tlbi paall TLBI_SYS_CR_systeminstrs - (b'\x9F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x343C)])'), - # tlbi vale3 TLBI_SYS_CR_systeminstrs - (b'\xBF\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x343D)])'), + (b'\x9F\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x743C)])'), + # tlbi vale3, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x87\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x743D),LLIL_CONST.q(0x0)])'), # tlbi alle3osnxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3488)])'), - # tlbi vae3osnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3489)])'), - # tlbi vale3osnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x348D)])'), - # tlbi rvae3isnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3491)])'), - # tlbi rvale3isnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3495)])'), + (b'\x1F\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7488)])'), + # tlbi vae3osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7489),LLIL_CONST.q(0x0)])'), + # tlbi vale3osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x91\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x748D),LLIL_CONST.q(0x0)])'), + # tlbi rvae3isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7491),LLIL_CONST.q(0x0)])'), + # tlbi rvale3isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x92\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7495),LLIL_CONST.q(0x0)])'), # tlbi alle3isnxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3498)])'), - # tlbi vae3isnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x3499)])'), - # tlbi vale3isnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x349D)])'), - # tlbi rvae3osnxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34A9)])'), - # tlbi rvale3osnxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34AD)])'), - # tlbi rvae3nxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B1)])'), - # tlbi rvale3nxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B5)])'), + (b'\x1F\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7498)])'), + # tlbi vae3isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x7499),LLIL_CONST.q(0x0)])'), + # tlbi vale3isnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x93\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x749D),LLIL_CONST.q(0x0)])'), + # tlbi rvae3osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74A9),LLIL_CONST.q(0x0)])'), + # tlbi rvale3osnxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x95\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74AD),LLIL_CONST.q(0x0)])'), + # tlbi rvae3nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B1),LLIL_CONST.q(0x0)])'), + # tlbi rvale3nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x96\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B5),LLIL_CONST.q(0x0)])'), # tlbi alle3nxs TLBI_SYS_CR_systeminstrs - (b'\x1F\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B8)])'), - # tlbi vae3nxs TLBI_SYS_CR_systeminstrs - (b'\x3F\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34B9)])'), - # tlbi vale3nxs TLBI_SYS_CR_systeminstrs - (b'\xBF\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x34BD)])'), + (b'\x1F\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B8)])'), + # tlbi vae3nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\x3F\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74B9),LLIL_CONST.q(0x0)])'), + # tlbi vale3nxs, xzr TLBI_SYS_CR_systeminstrs + (b'\xBF\x97\x0E\xD5', 'LLIL_INTRINSIC([],__tlbi,[LLIL_CONST.d(0x74BD),LLIL_CONST.q(0x0)])'), + # cfp rctx, x0 SYS_CR_systeminstrs + (b'\x80\x73\x0B\xD5', 'LLIL_INTRINSIC([],__cfp,[LLIL_CONST.d(0x5B9C),LLIL_REG.q(x0)])'), + # dvp rctx, x0 SYS_CR_systeminstrs + (b'\xA0\x73\x0B\xD5', 'LLIL_INTRINSIC([],__dvp,[LLIL_CONST.d(0x5B9D),LLIL_REG.q(x0)])'), + # cosp rctx, x0 SYS_CR_systeminstrs + (b'\xC0\x73\x0B\xD5', 'LLIL_INTRINSIC([],__cosp,[LLIL_CONST.d(0x5B9E),LLIL_REG.q(x0)])'), + # cpp rctx, x0 SYS_CR_systeminstrs + (b'\xE0\x73\x0B\xD5', 'LLIL_INTRINSIC([],__cpp,[LLIL_CONST.d(0x5B9F),LLIL_REG.q(x0)])'), + # gsb sys SYS_CR_systeminstrs + (b'\x1F\xC0\x08\xD5', 'LLIL_INTRINSIC([],__gsb,[LLIL_CONST.d(0x4600)])'), + # gic cddis, x0 SYS_CR_systeminstrs + (b'\x00\xC1\x08\xD5', 'LLIL_INTRINSIC([],__gic,[LLIL_CONST.d(0x4608),LLIL_REG.q(x0)])'), + # gicr x0, cdia SYS_CR_systeminstrs + (b'\x00\xC3\x28\xD5', 'LLIL_INTRINSIC([x0],__gicr,[LLIL_CONST.d(0x4618)])'), + # brb iall SYS_CR_systeminstrs + (b'\x9F\x72\x09\xD5', 'LLIL_INTRINSIC([],__brb,[LLIL_CONST.d(0x4B94)])'), + # ic ialluis IC_SYS_CR_systeminstrs + (b'\x1F\x71\x08\xD5', 'LLIL_INTRINSIC([],__ic,[LLIL_CONST.d(0x4388)])'), + # ic iallu IC_SYS_CR_systeminstrs + (b'\x1F\x75\x08\xD5', 'LLIL_INTRINSIC([],__ic,[LLIL_CONST.d(0x43A8)])'), + # ic ivau, x9 IC_SYS_CR_systeminstrs + (b'\x29\x75\x0B\xD5', 'LLIL_INTRINSIC([],__ic,[LLIL_CONST.d(0x5BA9),LLIL_REG.q(x9)])'), # dc cvadp, x26 DC_SYS_CR_systeminstrs - (b'\x3A\x7D\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BE9),LLIL_REG.q(x26)])'), + (b'\x3A\x7D\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BE9),LLIL_REG.q(x26)])'), # dc zva, x24 DC_SYS_CR_systeminstrs - (b'\x38\x74\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BA1),LLIL_REG.q(x24)])'), + (b'\x38\x74\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BA1),LLIL_REG.q(x24)])'), # dc zva, xzr DC_SYS_CR_systeminstrs - (b'\x3F\x74\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BA1),LLIL_CONST.q(0x0)])'), + (b'\x3F\x74\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BA1),LLIL_CONST.q(0x0)])'), # dc cisw, x18 DC_SYS_CR_systeminstrs - (b'\x52\x7E\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3F2),LLIL_REG.q(x18)])'), + (b'\x52\x7E\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43F2),LLIL_REG.q(x18)])'), # dc cvadp, x3 DC_SYS_CR_systeminstrs - (b'\x23\x7D\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BE9),LLIL_REG.q(x3)])'), + (b'\x23\x7D\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BE9),LLIL_REG.q(x3)])'), # dc csw, x21 DC_SYS_CR_systeminstrs - (b'\x55\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3D2),LLIL_REG.q(x21)])'), + (b'\x55\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43D2),LLIL_REG.q(x21)])'), # dc cvadp, x2 DC_SYS_CR_systeminstrs - (b'\x22\x7D\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BE9),LLIL_REG.q(x2)])'), + (b'\x22\x7D\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BE9),LLIL_REG.q(x2)])'), # dc cisw, x23 DC_SYS_CR_systeminstrs - (b'\x57\x7E\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3F2),LLIL_REG.q(x23)])'), + (b'\x57\x7E\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43F2),LLIL_REG.q(x23)])'), # dc csw, x19 DC_SYS_CR_systeminstrs - (b'\x53\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3D2),LLIL_REG.q(x19)])'), + (b'\x53\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43D2),LLIL_REG.q(x19)])'), # dc isw, x5 DC_SYS_CR_systeminstrs - (b'\x45\x76\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3B2),LLIL_REG.q(x5)])'), + (b'\x45\x76\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43B2),LLIL_REG.q(x5)])'), # dc civac, x24 DC_SYS_CR_systeminstrs - (b'\x38\x7E\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BF1),LLIL_REG.q(x24)])'), + (b'\x38\x7E\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BF1),LLIL_REG.q(x24)])'), # dc cvau, x4 DC_SYS_CR_systeminstrs - (b'\x24\x7B\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BD9),LLIL_REG.q(x4)])'), + (b'\x24\x7B\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BD9),LLIL_REG.q(x4)])'), # dc csw, x14 DC_SYS_CR_systeminstrs - (b'\x4E\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3D2),LLIL_REG.q(x14)])'), + (b'\x4E\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43D2),LLIL_REG.q(x14)])'), # dc csw, x5 DC_SYS_CR_systeminstrs - (b'\x45\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3D2),LLIL_REG.q(x5)])'), + (b'\x45\x7A\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43D2),LLIL_REG.q(x5)])'), # dc isw, x3 DC_SYS_CR_systeminstrs - (b'\x43\x76\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x3B2),LLIL_REG.q(x3)])'), + (b'\x43\x76\x08\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x43B2),LLIL_REG.q(x3)])'), # dc cvac, x14 DC_SYS_CR_systeminstrs - (b'\x2E\x7A\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x1BD1),LLIL_REG.q(x14)])'), + (b'\x2E\x7A\x0B\xD5', 'LLIL_INTRINSIC([],__dc,[LLIL_CONST.d(0x5BD1),LLIL_REG.q(x14)])'), # at s1e1wp, x10 AT_SYS_CR_systeminstrs - (b'\x2A\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3C9),LLIL_REG.q(x10)])'), - # at S1E1R, x21 AT_SYS_CR_systeminstrs - (b'\x15\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3C0),LLIL_REG.q(x21)])'), - # at S1E1W, x21 AT_SYS_CR_systeminstrs - (b'\x35\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3C1),LLIL_REG.q(x21)])'), - # at S1E0R, x21 AT_SYS_CR_systeminstrs - (b'\x55\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3C2),LLIL_REG.q(x21)])'), - # at S1E0W, x21 AT_SYS_CR_systeminstrs - (b'\x75\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3C3),LLIL_REG.q(x21)])'), - # at S1E1RP, x21 AT_SYS_CR_systeminstrs - (b'\x15\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3C8),LLIL_REG.q(x21)])'), - # at S1E1WP, x21 AT_SYS_CR_systeminstrs - (b'\x35\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3C9),LLIL_REG.q(x21)])'), - # at S1E1A, x21 AT_SYS_CR_systeminstrs - (b'\x55\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x3CA),LLIL_REG.q(x21)])'), - # at S1E2R, x21 AT_SYS_CR_systeminstrs - (b'\x15\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x23C0),LLIL_REG.q(x21)])'), - # at S1E2W, x21 AT_SYS_CR_systeminstrs - (b'\x35\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x23C1),LLIL_REG.q(x21)])'), - # at S12E1R, x21 AT_SYS_CR_systeminstrs - (b'\x95\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x23C4),LLIL_REG.q(x21)])'), - # at S12E1W, x21 AT_SYS_CR_systeminstrs - (b'\xB5\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x23C5),LLIL_REG.q(x21)])'), - # at S12E0R, x21 AT_SYS_CR_systeminstrs - (b'\xD5\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x23C6),LLIL_REG.q(x21)])'), - # at S12E0W, x21 AT_SYS_CR_systeminstrs - (b'\xF5\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x23C7),LLIL_REG.q(x21)])'), - # at S1E2A, x21 AT_SYS_CR_systeminstrs - (b'\x55\x79\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x23CA),LLIL_REG.q(x21)])'), - # at S1E3R, x21 AT_SYS_CR_systeminstrs - (b'\x15\x78\x0E\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x33C0),LLIL_REG.q(x21)])'), - # at S1E3W, x21 AT_SYS_CR_systeminstrs - (b'\x35\x78\x0E\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x33C1),LLIL_REG.q(x21)])'), - # at S1E3A, x21 AT_SYS_CR_systeminstrs - (b'\x55\x79\x0E\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x33CA),LLIL_REG.q(x21)])'), + (b'\x2A\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43C9),LLIL_REG.q(x10)])'), + # at s1e1r, x21 AT_SYS_CR_systeminstrs + (b'\x15\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43C0),LLIL_REG.q(x21)])'), + # at s1e1w, x21 AT_SYS_CR_systeminstrs + (b'\x35\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43C1),LLIL_REG.q(x21)])'), + # at s1e0r, x21 AT_SYS_CR_systeminstrs + (b'\x55\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43C2),LLIL_REG.q(x21)])'), + # at s1e0w, x21 AT_SYS_CR_systeminstrs + (b'\x75\x78\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43C3),LLIL_REG.q(x21)])'), + # at s1e1rp, x21 AT_SYS_CR_systeminstrs + (b'\x15\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43C8),LLIL_REG.q(x21)])'), + # at s1e1wp, x21 AT_SYS_CR_systeminstrs + (b'\x35\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43C9),LLIL_REG.q(x21)])'), + # at s1e1a, x21 AT_SYS_CR_systeminstrs + (b'\x55\x79\x08\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x43CA),LLIL_REG.q(x21)])'), + # at s1e2r, x21 AT_SYS_CR_systeminstrs + (b'\x15\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x63C0),LLIL_REG.q(x21)])'), + # at s1e2w, x21 AT_SYS_CR_systeminstrs + (b'\x35\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x63C1),LLIL_REG.q(x21)])'), + # at s12e1r, x21 AT_SYS_CR_systeminstrs + (b'\x95\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x63C4),LLIL_REG.q(x21)])'), + # at s12e1w, x21 AT_SYS_CR_systeminstrs + (b'\xB5\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x63C5),LLIL_REG.q(x21)])'), + # at s12e0r, x21 AT_SYS_CR_systeminstrs + (b'\xD5\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x63C6),LLIL_REG.q(x21)])'), + # at s12e0w, x21 AT_SYS_CR_systeminstrs + (b'\xF5\x78\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x63C7),LLIL_REG.q(x21)])'), + # at s1e2a, x21 AT_SYS_CR_systeminstrs + (b'\x55\x79\x0C\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x63CA),LLIL_REG.q(x21)])'), + # at s1e3r, x21 AT_SYS_CR_systeminstrs + (b'\x15\x78\x0E\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x73C0),LLIL_REG.q(x21)])'), + # at s1e3w, x21 AT_SYS_CR_systeminstrs + (b'\x35\x78\x0E\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x73C1),LLIL_REG.q(x21)])'), + # at s1e3a, x21 AT_SYS_CR_systeminstrs + (b'\x55\x79\x0E\xD5', 'LLIL_INTRINSIC([],__at,[LLIL_CONST.d(0x73CA),LLIL_REG.q(x21)])'), ] # tests_uxtl_uxtl2 = [ @@ -2026,7 +2082,7 @@ (b'\x53\x03\x61\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x26),LLIL_ADD.q(LLIL_REG.q(x1),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x19,LLIL_ZX.q(LLIL_REG.q(temp0)))'), - # ldaddl x22, x30, [x7] LDADDL_64_memop + # ldaddl x22, lr, [x7] LDADDL_64_memop (b'\xFE\x00\x76\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x7),LLIL_ADD.q(LLIL_REG.q(x22),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(lr,LLIL_ZX.q(LLIL_REG.q(temp0)))'), @@ -2094,7 +2150,7 @@ (b'\xE0\x02\x3B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x23),LLIL_ADD.q(LLIL_REG.q(x27),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x0,LLIL_ZX.q(LLIL_REG.q(temp0)))'), - # ldadd x13, x29, [x26] LDADD_64_memop + # ldadd x13, fp, [x26] LDADD_64_memop (b'\x5D\x03\x2D\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x26),LLIL_ADD.q(LLIL_REG.q(x13),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(fp,LLIL_ZX.q(LLIL_REG.q(temp0)))'), @@ -2190,7 +2246,7 @@ (b'\x7F\x00\x77\xF8', 'LLIL_STORE.q(LLIL_REG.q(x3),LLIL_ADD.q(LLIL_REG.q(x23),LLIL_LOAD.q(LLIL_REG.q(x3))))'), # staddl x19, [x12] STADDL_LDADDL_64_memop (b'\x9F\x01\x73\xF8', 'LLIL_STORE.q(LLIL_REG.q(x12),LLIL_ADD.q(LLIL_REG.q(x19),LLIL_LOAD.q(LLIL_REG.q(x12))))'), - # staddl x29, [x21] STADDL_LDADDL_64_memop + # staddl fp, [x21] STADDL_LDADDL_64_memop (b'\xBF\x02\x7D\xF8', 'LLIL_STORE.q(LLIL_REG.q(x21),LLIL_ADD.q(LLIL_REG.q(fp),LLIL_LOAD.q(LLIL_REG.q(x21))))'), # staddl x6, [fp] STADDL_LDADDL_64_memop (b'\xBF\x03\x66\xF8', 'LLIL_STORE.q(LLIL_REG.q(fp),LLIL_ADD.q(LLIL_REG.q(x6),LLIL_LOAD.q(LLIL_REG.q(fp))))'), @@ -2440,11 +2496,11 @@ (b'\xD7\x10\x65\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x5)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x23,LLIL_ZX.q(LLIL_REG.q(temp0)))'), - # ldclrl x29, x10, [x19] LDCLRL_64_memop + # ldclrl fp, x10, [x19] LDCLRL_64_memop (b'\x6A\x12\x7D\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x19),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(fp)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x10,LLIL_ZX.q(LLIL_REG.q(temp0)))'), - # ldclrl x29, x0, [x10] LDCLRL_64_memop + # ldclrl fp, x0, [x10] LDCLRL_64_memop (b'\x40\x11\x7D\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x10),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(fp)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x0,LLIL_ZX.q(LLIL_REG.q(temp0)))'), @@ -2704,7 +2760,7 @@ (b'\x12\x21\x74\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x8),LLIL_XOR.q(LLIL_REG.q(x20),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x18,LLIL_ZX.q(LLIL_REG.q(temp0)))'), - # ldeorl x6, x29, [x6] LDEORL_64_memop + # ldeorl x6, fp, [x6] LDEORL_64_memop (b'\xDD\x20\x66\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_XOR.q(LLIL_REG.q(x6),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(fp,LLIL_ZX.q(LLIL_REG.q(temp0)))'), @@ -2732,7 +2788,7 @@ (b'\xD9\x20\x2B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_XOR.q(LLIL_REG.q(x11),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x25,LLIL_ZX.q(LLIL_REG.q(temp0)))'), - # ldeor x30, x13, [lr] LDEOR_64_memop + # ldeor lr, x13, [lr] LDEOR_64_memop (b'\xCD\x23\x3E\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.q(LLIL_REG.q(lr),LLIL_XOR.q(LLIL_REG.q(lr),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x13,LLIL_ZX.q(LLIL_REG.q(temp0)))'), @@ -2823,7 +2879,7 @@ (b'\xD5\x32\xEC\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_OR.q(LLIL_REG.q(x12),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x21,LLIL_ZX.q(LLIL_REG.q(temp0)))'), - # ldsetal x10, x30, [x17] LDSETAL_64_memop + # ldsetal x10, lr, [x17] LDSETAL_64_memop (b'\x3E\x32\xEA\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x17),LLIL_OR.q(LLIL_REG.q(x10),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(lr,LLIL_ZX.q(LLIL_REG.q(temp0)))'), @@ -3232,7 +3288,7 @@ (b'\x3F\x31\x72\xF8', 'LLIL_STORE.q(LLIL_REG.q(x9),LLIL_OR.q(LLIL_REG.q(x18),LLIL_LOAD.q(LLIL_REG.q(x9))))'), # stsetl x10, [x10] STSETL_LDSETL_64_memop (b'\x5F\x31\x6A\xF8', 'LLIL_STORE.q(LLIL_REG.q(x10),LLIL_OR.q(LLIL_REG.q(x10),LLIL_LOAD.q(LLIL_REG.q(x10))))'), - # stsetl x29, [x6] STSETL_LDSETL_64_memop + # stsetl fp, [x6] STSETL_LDSETL_64_memop (b'\xDF\x30\x7D\xF8', 'LLIL_STORE.q(LLIL_REG.q(x6),LLIL_OR.q(LLIL_REG.q(fp),LLIL_LOAD.q(LLIL_REG.q(x6))))'), # stset w24, [x27] STSET_LDSET_32_memop (b'\x7F\x33\x38\xB8', 'LLIL_STORE.q(LLIL_REG.q(x27),LLIL_OR.d(LLIL_REG.d(w24),LLIL_LOAD.d(LLIL_REG.q(x27))))'), @@ -3246,7 +3302,7 @@ (b'\xFF\x33\x2A\xF8', 'LLIL_STORE.q(LLIL_REG.q(sp),LLIL_OR.q(LLIL_REG.q(x10),LLIL_LOAD.q(LLIL_REG.q(sp))))'), # stset x12, [x19] STSET_LDSET_64_memop (b'\x7F\x32\x2C\xF8', 'LLIL_STORE.q(LLIL_REG.q(x19),LLIL_OR.q(LLIL_REG.q(x12),LLIL_LOAD.q(LLIL_REG.q(x19))))'), - # stset x29, [lr] STSET_LDSET_64_memop + # stset fp, [lr] STSET_LDSET_64_memop (b'\xDF\x33\x3D\xF8', 'LLIL_STORE.q(LLIL_REG.q(lr),LLIL_OR.q(LLIL_REG.q(fp),LLIL_LOAD.q(LLIL_REG.q(lr))))'), # stset x10, [x24] STSET_LDSET_64_memop (b'\x1F\x33\x2A\xF8', 'LLIL_STORE.q(LLIL_REG.q(x24),LLIL_OR.q(LLIL_REG.q(x10),LLIL_LOAD.q(LLIL_REG.q(x24))))'), @@ -3637,11 +3693,11 @@ tests_mov = [ # 011c044e mov v1.s[0], w0 (b'\x01\x1C\x04\x4E', 'LLIL_SET_REG.d(v1.s[0],LLIL_REG.d(w0))'), - # mov w10, #0 + # mov w10, #0x0 (b'\x0A\x00\x80\x52', 'LLIL_SET_REG.d(w10,LLIL_CONST.d(0x0))'), # mov v8.16b, v1.16b (b'\x28\x1C\xA1\x4E', 'LLIL_SET_REG.o(v8,LLIL_REG.o(v1))'), - # mov v0.2s, v1.2s + # mov v0.8b, v1.8b (b'\x20\x1C\xA1\x0E', 'LLIL_SET_REG.q(v0.d[0],LLIL_REG.q(v1.d[0]))'), ] @@ -3818,7 +3874,7 @@ (b'\xFF\x03\x0D\x2A', 'LLIL_REG.d(w13)'), # mov x5, #0xffffff00000000 MOV_ORR_64_log_imm (b'\xE5\x5F\x60\xB2', 'LLIL_SET_REG.q(x5,LLIL_CONST.q(0xFFFFFF00000000))'), - # mov x30, #-0xffffffffffff01 MOV_ORR_64_log_imm + # mov lr, #-0xffffffffffff01 MOV_ORR_64_log_imm (b'\xFE\x3F\x48\xB2', 'LLIL_SET_REG.q(lr,LLIL_CONST.q(0xFF000000000000FF))'), # mov x9, #0x7fffffffffffffe MOV_ORR_64_log_imm (b'\xE9\xE7\x7F\xB2', 'LLIL_SET_REG.q(x9,LLIL_CONST.q(0x7FFFFFFFFFFFFFE))'), @@ -3902,6 +3958,21 @@ ' LLIL_SET_REG.d(v20.s[3],LLIL_CONST.d(0x59000000))'), ] +tests_bsl_bit_bif = [ + # bit v0.16b, v17.16b, v4.16b BIT_asimdsame_only + (b'\x20\x1E\xA4\x6E', 'LLIL_INTRINSIC([v0],vbslq_u8,[LLIL_REG.o(v4),LLIL_REG.o(v17),LLIL_REG.o(v0)])'), + # bit v0.8b, v17.8b, v4.8b BIT_asimdsame_only + (b'\x20\x1E\xA4\x2E', 'LLIL_INTRINSIC([v0],vbsl_u8,[LLIL_REG.o(v4),LLIL_REG.o(v17),LLIL_REG.o(v0)])'), + # bif v0.16b, v17.16b, v4.16b BIF_asimdsame_only + (b'\x20\x1E\xE4\x6E', 'LLIL_INTRINSIC([v0],vbslq_u8,[LLIL_REG.o(v4),LLIL_REG.o(v0),LLIL_REG.o(v17)])'), + # bif v0.8b, v17.8b, v4.8b BIF_asimdsame_only + (b'\x20\x1E\xE4\x2E', 'LLIL_INTRINSIC([v0],vbsl_u8,[LLIL_REG.o(v4),LLIL_REG.o(v0),LLIL_REG.o(v17)])'), + # bsl v0.16b, v17.16b, v4.16b BSL_asimdsame_only + (b'\x20\x1E\x64\x6E', 'LLIL_INTRINSIC([v0],vbslq_u8,[LLIL_REG.o(v0),LLIL_REG.o(v17),LLIL_REG.o(v4)])'), + # bsl v0.8b, v17.8b, v4.8b BSL_asimdsame_only + (b'\x20\x1E\x64\x2E', 'LLIL_INTRINSIC([v0],vbsl_u8,[LLIL_REG.o(v0),LLIL_REG.o(v17),LLIL_REG.o(v4)])'), +] + tests_umov = [ # mov w26, v25.s[0] MOV_UMOV_asimdins_W_w (b'\x3A\x3F\x04\x0E', 'LLIL_SET_REG.d(w26,LLIL_ZX.d(LLIL_REG.d(v25.s[0])))'), @@ -3942,37 +4013,89 @@ tests_fmul = [ # fmul v7.2d, v20.2d, v1.2d FMUL_asimdsame_only - (b'\x87\xDE\x61\x6E', 'LLIL_INTRINSIC([v7],vmulq_f64,[LLIL_REG.o(v20),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), + (b'\x87\xDE\x61\x6E', 'LLIL_SET_REG.q(v7.d[0],LLIL_FMUL.q(LLIL_REG.q(v20.d[0]),LLIL_REG.q(v1.d[0])));' + \ + ' LLIL_SET_REG.q(v7.d[1],LLIL_FMUL.q(LLIL_REG.q(v20.d[1]),LLIL_REG.q(v1.d[1])))'), # fmul v28.2s, v21.2s, v1.2s FMUL_asimdsame_only - (b'\xBC\xDE\x21\x2E', 'LLIL_INTRINSIC([v28],vmul_f32,[LLIL_REG.o(v21),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), + (b'\xBC\xDE\x21\x2E', 'LLIL_SET_REG.d(v28.s[0],LLIL_FMUL.d(LLIL_REG.d(v21.s[0]),LLIL_REG.d(v1.s[0])));' + \ + ' LLIL_SET_REG.d(v28.s[1],LLIL_FMUL.d(LLIL_REG.d(v21.s[1]),LLIL_REG.d(v1.s[1])))'), # fmul v6.2s, v21.2s, v1.2s FMUL_asimdsame_only - (b'\xA6\xDE\x21\x2E', 'LLIL_INTRINSIC([v6],vmul_f32,[LLIL_REG.o(v21),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), + (b'\xA6\xDE\x21\x2E', 'LLIL_SET_REG.d(v6.s[0],LLIL_FMUL.d(LLIL_REG.d(v21.s[0]),LLIL_REG.d(v1.s[0])));' + \ + ' LLIL_SET_REG.d(v6.s[1],LLIL_FMUL.d(LLIL_REG.d(v21.s[1]),LLIL_REG.d(v1.s[1])))'), # fmul v22.4s, v15.4s, v26.4s FMUL_asimdsame_only - (b'\xF6\xDD\x3A\x6E', 'LLIL_INTRINSIC([v22],vmulq_f32,[LLIL_REG.o(v15),LLIL_REG.o(v26),LLIL_CONST.b(0x0)])'), + (b'\xF6\xDD\x3A\x6E', 'LLIL_SET_REG.d(v22.s[0],LLIL_FMUL.d(LLIL_REG.d(v15.s[0]),LLIL_REG.d(v26.s[0])));' + \ + ' LLIL_SET_REG.d(v22.s[1],LLIL_FMUL.d(LLIL_REG.d(v15.s[1]),LLIL_REG.d(v26.s[1])));' + \ + ' LLIL_SET_REG.d(v22.s[2],LLIL_FMUL.d(LLIL_REG.d(v15.s[2]),LLIL_REG.d(v26.s[2])));' + \ + ' LLIL_SET_REG.d(v22.s[3],LLIL_FMUL.d(LLIL_REG.d(v15.s[3]),LLIL_REG.d(v26.s[3])))'), # fmul v13.2s, v10.2s, v21.2s FMUL_asimdsame_only - (b'\x4D\xDD\x35\x2E', 'LLIL_INTRINSIC([v13],vmul_f32,[LLIL_REG.o(v10),LLIL_REG.o(v21),LLIL_CONST.b(0x0)])'), + (b'\x4D\xDD\x35\x2E', 'LLIL_SET_REG.d(v13.s[0],LLIL_FMUL.d(LLIL_REG.d(v10.s[0]),LLIL_REG.d(v21.s[0])));' + \ + ' LLIL_SET_REG.d(v13.s[1],LLIL_FMUL.d(LLIL_REG.d(v10.s[1]),LLIL_REG.d(v21.s[1])))'), # fmul v22.4s, v6.4s, v31.4s FMUL_asimdsame_only - (b'\xD6\xDC\x3F\x6E', 'LLIL_INTRINSIC([v22],vmulq_f32,[LLIL_REG.o(v6),LLIL_REG.o(v31),LLIL_CONST.b(0x0)])'), + (b'\xD6\xDC\x3F\x6E', 'LLIL_SET_REG.d(v22.s[0],LLIL_FMUL.d(LLIL_REG.d(v6.s[0]),LLIL_REG.d(v31.s[0])));' + \ + ' LLIL_SET_REG.d(v22.s[1],LLIL_FMUL.d(LLIL_REG.d(v6.s[1]),LLIL_REG.d(v31.s[1])));' + \ + ' LLIL_SET_REG.d(v22.s[2],LLIL_FMUL.d(LLIL_REG.d(v6.s[2]),LLIL_REG.d(v31.s[2])));' + \ + ' LLIL_SET_REG.d(v22.s[3],LLIL_FMUL.d(LLIL_REG.d(v6.s[3]),LLIL_REG.d(v31.s[3])))'), # fmul v18.2d, v3.2d, v26.2d FMUL_asimdsame_only - (b'\x72\xDC\x7A\x6E', 'LLIL_INTRINSIC([v18],vmulq_f64,[LLIL_REG.o(v3),LLIL_REG.o(v26),LLIL_CONST.b(0x0)])'), + (b'\x72\xDC\x7A\x6E', 'LLIL_SET_REG.q(v18.d[0],LLIL_FMUL.q(LLIL_REG.q(v3.d[0]),LLIL_REG.q(v26.d[0])));' + \ + ' LLIL_SET_REG.q(v18.d[1],LLIL_FMUL.q(LLIL_REG.q(v3.d[1]),LLIL_REG.q(v26.d[1])))'), # fmul v14.2d, v19.2d, v23.2d FMUL_asimdsame_only - (b'\x6E\xDE\x77\x6E', 'LLIL_INTRINSIC([v14],vmulq_f64,[LLIL_REG.o(v19),LLIL_REG.o(v23),LLIL_CONST.b(0x0)])'), + (b'\x6E\xDE\x77\x6E', 'LLIL_SET_REG.q(v14.d[0],LLIL_FMUL.q(LLIL_REG.q(v19.d[0]),LLIL_REG.q(v23.d[0])));' + \ + ' LLIL_SET_REG.q(v14.d[1],LLIL_FMUL.q(LLIL_REG.q(v19.d[1]),LLIL_REG.q(v23.d[1])))'), # fmul v14.4h, v25.4h, v26.4h FMUL_asimdsamefp16_only - (b'\x2E\x1F\x5A\x2E', 'LLIL_INTRINSIC([v14],vmul_f16,[LLIL_REG.o(v25),LLIL_CONST.b(0x0)])'), + (b'\x2E\x1F\x5A\x2E', 'LLIL_SET_REG.w(v14.h[0],LLIL_FMUL.w(LLIL_REG.w(v25.h[0]),LLIL_REG.w(v26.h[0])));' + \ + ' LLIL_SET_REG.w(v14.h[1],LLIL_FMUL.w(LLIL_REG.w(v25.h[1]),LLIL_REG.w(v26.h[1])));' + \ + ' LLIL_SET_REG.w(v14.h[2],LLIL_FMUL.w(LLIL_REG.w(v25.h[2]),LLIL_REG.w(v26.h[2])));' + \ + ' LLIL_SET_REG.w(v14.h[3],LLIL_FMUL.w(LLIL_REG.w(v25.h[3]),LLIL_REG.w(v26.h[3])))'), # fmul v24.4h, v21.4h, v29.4h FMUL_asimdsamefp16_only - (b'\xB8\x1E\x5D\x2E', 'LLIL_INTRINSIC([v24],vmul_f16,[LLIL_REG.o(v21),LLIL_CONST.b(0x0)])'), + (b'\xB8\x1E\x5D\x2E', 'LLIL_SET_REG.w(v24.h[0],LLIL_FMUL.w(LLIL_REG.w(v21.h[0]),LLIL_REG.w(v29.h[0])));' + \ + ' LLIL_SET_REG.w(v24.h[1],LLIL_FMUL.w(LLIL_REG.w(v21.h[1]),LLIL_REG.w(v29.h[1])));' + \ + ' LLIL_SET_REG.w(v24.h[2],LLIL_FMUL.w(LLIL_REG.w(v21.h[2]),LLIL_REG.w(v29.h[2])));' + \ + ' LLIL_SET_REG.w(v24.h[3],LLIL_FMUL.w(LLIL_REG.w(v21.h[3]),LLIL_REG.w(v29.h[3])))'), # fmul v22.8h, v17.8h, v26.8h FMUL_asimdsamefp16_only - (b'\x36\x1E\x5A\x6E', 'LLIL_INTRINSIC([v22],vmulq_f16,[LLIL_REG.o(v17),LLIL_CONST.b(0x0)])'), + (b'\x36\x1E\x5A\x6E', 'LLIL_SET_REG.w(v22.h[0],LLIL_FMUL.w(LLIL_REG.w(v17.h[0]),LLIL_REG.w(v26.h[0])));' + \ + ' LLIL_SET_REG.w(v22.h[1],LLIL_FMUL.w(LLIL_REG.w(v17.h[1]),LLIL_REG.w(v26.h[1])));' + \ + ' LLIL_SET_REG.w(v22.h[2],LLIL_FMUL.w(LLIL_REG.w(v17.h[2]),LLIL_REG.w(v26.h[2])));' + \ + ' LLIL_SET_REG.w(v22.h[3],LLIL_FMUL.w(LLIL_REG.w(v17.h[3]),LLIL_REG.w(v26.h[3])));' + \ + ' LLIL_SET_REG.w(v22.h[4],LLIL_FMUL.w(LLIL_REG.w(v17.h[4]),LLIL_REG.w(v26.h[4])));' + \ + ' LLIL_SET_REG.w(v22.h[5],LLIL_FMUL.w(LLIL_REG.w(v17.h[5]),LLIL_REG.w(v26.h[5])));' + \ + ' LLIL_SET_REG.w(v22.h[6],LLIL_FMUL.w(LLIL_REG.w(v17.h[6]),LLIL_REG.w(v26.h[6])));' + \ + ' LLIL_SET_REG.w(v22.h[7],LLIL_FMUL.w(LLIL_REG.w(v17.h[7]),LLIL_REG.w(v26.h[7])))'), # fmul v9.8h, v2.8h, v17.8h FMUL_asimdsamefp16_only - (b'\x49\x1C\x51\x6E', 'LLIL_INTRINSIC([v9],vmulq_f16,[LLIL_REG.o(v2),LLIL_CONST.b(0x0)])'), + (b'\x49\x1C\x51\x6E', 'LLIL_SET_REG.w(v9.h[0],LLIL_FMUL.w(LLIL_REG.w(v2.h[0]),LLIL_REG.w(v17.h[0])));' + \ + ' LLIL_SET_REG.w(v9.h[1],LLIL_FMUL.w(LLIL_REG.w(v2.h[1]),LLIL_REG.w(v17.h[1])));' + \ + ' LLIL_SET_REG.w(v9.h[2],LLIL_FMUL.w(LLIL_REG.w(v2.h[2]),LLIL_REG.w(v17.h[2])));' + \ + ' LLIL_SET_REG.w(v9.h[3],LLIL_FMUL.w(LLIL_REG.w(v2.h[3]),LLIL_REG.w(v17.h[3])));' + \ + ' LLIL_SET_REG.w(v9.h[4],LLIL_FMUL.w(LLIL_REG.w(v2.h[4]),LLIL_REG.w(v17.h[4])));' + \ + ' LLIL_SET_REG.w(v9.h[5],LLIL_FMUL.w(LLIL_REG.w(v2.h[5]),LLIL_REG.w(v17.h[5])));' + \ + ' LLIL_SET_REG.w(v9.h[6],LLIL_FMUL.w(LLIL_REG.w(v2.h[6]),LLIL_REG.w(v17.h[6])));' + \ + ' LLIL_SET_REG.w(v9.h[7],LLIL_FMUL.w(LLIL_REG.w(v2.h[7]),LLIL_REG.w(v17.h[7])))'), # fmul v9.8h, v31.8h, v4.8h FMUL_asimdsamefp16_only - (b'\xE9\x1F\x44\x6E', 'LLIL_INTRINSIC([v9],vmulq_f16,[LLIL_REG.o(v31),LLIL_CONST.b(0x0)])'), + (b'\xE9\x1F\x44\x6E', 'LLIL_SET_REG.w(v9.h[0],LLIL_FMUL.w(LLIL_REG.w(v31.h[0]),LLIL_REG.w(v4.h[0])));' + \ + ' LLIL_SET_REG.w(v9.h[1],LLIL_FMUL.w(LLIL_REG.w(v31.h[1]),LLIL_REG.w(v4.h[1])));' + \ + ' LLIL_SET_REG.w(v9.h[2],LLIL_FMUL.w(LLIL_REG.w(v31.h[2]),LLIL_REG.w(v4.h[2])));' + \ + ' LLIL_SET_REG.w(v9.h[3],LLIL_FMUL.w(LLIL_REG.w(v31.h[3]),LLIL_REG.w(v4.h[3])));' + \ + ' LLIL_SET_REG.w(v9.h[4],LLIL_FMUL.w(LLIL_REG.w(v31.h[4]),LLIL_REG.w(v4.h[4])));' + \ + ' LLIL_SET_REG.w(v9.h[5],LLIL_FMUL.w(LLIL_REG.w(v31.h[5]),LLIL_REG.w(v4.h[5])));' + \ + ' LLIL_SET_REG.w(v9.h[6],LLIL_FMUL.w(LLIL_REG.w(v31.h[6]),LLIL_REG.w(v4.h[6])));' + \ + ' LLIL_SET_REG.w(v9.h[7],LLIL_FMUL.w(LLIL_REG.w(v31.h[7]),LLIL_REG.w(v4.h[7])))'), # fmul v21.4h, v19.4h, v2.4h FMUL_asimdsamefp16_only - (b'\x75\x1E\x42\x2E', 'LLIL_INTRINSIC([v21],vmul_f16,[LLIL_REG.o(v19),LLIL_CONST.b(0x0)])'), + (b'\x75\x1E\x42\x2E', 'LLIL_SET_REG.w(v21.h[0],LLIL_FMUL.w(LLIL_REG.w(v19.h[0]),LLIL_REG.w(v2.h[0])));' + \ + ' LLIL_SET_REG.w(v21.h[1],LLIL_FMUL.w(LLIL_REG.w(v19.h[1]),LLIL_REG.w(v2.h[1])));' + \ + ' LLIL_SET_REG.w(v21.h[2],LLIL_FMUL.w(LLIL_REG.w(v19.h[2]),LLIL_REG.w(v2.h[2])));' + \ + ' LLIL_SET_REG.w(v21.h[3],LLIL_FMUL.w(LLIL_REG.w(v19.h[3]),LLIL_REG.w(v2.h[3])))'), # fmul v24.8h, v4.8h, v20.8h FMUL_asimdsamefp16_only - (b'\x98\x1C\x54\x6E', 'LLIL_INTRINSIC([v24],vmulq_f16,[LLIL_REG.o(v4),LLIL_CONST.b(0x0)])'), + (b'\x98\x1C\x54\x6E', 'LLIL_SET_REG.w(v24.h[0],LLIL_FMUL.w(LLIL_REG.w(v4.h[0]),LLIL_REG.w(v20.h[0])));' + \ + ' LLIL_SET_REG.w(v24.h[1],LLIL_FMUL.w(LLIL_REG.w(v4.h[1]),LLIL_REG.w(v20.h[1])));' + \ + ' LLIL_SET_REG.w(v24.h[2],LLIL_FMUL.w(LLIL_REG.w(v4.h[2]),LLIL_REG.w(v20.h[2])));' + \ + ' LLIL_SET_REG.w(v24.h[3],LLIL_FMUL.w(LLIL_REG.w(v4.h[3]),LLIL_REG.w(v20.h[3])));' + \ + ' LLIL_SET_REG.w(v24.h[4],LLIL_FMUL.w(LLIL_REG.w(v4.h[4]),LLIL_REG.w(v20.h[4])));' + \ + ' LLIL_SET_REG.w(v24.h[5],LLIL_FMUL.w(LLIL_REG.w(v4.h[5]),LLIL_REG.w(v20.h[5])));' + \ + ' LLIL_SET_REG.w(v24.h[6],LLIL_FMUL.w(LLIL_REG.w(v4.h[6]),LLIL_REG.w(v20.h[6])));' + \ + ' LLIL_SET_REG.w(v24.h[7],LLIL_FMUL.w(LLIL_REG.w(v4.h[7]),LLIL_REG.w(v20.h[7])))'), # fmul v29.4h, v12.4h, v5.4h FMUL_asimdsamefp16_only - (b'\x9D\x1D\x45\x2E', 'LLIL_INTRINSIC([v29],vmul_f16,[LLIL_REG.o(v12),LLIL_CONST.b(0x0)])'), + (b'\x9D\x1D\x45\x2E', 'LLIL_SET_REG.w(v29.h[0],LLIL_FMUL.w(LLIL_REG.w(v12.h[0]),LLIL_REG.w(v5.h[0])));' + \ + ' LLIL_SET_REG.w(v29.h[1],LLIL_FMUL.w(LLIL_REG.w(v12.h[1]),LLIL_REG.w(v5.h[1])));' + \ + ' LLIL_SET_REG.w(v29.h[2],LLIL_FMUL.w(LLIL_REG.w(v12.h[2]),LLIL_REG.w(v5.h[2])));' + \ + ' LLIL_SET_REG.w(v29.h[3],LLIL_FMUL.w(LLIL_REG.w(v12.h[3]),LLIL_REG.w(v5.h[3])))'), # fmul v2.4h, v23.4h, v15.h[0] FMUL_asimdelem_RH_H (b'\xE2\x92\x0F\x0F', 'LLIL_SET_REG.w(v2.h[0],LLIL_FMUL.w(LLIL_REG.w(v23.h[0]),LLIL_REG.w(v15.h[0])));' + \ ' LLIL_SET_REG.w(v2.h[1],LLIL_FMUL.w(LLIL_REG.w(v23.h[1]),LLIL_REG.w(v15.h[0])));' + \ @@ -4029,7 +4152,8 @@ (b'\x21\x90\x80\x0F', 'LLIL_SET_REG.d(v1.s[0],LLIL_FMUL.d(LLIL_REG.d(v1.s[0]),LLIL_REG.d(v0.s[0])));' + \ ' LLIL_SET_REG.d(v1.s[1],LLIL_FMUL.d(LLIL_REG.d(v1.s[1]),LLIL_REG.d(v0.s[0])))'), # fmul v5.2d, v11.2d, v3.d[1] FMUL_asimdelem_R_SD - (b'\x65\x99\xC3\x4F', 'LLIL_INTRINSIC([v5],vmulq_lane_f64,[LLIL_REG.o(v11),LLIL_REG.o(v3),LLIL_CONST.b(0x1)])'), + (b'\x65\x99\xC3\x4F', 'LLIL_SET_REG.q(v5.d[0],LLIL_FMUL.q(LLIL_REG.q(v11.d[0]),LLIL_REG.q(v3.d[1])));' + \ + ' LLIL_SET_REG.q(v5.d[1],LLIL_FMUL.q(LLIL_REG.q(v11.d[1]),LLIL_REG.q(v3.d[1])))'), # fmul v23.4s, v4.4s, v3.s[3] FMUL_asimdelem_R_SD (b'\x97\x98\xA3\x4F', 'LLIL_SET_REG.d(v23.s[0],LLIL_FMUL.d(LLIL_REG.d(v4.s[0]),LLIL_REG.d(v3.s[3])));' + \ ' LLIL_SET_REG.d(v23.s[1],LLIL_FMUL.d(LLIL_REG.d(v4.s[1]),LLIL_REG.d(v3.s[3])));' + \ @@ -4042,7 +4166,8 @@ (b'\x58\x92\xA5\x0F', 'LLIL_SET_REG.d(v24.s[0],LLIL_FMUL.d(LLIL_REG.d(v18.s[0]),LLIL_REG.d(v5.s[1])));' + \ ' LLIL_SET_REG.d(v24.s[1],LLIL_FMUL.d(LLIL_REG.d(v18.s[1]),LLIL_REG.d(v5.s[1])))'), # fmul v24.2d, v11.2d, v8.d[0] FMUL_asimdelem_R_SD - (b'\x78\x91\xC8\x4F', 'LLIL_INTRINSIC([v24],vmulq_lane_f64,[LLIL_REG.o(v11),LLIL_REG.o(v8),LLIL_CONST.b(0x0)])'), + (b'\x78\x91\xC8\x4F', 'LLIL_SET_REG.q(v24.d[0],LLIL_FMUL.q(LLIL_REG.q(v11.d[0]),LLIL_REG.q(v8.d[0])));' + \ + ' LLIL_SET_REG.q(v24.d[1],LLIL_FMUL.q(LLIL_REG.q(v11.d[1]),LLIL_REG.q(v8.d[0])))'), # fmul v7.2s, v0.2s, v12.s[0] FMUL_asimdelem_R_SD (b'\x07\x90\x8C\x0F', 'LLIL_SET_REG.d(v7.s[0],LLIL_FMUL.d(LLIL_REG.d(v0.s[0]),LLIL_REG.d(v12.s[0])));' + \ ' LLIL_SET_REG.d(v7.s[1],LLIL_FMUL.d(LLIL_REG.d(v0.s[1]),LLIL_REG.d(v12.s[0])))'), @@ -4052,9 +4177,11 @@ ' LLIL_SET_REG.d(v9.s[2],LLIL_FMUL.d(LLIL_REG.d(v9.s[2]),LLIL_REG.d(v25.s[2])));' + \ ' LLIL_SET_REG.d(v9.s[3],LLIL_FMUL.d(LLIL_REG.d(v9.s[3]),LLIL_REG.d(v25.s[2])))'), # fmul v7.2d, v20.2d, v1.2d FMUL_asimdsame_only - (b'\x87\xDE\x61\x6E', 'LLIL_INTRINSIC([v7],vmulq_f64,[LLIL_REG.o(v20),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), + (b'\x87\xDE\x61\x6E', 'LLIL_SET_REG.q(v7.d[0],LLIL_FMUL.q(LLIL_REG.q(v20.d[0]),LLIL_REG.q(v1.d[0])));' + \ + ' LLIL_SET_REG.q(v7.d[1],LLIL_FMUL.q(LLIL_REG.q(v20.d[1]),LLIL_REG.q(v1.d[1])))'), # fmul v28.2s, v21.2s, v1.2s FMUL_asimdsame_only - (b'\xBC\xDE\x21\x2E', 'LLIL_INTRINSIC([v28],vmul_f32,[LLIL_REG.o(v21),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), + (b'\xBC\xDE\x21\x2E', 'LLIL_SET_REG.d(v28.s[0],LLIL_FMUL.d(LLIL_REG.d(v21.s[0]),LLIL_REG.d(v1.s[0])));' + \ + ' LLIL_SET_REG.d(v28.s[1],LLIL_FMUL.d(LLIL_REG.d(v21.s[1]),LLIL_REG.d(v1.s[1])))'), # fmul h19, h5, v4.h[3] FMUL_asisdelem_RH_H (b'\xB3\x90\x34\x5F', 'LLIL_SET_REG.w(h19,LLIL_FMUL.w(LLIL_REG.w(h5),LLIL_REG.w(v4.h[3])))'), # fmul h0, h5, v2.h[7] FMUL_asisdelem_RH_H @@ -4078,9 +4205,9 @@ # fmul s25, s8, v30.s[1] FMUL_asisdelem_R_SD (b'\x19\x91\xBE\x5F', 'LLIL_SET_REG.d(s25,LLIL_FMUL.d(LLIL_REG.d(s8),LLIL_REG.d(v30.s[1])))'), # fmul d2, d27, v4.d[0] FMUL_asisdelem_R_SD - (b'\x62\x93\xC4\x5F', 'LLIL_INTRINSIC([d2],vmul_lane_f64,[LLIL_REG.q(d27),LLIL_REG.o(v4),LLIL_CONST.b(0x0)])'), + (b'\x62\x93\xC4\x5F', 'LLIL_SET_REG.q(d2,LLIL_FMUL.q(LLIL_REG.q(d27),LLIL_REG.q(v4.d[0])))'), # fmul d26, d3, v27.d[1] FMUL_asisdelem_R_SD - (b'\x7A\x98\xDB\x5F', 'LLIL_INTRINSIC([d26],vmul_lane_f64,[LLIL_REG.q(d3),LLIL_REG.o(v27),LLIL_CONST.b(0x1)])'), + (b'\x7A\x98\xDB\x5F', 'LLIL_SET_REG.q(d26,LLIL_FMUL.q(LLIL_REG.q(d3),LLIL_REG.q(v27.d[1])))'), # fmul s26, s30, v13.s[3] FMUL_asisdelem_R_SD (b'\xDA\x9B\xAD\x5F', 'LLIL_SET_REG.d(s26,LLIL_FMUL.d(LLIL_REG.d(s30),LLIL_REG.d(v13.s[3])))'), # fmul s4, s24, v8.s[3] FMUL_asisdelem_R_SD @@ -4123,37 +4250,37 @@ # fcmeq h17, h20, h1 FCMEQ_asisdsamefp16_only (b'\x91\x26\x41\x5E', 'LLIL_INTRINSIC([h17],vceqh_f16,[LLIL_REG.w(h20),LLIL_REG.w(h1)])'), # fcmge v19.2s, v20.2s, v30.2s FCMGE_asimdsame_only - (b'\x93\xE6\x3E\x2E', 'LLIL_INTRINSIC([v19],vcle_f32,[LLIL_REG.o(v20),LLIL_REG.o(v30)])'), + (b'\x93\xE6\x3E\x2E', 'LLIL_INTRINSIC([v19],vcge_f32,[LLIL_REG.o(v20),LLIL_REG.o(v30)])'), # fcmge v14.4s, v24.4s, v26.4s FCMGE_asimdsame_only - (b'\x0E\xE7\x3A\x6E', 'LLIL_INTRINSIC([v14],vcleq_f32,[LLIL_REG.o(v24),LLIL_REG.o(v26)])'), + (b'\x0E\xE7\x3A\x6E', 'LLIL_INTRINSIC([v14],vcgeq_f32,[LLIL_REG.o(v24),LLIL_REG.o(v26)])'), # fcmge v16.4s, v12.4s, v9.4s FCMGE_asimdsame_only - (b'\x90\xE5\x29\x6E', 'LLIL_INTRINSIC([v16],vcleq_f32,[LLIL_REG.o(v12),LLIL_REG.o(v9)])'), + (b'\x90\xE5\x29\x6E', 'LLIL_INTRINSIC([v16],vcgeq_f32,[LLIL_REG.o(v12),LLIL_REG.o(v9)])'), # fcmge v25.2d, v9.2d, v10.2d FCMGE_asimdsame_only - (b'\x39\xE5\x6A\x6E', 'LLIL_INTRINSIC([v25],vcleq_f64,[LLIL_REG.o(v9),LLIL_REG.o(v10)])'), + (b'\x39\xE5\x6A\x6E', 'LLIL_INTRINSIC([v25],vcgeq_f64,[LLIL_REG.o(v9),LLIL_REG.o(v10)])'), # fcmge v30.4h, v8.4h, v25.4h FCMGE_asimdsamefp16_only - (b'\x1E\x25\x59\x2E', 'LLIL_INTRINSIC([v30],vcle_f16,[LLIL_REG.o(v8),LLIL_REG.o(v25)])'), + (b'\x1E\x25\x59\x2E', 'LLIL_INTRINSIC([v30],vcge_f16,[LLIL_REG.o(v8),LLIL_REG.o(v25)])'), # fcmge v8.4h, v21.4h, v13.4h FCMGE_asimdsamefp16_only - (b'\xA8\x26\x4D\x2E', 'LLIL_INTRINSIC([v8],vcle_f16,[LLIL_REG.o(v21),LLIL_REG.o(v13)])'), + (b'\xA8\x26\x4D\x2E', 'LLIL_INTRINSIC([v8],vcge_f16,[LLIL_REG.o(v21),LLIL_REG.o(v13)])'), # fcmge v1.4h, v6.4h, v21.4h FCMGE_asimdsamefp16_only - (b'\xC1\x24\x55\x2E', 'LLIL_INTRINSIC([v1],vcle_f16,[LLIL_REG.o(v6),LLIL_REG.o(v21)])'), + (b'\xC1\x24\x55\x2E', 'LLIL_INTRINSIC([v1],vcge_f16,[LLIL_REG.o(v6),LLIL_REG.o(v21)])'), # fcmge v5.8h, v17.8h, v22.8h FCMGE_asimdsamefp16_only - (b'\x25\x26\x56\x6E', 'LLIL_INTRINSIC([v5],vcleq_f16,[LLIL_REG.o(v17),LLIL_REG.o(v22)])'), + (b'\x25\x26\x56\x6E', 'LLIL_INTRINSIC([v5],vcgeq_f16,[LLIL_REG.o(v17),LLIL_REG.o(v22)])'), # fcmge d14, d18, d31 FCMGE_asisdsame_only - (b'\x4E\xE6\x7F\x7E', 'LLIL_INTRINSIC([d14],vcged_f64,[LLIL_REG.q(d18),LLIL_REG.q(d31)])'), + (b'\x4E\xE6\x7F\x7E', 'LLIL_INTRINSIC([d14],vcge_f64,[LLIL_REG.q(d18),LLIL_REG.q(d31)])'), # fcmge d5, d20, d1 FCMGE_asisdsame_only - (b'\x85\xE6\x61\x7E', 'LLIL_INTRINSIC([d5],vcged_f64,[LLIL_REG.q(d20),LLIL_REG.q(d1)])'), + (b'\x85\xE6\x61\x7E', 'LLIL_INTRINSIC([d5],vcge_f64,[LLIL_REG.q(d20),LLIL_REG.q(d1)])'), # fcmge d5, d31, d19 FCMGE_asisdsame_only - (b'\xE5\xE7\x73\x7E', 'LLIL_INTRINSIC([d5],vcged_f64,[LLIL_REG.q(d31),LLIL_REG.q(d19)])'), + (b'\xE5\xE7\x73\x7E', 'LLIL_INTRINSIC([d5],vcge_f64,[LLIL_REG.q(d31),LLIL_REG.q(d19)])'), # fcmge s22, s29, s1 FCMGE_asisdsame_only (b'\xB6\xE7\x21\x7E', 'LLIL_INTRINSIC([s22],vcges_f32,[LLIL_REG.d(s29),LLIL_REG.d(s1)])'), # fcmge h14, h31, h0 FCMGE_asisdsamefp16_only - (b'\xEE\x27\x40\x7E', 'LLIL_INTRINSIC([h14],vcleh_f16,[LLIL_REG.w(h31),LLIL_REG.w(h0)])'), + (b'\xEE\x27\x40\x7E', 'LLIL_INTRINSIC([h14],vcgeh_f16,[LLIL_REG.w(h31),LLIL_REG.w(h0)])'), # fcmge h15, h10, h6 FCMGE_asisdsamefp16_only - (b'\x4F\x25\x46\x7E', 'LLIL_INTRINSIC([h15],vcleh_f16,[LLIL_REG.w(h10),LLIL_REG.w(h6)])'), + (b'\x4F\x25\x46\x7E', 'LLIL_INTRINSIC([h15],vcgeh_f16,[LLIL_REG.w(h10),LLIL_REG.w(h6)])'), # fcmge h30, h22, h10 FCMGE_asisdsamefp16_only - (b'\xDE\x26\x4A\x7E', 'LLIL_INTRINSIC([h30],vcleh_f16,[LLIL_REG.w(h22),LLIL_REG.w(h10)])'), + (b'\xDE\x26\x4A\x7E', 'LLIL_INTRINSIC([h30],vcgeh_f16,[LLIL_REG.w(h22),LLIL_REG.w(h10)])'), # fcmge h2, h8, h29 FCMGE_asisdsamefp16_only - (b'\x02\x25\x5D\x7E', 'LLIL_INTRINSIC([h2],vcleh_f16,[LLIL_REG.w(h8),LLIL_REG.w(h29)])'), + (b'\x02\x25\x5D\x7E', 'LLIL_INTRINSIC([h2],vcgeh_f16,[LLIL_REG.w(h8),LLIL_REG.w(h29)])'), # fcmgt v24.2d, v5.2d, v23.2d FCMGT_asimdsame_only (b'\xB8\xE4\xF7\x6E', 'LLIL_INTRINSIC([v24],vcgtq_f64,[LLIL_REG.o(v5),LLIL_REG.o(v23)])'), # fcmgt v19.2d, v15.2d, v9.2d FCMGT_asimdsame_only @@ -4163,15 +4290,15 @@ # fcmgt v29.2s, v3.2s, v0.2s FCMGT_asimdsame_only (b'\x7D\xE4\xA0\x2E', 'LLIL_INTRINSIC([v29],vcgt_f32,[LLIL_REG.o(v3),LLIL_REG.o(v0)])'), # fcmgt v0.8h, v31.8h, v10.8h FCMGT_asimdsamefp16_only - (b'\xE0\x27\xCA\x6E', 'LLIL_INTRINSIC([v0],vcltq_f16,[LLIL_REG.o(v31),LLIL_REG.o(v10)])'), + (b'\xE0\x27\xCA\x6E', 'LLIL_INTRINSIC([v0],vcgtq_f16,[LLIL_REG.o(v31),LLIL_REG.o(v10)])'), # fcmgt v26.4h, v15.4h, v17.4h FCMGT_asimdsamefp16_only - (b'\xFA\x25\xD1\x2E', 'LLIL_INTRINSIC([v26],vclt_f16,[LLIL_REG.o(v15),LLIL_REG.o(v17)])'), + (b'\xFA\x25\xD1\x2E', 'LLIL_INTRINSIC([v26],vcgt_f16,[LLIL_REG.o(v15),LLIL_REG.o(v17)])'), # fcmgt v9.4h, v21.4h, v31.4h FCMGT_asimdsamefp16_only - (b'\xA9\x26\xDF\x2E', 'LLIL_INTRINSIC([v9],vclt_f16,[LLIL_REG.o(v21),LLIL_REG.o(v31)])'), + (b'\xA9\x26\xDF\x2E', 'LLIL_INTRINSIC([v9],vcgt_f16,[LLIL_REG.o(v21),LLIL_REG.o(v31)])'), # fcmgt v2.8h, v26.8h, v11.8h FCMGT_asimdsamefp16_only - (b'\x42\x27\xCB\x6E', 'LLIL_INTRINSIC([v2],vcltq_f16,[LLIL_REG.o(v26),LLIL_REG.o(v11)])'), + (b'\x42\x27\xCB\x6E', 'LLIL_INTRINSIC([v2],vcgtq_f16,[LLIL_REG.o(v26),LLIL_REG.o(v11)])'), # fcmgt d26, d9, d10 FCMGT_asisdsame_only - (b'\x3A\xE5\xEA\x7E', 'LLIL_INTRINSIC([d26],vcgtd_f64,[LLIL_REG.q(d9),LLIL_REG.q(d10)])'), + (b'\x3A\xE5\xEA\x7E', 'LLIL_INTRINSIC([d26],vcgt_f64,[LLIL_REG.q(d9),LLIL_REG.q(d10)])'), # fcmgt s31, s12, s18 FCMGT_asisdsame_only (b'\x9F\xE5\xB2\x7E', 'LLIL_INTRINSIC([s31],vcgts_f32,[LLIL_REG.d(s12),LLIL_REG.d(s18)])'), # fcmgt s22, s12, s23 FCMGT_asisdsame_only @@ -4179,52 +4306,61 @@ # fcmgt s6, s30, s22 FCMGT_asisdsame_only (b'\xC6\xE7\xB6\x7E', 'LLIL_INTRINSIC([s6],vcgts_f32,[LLIL_REG.d(s30),LLIL_REG.d(s22)])'), # fcmgt h6, h0, h25 FCMGT_asisdsamefp16_only - (b'\x06\x24\xD9\x7E', 'LLIL_INTRINSIC([h6],vclth_f16,[LLIL_REG.w(h0)])'), + (b'\x06\x24\xD9\x7E', 'LLIL_INTRINSIC([h6],vcgth_f16,[LLIL_REG.w(h0),LLIL_REG.w(h25)])'), # fcmgt h25, h0, h23 FCMGT_asisdsamefp16_only - (b'\x19\x24\xD7\x7E', 'LLIL_INTRINSIC([h25],vclth_f16,[LLIL_REG.w(h0)])'), + (b'\x19\x24\xD7\x7E', 'LLIL_INTRINSIC([h25],vcgth_f16,[LLIL_REG.w(h0),LLIL_REG.w(h23)])'), # fcmgt h5, h8, h9 FCMGT_asisdsamefp16_only - (b'\x05\x25\xC9\x7E', 'LLIL_INTRINSIC([h5],vclth_f16,[LLIL_REG.w(h8)])'), + (b'\x05\x25\xC9\x7E', 'LLIL_INTRINSIC([h5],vcgth_f16,[LLIL_REG.w(h8),LLIL_REG.w(h9)])'), # fcmgt h25, h2, h18 FCMGT_asisdsamefp16_only - (b'\x59\x24\xD2\x7E', 'LLIL_INTRINSIC([h25],vclth_f16,[LLIL_REG.w(h2)])'), + (b'\x59\x24\xD2\x7E', 'LLIL_INTRINSIC([h25],vcgth_f16,[LLIL_REG.w(h2),LLIL_REG.w(h18)])'), +] + +tests_cmge_cmhs = [ + # cmge v2.2d, v25.2d, v12.2d CMGE_asimdsame_only + (b'\x22\x3F\xEC\x4E', 'LLIL_INTRINSIC([v2],vcgeq_s64,[LLIL_REG.o(v25),LLIL_REG.o(v12)])'), + # cmhs v5.4s, v14.4s, v18.4s CMHS_asimdsame_only + (b'\xC5\x3D\xB2\x6E', 'LLIL_INTRINSIC([v5],vcgeq_u32,[LLIL_REG.o(v14),LLIL_REG.o(v18)])'), + # cmge d31, d4, d1 CMGE_asisdsame_only + (b'\x9F\x3C\xE1\x5E', 'LLIL_INTRINSIC([d31],vcge_s64,[LLIL_REG.q(d4),LLIL_REG.q(d1)])'), ] tests_fcmla = [ # fcmla v4.8h, v22.8h, v5.h[0], #0x0 FCMLA_asimdelem_C_H - (b'\xC4\x12\x45\x6F', 'LLIL_INTRINSIC([v4],vcmlaq_laneq_f16,[LLIL_REG.o(v4),LLIL_REG.o(v22),LLIL_REG.o(v5),LLIL_CONST.b(0x0),LLIL_CONST.q(0x0)])'), + (b'\xC4\x12\x45\x6F', 'LLIL_INTRINSIC([v4],vcmlaq_laneq_f16,[LLIL_REG.o(v4),LLIL_REG.o(v22),LLIL_REG.o(v5),LLIL_CONST.b(0x0)])'), # fcmla v11.8h, v1.8h, v18.h[0], #0x5a FCMLA_asimdelem_C_H - (b'\x2B\x30\x52\x6F', 'LLIL_INTRINSIC([v11],vcmlaq_rot90_laneq_f16,[LLIL_REG.o(v11),LLIL_REG.o(v1),LLIL_REG.o(v18),LLIL_CONST.b(0x0),LLIL_CONST.q(0x5A)])'), + (b'\x2B\x30\x52\x6F', 'LLIL_INTRINSIC([v11],vcmlaq_rot90_laneq_f16,[LLIL_REG.o(v11),LLIL_REG.o(v1),LLIL_REG.o(v18),LLIL_CONST.b(0x0)])'), # fcmla v23.8h, v7.8h, v22.h[0], #0xb4 FCMLA_asimdelem_C_H - (b'\xF7\x50\x56\x6F', 'LLIL_INTRINSIC([v23],vcmlaq_rot180_laneq_f16,[LLIL_REG.o(v23),LLIL_REG.o(v7),LLIL_REG.o(v22),LLIL_CONST.b(0x0),LLIL_CONST.q(0xB4)])'), + (b'\xF7\x50\x56\x6F', 'LLIL_INTRINSIC([v23],vcmlaq_rot180_laneq_f16,[LLIL_REG.o(v23),LLIL_REG.o(v7),LLIL_REG.o(v22),LLIL_CONST.b(0x0)])'), # fcmla v21.4h, v13.4h, v19.h[0], #0xb4 FCMLA_asimdelem_C_H - (b'\xB5\x51\x53\x2F', 'LLIL_INTRINSIC([v21],vcmla_rot180_laneq_f16,[LLIL_REG.o(v21),LLIL_REG.o(v13),LLIL_REG.o(v19),LLIL_CONST.b(0x0),LLIL_CONST.q(0xB4)])'), + (b'\xB5\x51\x53\x2F', 'LLIL_INTRINSIC([v21],vcmla_rot180_laneq_f16,[LLIL_REG.o(v21),LLIL_REG.o(v13),LLIL_REG.o(v19),LLIL_CONST.b(0x0)])'), # fcmla v24.4s, v7.4s, v16.s[1], #0x5a FCMLA_asimdelem_C_S - (b'\xF8\x38\x90\x6F', 'LLIL_INTRINSIC([v24],vcmlaq_rot90_laneq_f32,[LLIL_REG.o(v24),LLIL_REG.o(v7),LLIL_REG.o(v16),LLIL_CONST.b(0x1),LLIL_CONST.q(0x5A)])'), + (b'\xF8\x38\x90\x6F', 'LLIL_INTRINSIC([v24],vcmlaq_rot90_laneq_f32,[LLIL_REG.o(v24),LLIL_REG.o(v7),LLIL_REG.o(v16),LLIL_CONST.b(0x1)])'), # fcmla v23.4s, v8.4s, v0.s[1], #0x10e FCMLA_asimdelem_C_S - (b'\x17\x79\x80\x6F', 'LLIL_INTRINSIC([v23],vcmlaq_rot270_laneq_f32,[LLIL_REG.o(v23),LLIL_REG.o(v8),LLIL_REG.o(v0),LLIL_CONST.b(0x1),LLIL_CONST.q(0x10E)])'), + (b'\x17\x79\x80\x6F', 'LLIL_INTRINSIC([v23],vcmlaq_rot270_laneq_f32,[LLIL_REG.o(v23),LLIL_REG.o(v8),LLIL_REG.o(v0),LLIL_CONST.b(0x1)])'), # fcmla v16.4s, v0.4s, v31.s[0], #0xb4 FCMLA_asimdelem_C_S - (b'\x10\x50\x9F\x6F', 'LLIL_INTRINSIC([v16],vcmlaq_rot180_laneq_f32,[LLIL_REG.o(v16),LLIL_REG.o(v0),LLIL_REG.o(v31),LLIL_CONST.b(0x0),LLIL_CONST.q(0xB4)])'), + (b'\x10\x50\x9F\x6F', 'LLIL_INTRINSIC([v16],vcmlaq_rot180_laneq_f32,[LLIL_REG.o(v16),LLIL_REG.o(v0),LLIL_REG.o(v31),LLIL_CONST.b(0x0)])'), # fcmla v26.4s, v23.4s, v1.s[1], #0x0 FCMLA_asimdelem_C_S - (b'\xFA\x1A\x81\x6F', 'LLIL_INTRINSIC([v26],vcmlaq_laneq_f32,[LLIL_REG.o(v26),LLIL_REG.o(v23),LLIL_REG.o(v1),LLIL_CONST.b(0x1),LLIL_CONST.q(0x0)])'), + (b'\xFA\x1A\x81\x6F', 'LLIL_INTRINSIC([v26],vcmlaq_laneq_f32,[LLIL_REG.o(v26),LLIL_REG.o(v23),LLIL_REG.o(v1),LLIL_CONST.b(0x1)])'), # fcmla v9.4s, v2.4s, v31.4s, #0x0 FCMLA_asimdsame2_C - (b'\x49\xC4\x9F\x6E', 'LLIL_INTRINSIC([v9],vcmlaq_f32,[LLIL_REG.o(v9),LLIL_REG.o(v2),LLIL_REG.o(v31),LLIL_CONST.q(0x0)])'), + (b'\x49\xC4\x9F\x6E', 'LLIL_INTRINSIC([v9],vcmlaq_f32,[LLIL_REG.o(v9),LLIL_REG.o(v2),LLIL_REG.o(v31)])'), # fcmla v18.2s, v22.2s, v16.2s, #0x5a FCMLA_asimdsame2_C - (b'\xD2\xCE\x90\x2E', 'LLIL_INTRINSIC([v18],vcmla_rot90_f32,[LLIL_REG.o(v18),LLIL_REG.o(v22),LLIL_REG.o(v16),LLIL_CONST.q(0x5A)])'), + (b'\xD2\xCE\x90\x2E', 'LLIL_INTRINSIC([v18],vcmla_rot90_f32,[LLIL_REG.o(v18),LLIL_REG.o(v22),LLIL_REG.o(v16)])'), # fcmla v2.4h, v15.4h, v7.4h, #0x0 FCMLA_asimdsame2_C - (b'\xE2\xC5\x47\x2E', 'LLIL_INTRINSIC([v2],vcmla_f16,[LLIL_REG.o(v2),LLIL_REG.o(v15),LLIL_REG.o(v7),LLIL_CONST.q(0x0)])'), + (b'\xE2\xC5\x47\x2E', 'LLIL_INTRINSIC([v2],vcmla_f16,[LLIL_REG.o(v2),LLIL_REG.o(v15),LLIL_REG.o(v7)])'), # fcmla v13.2s, v10.2s, v1.2s, #0x5a FCMLA_asimdsame2_C - (b'\x4D\xCD\x81\x2E', 'LLIL_INTRINSIC([v13],vcmla_rot90_f32,[LLIL_REG.o(v13),LLIL_REG.o(v10),LLIL_REG.o(v1),LLIL_CONST.q(0x5A)])'), + (b'\x4D\xCD\x81\x2E', 'LLIL_INTRINSIC([v13],vcmla_rot90_f32,[LLIL_REG.o(v13),LLIL_REG.o(v10),LLIL_REG.o(v1)])'), ] tests_fml = [ # fmlal2 v12.2s, v26.2h, v15.h[2] FMLAL2_asimdelem_LH - (b'\x4C\x83\xAF\x2F', 'LLIL_INTRINSIC([v12],vfmlal_lane_high_f16,[LLIL_REG.o(v12),LLIL_REG.o(v26),LLIL_REG.o(v15),LLIL_CONST.b(0x2)])'), + (b'\x4C\x83\xAF\x2F', 'LLIL_INTRINSIC([v12],vfmlal_laneq_high_f16,[LLIL_REG.o(v12),LLIL_REG.o(v26),LLIL_REG.o(v15),LLIL_CONST.b(0x2)])'), # fmlal2 v5.2s, v10.2h, v3.h[2] FMLAL2_asimdelem_LH - (b'\x45\x81\xA3\x2F', 'LLIL_INTRINSIC([v5],vfmlal_lane_high_f16,[LLIL_REG.o(v5),LLIL_REG.o(v10),LLIL_REG.o(v3),LLIL_CONST.b(0x2)])'), + (b'\x45\x81\xA3\x2F', 'LLIL_INTRINSIC([v5],vfmlal_laneq_high_f16,[LLIL_REG.o(v5),LLIL_REG.o(v10),LLIL_REG.o(v3),LLIL_CONST.b(0x2)])'), # fmlal2 v20.4s, v9.4h, v12.h[7] FMLAL2_asimdelem_LH - (b'\x34\x89\xBC\x6F', 'LLIL_INTRINSIC([v20],vfmlalq_lane_high_f16,[LLIL_REG.o(v20),LLIL_REG.o(v9),LLIL_REG.o(v12),LLIL_CONST.b(0x7)])'), + (b'\x34\x89\xBC\x6F', 'LLIL_INTRINSIC([v20],vfmlalq_laneq_high_f16,[LLIL_REG.o(v20),LLIL_REG.o(v9),LLIL_REG.o(v12),LLIL_CONST.b(0x7)])'), # fmlal2 v6.2s, v7.2h, v12.h[2] FMLAL2_asimdelem_LH - (b'\xE6\x80\xAC\x2F', 'LLIL_INTRINSIC([v6],vfmlal_lane_high_f16,[LLIL_REG.o(v6),LLIL_REG.o(v7),LLIL_REG.o(v12),LLIL_CONST.b(0x2)])'), + (b'\xE6\x80\xAC\x2F', 'LLIL_INTRINSIC([v6],vfmlal_laneq_high_f16,[LLIL_REG.o(v6),LLIL_REG.o(v7),LLIL_REG.o(v12),LLIL_CONST.b(0x2)])'), # fmlal2 v9.2s, v30.2h, v7.2h FMLAL2_asimdsame_F (b'\xC9\xCF\x27\x2E', 'LLIL_INTRINSIC([v9],vfmlal_high_f16,[LLIL_REG.o(v9),LLIL_REG.o(v30),LLIL_REG.o(v7)])'), # fmlal2 v1.4s, v0.4h, v16.4h FMLAL2_asimdsame_F @@ -4234,13 +4370,13 @@ # fmlal2 v26.2s, v29.2h, v13.2h FMLAL2_asimdsame_F (b'\xBA\xCF\x2D\x2E', 'LLIL_INTRINSIC([v26],vfmlal_high_f16,[LLIL_REG.o(v26),LLIL_REG.o(v29),LLIL_REG.o(v13)])'), # fmlal v5.2s, v5.2h, v4.h[1] FMLAL_asimdelem_LH - (b'\xA5\x00\x94\x0F', 'LLIL_INTRINSIC([v5],vfmlal_lane_low_f16,[LLIL_REG.o(v5),LLIL_REG.o(v5),LLIL_REG.o(v4),LLIL_CONST.b(0x1)])'), + (b'\xA5\x00\x94\x0F', 'LLIL_INTRINSIC([v5],vfmlal_laneq_low_f16,[LLIL_REG.o(v5),LLIL_REG.o(v5),LLIL_REG.o(v4),LLIL_CONST.b(0x1)])'), # fmlal v28.4s, v25.4h, v5.h[7] FMLAL_asimdelem_LH - (b'\x3C\x0B\xB5\x4F', 'LLIL_INTRINSIC([v28],vfmlalq_lane_low_f16,[LLIL_REG.o(v28),LLIL_REG.o(v25),LLIL_REG.o(v5),LLIL_CONST.b(0x7)])'), + (b'\x3C\x0B\xB5\x4F', 'LLIL_INTRINSIC([v28],vfmlalq_laneq_low_f16,[LLIL_REG.o(v28),LLIL_REG.o(v25),LLIL_REG.o(v5),LLIL_CONST.b(0x7)])'), # fmlal v6.2s, v31.2h, v13.h[0] FMLAL_asimdelem_LH - (b'\xE6\x03\x8D\x0F', 'LLIL_INTRINSIC([v6],vfmlal_lane_low_f16,[LLIL_REG.o(v6),LLIL_REG.o(v31),LLIL_REG.o(v13),LLIL_CONST.b(0x0)])'), + (b'\xE6\x03\x8D\x0F', 'LLIL_INTRINSIC([v6],vfmlal_laneq_low_f16,[LLIL_REG.o(v6),LLIL_REG.o(v31),LLIL_REG.o(v13),LLIL_CONST.b(0x0)])'), # fmlal v14.4s, v10.4h, v4.h[3] FMLAL_asimdelem_LH - (b'\x4E\x01\xB4\x4F', 'LLIL_INTRINSIC([v14],vfmlalq_lane_low_f16,[LLIL_REG.o(v14),LLIL_REG.o(v10),LLIL_REG.o(v4),LLIL_CONST.b(0x3)])'), + (b'\x4E\x01\xB4\x4F', 'LLIL_INTRINSIC([v14],vfmlalq_laneq_low_f16,[LLIL_REG.o(v14),LLIL_REG.o(v10),LLIL_REG.o(v4),LLIL_CONST.b(0x3)])'), # fmlal v18.4s, v25.4h, v16.4h FMLAL_asimdsame_F (b'\x32\xEF\x30\x4E', 'LLIL_INTRINSIC([v18],vfmlalq_low_f16,[LLIL_REG.o(v18),LLIL_REG.o(v25),LLIL_REG.o(v16)])'), # fmlal v19.2s, v0.2h, v11.2h FMLAL_asimdsame_F @@ -4258,13 +4394,13 @@ # fmla v19.4h, v19.4h, v6.h[6] FMLA_asimdelem_RH_H (b'\x73\x1A\x26\x0F', 'LLIL_INTRINSIC([v19],vfma_laneq_f16,[LLIL_REG.o(v19),LLIL_REG.o(v19),LLIL_REG.o(v6),LLIL_CONST.b(0x6)])'), # fmla v28.4s, v5.4s, v23.s[0] FMLA_asimdelem_R_SD - (b'\xBC\x10\x97\x4F', 'LLIL_INTRINSIC([v28],vfmaq_n_f32,[LLIL_REG.o(v28),LLIL_REG.o(v5),LLIL_CONST.b(0x0)])'), + (b'\xBC\x10\x97\x4F', 'LLIL_INTRINSIC([v28],vfmaq_laneq_f32,[LLIL_REG.o(v28),LLIL_REG.o(v5),LLIL_REG.o(v23),LLIL_CONST.b(0x0)])'), # fmla v21.4s, v24.4s, v7.s[1] FMLA_asimdelem_R_SD - (b'\x15\x13\xA7\x4F', 'LLIL_INTRINSIC([v21],vfmaq_n_f32,[LLIL_REG.o(v21),LLIL_REG.o(v24),LLIL_CONST.b(0x1)])'), + (b'\x15\x13\xA7\x4F', 'LLIL_INTRINSIC([v21],vfmaq_laneq_f32,[LLIL_REG.o(v21),LLIL_REG.o(v24),LLIL_REG.o(v7),LLIL_CONST.b(0x1)])'), # fmla v29.2s, v3.2s, v23.s[0] FMLA_asimdelem_R_SD - (b'\x7D\x10\x97\x0F', 'LLIL_INTRINSIC([v29],vfma_n_f32,[LLIL_REG.o(v29),LLIL_REG.o(v3),LLIL_CONST.b(0x0)])'), + (b'\x7D\x10\x97\x0F', 'LLIL_INTRINSIC([v29],vfma_laneq_f32,[LLIL_REG.o(v29),LLIL_REG.o(v3),LLIL_REG.o(v23),LLIL_CONST.b(0x0)])'), # fmla v4.2s, v20.2s, v0.s[1] FMLA_asimdelem_R_SD - (b'\x84\x12\xA0\x0F', 'LLIL_INTRINSIC([v4],vfma_n_f32,[LLIL_REG.o(v4),LLIL_REG.o(v20),LLIL_CONST.b(0x1)])'), + (b'\x84\x12\xA0\x0F', 'LLIL_INTRINSIC([v4],vfma_laneq_f32,[LLIL_REG.o(v4),LLIL_REG.o(v20),LLIL_REG.o(v0),LLIL_CONST.b(0x1)])'), # fmla v13.4s, v26.4s, v21.4s FMLA_asimdsame_only (b'\x4D\xCF\x35\x4E', 'LLIL_INTRINSIC([v13],vfmaq_f32,[LLIL_REG.o(v13),LLIL_REG.o(v26),LLIL_REG.o(v21)])'), # fmla v3.4s, v18.4s, v14.4s FMLA_asimdsame_only @@ -4274,13 +4410,13 @@ # fmla v13.4s, v21.4s, v25.4s FMLA_asimdsame_only (b'\xAD\xCE\x39\x4E', 'LLIL_INTRINSIC([v13],vfmaq_f32,[LLIL_REG.o(v13),LLIL_REG.o(v21),LLIL_REG.o(v25)])'), # fmla v27.8h, v13.8h, v0.8h FMLA_asimdsamefp16_only - (b'\xBB\x0D\x40\x4E', 'LLIL_INTRINSIC([v27],vfmaq_f16,[LLIL_REG.o(v27),LLIL_REG.o(v13),LLIL_REG.o(v0),LLIL_CONST.b(0x0)])'), + (b'\xBB\x0D\x40\x4E', 'LLIL_INTRINSIC([v27],vfmaq_f16,[LLIL_REG.o(v27),LLIL_REG.o(v13),LLIL_REG.o(v0)])'), # fmla v5.8h, v22.8h, v22.8h FMLA_asimdsamefp16_only - (b'\xC5\x0E\x56\x4E', 'LLIL_INTRINSIC([v5],vfmaq_f16,[LLIL_REG.o(v5),LLIL_REG.o(v22),LLIL_REG.o(v22),LLIL_CONST.b(0x0)])'), + (b'\xC5\x0E\x56\x4E', 'LLIL_INTRINSIC([v5],vfmaq_f16,[LLIL_REG.o(v5),LLIL_REG.o(v22),LLIL_REG.o(v22)])'), # fmla v15.8h, v16.8h, v11.8h FMLA_asimdsamefp16_only - (b'\x0F\x0E\x4B\x4E', 'LLIL_INTRINSIC([v15],vfmaq_f16,[LLIL_REG.o(v15),LLIL_REG.o(v16),LLIL_REG.o(v11),LLIL_CONST.b(0x0)])'), + (b'\x0F\x0E\x4B\x4E', 'LLIL_INTRINSIC([v15],vfmaq_f16,[LLIL_REG.o(v15),LLIL_REG.o(v16),LLIL_REG.o(v11)])'), # fmla v13.8h, v7.8h, v8.8h FMLA_asimdsamefp16_only - (b'\xED\x0C\x48\x4E', 'LLIL_INTRINSIC([v13],vfmaq_f16,[LLIL_REG.o(v13),LLIL_REG.o(v7),LLIL_REG.o(v8),LLIL_CONST.b(0x0)])'), + (b'\xED\x0C\x48\x4E', 'LLIL_INTRINSIC([v13],vfmaq_f16,[LLIL_REG.o(v13),LLIL_REG.o(v7),LLIL_REG.o(v8)])'), # fmla h17, h23, v2.h[4] FMLA_asisdelem_RH_H (b'\xF1\x1A\x02\x5F', 'LLIL_INTRINSIC([h17],vfmah_laneq_f16,[LLIL_REG.w(h17),LLIL_REG.w(h23),LLIL_REG.o(v2),LLIL_CONST.b(0x4)])'), # fmla h22, h12, v13.h[1] FMLA_asisdelem_RH_H @@ -4298,13 +4434,13 @@ # fmla s16, s13, v14.s[0] FMLA_asisdelem_R_SD (b'\xB0\x11\x8E\x5F', 'LLIL_INTRINSIC([s16],vfmas_laneq_f32,[LLIL_REG.d(s16),LLIL_REG.d(s13),LLIL_REG.o(v14),LLIL_CONST.b(0x0)])'), # fmlsl2 v26.2s, v8.2h, v10.h[0] FMLSL2_asimdelem_LH - (b'\x1A\xC1\x8A\x2F', 'LLIL_INTRINSIC([v26],vfmlsl_lane_high_f16,[LLIL_REG.o(v26),LLIL_REG.o(v8),LLIL_REG.o(v10),LLIL_CONST.b(0x0)])'), + (b'\x1A\xC1\x8A\x2F', 'LLIL_INTRINSIC([v26],vfmlsl_laneq_high_f16,[LLIL_REG.o(v26),LLIL_REG.o(v8),LLIL_REG.o(v10),LLIL_CONST.b(0x0)])'), # fmlsl2 v18.2s, v25.2h, v8.h[0] FMLSL2_asimdelem_LH - (b'\x32\xC3\x88\x2F', 'LLIL_INTRINSIC([v18],vfmlsl_lane_high_f16,[LLIL_REG.o(v18),LLIL_REG.o(v25),LLIL_REG.o(v8),LLIL_CONST.b(0x0)])'), + (b'\x32\xC3\x88\x2F', 'LLIL_INTRINSIC([v18],vfmlsl_laneq_high_f16,[LLIL_REG.o(v18),LLIL_REG.o(v25),LLIL_REG.o(v8),LLIL_CONST.b(0x0)])'), # fmlsl2 v13.4s, v16.4h, v1.h[0] FMLSL2_asimdelem_LH - (b'\x0D\xC2\x81\x6F', 'LLIL_INTRINSIC([v13],vfmlslq_lane_high_f16,[LLIL_REG.o(v13),LLIL_REG.o(v16),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), + (b'\x0D\xC2\x81\x6F', 'LLIL_INTRINSIC([v13],vfmlslq_laneq_high_f16,[LLIL_REG.o(v13),LLIL_REG.o(v16),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), # fmlsl2 v9.4s, v28.4h, v2.h[3] FMLSL2_asimdelem_LH - (b'\x89\xC3\xB2\x6F', 'LLIL_INTRINSIC([v9],vfmlslq_lane_high_f16,[LLIL_REG.o(v9),LLIL_REG.o(v28),LLIL_REG.o(v2),LLIL_CONST.b(0x3)])'), + (b'\x89\xC3\xB2\x6F', 'LLIL_INTRINSIC([v9],vfmlslq_laneq_high_f16,[LLIL_REG.o(v9),LLIL_REG.o(v28),LLIL_REG.o(v2),LLIL_CONST.b(0x3)])'), # fmlsl2 v0.4s, v10.4h, v1.4h FMLSL2_asimdsame_F (b'\x40\xCD\xA1\x6E', 'LLIL_INTRINSIC([v0],vfmlslq_high_f16,[LLIL_REG.o(v0),LLIL_REG.o(v10),LLIL_REG.o(v1)])'), # fmlsl2 v18.4s, v4.4h, v16.4h FMLSL2_asimdsame_F @@ -4314,13 +4450,13 @@ # fmlsl2 v13.2s, v24.2h, v18.2h FMLSL2_asimdsame_F (b'\x0D\xCF\xB2\x2E', 'LLIL_INTRINSIC([v13],vfmlsl_high_f16,[LLIL_REG.o(v13),LLIL_REG.o(v24),LLIL_REG.o(v18)])'), # fmlsl v25.2s, v9.2h, v13.h[0] FMLSL_asimdelem_LH - (b'\x39\x41\x8D\x0F', 'LLIL_INTRINSIC([v25],vfmlsl_lane_low_f16,[LLIL_REG.o(v25),LLIL_REG.o(v9),LLIL_REG.o(v13),LLIL_CONST.b(0x0)])'), + (b'\x39\x41\x8D\x0F', 'LLIL_INTRINSIC([v25],vfmlsl_laneq_low_f16,[LLIL_REG.o(v25),LLIL_REG.o(v9),LLIL_REG.o(v13),LLIL_CONST.b(0x0)])'), # fmlsl v0.4s, v16.4h, v3.h[1] FMLSL_asimdelem_LH - (b'\x00\x42\x93\x4F', 'LLIL_INTRINSIC([v0],vfmlslq_lane_low_f16,[LLIL_REG.o(v0),LLIL_REG.o(v16),LLIL_REG.o(v3),LLIL_CONST.b(0x1)])'), + (b'\x00\x42\x93\x4F', 'LLIL_INTRINSIC([v0],vfmlslq_laneq_low_f16,[LLIL_REG.o(v0),LLIL_REG.o(v16),LLIL_REG.o(v3),LLIL_CONST.b(0x1)])'), # fmlsl v12.4s, v7.4h, v7.h[6] FMLSL_asimdelem_LH - (b'\xEC\x48\xA7\x4F', 'LLIL_INTRINSIC([v12],vfmlslq_lane_low_f16,[LLIL_REG.o(v12),LLIL_REG.o(v7),LLIL_REG.o(v7),LLIL_CONST.b(0x6)])'), + (b'\xEC\x48\xA7\x4F', 'LLIL_INTRINSIC([v12],vfmlslq_laneq_low_f16,[LLIL_REG.o(v12),LLIL_REG.o(v7),LLIL_REG.o(v7),LLIL_CONST.b(0x6)])'), # fmlsl v31.2s, v1.2h, v15.h[0] FMLSL_asimdelem_LH - (b'\x3F\x40\x8F\x0F', 'LLIL_INTRINSIC([v31],vfmlsl_lane_low_f16,[LLIL_REG.o(v31),LLIL_REG.o(v1),LLIL_REG.o(v15),LLIL_CONST.b(0x0)])'), + (b'\x3F\x40\x8F\x0F', 'LLIL_INTRINSIC([v31],vfmlsl_laneq_low_f16,[LLIL_REG.o(v31),LLIL_REG.o(v1),LLIL_REG.o(v15),LLIL_CONST.b(0x0)])'), # fmlsl v15.2s, v26.2h, v6.2h FMLSL_asimdsame_F (b'\x4F\xEF\xA6\x0E', 'LLIL_INTRINSIC([v15],vfmlsl_low_f16,[LLIL_REG.o(v15),LLIL_REG.o(v26),LLIL_REG.o(v6)])'), # fmlsl v16.2s, v10.2h, v8.2h FMLSL_asimdsame_F @@ -4346,21 +4482,21 @@ # fmls v8.4s, v22.4s, v0.s[0] FMLS_asimdelem_R_SD (b'\xC8\x52\x80\x4F', 'LLIL_INTRINSIC([v8],vfmsq_laneq_f32,[LLIL_REG.o(v8),LLIL_REG.o(v22),LLIL_REG.o(v0),LLIL_CONST.b(0x0)])'), # fmls v26.4s, v28.4s, v1.4s FMLS_asimdsame_only - (b'\x9A\xCF\xA1\x4E', 'LLIL_INTRINSIC([v26],vfmsq_f32,[LLIL_REG.o(v26),LLIL_REG.o(v28),LLIL_CONST.b(0x0)])'), + (b'\x9A\xCF\xA1\x4E', 'LLIL_INTRINSIC([v26],vfmsq_f32,[LLIL_REG.o(v26),LLIL_REG.o(v28),LLIL_REG.o(v1)])'), # fmls v0.2s, v8.2s, v1.2s FMLS_asimdsame_only - (b'\x00\xCD\xA1\x0E', 'LLIL_INTRINSIC([v0],vfms_f32,[LLIL_REG.o(v0),LLIL_REG.o(v8),LLIL_CONST.b(0x0)])'), + (b'\x00\xCD\xA1\x0E', 'LLIL_INTRINSIC([v0],vfms_f32,[LLIL_REG.o(v0),LLIL_REG.o(v8),LLIL_REG.o(v1)])'), # fmls v18.2d, v29.2d, v21.2d FMLS_asimdsame_only - (b'\xB2\xCF\xF5\x4E', 'LLIL_INTRINSIC([v18],vfmsq_f64,[LLIL_REG.o(v18),LLIL_REG.o(v29),LLIL_CONST.b(0x0)])'), + (b'\xB2\xCF\xF5\x4E', 'LLIL_INTRINSIC([v18],vfmsq_f64,[LLIL_REG.o(v18),LLIL_REG.o(v29),LLIL_REG.o(v21)])'), # fmls v23.2s, v7.2s, v3.2s FMLS_asimdsame_only - (b'\xF7\xCC\xA3\x0E', 'LLIL_INTRINSIC([v23],vfms_f32,[LLIL_REG.o(v23),LLIL_REG.o(v7),LLIL_CONST.b(0x0)])'), + (b'\xF7\xCC\xA3\x0E', 'LLIL_INTRINSIC([v23],vfms_f32,[LLIL_REG.o(v23),LLIL_REG.o(v7),LLIL_REG.o(v3)])'), # fmls v22.4h, v25.4h, v4.4h FMLS_asimdsamefp16_only - (b'\x36\x0F\xC4\x0E', 'LLIL_INTRINSIC([v22],vfms_f16,[LLIL_REG.o(v22),LLIL_REG.o(v25),LLIL_CONST.b(0x0)])'), + (b'\x36\x0F\xC4\x0E', 'LLIL_INTRINSIC([v22],vfms_f16,[LLIL_REG.o(v22),LLIL_REG.o(v25),LLIL_REG.o(v4)])'), # fmls v26.4h, v15.4h, v12.4h FMLS_asimdsamefp16_only - (b'\xFA\x0D\xCC\x0E', 'LLIL_INTRINSIC([v26],vfms_f16,[LLIL_REG.o(v26),LLIL_REG.o(v15),LLIL_CONST.b(0x0)])'), + (b'\xFA\x0D\xCC\x0E', 'LLIL_INTRINSIC([v26],vfms_f16,[LLIL_REG.o(v26),LLIL_REG.o(v15),LLIL_REG.o(v12)])'), # fmls v20.4h, v13.4h, v21.4h FMLS_asimdsamefp16_only - (b'\xB4\x0D\xD5\x0E', 'LLIL_INTRINSIC([v20],vfms_f16,[LLIL_REG.o(v20),LLIL_REG.o(v13),LLIL_CONST.b(0x0)])'), + (b'\xB4\x0D\xD5\x0E', 'LLIL_INTRINSIC([v20],vfms_f16,[LLIL_REG.o(v20),LLIL_REG.o(v13),LLIL_REG.o(v21)])'), # fmls v3.8h, v10.8h, v22.8h FMLS_asimdsamefp16_only - (b'\x43\x0D\xD6\x4E', 'LLIL_INTRINSIC([v3],vfmsq_f16,[LLIL_REG.o(v3),LLIL_REG.o(v10),LLIL_CONST.b(0x0)])'), + (b'\x43\x0D\xD6\x4E', 'LLIL_INTRINSIC([v3],vfmsq_f16,[LLIL_REG.o(v3),LLIL_REG.o(v10),LLIL_REG.o(v22)])'), # fmls h16, h6, v2.h[4] FMLS_asisdelem_RH_H (b'\xD0\x58\x02\x5F', 'LLIL_INTRINSIC([h16],vfmsh_laneq_f16,[LLIL_REG.w(h16),LLIL_REG.w(h6),LLIL_REG.o(v2),LLIL_CONST.b(0x4)])'), # fmls h21, h10, v3.h[7] FMLS_asisdelem_RH_H @@ -4370,7 +4506,7 @@ # fmls h18, h14, v3.h[6] FMLS_asisdelem_RH_H (b'\xD2\x59\x23\x5F', 'LLIL_INTRINSIC([h18],vfmsh_laneq_f16,[LLIL_REG.w(h18),LLIL_REG.w(h14),LLIL_REG.o(v3),LLIL_CONST.b(0x6)])'), # fmls d25, d21, v24.d[1] FMLS_asisdelem_R_SD - (b'\xB9\x5A\xD8\x5F', 'LLIL_INTRINSIC([d25],vfmsd_laneq_f64,[LLIL_REG.q(d25),LLIL_REG.q(d21),LLIL_REG.o(v24),LLIL_CONST.b(0x1)])'), + (b'\xB9\x5A\xD8\x5F', 'LLIL_INTRINSIC([d25],vfms_laneq_f64,[LLIL_REG.q(d25),LLIL_REG.q(d21),LLIL_REG.o(v24),LLIL_CONST.b(0x1)])'), # fmls s6, s31, v5.s[0] FMLS_asisdelem_R_SD (b'\xE6\x53\x85\x5F', 'LLIL_INTRINSIC([s6],vfmss_laneq_f32,[LLIL_REG.d(s6),LLIL_REG.d(s31),LLIL_REG.o(v5),LLIL_CONST.b(0x0)])'), # fmls s3, s4, v7.s[2] FMLS_asisdelem_R_SD @@ -4524,23 +4660,23 @@ # fmaxnmp v18.4h, v0.4h, v17.4h FMAXNMP_asimdsamefp16_only (b'\x12\x04\x51\x2E', 'LLIL_INTRINSIC([v18],vpmaxnm_f16,[LLIL_REG.o(v0),LLIL_REG.o(v17)])'), # fmaxnmp h12, v1.2h FMAXNMP_asisdpair_only_H - (b'\x2C\xC8\x30\x5E', 'LLIL_INTRINSIC([h12],vmaxnmv_f16,[LLIL_REG.o(v1)])'), + (b'\x2C\xC8\x30\x5E', 'LLIL_INTRINSIC([h12],vmaxnmh_f16,[LLIL_REG.w(v1.h[0]),LLIL_REG.w(v1.h[1])])'), # fmaxnmp h28, v1.2h FMAXNMP_asisdpair_only_H - (b'\x3C\xC8\x30\x5E', 'LLIL_INTRINSIC([h28],vmaxnmv_f16,[LLIL_REG.o(v1)])'), + (b'\x3C\xC8\x30\x5E', 'LLIL_INTRINSIC([h28],vmaxnmh_f16,[LLIL_REG.w(v1.h[0]),LLIL_REG.w(v1.h[1])])'), # fmaxnmp h7, v8.2h FMAXNMP_asisdpair_only_H - (b'\x07\xC9\x30\x5E', 'LLIL_INTRINSIC([h7],vmaxnmv_f16,[LLIL_REG.o(v8)])'), + (b'\x07\xC9\x30\x5E', 'LLIL_INTRINSIC([h7],vmaxnmh_f16,[LLIL_REG.w(v8.h[0]),LLIL_REG.w(v8.h[1])])'), # fmaxnmp h15, v25.2h FMAXNMP_asisdpair_only_H - (b'\x2F\xCB\x30\x5E', 'LLIL_INTRINSIC([h15],vmaxnmv_f16,[LLIL_REG.o(v25)])'), + (b'\x2F\xCB\x30\x5E', 'LLIL_INTRINSIC([h15],vmaxnmh_f16,[LLIL_REG.w(v25.h[0]),LLIL_REG.w(v25.h[1])])'), # fmaxnmp d21, v24.2d FMAXNMP_asisdpair_only_SD - (b'\x15\xCB\x70\x7E', 'LLIL_INTRINSIC([d21],vpmaxnmqd_f64,[LLIL_REG.o(v24)])'), + (b'\x15\xCB\x70\x7E', 'LLIL_INTRINSIC([d21],vmaxnmvq_f64,[LLIL_REG.o(v24)])'), # fmaxnmp s27, v11.2s FMAXNMP_asisdpair_only_SD - (b'\x7B\xC9\x30\x7E', 'LLIL_INTRINSIC([s27],vpmaxnms_f32,[LLIL_REG.o(v11)])'), + (b'\x7B\xC9\x30\x7E', 'LLIL_INTRINSIC([s27],vmaxnmv_f32,[LLIL_REG.o(v11)])'), # fmaxnmp s4, v30.2s FMAXNMP_asisdpair_only_SD - (b'\xC4\xCB\x30\x7E', 'LLIL_INTRINSIC([s4],vpmaxnms_f32,[LLIL_REG.o(v30)])'), + (b'\xC4\xCB\x30\x7E', 'LLIL_INTRINSIC([s4],vmaxnmv_f32,[LLIL_REG.o(v30)])'), # fmaxnmp d12, v27.2d FMAXNMP_asisdpair_only_SD - (b'\x6C\xCB\x70\x7E', 'LLIL_INTRINSIC([d12],vpmaxnmqd_f64,[LLIL_REG.o(v27)])'), + (b'\x6C\xCB\x70\x7E', 'LLIL_INTRINSIC([d12],vmaxnmvq_f64,[LLIL_REG.o(v27)])'), # fmaxnmv h31, v22.4h FMAXNMV_asimdall_only_H - (b'\xDF\xCA\x30\x0E', 'LLIL_INTRINSIC([h31],vmaxnmvq_f16,[LLIL_REG.o(v22)])'), + (b'\xDF\xCA\x30\x0E', 'LLIL_INTRINSIC([h31],vmaxnmv_f16,[LLIL_REG.o(v22)])'), # fmaxnmv h31, v6.8h FMAXNMV_asimdall_only_H (b'\xDF\xC8\x30\x4E', 'LLIL_INTRINSIC([h31],vmaxnmvq_f16,[LLIL_REG.o(v6)])'), # fmaxnmv h25, v22.8h FMAXNMV_asimdall_only_H @@ -4572,13 +4708,13 @@ # fmaxnm h4, h1, h16 FMAXNM_H_floatdp2 (b'\x24\x68\xF0\x1E', 'LLIL_INTRINSIC([h4],vmaxnmh_f16,[LLIL_REG.w(h1),LLIL_REG.w(h16)])'), # fmaxnm s31, s22, s6 FMAXNM_S_floatdp2 - (b'\xDF\x6A\x26\x1E', 'LLIL_INTRINSIC([s31],vmaxnm_f32,[LLIL_REG.d(s22),LLIL_REG.d(s6)])'), + (b'\xDF\x6A\x26\x1E', 'LLIL_INTRINSIC([s31],__fmaxnm,[LLIL_REG.d(s22),LLIL_REG.d(s6)])'), # fmaxnm s12, s25, s3 FMAXNM_S_floatdp2 - (b'\x2C\x6B\x23\x1E', 'LLIL_INTRINSIC([s12],vmaxnm_f32,[LLIL_REG.d(s25),LLIL_REG.d(s3)])'), + (b'\x2C\x6B\x23\x1E', 'LLIL_INTRINSIC([s12],__fmaxnm,[LLIL_REG.d(s25),LLIL_REG.d(s3)])'), # fmaxnm s12, s11, s6 FMAXNM_S_floatdp2 - (b'\x6C\x69\x26\x1E', 'LLIL_INTRINSIC([s12],vmaxnm_f32,[LLIL_REG.d(s11),LLIL_REG.d(s6)])'), + (b'\x6C\x69\x26\x1E', 'LLIL_INTRINSIC([s12],__fmaxnm,[LLIL_REG.d(s11),LLIL_REG.d(s6)])'), # fmaxnm s6, s12, s22 FMAXNM_S_floatdp2 - (b'\x86\x69\x36\x1E', 'LLIL_INTRINSIC([s6],vmaxnm_f32,[LLIL_REG.d(s12),LLIL_REG.d(s22)])'), + (b'\x86\x69\x36\x1E', 'LLIL_INTRINSIC([s6],__fmaxnm,[LLIL_REG.d(s12),LLIL_REG.d(s22)])'), # fmaxnm v21.2s, v5.2s, v8.2s FMAXNM_asimdsame_only (b'\xB5\xC4\x28\x0E', 'LLIL_INTRINSIC([v21],vmaxnm_f32,[LLIL_REG.o(v5),LLIL_REG.o(v8)])'), # fmaxnm v15.4s, v14.4s, v2.4s FMAXNM_asimdsame_only @@ -4612,27 +4748,27 @@ # fmaxp v10.8h, v15.8h, v4.8h FMAXP_asimdsamefp16_only (b'\xEA\x35\x44\x6E', 'LLIL_INTRINSIC([v10],vpmaxq_f16,[LLIL_REG.o(v15),LLIL_REG.o(v4)])'), # fmaxp h3, v10.2h FMAXP_asisdpair_only_H - (b'\x43\xF9\x30\x5E', 'LLIL_INTRINSIC([h3],vmaxv_f16,[LLIL_REG.o(v10)])'), + (b'\x43\xF9\x30\x5E', 'LLIL_INTRINSIC([h3],vmaxh_f16,[LLIL_REG.w(v10.h[0]),LLIL_REG.w(v10.h[1])])'), # fmaxp h23, v5.2h FMAXP_asisdpair_only_H - (b'\xB7\xF8\x30\x5E', 'LLIL_INTRINSIC([h23],vmaxv_f16,[LLIL_REG.o(v5)])'), + (b'\xB7\xF8\x30\x5E', 'LLIL_INTRINSIC([h23],vmaxh_f16,[LLIL_REG.w(v5.h[0]),LLIL_REG.w(v5.h[1])])'), # fmaxp h6, v31.2h FMAXP_asisdpair_only_H - (b'\xE6\xFB\x30\x5E', 'LLIL_INTRINSIC([h6],vmaxv_f16,[LLIL_REG.o(v31)])'), + (b'\xE6\xFB\x30\x5E', 'LLIL_INTRINSIC([h6],vmaxh_f16,[LLIL_REG.w(v31.h[0]),LLIL_REG.w(v31.h[1])])'), # fmaxp h24, v5.2h FMAXP_asisdpair_only_H - (b'\xB8\xF8\x30\x5E', 'LLIL_INTRINSIC([h24],vmaxv_f16,[LLIL_REG.o(v5)])'), + (b'\xB8\xF8\x30\x5E', 'LLIL_INTRINSIC([h24],vmaxh_f16,[LLIL_REG.w(v5.h[0]),LLIL_REG.w(v5.h[1])])'), # fmaxp d19, v15.2d FMAXP_asisdpair_only_SD - (b'\xF3\xF9\x70\x7E', 'LLIL_INTRINSIC([d19],vpmaxqd_f64,[LLIL_REG.o(v15)])'), + (b'\xF3\xF9\x70\x7E', 'LLIL_INTRINSIC([d19],vmaxvq_f64,[LLIL_REG.o(v15)])'), # fmaxp d14, v6.2d FMAXP_asisdpair_only_SD - (b'\xCE\xF8\x70\x7E', 'LLIL_INTRINSIC([d14],vpmaxqd_f64,[LLIL_REG.o(v6)])'), + (b'\xCE\xF8\x70\x7E', 'LLIL_INTRINSIC([d14],vmaxvq_f64,[LLIL_REG.o(v6)])'), # fmaxp d1, v4.2d FMAXP_asisdpair_only_SD - (b'\x81\xF8\x70\x7E', 'LLIL_INTRINSIC([d1],vpmaxqd_f64,[LLIL_REG.o(v4)])'), + (b'\x81\xF8\x70\x7E', 'LLIL_INTRINSIC([d1],vmaxvq_f64,[LLIL_REG.o(v4)])'), # fmaxp s29, v2.2s FMAXP_asisdpair_only_SD - (b'\x5D\xF8\x30\x7E', 'LLIL_INTRINSIC([s29],vpmaxs_f32,[LLIL_REG.o(v2)])'), + (b'\x5D\xF8\x30\x7E', 'LLIL_INTRINSIC([s29],vmaxv_f32,[LLIL_REG.o(v2)])'), # fmaxv h28, v6.4h FMAXV_asimdall_only_H - (b'\xDC\xF8\x30\x0E', 'LLIL_INTRINSIC([h28],vmaxvq_f16,[LLIL_REG.o(v6)])'), + (b'\xDC\xF8\x30\x0E', 'LLIL_INTRINSIC([h28],vmaxv_f16,[LLIL_REG.o(v6)])'), # fmaxv h6, v16.8h FMAXV_asimdall_only_H (b'\x06\xFA\x30\x4E', 'LLIL_INTRINSIC([h6],vmaxvq_f16,[LLIL_REG.o(v16)])'), # fmaxv h2, v24.4h FMAXV_asimdall_only_H - (b'\x02\xFB\x30\x0E', 'LLIL_INTRINSIC([h2],vmaxvq_f16,[LLIL_REG.o(v24)])'), + (b'\x02\xFB\x30\x0E', 'LLIL_INTRINSIC([h2],vmaxv_f16,[LLIL_REG.o(v24)])'), # fmaxv h20, v5.8h FMAXV_asimdall_only_H (b'\xB4\xF8\x30\x4E', 'LLIL_INTRINSIC([h20],vmaxvq_f16,[LLIL_REG.o(v5)])'), # fmaxv s24, v3.4s FMAXV_asimdall_only_SD @@ -4660,13 +4796,13 @@ # fmax h16, h13, h19 FMAX_H_floatdp2 (b'\xB0\x49\xF3\x1E', 'LLIL_INTRINSIC([h16],vmaxh_f16,[LLIL_REG.w(h13),LLIL_REG.w(h19)])'), # fmax s6, s15, s15 FMAX_S_floatdp2 - (b'\xE6\x49\x2F\x1E', 'LLIL_INTRINSIC([s6],vmax_f32,[LLIL_REG.d(s15),LLIL_REG.d(s15)])'), + (b'\xE6\x49\x2F\x1E', 'LLIL_INTRINSIC([s6],__fmax,[LLIL_REG.d(s15),LLIL_REG.d(s15)])'), # fmax s10, s15, s3 FMAX_S_floatdp2 - (b'\xEA\x49\x23\x1E', 'LLIL_INTRINSIC([s10],vmax_f32,[LLIL_REG.d(s15),LLIL_REG.d(s3)])'), + (b'\xEA\x49\x23\x1E', 'LLIL_INTRINSIC([s10],__fmax,[LLIL_REG.d(s15),LLIL_REG.d(s3)])'), # fmax s22, s13, s3 FMAX_S_floatdp2 - (b'\xB6\x49\x23\x1E', 'LLIL_INTRINSIC([s22],vmax_f32,[LLIL_REG.d(s13),LLIL_REG.d(s3)])'), + (b'\xB6\x49\x23\x1E', 'LLIL_INTRINSIC([s22],__fmax,[LLIL_REG.d(s13),LLIL_REG.d(s3)])'), # fmax s30, s20, s26 FMAX_S_floatdp2 - (b'\x9E\x4A\x3A\x1E', 'LLIL_INTRINSIC([s30],vmax_f32,[LLIL_REG.d(s20),LLIL_REG.d(s26)])'), + (b'\x9E\x4A\x3A\x1E', 'LLIL_INTRINSIC([s30],__fmax,[LLIL_REG.d(s20),LLIL_REG.d(s26)])'), # fmax v13.2s, v14.2s, v13.2s FMAX_asimdsame_only (b'\xCD\xF5\x2D\x0E', 'LLIL_INTRINSIC([v13],vmax_f32,[LLIL_REG.o(v14),LLIL_REG.o(v13)])'), # fmax v18.2s, v2.2s, v16.2s FMAX_asimdsame_only @@ -4700,21 +4836,21 @@ # fminnmp v14.4h, v7.4h, v4.4h FMINNMP_asimdsamefp16_only (b'\xEE\x04\xC4\x2E', 'LLIL_INTRINSIC([v14],vpminnm_f16,[LLIL_REG.o(v7),LLIL_REG.o(v4)])'), # fminnmp h30, v28.2h FMINNMP_asisdpair_only_H - (b'\x9E\xCB\xB0\x5E', 'LLIL_INTRINSIC([h30],vminnmv_f16,[LLIL_REG.o(v28)])'), + (b'\x9E\xCB\xB0\x5E', 'LLIL_INTRINSIC([h30],vminnmh_f16,[LLIL_REG.w(v28.h[0]),LLIL_REG.w(v28.h[1])])'), # fminnmp h31, v20.2h FMINNMP_asisdpair_only_H - (b'\x9F\xCA\xB0\x5E', 'LLIL_INTRINSIC([h31],vminnmv_f16,[LLIL_REG.o(v20)])'), + (b'\x9F\xCA\xB0\x5E', 'LLIL_INTRINSIC([h31],vminnmh_f16,[LLIL_REG.w(v20.h[0]),LLIL_REG.w(v20.h[1])])'), # fminnmp h28, v24.2h FMINNMP_asisdpair_only_H - (b'\x1C\xCB\xB0\x5E', 'LLIL_INTRINSIC([h28],vminnmv_f16,[LLIL_REG.o(v24)])'), + (b'\x1C\xCB\xB0\x5E', 'LLIL_INTRINSIC([h28],vminnmh_f16,[LLIL_REG.w(v24.h[0]),LLIL_REG.w(v24.h[1])])'), # fminnmp h10, v7.2h FMINNMP_asisdpair_only_H - (b'\xEA\xC8\xB0\x5E', 'LLIL_INTRINSIC([h10],vminnmv_f16,[LLIL_REG.o(v7)])'), + (b'\xEA\xC8\xB0\x5E', 'LLIL_INTRINSIC([h10],vminnmh_f16,[LLIL_REG.w(v7.h[0]),LLIL_REG.w(v7.h[1])])'), # fminnmp s21, v7.2s FMINNMP_asisdpair_only_SD - (b'\xF5\xC8\xB0\x7E', 'LLIL_INTRINSIC([s21],vpminnms_f32,[LLIL_REG.o(v7)])'), + (b'\xF5\xC8\xB0\x7E', 'LLIL_INTRINSIC([s21],vminnmv_f32,[LLIL_REG.o(v7)])'), # fminnmp d14, v3.2d FMINNMP_asisdpair_only_SD - (b'\x6E\xC8\xF0\x7E', 'LLIL_INTRINSIC([d14],vpminnmqd_f64,[LLIL_REG.o(v3)])'), + (b'\x6E\xC8\xF0\x7E', 'LLIL_INTRINSIC([d14],vminnmvq_f64,[LLIL_REG.o(v3)])'), # fminnmp s8, v3.2s FMINNMP_asisdpair_only_SD - (b'\x68\xC8\xB0\x7E', 'LLIL_INTRINSIC([s8],vpminnms_f32,[LLIL_REG.o(v3)])'), + (b'\x68\xC8\xB0\x7E', 'LLIL_INTRINSIC([s8],vminnmv_f32,[LLIL_REG.o(v3)])'), # fminnmp s8, v0.2s FMINNMP_asisdpair_only_SD - (b'\x08\xC8\xB0\x7E', 'LLIL_INTRINSIC([s8],vpminnms_f32,[LLIL_REG.o(v0)])'), + (b'\x08\xC8\xB0\x7E', 'LLIL_INTRINSIC([s8],vminnmv_f32,[LLIL_REG.o(v0)])'), # fminnmv h13, v26.8h FMINNMV_asimdall_only_H (b'\x4D\xCB\xB0\x4E', 'LLIL_INTRINSIC([h13],vminnmvq_f16,[LLIL_REG.o(v26)])'), # fminnmv h17, v24.4h FMINNMV_asimdall_only_H @@ -4748,13 +4884,13 @@ # fminnm h21, h8, h25 FMINNM_H_floatdp2 (b'\x15\x79\xF9\x1E', 'LLIL_INTRINSIC([h21],vminnmh_f16,[LLIL_REG.w(h8),LLIL_REG.w(h25)])'), # fminnm s14, s27, s8 FMINNM_S_floatdp2 - (b'\x6E\x7B\x28\x1E', 'LLIL_INTRINSIC([s14],vminnm_f32,[LLIL_REG.d(s27),LLIL_REG.d(s8)])'), + (b'\x6E\x7B\x28\x1E', 'LLIL_INTRINSIC([s14],__fminnm,[LLIL_REG.d(s27),LLIL_REG.d(s8)])'), # fminnm s25, s16, s23 FMINNM_S_floatdp2 - (b'\x19\x7A\x37\x1E', 'LLIL_INTRINSIC([s25],vminnm_f32,[LLIL_REG.d(s16),LLIL_REG.d(s23)])'), + (b'\x19\x7A\x37\x1E', 'LLIL_INTRINSIC([s25],__fminnm,[LLIL_REG.d(s16),LLIL_REG.d(s23)])'), # fminnm s31, s11, s18 FMINNM_S_floatdp2 - (b'\x7F\x79\x32\x1E', 'LLIL_INTRINSIC([s31],vminnm_f32,[LLIL_REG.d(s11),LLIL_REG.d(s18)])'), + (b'\x7F\x79\x32\x1E', 'LLIL_INTRINSIC([s31],__fminnm,[LLIL_REG.d(s11),LLIL_REG.d(s18)])'), # fminnm s22, s13, s28 FMINNM_S_floatdp2 - (b'\xB6\x79\x3C\x1E', 'LLIL_INTRINSIC([s22],vminnm_f32,[LLIL_REG.d(s13),LLIL_REG.d(s28)])'), + (b'\xB6\x79\x3C\x1E', 'LLIL_INTRINSIC([s22],__fminnm,[LLIL_REG.d(s13),LLIL_REG.d(s28)])'), # fminnm v22.2s, v11.2s, v21.2s FMINNM_asimdsame_only (b'\x76\xC5\xB5\x0E', 'LLIL_INTRINSIC([v22],vminnm_f32,[LLIL_REG.o(v11),LLIL_REG.o(v21)])'), # fminnm v3.2s, v13.2s, v3.2s FMINNM_asimdsame_only @@ -4788,21 +4924,21 @@ # fminp v12.4h, v20.4h, v3.4h FMINP_asimdsamefp16_only (b'\x8C\x36\xC3\x2E', 'LLIL_INTRINSIC([v12],vpmin_f16,[LLIL_REG.o(v20),LLIL_REG.o(v3)])'), # fminp h7, v13.2h FMINP_asisdpair_only_H - (b'\xA7\xF9\xB0\x5E', 'LLIL_INTRINSIC([h7],vminv_f16,[LLIL_REG.o(v13)])'), + (b'\xA7\xF9\xB0\x5E', 'LLIL_INTRINSIC([h7],vminh_f16,[LLIL_REG.w(v13.h[0]),LLIL_REG.w(v13.h[1])])'), # fminp h26, v19.2h FMINP_asisdpair_only_H - (b'\x7A\xFA\xB0\x5E', 'LLIL_INTRINSIC([h26],vminv_f16,[LLIL_REG.o(v19)])'), + (b'\x7A\xFA\xB0\x5E', 'LLIL_INTRINSIC([h26],vminh_f16,[LLIL_REG.w(v19.h[0]),LLIL_REG.w(v19.h[1])])'), # fminp h21, v3.2h FMINP_asisdpair_only_H - (b'\x75\xF8\xB0\x5E', 'LLIL_INTRINSIC([h21],vminv_f16,[LLIL_REG.o(v3)])'), + (b'\x75\xF8\xB0\x5E', 'LLIL_INTRINSIC([h21],vminh_f16,[LLIL_REG.w(v3.h[0]),LLIL_REG.w(v3.h[1])])'), # fminp h2, v30.2h FMINP_asisdpair_only_H - (b'\xC2\xFB\xB0\x5E', 'LLIL_INTRINSIC([h2],vminv_f16,[LLIL_REG.o(v30)])'), + (b'\xC2\xFB\xB0\x5E', 'LLIL_INTRINSIC([h2],vminh_f16,[LLIL_REG.w(v30.h[0]),LLIL_REG.w(v30.h[1])])'), # fminp s18, v30.2s FMINP_asisdpair_only_SD - (b'\xD2\xFB\xB0\x7E', 'LLIL_INTRINSIC([s18],vpmins_f32,[LLIL_REG.o(v30)])'), + (b'\xD2\xFB\xB0\x7E', 'LLIL_INTRINSIC([s18],vminv_f32,[LLIL_REG.o(v30)])'), # fminp s29, v11.2s FMINP_asisdpair_only_SD - (b'\x7D\xF9\xB0\x7E', 'LLIL_INTRINSIC([s29],vpmins_f32,[LLIL_REG.o(v11)])'), + (b'\x7D\xF9\xB0\x7E', 'LLIL_INTRINSIC([s29],vminv_f32,[LLIL_REG.o(v11)])'), # fminp d6, v9.2d FMINP_asisdpair_only_SD - (b'\x26\xF9\xF0\x7E', 'LLIL_INTRINSIC([d6],vpminqd_f64,[LLIL_REG.o(v9)])'), + (b'\x26\xF9\xF0\x7E', 'LLIL_INTRINSIC([d6],vminvq_f64,[LLIL_REG.o(v9)])'), # fminp d14, v29.2d FMINP_asisdpair_only_SD - (b'\xAE\xFB\xF0\x7E', 'LLIL_INTRINSIC([d14],vpminqd_f64,[LLIL_REG.o(v29)])'), + (b'\xAE\xFB\xF0\x7E', 'LLIL_INTRINSIC([d14],vminvq_f64,[LLIL_REG.o(v29)])'), # fminv h3, v24.8h FMINV_asimdall_only_H (b'\x03\xFB\xB0\x4E', 'LLIL_INTRINSIC([h3],vminvq_f16,[LLIL_REG.o(v24)])'), # fminv h1, v19.8h FMINV_asimdall_only_H @@ -4836,13 +4972,13 @@ # fmin h27, h4, h14 FMIN_H_floatdp2 (b'\x9B\x58\xEE\x1E', 'LLIL_INTRINSIC([h27],vminh_f16,[LLIL_REG.w(h4),LLIL_REG.w(h14)])'), # fmin s6, s7, s30 FMIN_S_floatdp2 - (b'\xE6\x58\x3E\x1E', 'LLIL_INTRINSIC([s6],vmin_f32,[LLIL_REG.d(s7),LLIL_REG.d(s30)])'), + (b'\xE6\x58\x3E\x1E', 'LLIL_INTRINSIC([s6],__fmin,[LLIL_REG.d(s7),LLIL_REG.d(s30)])'), # fmin s25, s27, s8 FMIN_S_floatdp2 - (b'\x79\x5B\x28\x1E', 'LLIL_INTRINSIC([s25],vmin_f32,[LLIL_REG.d(s27),LLIL_REG.d(s8)])'), + (b'\x79\x5B\x28\x1E', 'LLIL_INTRINSIC([s25],__fmin,[LLIL_REG.d(s27),LLIL_REG.d(s8)])'), # fmin s9, s25, s16 FMIN_S_floatdp2 - (b'\x29\x5B\x30\x1E', 'LLIL_INTRINSIC([s9],vmin_f32,[LLIL_REG.d(s25),LLIL_REG.d(s16)])'), + (b'\x29\x5B\x30\x1E', 'LLIL_INTRINSIC([s9],__fmin,[LLIL_REG.d(s25),LLIL_REG.d(s16)])'), # fmin s12, s23, s28 FMIN_S_floatdp2 - (b'\xEC\x5A\x3C\x1E', 'LLIL_INTRINSIC([s12],vmin_f32,[LLIL_REG.d(s23),LLIL_REG.d(s28)])'), + (b'\xEC\x5A\x3C\x1E', 'LLIL_INTRINSIC([s12],__fmin,[LLIL_REG.d(s23),LLIL_REG.d(s28)])'), # fmin v7.2s, v19.2s, v4.2s FMIN_asimdsame_only (b'\x67\xF6\xA4\x0E', 'LLIL_INTRINSIC([v7],vmin_f32,[LLIL_REG.o(v19),LLIL_REG.o(v4)])'), # fmin v9.2s, v17.2s, v0.2s FMIN_asimdsame_only @@ -4925,6 +5061,45 @@ (b'\xAA\x8B\x3A\x1E', 'LLIL_SET_REG.d(s10,LLIL_FNEG.d(LLIL_FMUL.d(LLIL_REG.d(s29),LLIL_REG.d(s26))))'), ] +tests_frint_fmadd = [ + # frinta s28, s0 FRINTA_S_floatdp1 + (b'\x1C\x40\x26\x1E', 'LLIL_INTRINSIC([s28],__frinta,[LLIL_REG.d(s0)])'), + # frinti s23, s24 FRINTI_S_floatdp1 + (b'\x17\xC3\x27\x1E', 'LLIL_INTRINSIC([s23],__frinti,[LLIL_REG.d(s24)])'), + # frintm s8, s21 FRINTM_S_floatdp1 + (b'\xA8\x42\x25\x1E', 'LLIL_SET_REG.d(s8,LLIL_FLOOR.d(LLIL_REG.d(s21)))'), + # frintn s0, s18 FRINTN_S_floatdp1 + (b'\x40\x42\x24\x1E', 'LLIL_INTRINSIC([s0],vrndns_f32,[LLIL_REG.d(s18)])'), + # frintp s24, s5 FRINTP_S_floatdp1 + (b'\xB8\xC0\x24\x1E', 'LLIL_SET_REG.d(s24,LLIL_CEIL.d(LLIL_REG.d(s5)))'), + # frintx s20, s17 FRINTX_S_floatdp1 + (b'\x34\x42\x27\x1E', 'LLIL_INTRINSIC([s20],__frintx,[LLIL_REG.d(s17)])'), + # frintz s6, s24 FRINTZ_S_floatdp1 + (b'\x06\xC3\x25\x1E', 'LLIL_SET_REG.d(s6,LLIL_FTRUNC.d(LLIL_REG.d(s24)))'), + # frintz d5, d19 FRINTZ_D_floatdp1 + (b'\x65\xC2\x65\x1E', 'LLIL_INTRINSIC([d5],vrnd_f64,[LLIL_REG.q(d19)])'), + # frintz h15, h17 FRINTZ_H_floatdp1 + (b'\x2F\xC2\xE5\x1E', 'LLIL_INTRINSIC([h15],vrndh_f16,[LLIL_REG.w(h17)])'), + # frint32x s13, s1 FRINT32X_S_floatdp1 + (b'\x2D\xC0\x28\x1E', 'LLIL_INTRINSIC([s13],__frint32x,[LLIL_REG.d(s1)])'), + # frint32z s8, s25 FRINT32Z_S_floatdp1 + (b'\x28\x43\x28\x1E', 'LLIL_INTRINSIC([s8],__frint32z,[LLIL_REG.d(s25)])'), + # frint64x s2, s22 FRINT64X_S_floatdp1 + (b'\xC2\xC2\x29\x1E', 'LLIL_INTRINSIC([s2],__frint64x,[LLIL_REG.d(s22)])'), + # frint64z s26, s30 FRINT64Z_S_floatdp1 + (b'\xDA\x43\x29\x1E', 'LLIL_INTRINSIC([s26],__frint64z,[LLIL_REG.d(s30)])'), + # fmadd s31, s15, s3, s16 FMADD_S_floatdp3 + (b'\xFF\x41\x03\x1F', 'LLIL_INTRINSIC([s31],__fmadd,[LLIL_REG.d(s16),LLIL_REG.d(s15),LLIL_REG.d(s3)])'), + # fmadd d9, d16, d14, d12 FMADD_D_floatdp3 + (b'\x09\x32\x4E\x1F', 'LLIL_INTRINSIC([d9],vfma_f64,[LLIL_REG.q(d12),LLIL_REG.q(d16),LLIL_REG.q(d14)])'), + # fmadd h29, h20, h31, h19 FMADD_H_floatdp3 + (b'\x9D\x4E\xDF\x1F', 'LLIL_INTRINSIC([h29],vfmah_f16,[LLIL_REG.w(h19),LLIL_REG.w(h20),LLIL_REG.w(h31)])'), + # fmsub s31, s9, s26, s0 FMSUB_S_floatdp3 + (b'\x3F\x81\x1A\x1F', 'LLIL_INTRINSIC([s31],__fmsub,[LLIL_REG.d(s0),LLIL_REG.d(s9),LLIL_REG.d(s26)])'), + # fmsub d5, d7, d25, d5 FMSUB_D_floatdp3 + (b'\xE5\x94\x59\x1F', 'LLIL_INTRINSIC([d5],vfms_f64,[LLIL_REG.q(d5),LLIL_REG.q(d7),LLIL_REG.q(d25)])'), +] + tests_fcvt = [ # fcvtas w14, d12 FCVTAS_32D_float2int (b'\x8E\x01\x64\x1E', 'LLIL_INTRINSIC([w14],vcvtad_s32_f64,[LLIL_REG.q(d12)])'), @@ -4938,16 +5113,16 @@ (b'\x3B\x01\x64\x9E', 'LLIL_INTRINSIC([x27],vcvtad_s64_f64,[LLIL_REG.q(d9)])'), # fcvtas x8, d15 FCVTAS_64D_float2int (b'\xE8\x01\x64\x9E', 'LLIL_INTRINSIC([x8],vcvtad_s64_f64,[LLIL_REG.q(d15)])'), - # fcvtas x30, s7 FCVTAS_64S_float2int - (b'\xFE\x00\x24\x9E', 'LLIL_INTRINSIC([lr],vcvtad_s64_f64,[LLIL_REG.d(s7)])'), + # fcvtas lr, s7 FCVTAS_64S_float2int + (b'\xFE\x00\x24\x9E', 'LLIL_INTRINSIC([lr],vcvtas_s64_f32,[LLIL_REG.d(s7)])'), # fcvtas x15, s25 FCVTAS_64S_float2int - (b'\x2F\x03\x24\x9E', 'LLIL_INTRINSIC([x15],vcvtad_s64_f64,[LLIL_REG.d(s25)])'), + (b'\x2F\x03\x24\x9E', 'LLIL_INTRINSIC([x15],vcvtas_s64_f32,[LLIL_REG.d(s25)])'), # fcvtas v11.2s, v9.2s FCVTAS_asimdmisc_R (b'\x2B\xC9\x21\x0E', 'LLIL_INTRINSIC([v11],vcvta_s32_f32,[LLIL_REG.o(v9)])'), # fcvtas v1.4s, v28.4s FCVTAS_asimdmisc_R (b'\x81\xCB\x21\x4E', 'LLIL_INTRINSIC([v1],vcvtaq_s32_f32,[LLIL_REG.o(v28)])'), # fcvtas d26, d14 FCVTAS_asisdmisc_R - (b'\xDA\xC9\x61\x5E', 'LLIL_INTRINSIC([d26],vcvtad_s64_f64,[LLIL_REG.q(d14)])'), + (b'\xDA\xC9\x61\x5E', 'LLIL_INTRINSIC([d26],vcvta_s64_f64,[LLIL_REG.q(d14)])'), # fcvtas s11, s2 FCVTAS_asisdmisc_R (b'\x4B\xC8\x21\x5E', 'LLIL_INTRINSIC([s11],vcvtas_s32_f32,[LLIL_REG.d(s2)])'), # fcvtau w14, d7 FCVTAU_32D_float2int @@ -4963,15 +5138,15 @@ # fcvtau x8, d0 FCVTAU_64D_float2int (b'\x08\x00\x65\x9E', 'LLIL_INTRINSIC([x8],vcvtad_u64_f64,[LLIL_REG.q(d0)])'), # fcvtau x23, s20 FCVTAU_64S_float2int - (b'\x97\x02\x25\x9E', 'LLIL_INTRINSIC([x23],vcvtad_u64_f64,[LLIL_REG.d(s20)])'), + (b'\x97\x02\x25\x9E', 'LLIL_INTRINSIC([x23],vcvtas_u64_f32,[LLIL_REG.d(s20)])'), # fcvtau x24, s4 FCVTAU_64S_float2int - (b'\x98\x00\x25\x9E', 'LLIL_INTRINSIC([x24],vcvtad_u64_f64,[LLIL_REG.d(s4)])'), + (b'\x98\x00\x25\x9E', 'LLIL_INTRINSIC([x24],vcvtas_u64_f32,[LLIL_REG.d(s4)])'), # fcvtau v26.2s, v16.2s FCVTAU_asimdmisc_R (b'\x1A\xCA\x21\x2E', 'LLIL_INTRINSIC([v26],vcvta_u32_f32,[LLIL_REG.o(v16)])'), # fcvtau v8.4s, v31.4s FCVTAU_asimdmisc_R (b'\xE8\xCB\x21\x6E', 'LLIL_INTRINSIC([v8],vcvtaq_u32_f32,[LLIL_REG.o(v31)])'), # fcvtau d29, d30 FCVTAU_asisdmisc_R - (b'\xDD\xCB\x61\x7E', 'LLIL_INTRINSIC([d29],vcvtad_u64_f64,[LLIL_REG.q(d30)])'), + (b'\xDD\xCB\x61\x7E', 'LLIL_INTRINSIC([d29],vcvta_u64_f64,[LLIL_REG.q(d30)])'), # fcvtau s0, s4 FCVTAU_asisdmisc_R (b'\x80\xC8\x21\x7E', 'LLIL_INTRINSIC([s0],vcvtas_u32_f32,[LLIL_REG.d(s4)])'), # fcvtl v30.4s, v0.4h FCVTL_asimdmisc_L @@ -4979,69 +5154,69 @@ # fcvtl2 v25.4s, v24.8h FCVTL_asimdmisc_L (b'\x19\x7B\x21\x4E', 'LLIL_INTRINSIC([v25],vcvt_high_f32_f16,[LLIL_REG.o(v24)])'), # fcvtms w1, d17 FCVTMS_32D_float2int - (b'\x21\x02\x70\x1E', 'LLIL_INTRINSIC([w1],vcvtmd_s32_f64,[LLIL_REG.q(d17)])'), + (b'\x21\x02\x70\x1E', 'LLIL_SET_REG.d(w1,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.q(LLIL_REG.q(d17))))'), # fcvtms w7, d7 FCVTMS_32D_float2int - (b'\xE7\x00\x70\x1E', 'LLIL_INTRINSIC([w7],vcvtmd_s32_f64,[LLIL_REG.q(d7)])'), + (b'\xE7\x00\x70\x1E', 'LLIL_SET_REG.d(w7,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.q(LLIL_REG.q(d7))))'), # fcvtms w19, s28 FCVTMS_32S_float2int - (b'\x93\x03\x30\x1E', 'LLIL_INTRINSIC([w19],vcvtms_s32_f32,[LLIL_REG.d(s28)])'), + (b'\x93\x03\x30\x1E', 'LLIL_SET_REG.d(w19,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.d(LLIL_REG.d(s28))))'), # fcvtms w16, s26 FCVTMS_32S_float2int - (b'\x50\x03\x30\x1E', 'LLIL_INTRINSIC([w16],vcvtms_s32_f32,[LLIL_REG.d(s26)])'), + (b'\x50\x03\x30\x1E', 'LLIL_SET_REG.d(w16,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.d(LLIL_REG.d(s26))))'), # fcvtms x22, d30 FCVTMS_64D_float2int - (b'\xD6\x03\x70\x9E', 'LLIL_INTRINSIC([x22],vcvtmd_s64_f64,[LLIL_REG.q(d30)])'), + (b'\xD6\x03\x70\x9E', 'LLIL_SET_REG.q(x22,LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.q(LLIL_REG.q(d30))))'), # fcvtms x22, d22 FCVTMS_64D_float2int - (b'\xD6\x02\x70\x9E', 'LLIL_INTRINSIC([x22],vcvtmd_s64_f64,[LLIL_REG.q(d22)])'), + (b'\xD6\x02\x70\x9E', 'LLIL_SET_REG.q(x22,LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.q(LLIL_REG.q(d22))))'), # fcvtms x13, s3 FCVTMS_64S_float2int - (b'\x6D\x00\x30\x9E', 'LLIL_INTRINSIC([x13],vcvtmd_s64_f64,[LLIL_REG.d(s3)])'), - # fcvtms x30, s13 FCVTMS_64S_float2int - (b'\xBE\x01\x30\x9E', 'LLIL_INTRINSIC([lr],vcvtmd_s64_f64,[LLIL_REG.d(s13)])'), + (b'\x6D\x00\x30\x9E', 'LLIL_SET_REG.q(x13,LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.d(LLIL_REG.d(s3))))'), + # fcvtms lr, s13 FCVTMS_64S_float2int + (b'\xBE\x01\x30\x9E', 'LLIL_SET_REG.q(lr,LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.d(LLIL_REG.d(s13))))'), # fcvtms v31.4s, v28.4s FCVTMS_asimdmisc_R (b'\x9F\xBB\x21\x4E', 'LLIL_INTRINSIC([v31],vcvtmq_s32_f32,[LLIL_REG.o(v28)])'), # fcvtms v31.2s, v12.2s FCVTMS_asimdmisc_R (b'\x9F\xB9\x21\x0E', 'LLIL_INTRINSIC([v31],vcvtm_s32_f32,[LLIL_REG.o(v12)])'), # fcvtms d1, d28 FCVTMS_asisdmisc_R - (b'\x81\xBB\x61\x5E', 'LLIL_INTRINSIC([d1],vcvtmd_s64_f64,[LLIL_REG.q(d28)])'), + (b'\x81\xBB\x61\x5E', 'LLIL_INTRINSIC([d1],vcvtm_s64_f64,[LLIL_REG.q(d28)])'), # fcvtms s27, s15 FCVTMS_asisdmisc_R (b'\xFB\xB9\x21\x5E', 'LLIL_INTRINSIC([s27],vcvtms_s32_f32,[LLIL_REG.d(s15)])'), # fcvtmu w1, d3 FCVTMU_32D_float2int - (b'\x61\x00\x71\x1E', 'LLIL_INTRINSIC([w1],vcvtmd_u32_f64,[LLIL_REG.q(d3)])'), + (b'\x61\x00\x71\x1E', 'LLIL_SET_REG.d(w1,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.q(LLIL_REG.q(d3))))'), # fcvtmu w5, d13 FCVTMU_32D_float2int - (b'\xA5\x01\x71\x1E', 'LLIL_INTRINSIC([w5],vcvtmd_u32_f64,[LLIL_REG.q(d13)])'), + (b'\xA5\x01\x71\x1E', 'LLIL_SET_REG.d(w5,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.q(LLIL_REG.q(d13))))'), # fcvtmu w5, s23 FCVTMU_32S_float2int - (b'\xE5\x02\x31\x1E', 'LLIL_INTRINSIC([w5],vcvtms_u32_f32,[LLIL_REG.d(s23)])'), + (b'\xE5\x02\x31\x1E', 'LLIL_SET_REG.d(w5,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.d(LLIL_REG.d(s23))))'), # fcvtmu w28, s31 FCVTMU_32S_float2int - (b'\xFC\x03\x31\x1E', 'LLIL_INTRINSIC([w28],vcvtms_u32_f32,[LLIL_REG.d(s31)])'), + (b'\xFC\x03\x31\x1E', 'LLIL_SET_REG.d(w28,LLIL_FLOAT_TO_INT.d(LLIL_FLOOR.d(LLIL_REG.d(s31))))'), # fcvtmu x26, d24 FCVTMU_64D_float2int - (b'\x1A\x03\x71\x9E', 'LLIL_INTRINSIC([x26],vcvtmd_u64_f64,[LLIL_REG.q(d24)])'), + (b'\x1A\x03\x71\x9E', 'LLIL_SET_REG.q(x26,LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.q(LLIL_REG.q(d24))))'), # fcvtmu x5, d20 FCVTMU_64D_float2int - (b'\x85\x02\x71\x9E', 'LLIL_INTRINSIC([x5],vcvtmd_u64_f64,[LLIL_REG.q(d20)])'), + (b'\x85\x02\x71\x9E', 'LLIL_SET_REG.q(x5,LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.q(LLIL_REG.q(d20))))'), # fcvtmu xzr, s3 FCVTMU_64S_float2int - (b'\x7F\x00\x31\x9E', 'LLIL_INTRINSIC([xzr],vcvtmd_u64_f64,[LLIL_REG.d(s3)])'), + (b'\x7F\x00\x31\x9E', 'LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.d(LLIL_REG.d(s3)))'), # fcvtmu x23, s24 FCVTMU_64S_float2int - (b'\x17\x03\x31\x9E', 'LLIL_INTRINSIC([x23],vcvtmd_u64_f64,[LLIL_REG.d(s24)])'), + (b'\x17\x03\x31\x9E', 'LLIL_SET_REG.q(x23,LLIL_FLOAT_TO_INT.q(LLIL_FLOOR.d(LLIL_REG.d(s24))))'), # fcvtmu v20.4s, v1.4s FCVTMU_asimdmisc_R (b'\x34\xB8\x21\x6E', 'LLIL_INTRINSIC([v20],vcvtmq_u32_f32,[LLIL_REG.o(v1)])'), # fcvtmu v29.2d, v19.2d FCVTMU_asimdmisc_R (b'\x7D\xBA\x61\x6E', 'LLIL_INTRINSIC([v29],vcvtmq_u64_f64,[LLIL_REG.o(v19)])'), # fcvtmu d13, d31 FCVTMU_asisdmisc_R - (b'\xED\xBB\x61\x7E', 'LLIL_INTRINSIC([d13],vcvtmd_u64_f64,[LLIL_REG.q(d31)])'), + (b'\xED\xBB\x61\x7E', 'LLIL_INTRINSIC([d13],vcvtm_u64_f64,[LLIL_REG.q(d31)])'), # fcvtmu s10, s27 FCVTMU_asisdmisc_R (b'\x6A\xBB\x21\x7E', 'LLIL_INTRINSIC([s10],vcvtms_u32_f32,[LLIL_REG.d(s27)])'), # fcvtns w6, d2 FCVTNS_32D_float2int - (b'\x46\x00\x60\x1E', 'LLIL_INTRINSIC([w6],vcvtnd_s32_f64,[LLIL_REG.q(d2)])'), + (b'\x46\x00\x60\x1E', 'LLIL_SET_REG.d(w6,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d2))))'), # fcvtns w6, d14 FCVTNS_32D_float2int - (b'\xC6\x01\x60\x1E', 'LLIL_INTRINSIC([w6],vcvtnd_s32_f64,[LLIL_REG.q(d14)])'), + (b'\xC6\x01\x60\x1E', 'LLIL_SET_REG.d(w6,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d14))))'), # fcvtns w28, s5 FCVTNS_32S_float2int - (b'\xBC\x00\x20\x1E', 'LLIL_INTRINSIC([w28],vcvtns_s32_f32,[LLIL_REG.d(s5)])'), + (b'\xBC\x00\x20\x1E', 'LLIL_SET_REG.d(w28,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s5))))'), # fcvtns w29, s4 FCVTNS_32S_float2int - (b'\x9D\x00\x20\x1E', 'LLIL_INTRINSIC([w29],vcvtns_s32_f32,[LLIL_REG.d(s4)])'), + (b'\x9D\x00\x20\x1E', 'LLIL_SET_REG.d(w29,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s4))))'), # fcvtns xzr, d7 FCVTNS_64D_float2int - (b'\xFF\x00\x60\x9E', 'LLIL_INTRINSIC([xzr],vcvtnd_s64_f64,[LLIL_REG.q(d7)])'), + (b'\xFF\x00\x60\x9E', 'LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d7)))'), # fcvtns x3, d25 FCVTNS_64D_float2int - (b'\x23\x03\x60\x9E', 'LLIL_INTRINSIC([x3],vcvtnd_s64_f64,[LLIL_REG.q(d25)])'), + (b'\x23\x03\x60\x9E', 'LLIL_SET_REG.q(x3,LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d25))))'), # fcvtns x20, s28 FCVTNS_64S_float2int - (b'\x94\x03\x20\x9E', 'LLIL_INTRINSIC([x20],vcvtns_s64_f32,[LLIL_REG.d(s28)])'), + (b'\x94\x03\x20\x9E', 'LLIL_SET_REG.q(x20,LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s28))))'), # fcvtns x0, s4 FCVTNS_64S_float2int - (b'\x80\x00\x20\x9E', 'LLIL_INTRINSIC([x0],vcvtns_s64_f32,[LLIL_REG.d(s4)])'), + (b'\x80\x00\x20\x9E', 'LLIL_SET_REG.q(x0,LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s4))))'), # fcvtns v3.4s, v21.4s FCVTNS_asimdmisc_R (b'\xA3\xAA\x21\x4E', 'LLIL_INTRINSIC([v3],vcvtnq_s32_f32,[LLIL_REG.o(v21)])'), # fcvtns v10.2s, v9.2s FCVTNS_asimdmisc_R @@ -5049,23 +5224,23 @@ # fcvtns s18, s0 FCVTNS_asisdmisc_R (b'\x12\xA8\x21\x5E', 'LLIL_INTRINSIC([s18],vcvtns_s32_f32,[LLIL_REG.d(s0)])'), # fcvtns d7, d16 FCVTNS_asisdmisc_R - (b'\x07\xAA\x61\x5E', 'LLIL_INTRINSIC([d7],vcvtnd_s64_f64,[LLIL_REG.q(d16)])'), + (b'\x07\xAA\x61\x5E', 'LLIL_INTRINSIC([d7],vcvtn_s64_f64,[LLIL_REG.q(d16)])'), # fcvtnu w17, d18 FCVTNU_32D_float2int - (b'\x51\x02\x61\x1E', 'LLIL_INTRINSIC([w17],vcvtnd_s32_f64,[LLIL_REG.q(d18)])'), + (b'\x51\x02\x61\x1E', 'LLIL_SET_REG.d(w17,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d18))))'), # fcvtnu w30, d16 FCVTNU_32D_float2int - (b'\x1E\x02\x61\x1E', 'LLIL_INTRINSIC([w30],vcvtnd_s32_f64,[LLIL_REG.q(d16)])'), + (b'\x1E\x02\x61\x1E', 'LLIL_SET_REG.d(w30,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d16))))'), # fcvtnu w27, s6 FCVTNU_32S_float2int - (b'\xDB\x00\x21\x1E', 'LLIL_INTRINSIC([w27],vcvtns_u32_f32,[LLIL_REG.d(s6)])'), + (b'\xDB\x00\x21\x1E', 'LLIL_SET_REG.d(w27,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s6))))'), # fcvtnu w4, s14 FCVTNU_32S_float2int - (b'\xC4\x01\x21\x1E', 'LLIL_INTRINSIC([w4],vcvtns_u32_f32,[LLIL_REG.d(s14)])'), + (b'\xC4\x01\x21\x1E', 'LLIL_SET_REG.d(w4,LLIL_FLOAT_TO_INT.d(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s14))))'), # fcvtnu x10, d11 FCVTNU_64D_float2int - (b'\x6A\x01\x61\x9E', 'LLIL_INTRINSIC([x10],vcvtnd_s64_f64,[LLIL_REG.q(d11)])'), + (b'\x6A\x01\x61\x9E', 'LLIL_SET_REG.q(x10,LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d11))))'), # fcvtnu x2, d27 FCVTNU_64D_float2int - (b'\x62\x03\x61\x9E', 'LLIL_INTRINSIC([x2],vcvtnd_s64_f64,[LLIL_REG.q(d27)])'), + (b'\x62\x03\x61\x9E', 'LLIL_SET_REG.q(x2,LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.q(LLIL_REG.q(d27))))'), # fcvtnu x17, s3 FCVTNU_64S_float2int - (b'\x71\x00\x21\x9E', 'LLIL_INTRINSIC([x17],vcvtns_u64_f32,[LLIL_REG.d(s3)])'), - # fcvtnu x30, s18 FCVTNU_64S_float2int - (b'\x5E\x02\x21\x9E', 'LLIL_INTRINSIC([lr],vcvtns_u64_f32,[LLIL_REG.d(s18)])'), + (b'\x71\x00\x21\x9E', 'LLIL_SET_REG.q(x17,LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s3))))'), + # fcvtnu lr, s18 FCVTNU_64S_float2int + (b'\x5E\x02\x21\x9E', 'LLIL_SET_REG.q(lr,LLIL_FLOAT_TO_INT.q(LLIL_ROUND_TO_INT.d(LLIL_REG.d(s18))))'), # fcvtnu v29.4s, v22.4s FCVTNU_asimdmisc_R (b'\xDD\xAA\x21\x6E', 'LLIL_INTRINSIC([v29],vcvtnq_u32_f32,[LLIL_REG.o(v22)])'), # fcvtnu v24.2s, v15.2s FCVTNU_asimdmisc_R @@ -5075,89 +5250,89 @@ # fcvtnu s13, s14 FCVTNU_asisdmisc_R (b'\xCD\xA9\x21\x7E', 'LLIL_INTRINSIC([s13],vcvtns_u32_f32,[LLIL_REG.d(s14)])'), # fcvtn v2.2s, v13.2d FCVTN_asimdmisc_N - (b'\xA2\x69\x61\x0E', 'LLIL_INTRINSIC([v2],vcvt_f32_f64,[LLIL_REG.o(v2),LLIL_REG.o(v13)])'), + (b'\xA2\x69\x61\x0E', 'LLIL_INTRINSIC([v2],vcvt_f32_f64,[LLIL_REG.o(v13)])'), # fcvtn v15.2s, v14.2d FCVTN_asimdmisc_N - (b'\xCF\x69\x61\x0E', 'LLIL_INTRINSIC([v15],vcvt_f32_f64,[LLIL_REG.o(v15),LLIL_REG.o(v14)])'), + (b'\xCF\x69\x61\x0E', 'LLIL_INTRINSIC([v15],vcvt_f32_f64,[LLIL_REG.o(v14)])'), # fcvtps w22, d11 FCVTPS_32D_float2int - (b'\x76\x01\x68\x1E', 'LLIL_INTRINSIC([w22],vcvtpd_s32_f64,[LLIL_REG.q(d11)])'), + (b'\x76\x01\x68\x1E', 'LLIL_SET_REG.d(w22,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.q(LLIL_REG.q(d11))))'), # fcvtps w17, d29 FCVTPS_32D_float2int - (b'\xB1\x03\x68\x1E', 'LLIL_INTRINSIC([w17],vcvtpd_s32_f64,[LLIL_REG.q(d29)])'), + (b'\xB1\x03\x68\x1E', 'LLIL_SET_REG.d(w17,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.q(LLIL_REG.q(d29))))'), # fcvtps w23, s11 FCVTPS_32S_float2int - (b'\x77\x01\x28\x1E', 'LLIL_INTRINSIC([w23],vcvtps_s32_f32,[LLIL_REG.d(s11)])'), + (b'\x77\x01\x28\x1E', 'LLIL_SET_REG.d(w23,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.d(LLIL_REG.d(s11))))'), # fcvtps w3, s14 FCVTPS_32S_float2int - (b'\xC3\x01\x28\x1E', 'LLIL_INTRINSIC([w3],vcvtps_s32_f32,[LLIL_REG.d(s14)])'), + (b'\xC3\x01\x28\x1E', 'LLIL_SET_REG.d(w3,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.d(LLIL_REG.d(s14))))'), # fcvtps x28, d21 FCVTPS_64D_float2int - (b'\xBC\x02\x68\x9E', 'LLIL_INTRINSIC([x28],vcvtpd_s64_f64,[LLIL_REG.q(d21)])'), + (b'\xBC\x02\x68\x9E', 'LLIL_SET_REG.q(x28,LLIL_FLOAT_TO_INT.q(LLIL_CEIL.q(LLIL_REG.q(d21))))'), # fcvtps xzr, d26 FCVTPS_64D_float2int - (b'\x5F\x03\x68\x9E', 'LLIL_INTRINSIC([xzr],vcvtpd_s64_f64,[LLIL_REG.q(d26)])'), + (b'\x5F\x03\x68\x9E', 'LLIL_FLOAT_TO_INT.q(LLIL_CEIL.q(LLIL_REG.q(d26)))'), # fcvtps x3, s30 FCVTPS_64S_float2int - (b'\xC3\x03\x28\x9E', 'LLIL_INTRINSIC([x3],vcvtpd_s64_f64,[LLIL_REG.d(s30)])'), + (b'\xC3\x03\x28\x9E', 'LLIL_SET_REG.q(x3,LLIL_FLOAT_TO_INT.q(LLIL_CEIL.d(LLIL_REG.d(s30))))'), # fcvtps x12, s25 FCVTPS_64S_float2int - (b'\x2C\x03\x28\x9E', 'LLIL_INTRINSIC([x12],vcvtpd_s64_f64,[LLIL_REG.d(s25)])'), + (b'\x2C\x03\x28\x9E', 'LLIL_SET_REG.q(x12,LLIL_FLOAT_TO_INT.q(LLIL_CEIL.d(LLIL_REG.d(s25))))'), # fcvtps v4.2d, v7.2d FCVTPS_asimdmisc_R (b'\xE4\xA8\xE1\x4E', 'LLIL_INTRINSIC([v4],vcvtpq_s64_f64,[LLIL_REG.o(v7)])'), # fcvtps v1.4s, v3.4s FCVTPS_asimdmisc_R (b'\x61\xA8\xA1\x4E', 'LLIL_INTRINSIC([v1],vcvtpq_s32_f32,[LLIL_REG.o(v3)])'), # fcvtps d11, d17 FCVTPS_asisdmisc_R - (b'\x2B\xAA\xE1\x5E', 'LLIL_INTRINSIC([d11],vcvtpd_s64_f64,[LLIL_REG.q(d17)])'), + (b'\x2B\xAA\xE1\x5E', 'LLIL_INTRINSIC([d11],vcvtp_s64_f64,[LLIL_REG.q(d17)])'), # fcvtps s23, s17 FCVTPS_asisdmisc_R (b'\x37\xAA\xA1\x5E', 'LLIL_INTRINSIC([s23],vcvtps_s32_f32,[LLIL_REG.d(s17)])'), # fcvtpu w1, d13 FCVTPU_32D_float2int - (b'\xA1\x01\x69\x1E', 'LLIL_INTRINSIC([w1],vcvtpd_u32_f64,[LLIL_REG.q(d13)])'), + (b'\xA1\x01\x69\x1E', 'LLIL_SET_REG.d(w1,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.q(LLIL_REG.q(d13))))'), # fcvtpu w17, d3 FCVTPU_32D_float2int - (b'\x71\x00\x69\x1E', 'LLIL_INTRINSIC([w17],vcvtpd_u32_f64,[LLIL_REG.q(d3)])'), + (b'\x71\x00\x69\x1E', 'LLIL_SET_REG.d(w17,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.q(LLIL_REG.q(d3))))'), # fcvtpu w17, s3 FCVTPU_32S_float2int - (b'\x71\x00\x29\x1E', 'LLIL_INTRINSIC([w17],vcvtps_u32_f32,[LLIL_REG.d(s3)])'), + (b'\x71\x00\x29\x1E', 'LLIL_SET_REG.d(w17,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.d(LLIL_REG.d(s3))))'), # fcvtpu w14, s26 FCVTPU_32S_float2int - (b'\x4E\x03\x29\x1E', 'LLIL_INTRINSIC([w14],vcvtps_u32_f32,[LLIL_REG.d(s26)])'), + (b'\x4E\x03\x29\x1E', 'LLIL_SET_REG.d(w14,LLIL_FLOAT_TO_INT.d(LLIL_CEIL.d(LLIL_REG.d(s26))))'), # fcvtpu x5, d18 FCVTPU_64D_float2int - (b'\x45\x02\x69\x9E', 'LLIL_INTRINSIC([x5],vcvtpd_u64_f64,[LLIL_REG.q(d18)])'), + (b'\x45\x02\x69\x9E', 'LLIL_SET_REG.q(x5,LLIL_FLOAT_TO_INT.q(LLIL_CEIL.q(LLIL_REG.q(d18))))'), # fcvtpu x24, d30 FCVTPU_64D_float2int - (b'\xD8\x03\x69\x9E', 'LLIL_INTRINSIC([x24],vcvtpd_u64_f64,[LLIL_REG.q(d30)])'), + (b'\xD8\x03\x69\x9E', 'LLIL_SET_REG.q(x24,LLIL_FLOAT_TO_INT.q(LLIL_CEIL.q(LLIL_REG.q(d30))))'), # fcvtpu x21, s18 FCVTPU_64S_float2int - (b'\x55\x02\x29\x9E', 'LLIL_INTRINSIC([x21],vcvtpd_u64_f64,[LLIL_REG.d(s18)])'), + (b'\x55\x02\x29\x9E', 'LLIL_SET_REG.q(x21,LLIL_FLOAT_TO_INT.q(LLIL_CEIL.d(LLIL_REG.d(s18))))'), # fcvtpu x3, s8 FCVTPU_64S_float2int - (b'\x03\x01\x29\x9E', 'LLIL_INTRINSIC([x3],vcvtpd_u64_f64,[LLIL_REG.d(s8)])'), + (b'\x03\x01\x29\x9E', 'LLIL_SET_REG.q(x3,LLIL_FLOAT_TO_INT.q(LLIL_CEIL.d(LLIL_REG.d(s8))))'), # fcvtpu v12.2s, v20.2s FCVTPU_asimdmisc_R (b'\x8C\xAA\xA1\x2E', 'LLIL_INTRINSIC([v12],vcvtp_u32_f32,[LLIL_REG.o(v20)])'), # fcvtpu v21.2s, v15.2s FCVTPU_asimdmisc_R (b'\xF5\xA9\xA1\x2E', 'LLIL_INTRINSIC([v21],vcvtp_u32_f32,[LLIL_REG.o(v15)])'), # fcvtpu d0, d11 FCVTPU_asisdmisc_R - (b'\x60\xA9\xE1\x7E', 'LLIL_INTRINSIC([d0],vcvtpd_u64_f64,[LLIL_REG.q(d11)])'), + (b'\x60\xA9\xE1\x7E', 'LLIL_INTRINSIC([d0],vcvtp_u64_f64,[LLIL_REG.q(d11)])'), # fcvtpu d21, d23 FCVTPU_asisdmisc_R - (b'\xF5\xAA\xE1\x7E', 'LLIL_INTRINSIC([d21],vcvtpd_u64_f64,[LLIL_REG.q(d23)])'), + (b'\xF5\xAA\xE1\x7E', 'LLIL_INTRINSIC([d21],vcvtp_u64_f64,[LLIL_REG.q(d23)])'), # fcvtxn2 v27.4s, v24.2d FCVTXN_asimdmisc_N (b'\x1B\x6B\x61\x6E', 'LLIL_INTRINSIC([v27],vcvtx_high_f32_f64,[LLIL_REG.o(v27),LLIL_REG.o(v24)])'), # fcvtxn v4.2s, v11.2d FCVTXN_asimdmisc_N - (b'\x64\x69\x61\x2E', 'LLIL_INTRINSIC([v4],vcvtx_f32_f64,[LLIL_REG.o(v4),LLIL_REG.o(v11)])'), + (b'\x64\x69\x61\x2E', 'LLIL_INTRINSIC([v4],vcvtx_f32_f64,[LLIL_REG.o(v11)])'), # fcvtxn s4, d5 FCVTXN_asisdmisc_N (b'\xA4\x68\x61\x7E', 'LLIL_INTRINSIC([s4],vcvtxd_f32_f64,[LLIL_REG.q(d5)])'), # fcvtxn s22, d9 FCVTXN_asisdmisc_N (b'\x36\x69\x61\x7E', 'LLIL_INTRINSIC([s22],vcvtxd_f32_f64,[LLIL_REG.q(d9)])'), # fcvtzs w5, d23 FCVTZS_32D_float2int - (b'\xE5\x02\x78\x1E', 'LLIL_INTRINSIC([w5],vcvtd_s32_f64,[LLIL_REG.q(d23)])'), + (b'\xE5\x02\x78\x1E', 'LLIL_SET_REG.d(w5,LLIL_FLOAT_TO_INT.d(LLIL_REG.q(d23)))'), # fcvtzs w16, d31 FCVTZS_32D_float2int - (b'\xF0\x03\x78\x1E', 'LLIL_INTRINSIC([w16],vcvtd_s32_f64,[LLIL_REG.q(d31)])'), + (b'\xF0\x03\x78\x1E', 'LLIL_SET_REG.d(w16,LLIL_FLOAT_TO_INT.d(LLIL_REG.q(d31)))'), # fcvtzs w27, s20 FCVTZS_32S_float2int - (b'\x9B\x02\x38\x1E', 'LLIL_INTRINSIC([w27],vcvts_s32_f32,[LLIL_REG.d(s20)])'), + (b'\x9B\x02\x38\x1E', 'LLIL_SET_REG.d(w27,LLIL_FLOAT_TO_INT.d(LLIL_REG.d(s20)))'), # fcvtzs w24, s21 FCVTZS_32S_float2int - (b'\xB8\x02\x38\x1E', 'LLIL_INTRINSIC([w24],vcvts_s32_f32,[LLIL_REG.d(s21)])'), + (b'\xB8\x02\x38\x1E', 'LLIL_SET_REG.d(w24,LLIL_FLOAT_TO_INT.d(LLIL_REG.d(s21)))'), # fcvtzs x11, d7, #0x12 FCVTZS_64D_float2fix - (b'\xEB\xB8\x58\x9E', 'LLIL_INTRINSIC([x11],vcvtd_n_s64_f64,[LLIL_REG.q(d7),LLIL_CONST.q(0x12)])'), + (b'\xEB\xB8\x58\x9E', 'LLIL_SET_REG.q(x11,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d7),LLIL_FLOAT_CONST.q(262144.0))))'), # fcvtzs x8, d8, #0x3e FCVTZS_64D_float2fix - (b'\x08\x09\x58\x9E', 'LLIL_INTRINSIC([x8],vcvtd_n_s64_f64,[LLIL_REG.q(d8),LLIL_CONST.q(0x3E)])'), + (b'\x08\x09\x58\x9E', 'LLIL_SET_REG.q(x8,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d8),LLIL_FLOAT_CONST.q(4.611686018427388e+18))))'), # fcvtzs x10, d2, #0x1b FCVTZS_64D_float2fix - (b'\x4A\x94\x58\x9E', 'LLIL_INTRINSIC([x10],vcvtd_n_s64_f64,[LLIL_REG.q(d2),LLIL_CONST.q(0x1B)])'), + (b'\x4A\x94\x58\x9E', 'LLIL_SET_REG.q(x10,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d2),LLIL_FLOAT_CONST.q(134217728.0))))'), # fcvtzs x26, d18, #0x8 FCVTZS_64D_float2fix - (b'\x5A\xE2\x58\x9E', 'LLIL_INTRINSIC([x26],vcvtd_n_s64_f64,[LLIL_REG.q(d18),LLIL_CONST.q(0x8)])'), + (b'\x5A\xE2\x58\x9E', 'LLIL_SET_REG.q(x26,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d18),LLIL_FLOAT_CONST.q(256.0))))'), # fcvtzs x17, d10 FCVTZS_64D_float2int - (b'\x51\x01\x78\x9E', 'LLIL_INTRINSIC([x17],vcvtd_s64_f64,[LLIL_REG.q(d10)])'), + (b'\x51\x01\x78\x9E', 'LLIL_SET_REG.q(x17,LLIL_FLOAT_TO_INT.q(LLIL_REG.q(d10)))'), # fcvtzs x17, d6 FCVTZS_64D_float2int - (b'\xD1\x00\x78\x9E', 'LLIL_INTRINSIC([x17],vcvtd_s64_f64,[LLIL_REG.q(d6)])'), + (b'\xD1\x00\x78\x9E', 'LLIL_SET_REG.q(x17,LLIL_FLOAT_TO_INT.q(LLIL_REG.q(d6)))'), # fcvtzs x19, s1 FCVTZS_64S_float2int - (b'\x33\x00\x38\x9E', 'LLIL_INTRINSIC([x19],vcvts_s64_f32,[LLIL_REG.d(s1)])'), + (b'\x33\x00\x38\x9E', 'LLIL_SET_REG.q(x19,LLIL_FLOAT_TO_INT.q(LLIL_REG.d(s1)))'), # fcvtzs x28, s16 FCVTZS_64S_float2int - (b'\x1C\x02\x38\x9E', 'LLIL_INTRINSIC([x28],vcvts_s64_f32,[LLIL_REG.d(s16)])'), + (b'\x1C\x02\x38\x9E', 'LLIL_SET_REG.q(x28,LLIL_FLOAT_TO_INT.q(LLIL_REG.d(s16)))'), # fcvtzs v22.2s, v11.2s FCVTZS_asimdmisc_R (b'\x76\xB9\xA1\x0E', 'LLIL_INTRINSIC([v22],vcvt_s32_f32,[LLIL_REG.o(v11)])'), # fcvtzs v16.2d, v24.2d FCVTZS_asimdmisc_R @@ -5171,65 +5346,65 @@ # fcvtzs v22.4s, v8.4s, #0x1 FCVTZS_asimdshf_C (b'\x16\xFD\x3F\x4F', 'LLIL_INTRINSIC([v22],vcvtq_n_s32_f32,[LLIL_REG.o(v8),LLIL_CONST.q(0x1)])'), # fcvtzs d4, d1 FCVTZS_asisdmisc_R - (b'\x24\xB8\xE1\x5E', 'LLIL_INTRINSIC([d4],vcvtd_s64_f64,[LLIL_REG.q(d1)])'), + (b'\x24\xB8\xE1\x5E', 'LLIL_INTRINSIC([d4],vcvt_s64_f64,[LLIL_REG.q(d1)])'), # fcvtzs s9, s0 FCVTZS_asisdmisc_R (b'\x09\xB8\xA1\x5E', 'LLIL_INTRINSIC([s9],vcvts_s32_f32,[LLIL_REG.d(s0)])'), # fcvtzs d21, d4, #0x4 FCVTZS_asisdshf_C - (b'\x95\xFC\x7C\x5F', 'LLIL_INTRINSIC([d21],vcvtd_n_s64_f64,[LLIL_REG.q(d4),LLIL_CONST.q(0x4)])'), + (b'\x95\xFC\x7C\x5F', 'LLIL_INTRINSIC([d21],vcvt_n_s64_f64,[LLIL_REG.q(d4),LLIL_CONST.q(0x4)])'), # fcvtzs d27, d5, #0x2f FCVTZS_asisdshf_C - (b'\xBB\xFC\x51\x5F', 'LLIL_INTRINSIC([d27],vcvtd_n_s64_f64,[LLIL_REG.q(d5),LLIL_CONST.q(0x2F)])'), + (b'\xBB\xFC\x51\x5F', 'LLIL_INTRINSIC([d27],vcvt_n_s64_f64,[LLIL_REG.q(d5),LLIL_CONST.q(0x2F)])'), # fcvtzs s10, s19, #0x11 FCVTZS_asisdshf_C (b'\x6A\xFE\x2F\x5F', 'LLIL_INTRINSIC([s10],vcvts_n_s32_f32,[LLIL_REG.d(s19),LLIL_CONST.q(0x11)])'), # fcvtzs d4, d2, #0x30 FCVTZS_asisdshf_C - (b'\x44\xFC\x50\x5F', 'LLIL_INTRINSIC([d4],vcvtd_n_s64_f64,[LLIL_REG.q(d2),LLIL_CONST.q(0x30)])'), + (b'\x44\xFC\x50\x5F', 'LLIL_INTRINSIC([d4],vcvt_n_s64_f64,[LLIL_REG.q(d2),LLIL_CONST.q(0x30)])'), # fcvtzu w22, d30, #0x18 FCVTZU_32D_float2fix - (b'\xD6\xA3\x59\x1E', 'LLIL_INTRINSIC([w22],vcvts_n_u32_f64,[LLIL_REG.q(d30),LLIL_CONST.q(0x18)])'), + (b'\xD6\xA3\x59\x1E', 'LLIL_SET_REG.d(w22,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.q(LLIL_REG.q(d30),LLIL_FLOAT_CONST.q(16777216.0))))'), # fcvtzu w23, d16, #0x1d FCVTZU_32D_float2fix - (b'\x17\x8E\x59\x1E', 'LLIL_INTRINSIC([w23],vcvts_n_u32_f64,[LLIL_REG.q(d16),LLIL_CONST.q(0x1D)])'), + (b'\x17\x8E\x59\x1E', 'LLIL_SET_REG.d(w23,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.q(LLIL_REG.q(d16),LLIL_FLOAT_CONST.q(536870912.0))))'), # fcvtzu w16, d29, #0x5 FCVTZU_32D_float2fix - (b'\xB0\xEF\x59\x1E', 'LLIL_INTRINSIC([w16],vcvts_n_u32_f64,[LLIL_REG.q(d29),LLIL_CONST.q(0x5)])'), + (b'\xB0\xEF\x59\x1E', 'LLIL_SET_REG.d(w16,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.q(LLIL_REG.q(d29),LLIL_FLOAT_CONST.q(32.0))))'), # fcvtzu w10, d14, #0x1f FCVTZU_32D_float2fix - (b'\xCA\x85\x59\x1E', 'LLIL_INTRINSIC([w10],vcvts_n_u32_f64,[LLIL_REG.q(d14),LLIL_CONST.q(0x1F)])'), + (b'\xCA\x85\x59\x1E', 'LLIL_SET_REG.d(w10,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.q(LLIL_REG.q(d14),LLIL_FLOAT_CONST.q(2147483648.0))))'), # fcvtzu w8, d19 FCVTZU_32D_float2int - (b'\x68\x02\x79\x1E', 'LLIL_INTRINSIC([w8],vcvtd_u32_f64,[LLIL_REG.q(d19)])'), + (b'\x68\x02\x79\x1E', 'LLIL_SET_REG.d(w8,LLIL_FLOAT_TO_INT.d(LLIL_REG.q(d19)))'), # fcvtzu w11, d24 FCVTZU_32D_float2int - (b'\x0B\x03\x79\x1E', 'LLIL_INTRINSIC([w11],vcvtd_u32_f64,[LLIL_REG.q(d24)])'), + (b'\x0B\x03\x79\x1E', 'LLIL_SET_REG.d(w11,LLIL_FLOAT_TO_INT.d(LLIL_REG.q(d24)))'), # fcvtzu w18, s24, #0x1f FCVTZU_32S_float2fix - (b'\x12\x87\x19\x1E', 'LLIL_INTRINSIC([w18],vcvts_n_u32_f32,[LLIL_REG.d(s24),LLIL_CONST.q(0x1F)])'), + (b'\x12\x87\x19\x1E', 'LLIL_SET_REG.d(w18,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.d(LLIL_REG.d(s24),LLIL_FLOAT_CONST.d(2147483648.0))))'), # fcvtzu w9, s9, #0x1b FCVTZU_32S_float2fix - (b'\x29\x95\x19\x1E', 'LLIL_INTRINSIC([w9],vcvts_n_u32_f32,[LLIL_REG.d(s9),LLIL_CONST.q(0x1B)])'), + (b'\x29\x95\x19\x1E', 'LLIL_SET_REG.d(w9,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.d(LLIL_REG.d(s9),LLIL_FLOAT_CONST.d(134217728.0))))'), # fcvtzu w5, s25, #0x14 FCVTZU_32S_float2fix - (b'\x25\xB3\x19\x1E', 'LLIL_INTRINSIC([w5],vcvts_n_u32_f32,[LLIL_REG.d(s25),LLIL_CONST.q(0x14)])'), + (b'\x25\xB3\x19\x1E', 'LLIL_SET_REG.d(w5,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.d(LLIL_REG.d(s25),LLIL_FLOAT_CONST.d(1048576.0))))'), # fcvtzu w19, s16, #0x1f FCVTZU_32S_float2fix - (b'\x13\x86\x19\x1E', 'LLIL_INTRINSIC([w19],vcvts_n_u32_f32,[LLIL_REG.d(s16),LLIL_CONST.q(0x1F)])'), + (b'\x13\x86\x19\x1E', 'LLIL_SET_REG.d(w19,LLIL_FLOAT_TO_INT.d(LLIL_FMUL.d(LLIL_REG.d(s16),LLIL_FLOAT_CONST.d(2147483648.0))))'), # fcvtzu w4, s18 FCVTZU_32S_float2int - (b'\x44\x02\x39\x1E', 'LLIL_INTRINSIC([w4],vcvts_u32_f32,[LLIL_REG.d(s18)])'), + (b'\x44\x02\x39\x1E', 'LLIL_SET_REG.d(w4,LLIL_FLOAT_TO_INT.d(LLIL_REG.d(s18)))'), # fcvtzu w17, s27 FCVTZU_32S_float2int - (b'\x71\x03\x39\x1E', 'LLIL_INTRINSIC([w17],vcvts_u32_f32,[LLIL_REG.d(s27)])'), - # fcvtzu x29, d13, #0x37 FCVTZU_64D_float2fix - (b'\xBD\x25\x59\x9E', 'LLIL_INTRINSIC([fp],vcvts_n_u32_f64,[LLIL_REG.q(d13),LLIL_CONST.q(0x37)])'), + (b'\x71\x03\x39\x1E', 'LLIL_SET_REG.d(w17,LLIL_FLOAT_TO_INT.d(LLIL_REG.d(s27)))'), + # fcvtzu fp, d13, #0x37 FCVTZU_64D_float2fix + (b'\xBD\x25\x59\x9E', 'LLIL_SET_REG.q(fp,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d13),LLIL_FLOAT_CONST.q(3.602879701896397e+16))))'), # fcvtzu x4, d6, #0x17 FCVTZU_64D_float2fix - (b'\xC4\xA4\x59\x9E', 'LLIL_INTRINSIC([x4],vcvts_n_u32_f64,[LLIL_REG.q(d6),LLIL_CONST.q(0x17)])'), + (b'\xC4\xA4\x59\x9E', 'LLIL_SET_REG.q(x4,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d6),LLIL_FLOAT_CONST.q(8388608.0))))'), # fcvtzu x17, d24, #0x9 FCVTZU_64D_float2fix - (b'\x11\xDF\x59\x9E', 'LLIL_INTRINSIC([x17],vcvts_n_u32_f64,[LLIL_REG.q(d24),LLIL_CONST.q(0x9)])'), + (b'\x11\xDF\x59\x9E', 'LLIL_SET_REG.q(x17,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d24),LLIL_FLOAT_CONST.q(512.0))))'), # fcvtzu x4, d26, #0x36 FCVTZU_64D_float2fix - (b'\x44\x2B\x59\x9E', 'LLIL_INTRINSIC([x4],vcvts_n_u32_f64,[LLIL_REG.q(d26),LLIL_CONST.q(0x36)])'), + (b'\x44\x2B\x59\x9E', 'LLIL_SET_REG.q(x4,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.q(LLIL_REG.q(d26),LLIL_FLOAT_CONST.q(1.8014398509481984e+16))))'), # fcvtzu x9, d6 FCVTZU_64D_float2int - (b'\xC9\x00\x79\x9E', 'LLIL_INTRINSIC([x9],vcvtd_u64_f64,[LLIL_REG.q(d6)])'), + (b'\xC9\x00\x79\x9E', 'LLIL_SET_REG.q(x9,LLIL_FLOAT_TO_INT.q(LLIL_REG.q(d6)))'), # fcvtzu x9, d25 FCVTZU_64D_float2int - (b'\x29\x03\x79\x9E', 'LLIL_INTRINSIC([x9],vcvtd_u64_f64,[LLIL_REG.q(d25)])'), + (b'\x29\x03\x79\x9E', 'LLIL_SET_REG.q(x9,LLIL_FLOAT_TO_INT.q(LLIL_REG.q(d25)))'), # fcvtzu x26, s31, #0x15 FCVTZU_64S_float2fix - (b'\xFA\xAF\x19\x9E', 'LLIL_INTRINSIC([x26],vcvts_n_u64_f32,[LLIL_REG.d(s31),LLIL_CONST.q(0x15)])'), + (b'\xFA\xAF\x19\x9E', 'LLIL_SET_REG.q(x26,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.d(LLIL_REG.d(s31),LLIL_FLOAT_CONST.d(2097152.0))))'), # fcvtzu x27, s11, #0x21 FCVTZU_64S_float2fix - (b'\x7B\x7D\x19\x9E', 'LLIL_INTRINSIC([x27],vcvts_n_u64_f32,[LLIL_REG.d(s11),LLIL_CONST.q(0x21)])'), - # fcvtzu x29, s6, #0x38 FCVTZU_64S_float2fix - (b'\xDD\x20\x19\x9E', 'LLIL_INTRINSIC([fp],vcvts_n_u64_f32,[LLIL_REG.d(s6),LLIL_CONST.q(0x38)])'), + (b'\x7B\x7D\x19\x9E', 'LLIL_SET_REG.q(x27,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.d(LLIL_REG.d(s11),LLIL_FLOAT_CONST.d(8589934592.0))))'), + # fcvtzu fp, s6, #0x38 FCVTZU_64S_float2fix + (b'\xDD\x20\x19\x9E', 'LLIL_SET_REG.q(fp,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.d(LLIL_REG.d(s6),LLIL_FLOAT_CONST.d(7.205759403792794e+16))))'), # fcvtzu x22, s10, #0x13 FCVTZU_64S_float2fix - (b'\x56\xB5\x19\x9E', 'LLIL_INTRINSIC([x22],vcvts_n_u64_f32,[LLIL_REG.d(s10),LLIL_CONST.q(0x13)])'), + (b'\x56\xB5\x19\x9E', 'LLIL_SET_REG.q(x22,LLIL_FLOAT_TO_INT.q(LLIL_FMUL.d(LLIL_REG.d(s10),LLIL_FLOAT_CONST.d(524288.0))))'), # fcvtzu x5, s19 FCVTZU_64S_float2int - (b'\x65\x02\x39\x9E', 'LLIL_INTRINSIC([x5],vcvt_n_u64_f32,[LLIL_REG.d(s19)])'), + (b'\x65\x02\x39\x9E', 'LLIL_SET_REG.q(x5,LLIL_FLOAT_TO_INT.q(LLIL_REG.d(s19)))'), # fcvtzu xzr, s22 FCVTZU_64S_float2int - (b'\xDF\x02\x39\x9E', 'LLIL_INTRINSIC([xzr],vcvt_n_u64_f32,[LLIL_REG.d(s22)])'), + (b'\xDF\x02\x39\x9E', 'LLIL_FLOAT_TO_INT.q(LLIL_REG.d(s22))'), # fcvtzu v23.4s, v22.4s FCVTZU_asimdmisc_R (b'\xD7\xBA\xA1\x6E', 'LLIL_INTRINSIC([v23],vcvtq_u32_f32,[LLIL_REG.o(v22)])'), # fcvtzu v25.4s, v15.4s FCVTZU_asimdmisc_R @@ -5245,86 +5420,86 @@ # fcvtzu s25, s13 FCVTZU_asisdmisc_R (b'\xB9\xB9\xA1\x7E', 'LLIL_INTRINSIC([s25],vcvts_u32_f32,[LLIL_REG.d(s13)])'), # fcvtzu d10, d15 FCVTZU_asisdmisc_R - (b'\xEA\xB9\xE1\x7E', 'LLIL_INTRINSIC([d10],vcvtd_u64_f64,[LLIL_REG.q(d15)])'), + (b'\xEA\xB9\xE1\x7E', 'LLIL_INTRINSIC([d10],vcvt_u64_f64,[LLIL_REG.q(d15)])'), # fcvtzu d23, d15, #0x3 FCVTZU_asisdshf_C - (b'\xF7\xFD\x7D\x7F', 'LLIL_INTRINSIC([d23],vcvtd_n_u64_f64,[LLIL_REG.q(d15),LLIL_CONST.q(0x3)])'), + (b'\xF7\xFD\x7D\x7F', 'LLIL_INTRINSIC([d23],vcvt_n_u64_f64,[LLIL_REG.q(d15),LLIL_CONST.q(0x3)])'), # fcvtzu s15, s2, #0x7 FCVTZU_asisdshf_C (b'\x4F\xFC\x39\x7F', 'LLIL_INTRINSIC([s15],vcvts_n_u32_f32,[LLIL_REG.d(s2),LLIL_CONST.q(0x7)])'), # fcvtzu d5, d10, #0x25 FCVTZU_asisdshf_C - (b'\x45\xFD\x5B\x7F', 'LLIL_INTRINSIC([d5],vcvtd_n_u64_f64,[LLIL_REG.q(d10),LLIL_CONST.q(0x25)])'), + (b'\x45\xFD\x5B\x7F', 'LLIL_INTRINSIC([d5],vcvt_n_u64_f64,[LLIL_REG.q(d10),LLIL_CONST.q(0x25)])'), # fcvtzu d9, d27, #0x6 FCVTZU_asisdshf_C - (b'\x69\xFF\x7A\x7F', 'LLIL_INTRINSIC([d9],vcvtd_n_u64_f64,[LLIL_REG.q(d27),LLIL_CONST.q(0x6)])'), + (b'\x69\xFF\x7A\x7F', 'LLIL_INTRINSIC([d9],vcvt_n_u64_f64,[LLIL_REG.q(d27),LLIL_CONST.q(0x6)])'), ] tests_scvtf = [ # scvtf d9, w19, #0x12 SCVTF_D32_float2fix - (b'\x69\xBA\x42\x1E', 'LLIL_INTRINSIC([d9],vcvts_n_f64_s32,[LLIL_REG.d(w19),LLIL_CONST.q(0x12)])'), + (b'\x69\xBA\x42\x1E', 'LLIL_SET_REG.q(d9,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.d(w19)),LLIL_FLOAT_CONST.q(262144.0)))'), # scvtf d1, w24, #0x12 SCVTF_D32_float2fix - (b'\x01\xBB\x42\x1E', 'LLIL_INTRINSIC([d1],vcvts_n_f64_s32,[LLIL_REG.d(w24),LLIL_CONST.q(0x12)])'), + (b'\x01\xBB\x42\x1E', 'LLIL_SET_REG.q(d1,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.d(w24)),LLIL_FLOAT_CONST.q(262144.0)))'), # scvtf d15, w4, #0x14 SCVTF_D32_float2fix - (b'\x8F\xB0\x42\x1E', 'LLIL_INTRINSIC([d15],vcvts_n_f64_s32,[LLIL_REG.d(w4),LLIL_CONST.q(0x14)])'), + (b'\x8F\xB0\x42\x1E', 'LLIL_SET_REG.q(d15,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.d(w4)),LLIL_FLOAT_CONST.q(1048576.0)))'), # scvtf d7, w23, #0x5 SCVTF_D32_float2fix - (b'\xE7\xEE\x42\x1E', 'LLIL_INTRINSIC([d7],vcvts_n_f64_s32,[LLIL_REG.d(w23),LLIL_CONST.q(0x5)])'), + (b'\xE7\xEE\x42\x1E', 'LLIL_SET_REG.q(d7,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.d(w23)),LLIL_FLOAT_CONST.q(32.0)))'), # scvtf d3, w3 SCVTF_D32_float2int (b'\x63\x00\x62\x1E', 'LLIL_SET_REG.q(d3,LLIL_INT_TO_FLOAT.q(LLIL_SX.q(LLIL_REG.d(w3))))'), # scvtf d1, w2 SCVTF_D32_float2int (b'\x41\x00\x62\x1E', 'LLIL_SET_REG.q(d1,LLIL_INT_TO_FLOAT.q(LLIL_SX.q(LLIL_REG.d(w2))))'), # scvtf d1, x20, #0x20 SCVTF_D64_float2fix - (b'\x81\x82\x42\x9E', 'LLIL_INTRINSIC([d1],vcvtd_n_f64_s64,[LLIL_REG.q(x20),LLIL_CONST.q(0x20)])'), + (b'\x81\x82\x42\x9E', 'LLIL_SET_REG.q(d1,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.q(x20)),LLIL_FLOAT_CONST.q(4294967296.0)))'), # scvtf d3, x28, #0xd SCVTF_D64_float2fix - (b'\x83\xCF\x42\x9E', 'LLIL_INTRINSIC([d3],vcvtd_n_f64_s64,[LLIL_REG.q(x28),LLIL_CONST.q(0xD)])'), + (b'\x83\xCF\x42\x9E', 'LLIL_SET_REG.q(d3,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.q(x28)),LLIL_FLOAT_CONST.q(8192.0)))'), # scvtf d7, x19, #0x1c SCVTF_D64_float2fix - (b'\x67\x92\x42\x9E', 'LLIL_INTRINSIC([d7],vcvtd_n_f64_s64,[LLIL_REG.q(x19),LLIL_CONST.q(0x1C)])'), + (b'\x67\x92\x42\x9E', 'LLIL_SET_REG.q(d7,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.q(x19)),LLIL_FLOAT_CONST.q(268435456.0)))'), # scvtf d27, x28, #0x26 SCVTF_D64_float2fix - (b'\x9B\x6B\x42\x9E', 'LLIL_INTRINSIC([d27],vcvtd_n_f64_s64,[LLIL_REG.q(x28),LLIL_CONST.q(0x26)])'), + (b'\x9B\x6B\x42\x9E', 'LLIL_SET_REG.q(d27,LLIL_FDIV.q(LLIL_INT_TO_FLOAT.q(LLIL_REG.q(x28)),LLIL_FLOAT_CONST.q(274877906944.0)))'), # scvtf d16, x17 SCVTF_D64_float2int (b'\x30\x02\x62\x9E', 'LLIL_SET_REG.q(d16,LLIL_INT_TO_FLOAT.q(LLIL_SX.q(LLIL_REG.q(x17))))'), # scvtf d15, x22 SCVTF_D64_float2int (b'\xCF\x02\x62\x9E', 'LLIL_SET_REG.q(d15,LLIL_INT_TO_FLOAT.q(LLIL_SX.q(LLIL_REG.q(x22))))'), # scvtf h6, wzr, #0x1e SCVTF_H32_float2fix - (b'\xE6\x8B\xC2\x1E', 'LLIL_INTRINSIC([h6],vcvth_n_f16_s32,[LLIL_CONST.d(0x0),LLIL_CONST.q(0x1E)])'), + (b'\xE6\x8B\xC2\x1E', 'LLIL_SET_REG.w(h6,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_CONST.d(0x0)),LLIL_FLOAT_CONST.d(1073741824.0))))'), # scvtf h20, w29, #0x1b SCVTF_H32_float2fix - (b'\xB4\x97\xC2\x1E', 'LLIL_INTRINSIC([h20],vcvth_n_f16_s32,[LLIL_REG.d(w29),LLIL_CONST.q(0x1B)])'), + (b'\xB4\x97\xC2\x1E', 'LLIL_SET_REG.w(h20,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.d(w29)),LLIL_FLOAT_CONST.d(134217728.0))))'), # scvtf h5, w18, #0x12 SCVTF_H32_float2fix - (b'\x45\xBA\xC2\x1E', 'LLIL_INTRINSIC([h5],vcvth_n_f16_s32,[LLIL_REG.d(w18),LLIL_CONST.q(0x12)])'), + (b'\x45\xBA\xC2\x1E', 'LLIL_SET_REG.w(h5,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.d(w18)),LLIL_FLOAT_CONST.d(262144.0))))'), # scvtf h13, w15, #0x2 SCVTF_H32_float2fix - (b'\xED\xF9\xC2\x1E', 'LLIL_INTRINSIC([h13],vcvth_n_f16_s32,[LLIL_REG.d(w15),LLIL_CONST.q(0x2)])'), + (b'\xED\xF9\xC2\x1E', 'LLIL_SET_REG.w(h13,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.d(w15)),LLIL_FLOAT_CONST.d(4.0))))'), # scvtf h13, w7 SCVTF_H32_float2int (b'\xED\x00\xE2\x1E', 'LLIL_SET_REG.w(h13,LLIL_INT_TO_FLOAT.w(LLIL_SX.w(LLIL_REG.d(w7))))'), # scvtf h0, w23 SCVTF_H32_float2int (b'\xE0\x02\xE2\x1E', 'LLIL_SET_REG.w(h0,LLIL_INT_TO_FLOAT.w(LLIL_SX.w(LLIL_REG.d(w23))))'), # scvtf h19, x11, #0x12 SCVTF_H64_float2fix - (b'\x73\xB9\xC2\x9E', 'LLIL_INTRINSIC([h19],vcvth_n_f16_s64,[LLIL_REG.q(x11),LLIL_CONST.q(0x12)])'), + (b'\x73\xB9\xC2\x9E', 'LLIL_SET_REG.w(h19,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x11)),LLIL_FLOAT_CONST.d(262144.0))))'), # scvtf h7, x4, #0x3a SCVTF_H64_float2fix - (b'\x87\x18\xC2\x9E', 'LLIL_INTRINSIC([h7],vcvth_n_f16_s64,[LLIL_REG.q(x4),LLIL_CONST.q(0x3A)])'), + (b'\x87\x18\xC2\x9E', 'LLIL_SET_REG.w(h7,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x4)),LLIL_FLOAT_CONST.d(2.8823037615171174e+17))))'), # scvtf h22, x22, #0x2 SCVTF_H64_float2fix - (b'\xD6\xFA\xC2\x9E', 'LLIL_INTRINSIC([h22],vcvth_n_f16_s64,[LLIL_REG.q(x22),LLIL_CONST.q(0x2)])'), + (b'\xD6\xFA\xC2\x9E', 'LLIL_SET_REG.w(h22,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x22)),LLIL_FLOAT_CONST.d(4.0))))'), # scvtf h17, x18, #0x10 SCVTF_H64_float2fix - (b'\x51\xC2\xC2\x9E', 'LLIL_INTRINSIC([h17],vcvth_n_f16_s64,[LLIL_REG.q(x18),LLIL_CONST.q(0x10)])'), - # scvtf h8, x29 SCVTF_H64_float2int + (b'\x51\xC2\xC2\x9E', 'LLIL_SET_REG.w(h17,LLIL_FLOAT_CONV.w(LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x18)),LLIL_FLOAT_CONST.d(65536.0))))'), + # scvtf h8, fp SCVTF_H64_float2int (b'\xA8\x03\xE2\x9E', 'LLIL_SET_REG.w(h8,LLIL_INT_TO_FLOAT.w(LLIL_SX.w(LLIL_REG.q(fp))))'), # scvtf h28, xzr SCVTF_H64_float2int (b'\xFC\x03\xE2\x9E', 'LLIL_SET_REG.w(h28,LLIL_INT_TO_FLOAT.w(LLIL_SX.w(LLIL_CONST.q(0x0))))'), # scvtf s22, w4, #0x9 SCVTF_S32_float2fix - (b'\x96\xDC\x02\x1E', 'LLIL_INTRINSIC([s22],vcvts_n_f32_s32,[LLIL_REG.d(w4),LLIL_CONST.q(0x9)])'), + (b'\x96\xDC\x02\x1E', 'LLIL_SET_REG.d(s22,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.d(w4)),LLIL_FLOAT_CONST.d(512.0)))'), # scvtf s14, w11, #0x9 SCVTF_S32_float2fix - (b'\x6E\xDD\x02\x1E', 'LLIL_INTRINSIC([s14],vcvts_n_f32_s32,[LLIL_REG.d(w11),LLIL_CONST.q(0x9)])'), + (b'\x6E\xDD\x02\x1E', 'LLIL_SET_REG.d(s14,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.d(w11)),LLIL_FLOAT_CONST.d(512.0)))'), # scvtf s12, w22, #0x1f SCVTF_S32_float2fix - (b'\xCC\x86\x02\x1E', 'LLIL_INTRINSIC([s12],vcvts_n_f32_s32,[LLIL_REG.d(w22),LLIL_CONST.q(0x1F)])'), + (b'\xCC\x86\x02\x1E', 'LLIL_SET_REG.d(s12,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.d(w22)),LLIL_FLOAT_CONST.d(2147483648.0)))'), # scvtf s17, w6, #0xf SCVTF_S32_float2fix - (b'\xD1\xC4\x02\x1E', 'LLIL_INTRINSIC([s17],vcvts_n_f32_s32,[LLIL_REG.d(w6),LLIL_CONST.q(0xF)])'), + (b'\xD1\xC4\x02\x1E', 'LLIL_SET_REG.d(s17,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.d(w6)),LLIL_FLOAT_CONST.d(32768.0)))'), # scvtf s22, w20 SCVTF_S32_float2int (b'\x96\x02\x22\x1E', 'LLIL_SET_REG.d(s22,LLIL_INT_TO_FLOAT.d(LLIL_SX.d(LLIL_REG.d(w20))))'), # scvtf s11, w5 SCVTF_S32_float2int (b'\xAB\x00\x22\x1E', 'LLIL_SET_REG.d(s11,LLIL_INT_TO_FLOAT.d(LLIL_SX.d(LLIL_REG.d(w5))))'), # scvtf s7, x11, #0x40 SCVTF_S64_float2fix - (b'\x67\x01\x02\x9E', 'LLIL_INTRINSIC([s7],vcvts_n_f32_s64,[LLIL_REG.q(x11),LLIL_CONST.q(0x40)])'), + (b'\x67\x01\x02\x9E', 'LLIL_SET_REG.d(s7,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x11)),LLIL_FLOAT_CONST.d(1.8446744073709552e+19)))'), # scvtf s8, x8, #0x6 SCVTF_S64_float2fix - (b'\x08\xE9\x02\x9E', 'LLIL_INTRINSIC([s8],vcvts_n_f32_s64,[LLIL_REG.q(x8),LLIL_CONST.q(0x6)])'), + (b'\x08\xE9\x02\x9E', 'LLIL_SET_REG.d(s8,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x8)),LLIL_FLOAT_CONST.d(64.0)))'), # scvtf s21, x22, #0x1b SCVTF_S64_float2fix - (b'\xD5\x96\x02\x9E', 'LLIL_INTRINSIC([s21],vcvts_n_f32_s64,[LLIL_REG.q(x22),LLIL_CONST.q(0x1B)])'), + (b'\xD5\x96\x02\x9E', 'LLIL_SET_REG.d(s21,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x22)),LLIL_FLOAT_CONST.d(134217728.0)))'), # scvtf s6, x15, #0x30 SCVTF_S64_float2fix - (b'\xE6\x41\x02\x9E', 'LLIL_INTRINSIC([s6],vcvts_n_f32_s64,[LLIL_REG.q(x15),LLIL_CONST.q(0x30)])'), + (b'\xE6\x41\x02\x9E', 'LLIL_SET_REG.d(s6,LLIL_FDIV.d(LLIL_INT_TO_FLOAT.d(LLIL_REG.q(x15)),LLIL_FLOAT_CONST.d(281474976710656.0)))'), # scvtf s12, x1 SCVTF_S64_float2int (b'\x2C\x00\x22\x9E', 'LLIL_SET_REG.d(s12,LLIL_INT_TO_FLOAT.d(LLIL_SX.d(LLIL_REG.q(x1))))'), # scvtf s24, x25 SCVTF_S64_float2int @@ -5452,21 +5627,21 @@ tests_shll = [ # shll v1.8h, v11.8b, #0x8 SHLL_asimdmisc_S - (b'\x61\x39\x21\x2E', 'LLIL_INTRINSIC([v1],vshll_n_s8,[LLIL_REG.o(v11)])'), + (b'\x61\x39\x21\x2E', 'LLIL_INTRINSIC([v1],vshll_n_s8,[LLIL_REG.o(v11),LLIL_CONST.q(0x8)])'), # shll v14.2d, v20.2s, #0x20 SHLL_asimdmisc_S - (b'\x8E\x3A\xA1\x2E', 'LLIL_INTRINSIC([v14],vshll_n_s32,[LLIL_REG.o(v20)])'), + (b'\x8E\x3A\xA1\x2E', 'LLIL_INTRINSIC([v14],vshll_n_s32,[LLIL_REG.o(v20),LLIL_CONST.q(0x20)])'), # shll v22.2d, v23.2s, #0x20 SHLL_asimdmisc_S - (b'\xF6\x3A\xA1\x2E', 'LLIL_INTRINSIC([v22],vshll_n_s32,[LLIL_REG.o(v23)])'), + (b'\xF6\x3A\xA1\x2E', 'LLIL_INTRINSIC([v22],vshll_n_s32,[LLIL_REG.o(v23),LLIL_CONST.q(0x20)])'), # shll v5.8h, v18.8b, #0x8 SHLL_asimdmisc_S - (b'\x45\x3A\x21\x2E', 'LLIL_INTRINSIC([v5],vshll_n_s8,[LLIL_REG.o(v18)])'), + (b'\x45\x3A\x21\x2E', 'LLIL_INTRINSIC([v5],vshll_n_s8,[LLIL_REG.o(v18),LLIL_CONST.q(0x8)])'), # shll v7.2d, v3.2s, #0x20 SHLL_asimdmisc_S - (b'\x67\x38\xA1\x2E', 'LLIL_INTRINSIC([v7],vshll_n_s32,[LLIL_REG.o(v3)])'), + (b'\x67\x38\xA1\x2E', 'LLIL_INTRINSIC([v7],vshll_n_s32,[LLIL_REG.o(v3),LLIL_CONST.q(0x20)])'), # shll v3.2d, v20.2s, #0x20 SHLL_asimdmisc_S - (b'\x83\x3A\xA1\x2E', 'LLIL_INTRINSIC([v3],vshll_n_s32,[LLIL_REG.o(v20)])'), + (b'\x83\x3A\xA1\x2E', 'LLIL_INTRINSIC([v3],vshll_n_s32,[LLIL_REG.o(v20),LLIL_CONST.q(0x20)])'), # shll2 v27.2d, v4.4s, #0x20 SHLL_asimdmisc_S - (b'\x9B\x38\xA1\x6E', 'LLIL_INTRINSIC([v27],vshll_high_n_s32,[LLIL_REG.o(v4)])'), + (b'\x9B\x38\xA1\x6E', 'LLIL_INTRINSIC([v27],vshll_high_n_s32,[LLIL_REG.o(v4),LLIL_CONST.q(0x20)])'), # shll2 v26.8h, v26.16b, #0x8 SHLL_asimdmisc_S - (b'\x5A\x3B\x21\x6E', 'LLIL_INTRINSIC([v26],vshll_high_n_s8,[LLIL_REG.o(v26)])'), + (b'\x5A\x3B\x21\x6E', 'LLIL_INTRINSIC([v26],vshll_high_n_s8,[LLIL_REG.o(v26),LLIL_CONST.q(0x8)])'), # shl v19.2d, v21.2d, #0x2 SHL_asimdshf_R (b'\xB3\x56\x42\x4F', 'LLIL_SET_REG.q(v19.d[0],LLIL_LSL.q(LLIL_REG.q(v21.d[0]),LLIL_CONST.b(0x2)));' + \ ' LLIL_SET_REG.q(v19.d[1],LLIL_LSL.q(LLIL_REG.q(v21.d[1]),LLIL_CONST.b(0x2)))'), @@ -5862,7 +6037,7 @@ ] tests_fccmp_fccmpe = [ - # fccmpe d0, d20, #0x7, lo + # fccmpe d0, d20, #0x7, cc (b'\x17\x34\x74\x1E', 'LLIL_IF(LLIL_FLAG_GROUP(cc),1,3);' + \ ' LLIL_FSUB.q{f*}(LLIL_REG.q(d0),LLIL_REG.q(d20));' + \ ' LLIL_GOTO(8);' + \ @@ -5916,7 +6091,7 @@ ' LLIL_SET_FLAG(c,LLIL_CONST(0));' + \ ' LLIL_SET_FLAG(v,LLIL_CONST(0));' + \ ' LLIL_GOTO(8)'), - # fccmp d2, d28, #0xf, lo + # fccmp d2, d28, #0xf, cc (b'\x4F\x34\x7C\x1E', 'LLIL_IF(LLIL_FLAG_GROUP(cc),1,3);' + \ ' LLIL_FSUB.q{f*}(LLIL_REG.q(d2),LLIL_REG.q(d28));' + \ ' LLIL_GOTO(8);' + \ @@ -5952,7 +6127,7 @@ ' LLIL_SET_FLAG(c,LLIL_CONST(1));' + \ ' LLIL_SET_FLAG(v,LLIL_CONST(1));' + \ ' LLIL_GOTO(8)'), - # fccmp s23, s31, #0x6, hs + # fccmp s23, s31, #0x6, cs (b'\xE6\x26\x3F\x1E', 'LLIL_IF(LLIL_FLAG_GROUP(cs),1,3);' + \ ' LLIL_FSUB.d{f*}(LLIL_REG.d(s23),LLIL_REG.d(s31));' + \ ' LLIL_GOTO(8);' + \ @@ -5985,7 +6160,7 @@ ' LLIL_GOTO(5);' + \ ' LLIL_SET_REG.q(d30,LLIL_REG.q(d21));' + \ ' LLIL_GOTO(5)'), - # fcsel h30, h9, h13, lo + # fcsel h30, h9, h13, cc (b'\x3E\x3D\xED\x1E', 'LLIL_IF(LLIL_FLAG_GROUP(cc),1,3);' + \ ' LLIL_SET_REG.w(h30,LLIL_REG.w(h9));' + \ ' LLIL_GOTO(5);' + \ @@ -6101,7 +6276,7 @@ (b'\xA2\x00\xE7\x1E', 'LLIL_SET_REG.w(h2,LLIL_INT_TO_FLOAT.w(LLIL_REG.d(w5)))'), # fmov h10, x14 (b'\xCA\x01\xE7\x9E', 'LLIL_SET_REG.w(h10,LLIL_INT_TO_FLOAT.w(LLIL_REG.q(x14)))'), - # fmov h9, x29 + # fmov h9, fp (b'\xA9\x03\xE7\x9E', 'LLIL_SET_REG.w(h9,LLIL_INT_TO_FLOAT.w(LLIL_REG.q(fp)))'), # fmov h6, h23 (b'\xE6\x42\xE0\x1E', 'LLIL_SET_REG.w(h6,LLIL_REG.w(h23))'), @@ -6215,7 +6390,7 @@ ] tests_rev = [ - (b'\x49\x29\xC8\x9A', 'LLIL_SET_REG.q(x9,LLIL_ASR.q(LLIL_REG.q(x10),LLIL_REG.q(x8)))'), # asr x9, x10, x8 + (b'\x49\x29\xC8\x9A', 'LLIL_SET_REG.q(x9,LLIL_ASR.q(LLIL_REG.q(x10),LLIL_REG.q(x8)))'), # asr x9, x10, x8 # rev16 w25, w2 (b'\x59\x04\xC0\x5A', 'LLIL_SET_REG.d(w25,LLIL_ROR.d(LLIL_BSWAP.d(LLIL_REG.d(w2)),LLIL_CONST.b(0x10)))'), # rev16 w25, w6 @@ -6228,7 +6403,7 @@ (b'\x48\x1B\x20\x4E', 'LLIL_INTRINSIC([v8],vrev16q_s8,[LLIL_REG.o(v26)])'), # rev16 v4.8b, v27.8b (b'\x64\x1B\x20\x0E', 'LLIL_INTRINSIC([v4],vrev16_s8,[LLIL_REG.o(v27)])'), - # rev32 x29, x8 + # rev32 fp, x8 (b'\x1D\x09\xC0\xDA', 'LLIL_SET_REG.q(fp,LLIL_ROR.q(LLIL_BSWAP.q(LLIL_REG.q(x8)),LLIL_CONST.b(0x20)))'), # rev32 x18, x26 (b'\x52\x0B\xC0\xDA', 'LLIL_SET_REG.q(x18,LLIL_ROR.q(LLIL_BSWAP.q(LLIL_REG.q(x26)),LLIL_CONST.b(0x20)))'), @@ -6312,7 +6487,7 @@ ' LLIL_SET_REG.b(v23.b[12],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.b(v23.b[13],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.b(v23.b[14],LLIL_REG.b(temp0));' + \ - ' LLIL_SET_REG.b(v23.b[15],LLIL_REG.b(temp0))'), + ' LLIL_SET_REG.b(v23.b[15],LLIL_REG.b(temp0)); LLIL_SET_REG.q(x28,LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x1)))'), # ld1r {v6.16b}, [x6], #0x1 LD1R_asisdlsop_R1_i (b'\xC6\xC0\xDF\x4D', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x6)));' + \ ' LLIL_SET_REG.b(v6.b[0],LLIL_REG.b(temp0));' + \ @@ -6330,7 +6505,7 @@ ' LLIL_SET_REG.b(v6.b[12],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.b(v6.b[13],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.b(v6.b[14],LLIL_REG.b(temp0));' + \ - ' LLIL_SET_REG.b(v6.b[15],LLIL_REG.b(temp0))'), + ' LLIL_SET_REG.b(v6.b[15],LLIL_REG.b(temp0)); LLIL_SET_REG.q(x6,LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x1)))'), # ld1r {v8.8b}, [x17], #0x1 LD1R_asisdlsop_R1_i (b'\x28\xC2\xDF\x0D', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ ' LLIL_SET_REG.b(v8.b[0],LLIL_REG.b(temp0));' + \ @@ -6340,11 +6515,11 @@ ' LLIL_SET_REG.b(v8.b[4],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.b(v8.b[5],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.b(v8.b[6],LLIL_REG.b(temp0));' + \ - ' LLIL_SET_REG.b(v8.b[7],LLIL_REG.b(temp0))'), + ' LLIL_SET_REG.b(v8.b[7],LLIL_REG.b(temp0)); LLIL_SET_REG.q(x17,LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x1)))'), # ld1r {v20.2d}, [x14], #0x8 LD1R_asisdlsop_R1_i (b'\xD4\xCD\xDF\x4D', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x14)));' + \ ' LLIL_SET_REG.q(v20.d[0],LLIL_REG.q(temp0));' + \ - ' LLIL_SET_REG.q(v20.d[1],LLIL_REG.q(temp0))'), + ' LLIL_SET_REG.q(v20.d[1],LLIL_REG.q(temp0)); LLIL_SET_REG.q(x14,LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x8)))'), # ld1r {v16.8b}, [x9], x1 LD1R_asisdlsop_RX1_r (b'\x30\xC1\xC1\x0D', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x9)));' + \ ' LLIL_SET_REG.b(v16.b[0],LLIL_REG.b(temp0));' + \ @@ -6356,7 +6531,7 @@ ' LLIL_SET_REG.b(v16.b[6],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.b(v16.b[7],LLIL_REG.b(temp0));' + \ ' LLIL_SET_REG.q(x9,LLIL_ADD.q(LLIL_REG.q(x9),LLIL_REG.q(x1)))'), - # ld1r {v7.2s}, [x6], x29 LD1R_asisdlsop_RX1_r + # ld1r {v7.2s}, [x6], fp LD1R_asisdlsop_RX1_r (b'\xC7\xC8\xDD\x0D', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x6)));' + \ ' LLIL_SET_REG.d(v7.s[0],LLIL_REG.d(temp0));' + \ ' LLIL_SET_REG.d(v7.s[1],LLIL_REG.d(temp0));' + \ @@ -6652,13 +6827,13 @@ (b'\xDF\x74\xDF\x0C', 'LLIL_SET_REG.w(v31.h[0],LLIL_LOAD.w(LLIL_REG.q(x6)));' + \ ' LLIL_SET_REG.w(v31.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x2))));' + \ ' LLIL_SET_REG.w(v31.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.w(v31.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x6))))'), + ' LLIL_SET_REG.w(v31.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x6)))); LLIL_SET_REG.q(x6,LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x8)))'), # ld1 {v2.2d}, [x22], #0x10 LD1_asisdlsep_I1_i1 (b'\xC2\x7E\xDF\x4C', 'LLIL_SET_REG.q(v2.d[0],LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ - ' LLIL_SET_REG.q(v2.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x8))))'), + ' LLIL_SET_REG.q(v2.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x8)))); LLIL_SET_REG.q(x22,LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x10)))'), # ld1 {v26.2d}, [x16], #0x10 LD1_asisdlsep_I1_i1 (b'\x1A\x7E\xDF\x4C', 'LLIL_SET_REG.q(v26.d[0],LLIL_LOAD.q(LLIL_REG.q(x16)));' + \ - ' LLIL_SET_REG.q(v26.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x16),LLIL_CONST.q(0x8))))'), + ' LLIL_SET_REG.q(v26.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x16),LLIL_CONST.q(0x8)))); LLIL_SET_REG.q(x16,LLIL_ADD.q(LLIL_REG.q(x16),LLIL_CONST.q(0x10)))'), # ld1 {v18.8h}, [x17], #0x10 LD1_asisdlsep_I1_i1 (b'\x32\x76\xDF\x4C', 'LLIL_SET_REG.w(v18.h[0],LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ ' LLIL_SET_REG.w(v18.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x2))));' + \ @@ -6667,7 +6842,7 @@ ' LLIL_SET_REG.w(v18.h[4],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x8))));' + \ ' LLIL_SET_REG.w(v18.h[5],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0xA))));' + \ ' LLIL_SET_REG.w(v18.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0xC))));' + \ - ' LLIL_SET_REG.w(v18.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0xE))))'), + ' LLIL_SET_REG.w(v18.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0xE)))); LLIL_SET_REG.q(x17,LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x10)))'), # ld1 {v10.8b, v11.8b}, [x26], #0x10 LD1_asisdlsep_I2_i2 (b'\x4A\xA3\xDF\x0C', 'LLIL_SET_REG.b(v10.b[0],LLIL_LOAD.b(LLIL_REG.q(x26)));' + \ ' LLIL_SET_REG.b(v11.b[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x26),LLIL_CONST.q(0x1))));' + \ @@ -6847,7 +7022,7 @@ (b'\x16\x7D\xC6\x4C', 'LLIL_SET_REG.q(v22.d[0],LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ ' LLIL_SET_REG.q(v22.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x8))));' + \ ' LLIL_SET_REG.q(x8,LLIL_ADD.q(LLIL_REG.q(x8),LLIL_REG.q(x6)))'), - # ld1 {v12.2d}, [x2], x29 LD1_asisdlsep_R1_r1 + # ld1 {v12.2d}, [x2], fp LD1_asisdlsep_R1_r1 (b'\x4C\x7C\xDD\x4C', 'LLIL_SET_REG.q(v12.d[0],LLIL_LOAD.q(LLIL_REG.q(x2)));' + \ ' LLIL_SET_REG.q(v12.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x8))));' + \ ' LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_REG.q(fp)))'), @@ -6892,7 +7067,7 @@ ' LLIL_SET_REG.b(v5.b[15],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x1E))));' + \ ' LLIL_SET_REG.b(v6.b[15],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x1F))));' + \ ' LLIL_SET_REG.q(x20,LLIL_ADD.q(LLIL_REG.q(x20),LLIL_REG.q(x19)))'), - # ld1 {v11.4s, v12.4s}, [sp], x30 LD1_asisdlsep_R2_r2 + # ld1 {v11.4s, v12.4s}, [sp], lr LD1_asisdlsep_R2_r2 (b'\xEB\xAB\xDE\x4C', 'LLIL_SET_REG.d(v11.s[0],LLIL_LOAD.d(LLIL_REG.q(sp)));' + \ ' LLIL_SET_REG.d(v12.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0x4))));' + \ ' LLIL_SET_REG.d(v11.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0x8))));' + \ @@ -6932,62 +7107,62 @@ ' LLIL_SET_REG.q(x19,LLIL_ADD.q(LLIL_REG.q(x19),LLIL_REG.q(x24)))'), # ld1 {v30.16b, v31.16b, v0.16b}, [x22], x9 LD1_asisdlsep_R3_r3 (b'\xDE\x62\xC9\x4C', 'LLIL_SET_REG.b(v30.b[0],LLIL_LOAD.b(LLIL_REG.q(x22)));' + \ - ' LLIL_SET_REG.b(v31.b[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1))));' + \ - ' LLIL_SET_REG.b(v0.h[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.b(v30.b[1],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x3))));' + \ - ' LLIL_SET_REG.b(v31.b[1],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.b(v0.h[1],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x5))));' + \ - ' LLIL_SET_REG.b(v30.b[2],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x6))));' + \ - ' LLIL_SET_REG.b(v31.b[2],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x7))));' + \ - ' LLIL_SET_REG.b(v0.h[2],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x8))));' + \ - ' LLIL_SET_REG.b(v30.b[3],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x9))));' + \ - ' LLIL_SET_REG.b(v31.b[3],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xA))));' + \ - ' LLIL_SET_REG.b(v0.h[3],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xB))));' + \ - ' LLIL_SET_REG.b(v30.b[4],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xC))));' + \ - ' LLIL_SET_REG.b(v31.b[4],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xD))));' + \ - ' LLIL_SET_REG.b(v0.h[4],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xE))));' + \ - ' LLIL_SET_REG.b(v30.b[5],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xF))));' + \ - ' LLIL_SET_REG.b(v31.b[5],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x10))));' + \ - ' LLIL_SET_REG.b(v0.h[5],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x11))));' + \ - ' LLIL_SET_REG.b(v30.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x12))));' + \ - ' LLIL_SET_REG.b(v31.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x13))));' + \ - ' LLIL_SET_REG.b(v0.h[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x14))));' + \ - ' LLIL_SET_REG.b(v30.b[7],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x15))));' + \ - ' LLIL_SET_REG.b(v31.b[7],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x16))));' + \ - ' LLIL_SET_REG.b(v0.h[7],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x17))));' + \ - ' LLIL_SET_REG.b(v30.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x18))));' + \ - ' LLIL_SET_REG.b(v31.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x19))));' + \ - ' LLIL_SET_REG.b(v1.h[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1A))));' + \ - ' LLIL_SET_REG.b(v30.b[9],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1B))));' + \ - ' LLIL_SET_REG.b(v31.b[9],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1C))));' + \ - ' LLIL_SET_REG.b(v1.h[1],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1D))));' + \ - ' LLIL_SET_REG.b(v30.b[10],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1E))));' + \ - ' LLIL_SET_REG.b(v31.b[10],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1F))));' + \ - ' LLIL_SET_REG.b(v1.h[2],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x20))));' + \ - ' LLIL_SET_REG.b(v30.b[11],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x21))));' + \ - ' LLIL_SET_REG.b(v31.b[11],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x22))));' + \ - ' LLIL_SET_REG.b(v1.h[3],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x23))));' + \ - ' LLIL_SET_REG.b(v30.b[12],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x24))));' + \ - ' LLIL_SET_REG.b(v31.b[12],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x25))));' + \ - ' LLIL_SET_REG.b(v1.h[4],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x26))));' + \ - ' LLIL_SET_REG.b(v30.b[13],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x27))));' + \ - ' LLIL_SET_REG.b(v31.b[13],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x28))));' + \ - ' LLIL_SET_REG.b(v1.h[5],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x29))));' + \ - ' LLIL_SET_REG.b(v30.b[14],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2A))));' + \ - ' LLIL_SET_REG.b(v31.b[14],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2B))));' + \ - ' LLIL_SET_REG.b(v1.h[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2C))));' + \ - ' LLIL_SET_REG.b(v30.b[15],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2D))));' + \ - ' LLIL_SET_REG.b(v31.b[15],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2E))));' + \ - ' LLIL_SET_REG.b(v1.h[7],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2F))));' + \ - ' LLIL_SET_REG.q(x22,LLIL_ADD.q(LLIL_REG.q(x22),LLIL_REG.q(x9)))'), + ' LLIL_SET_REG.b(v31.b[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1))));' + \ + ' LLIL_SET_REG.b(v0.b[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2))));' + \ + ' LLIL_SET_REG.b(v30.b[1],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x3))));' + \ + ' LLIL_SET_REG.b(v31.b[1],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x4))));' + \ + ' LLIL_SET_REG.b(v0.b[1],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x5))));' + \ + ' LLIL_SET_REG.b(v30.b[2],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x6))));' + \ + ' LLIL_SET_REG.b(v31.b[2],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x7))));' + \ + ' LLIL_SET_REG.b(v0.b[2],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x8))));' + \ + ' LLIL_SET_REG.b(v30.b[3],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x9))));' + \ + ' LLIL_SET_REG.b(v31.b[3],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xA))));' + \ + ' LLIL_SET_REG.b(v0.b[3],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xB))));' + \ + ' LLIL_SET_REG.b(v30.b[4],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xC))));' + \ + ' LLIL_SET_REG.b(v31.b[4],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xD))));' + \ + ' LLIL_SET_REG.b(v0.b[4],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xE))));' + \ + ' LLIL_SET_REG.b(v30.b[5],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0xF))));' + \ + ' LLIL_SET_REG.b(v31.b[5],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x10))));' + \ + ' LLIL_SET_REG.b(v0.b[5],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x11))));' + \ + ' LLIL_SET_REG.b(v30.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x12))));' + \ + ' LLIL_SET_REG.b(v31.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x13))));' + \ + ' LLIL_SET_REG.b(v0.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x14))));' + \ + ' LLIL_SET_REG.b(v30.b[7],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x15))));' + \ + ' LLIL_SET_REG.b(v31.b[7],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x16))));' + \ + ' LLIL_SET_REG.b(v0.b[7],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x17))));' + \ + ' LLIL_SET_REG.b(v30.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x18))));' + \ + ' LLIL_SET_REG.b(v31.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x19))));' + \ + ' LLIL_SET_REG.b(v0.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1A))));' + \ + ' LLIL_SET_REG.b(v30.b[9],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1B))));' + \ + ' LLIL_SET_REG.b(v31.b[9],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1C))));' + \ + ' LLIL_SET_REG.b(v0.b[9],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1D))));' + \ + ' LLIL_SET_REG.b(v30.b[10],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1E))));' + \ + ' LLIL_SET_REG.b(v31.b[10],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1F))));' + \ + ' LLIL_SET_REG.b(v0.b[10],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x20))));' + \ + ' LLIL_SET_REG.b(v30.b[11],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x21))));' + \ + ' LLIL_SET_REG.b(v31.b[11],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x22))));' + \ + ' LLIL_SET_REG.b(v0.b[11],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x23))));' + \ + ' LLIL_SET_REG.b(v30.b[12],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x24))));' + \ + ' LLIL_SET_REG.b(v31.b[12],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x25))));' + \ + ' LLIL_SET_REG.b(v0.b[12],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x26))));' + \ + ' LLIL_SET_REG.b(v30.b[13],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x27))));' + \ + ' LLIL_SET_REG.b(v31.b[13],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x28))));' + \ + ' LLIL_SET_REG.b(v0.b[13],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x29))));' + \ + ' LLIL_SET_REG.b(v30.b[14],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2A))));' + \ + ' LLIL_SET_REG.b(v31.b[14],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2B))));' + \ + ' LLIL_SET_REG.b(v0.b[14],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2C))));' + \ + ' LLIL_SET_REG.b(v30.b[15],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2D))));' + \ + ' LLIL_SET_REG.b(v31.b[15],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2E))));' + \ + ' LLIL_SET_REG.b(v0.b[15],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x2F))));' + \ + ' LLIL_SET_REG.q(x22,LLIL_ADD.q(LLIL_REG.q(x22),LLIL_REG.q(x9)))'), # ld1 {v30.2d, v31.2d, v0.2d}, [fp], x19 LD1_asisdlsep_R3_r3 (b'\xBE\x6F\xD3\x4C', 'LLIL_SET_REG.q(v30.d[0],LLIL_LOAD.q(LLIL_REG.q(fp)));' + \ - ' LLIL_SET_REG.q(v31.d[0],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x8))));' + \ - ' LLIL_SET_REG.q(z0,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x10))));' + \ - ' LLIL_SET_REG.q(v30.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x18))));' + \ - ' LLIL_SET_REG.q(v31.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x20))));' + \ - ' LLIL_SET_REG.q(z1,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x28))));' + \ - ' LLIL_SET_REG.q(fp,LLIL_ADD.q(LLIL_REG.q(fp),LLIL_REG.q(x19)))'), + ' LLIL_SET_REG.q(v31.d[0],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x8))));' + \ + ' LLIL_SET_REG.q(v0.d[0],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x10))));' + \ + ' LLIL_SET_REG.q(v30.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x18))));' + \ + ' LLIL_SET_REG.q(v31.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x20))));' + \ + ' LLIL_SET_REG.q(v0.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x28))));' + \ + ' LLIL_SET_REG.q(fp,LLIL_ADD.q(LLIL_REG.q(fp),LLIL_REG.q(x19)))'), # ld1 {v22.16b, v23.16b, v24.16b}, [lr], x12 LD1_asisdlsep_R3_r3 (b'\xD6\x63\xCC\x4C', 'LLIL_SET_REG.b(v22.b[0],LLIL_LOAD.b(LLIL_REG.q(lr)));' + \ ' LLIL_SET_REG.b(v23.b[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x1))));' + \ @@ -7150,7 +7325,7 @@ # ld1 {v4.b}[15], [x22], #0x1 LD1_asisdlsop_B1_i1b (b'\xC4\x1E\xDF\x4D', 'LLIL_SET_REG.b(v4.b[15],LLIL_LOAD.b(LLIL_REG.q(x22)));' + \ ' LLIL_SET_REG.q(x22,LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x1)))'), - # ld1 {v5.b}[7], [x26], x29 LD1_asisdlsop_BX1_r1b + # ld1 {v5.b}[7], [x26], fp LD1_asisdlsop_BX1_r1b (b'\x45\x1F\xDD\x0D', 'LLIL_SET_REG.b(v5.b[7],LLIL_LOAD.b(LLIL_REG.q(x26)));' + \ ' LLIL_SET_REG.q(x26,LLIL_ADD.q(LLIL_REG.q(x26),LLIL_REG.q(fp)))'), # ld1 {v5.b}[3], [x8], x10 LD1_asisdlsop_BX1_r1b @@ -7177,7 +7352,7 @@ # ld1 {v18.d}[1], [x24], x13 LD1_asisdlsop_DX1_r1d (b'\x12\x87\xCD\x4D', 'LLIL_SET_REG.q(v18.d[1],LLIL_LOAD.q(LLIL_REG.q(x24)));' + \ ' LLIL_SET_REG.q(x24,LLIL_ADD.q(LLIL_REG.q(x24),LLIL_REG.q(x13)))'), - # ld1 {v25.d}[0], [x14], x29 LD1_asisdlsop_DX1_r1d + # ld1 {v25.d}[0], [x14], fp LD1_asisdlsop_DX1_r1d (b'\xD9\x85\xDD\x0D', 'LLIL_SET_REG.q(v25.d[0],LLIL_LOAD.q(LLIL_REG.q(x14)));' + \ ' LLIL_SET_REG.q(x14,LLIL_ADD.q(LLIL_REG.q(x14),LLIL_REG.q(fp)))'), # ld1 {v24.d}[1], [x13], x14 LD1_asisdlsop_DX1_r1d @@ -7446,7 +7621,7 @@ ' LLIL_SET_REG.d(v1.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x18))));' + \ ' LLIL_SET_REG.d(v2.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x1C))));' + \ ' LLIL_SET_REG.q(x23,LLIL_ADD.q(LLIL_REG.q(x23),LLIL_REG.q(x14)))'), - # ld2 {v7.8h, v8.8h}, [x9], x29 LD2_asisdlsep_R2_r + # ld2 {v7.8h, v8.8h}, [x9], fp LD2_asisdlsep_R2_r (b'\x27\x85\xDD\x4C', 'LLIL_SET_REG.w(v7.h[0],LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ ' LLIL_SET_REG.w(v8.h[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x2))));' + \ ' LLIL_SET_REG.w(v7.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x4))));' + \ @@ -7518,13 +7693,13 @@ ' LLIL_SET_REG.q(v15.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x8))))'), # ld2 {v31.h, v0.h}[2], [x18] LD2_asisdlso_H2_2h (b'\x5F\x52\x60\x0D', 'LLIL_SET_REG.w(v31.h[2],LLIL_LOAD.w(LLIL_REG.q(x18)));' + \ - ' LLIL_SET_REG.w(v0.s[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x2))))'), + ' LLIL_SET_REG.w(v0.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x2))))'), # ld2 {v15.h, v16.h}[7], [x11] LD2_asisdlso_H2_2h (b'\x6F\x59\x60\x4D', 'LLIL_SET_REG.w(v15.h[7],LLIL_LOAD.w(LLIL_REG.q(x11)));' + \ ' LLIL_SET_REG.w(v16.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x2))))'), # ld2 {v31.h, v0.h}[6], [x11] LD2_asisdlso_H2_2h (b'\x7F\x51\x60\x4D', 'LLIL_SET_REG.w(v31.h[6],LLIL_LOAD.w(LLIL_REG.q(x11)));' + \ - ' LLIL_SET_REG.w(v1.s[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x2))))'), + ' LLIL_SET_REG.w(v0.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x2))))'), # ld2 {v20.h, v21.h}[1], [lr] LD2_asisdlso_H2_2h (b'\xD4\x4B\x60\x0D', 'LLIL_SET_REG.w(v20.h[1],LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ ' LLIL_SET_REG.w(v21.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x2))))'), @@ -7868,7 +8043,7 @@ ' LLIL_SET_REG.w(v6.h[3],LLIL_REG.w(temp0));' + \ ' LLIL_SET_REG.w(v7.h[3],LLIL_REG.w(temp0));' + \ ' LLIL_SET_REG.q(x28,LLIL_ADD.q(LLIL_REG.q(x28),LLIL_REG.q(x14)))'), - # ld3r {v11.8h, v12.8h, v13.8h}, [x17], x30 LD3R_asisdlsop_RX3_r + # ld3r {v11.8h, v12.8h, v13.8h}, [x17], lr LD3R_asisdlsop_RX3_r (b'\x2B\xE6\xDE\x4D', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ ' LLIL_SET_REG.w(v11.h[0],LLIL_REG.w(temp0));' + \ ' LLIL_SET_REG.w(v12.h[0],LLIL_REG.w(temp0));' + \ @@ -8084,7 +8259,7 @@ ' LLIL_SET_REG.w(v4.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x14))));' + \ ' LLIL_SET_REG.w(v5.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x16))));' + \ ' LLIL_SET_REG.q(x25,LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x18)))'), - # ld3 {v26.4s, v27.4s, v28.4s}, [x0], x29 LD3_asisdlsep_R3_r + # ld3 {v26.4s, v27.4s, v28.4s}, [x0], fp LD3_asisdlsep_R3_r (b'\x1A\x48\xDD\x4C', 'LLIL_SET_REG.d(v26.s[0],LLIL_LOAD.d(LLIL_REG.q(x0)));' + \ ' LLIL_SET_REG.d(v27.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x0),LLIL_CONST.q(0x4))));' + \ ' LLIL_SET_REG.d(v28.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x0),LLIL_CONST.q(0x8))));' + \ @@ -8176,8 +8351,8 @@ ' LLIL_SET_REG.q(v28.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x10))))'), # ld3 {v31.d, v0.d, v1.d}[1], [x1] LD3_asisdlso_D3_3d (b'\x3F\xA4\x40\x4D', 'LLIL_SET_REG.q(v31.d[1],LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ - ' LLIL_SET_REG.q(z1,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0x8))));' + \ - ' LLIL_SET_REG.q(z3,LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0x10))))'), + ' LLIL_SET_REG.q(v0.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0x8))));' + \ + ' LLIL_SET_REG.q(v1.d[1],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0x10))))'), # ld3 {v18.h, v19.h, v20.h}[7], [x26] LD3_asisdlso_H3_3h (b'\x52\x7B\x40\x4D', 'LLIL_SET_REG.w(v18.h[7],LLIL_LOAD.w(LLIL_REG.q(x26)));' + \ ' LLIL_SET_REG.w(v19.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x26),LLIL_CONST.q(0x2))));' + \ @@ -8204,8 +8379,8 @@ ' LLIL_SET_REG.d(v27.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0x8))))'), # ld3 {v31.s, v0.s, v1.s}[0], [x3] LD3_asisdlso_S3_3s (b'\x7F\xA0\x40\x0D', 'LLIL_SET_REG.d(v31.s[0],LLIL_LOAD.d(LLIL_REG.q(x3)));' + \ - ' LLIL_SET_REG.d(v0.d[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.d(v2.d[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x8))))'), + ' LLIL_SET_REG.d(v0.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x4))));' + \ + ' LLIL_SET_REG.d(v1.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x8))))'), # ld3 {v12.s, v13.s, v14.s}[3], [sp] LD3_asisdlso_S3_3s (b'\xEC\xB3\x40\x4D', 'LLIL_SET_REG.d(v12.s[3],LLIL_LOAD.d(LLIL_REG.q(sp)));' + \ ' LLIL_SET_REG.d(v13.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0x4))));' + \ @@ -8237,19 +8412,19 @@ ' LLIL_SET_REG.q(x23,LLIL_ADD.q(LLIL_REG.q(x23),LLIL_REG.q(x13)))'), # ld3 {v30.b, v31.b, v0.b}[6], [x28], x26 LD3_asisdlsop_BX3_r3b (b'\x9E\x3B\xDA\x0D', 'LLIL_SET_REG.b(v30.b[6],LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ - ' LLIL_SET_REG.b(v31.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x1))));' + \ - ' LLIL_SET_REG.b(v0.h[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.q(x28,LLIL_ADD.q(LLIL_REG.q(x28),LLIL_REG.q(x26)))'), + ' LLIL_SET_REG.b(v31.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x1))));' + \ + ' LLIL_SET_REG.b(v0.b[6],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x2))));' + \ + ' LLIL_SET_REG.q(x28,LLIL_ADD.q(LLIL_REG.q(x28),LLIL_REG.q(x26)))'), # ld3 {v21.b, v22.b, v23.b}[11], [x28], x20 LD3_asisdlsop_BX3_r3b (b'\x95\x2F\xD4\x4D', 'LLIL_SET_REG.b(v21.b[11],LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_SET_REG.b(v22.b[11],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x1))));' + \ ' LLIL_SET_REG.b(v23.b[11],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x2))));' + \ ' LLIL_SET_REG.q(x28,LLIL_ADD.q(LLIL_REG.q(x28),LLIL_REG.q(x20)))'), - # ld3 {v30.b, v31.b, v0.b}[8], [x13], x29 LD3_asisdlsop_BX3_r3b + # ld3 {v30.b, v31.b, v0.b}[8], [x13], fp LD3_asisdlsop_BX3_r3b (b'\xBE\x21\xDD\x4D', 'LLIL_SET_REG.b(v30.b[8],LLIL_LOAD.b(LLIL_REG.q(x13)));' + \ - ' LLIL_SET_REG.b(v31.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x13),LLIL_CONST.q(0x1))));' + \ - ' LLIL_SET_REG.b(v1.h[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x13),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.q(x13,LLIL_ADD.q(LLIL_REG.q(x13),LLIL_REG.q(fp)))'), + ' LLIL_SET_REG.b(v31.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x13),LLIL_CONST.q(0x1))));' + \ + ' LLIL_SET_REG.b(v0.b[8],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x13),LLIL_CONST.q(0x2))));' + \ + ' LLIL_SET_REG.q(x13,LLIL_ADD.q(LLIL_REG.q(x13),LLIL_REG.q(fp)))'), # ld3 {v29.d, v30.d, v31.d}[0], [x9], #0x18 LD3_asisdlsop_D3_i3d (b'\x3D\xA5\xDF\x0D', 'LLIL_SET_REG.q(v29.d[0],LLIL_LOAD.q(LLIL_REG.q(x9)));' + \ ' LLIL_SET_REG.q(v30.d[0],LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x8))));' + \ @@ -8293,19 +8468,19 @@ # ld3 {v16.h, v17.h, v18.h}[7], [x9], #0x6 LD3_asisdlsop_H3_i3h (b'\x30\x79\xDF\x4D', 'LLIL_SET_REG.w(v16.h[7],LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ ' LLIL_SET_REG.w(v17.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.w(v18.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x4))))'), + ' LLIL_SET_REG.w(v18.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x4)))); LLIL_SET_REG.q(x9,LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x6)))'), # ld3 {v24.h, v25.h, v26.h}[7], [x15], #0x6 LD3_asisdlsop_H3_i3h (b'\xF8\x79\xDF\x4D', 'LLIL_SET_REG.w(v24.h[7],LLIL_LOAD.w(LLIL_REG.q(x15)));' + \ ' LLIL_SET_REG.w(v25.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.w(v26.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x4))))'), + ' LLIL_SET_REG.w(v26.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x4)))); LLIL_SET_REG.q(x15,LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x6)))'), # ld3 {v26.h, v27.h, v28.h}[1], [x8], #0x6 LD3_asisdlsop_H3_i3h (b'\x1A\x69\xDF\x0D', 'LLIL_SET_REG.w(v26.h[1],LLIL_LOAD.w(LLIL_REG.q(x8)));' + \ ' LLIL_SET_REG.w(v27.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.w(v28.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x4))))'), + ' LLIL_SET_REG.w(v28.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x4)))); LLIL_SET_REG.q(x8,LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x6)))'), # ld3 {v22.h, v23.h, v24.h}[2], [x4], #0x6 LD3_asisdlsop_H3_i3h (b'\x96\x70\xDF\x0D', 'LLIL_SET_REG.w(v22.h[2],LLIL_LOAD.w(LLIL_REG.q(x4)));' + \ ' LLIL_SET_REG.w(v23.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.w(v24.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x4))))'), + ' LLIL_SET_REG.w(v24.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x4)))); LLIL_SET_REG.q(x4,LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x6)))'), # ld3 {v12.h, v13.h, v14.h}[6], [x16], x15 LD3_asisdlsop_HX3_r3h (b'\x0C\x72\xCF\x4D', 'LLIL_SET_REG.w(v12.h[6],LLIL_LOAD.w(LLIL_REG.q(x16)));' + \ ' LLIL_SET_REG.w(v13.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x16),LLIL_CONST.q(0x2))));' + \ @@ -8321,7 +8496,7 @@ ' LLIL_SET_REG.w(v20.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0x2))));' + \ ' LLIL_SET_REG.w(v21.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x12),LLIL_CONST.q(0x4))));' + \ ' LLIL_SET_REG.q(x12,LLIL_ADD.q(LLIL_REG.q(x12),LLIL_REG.q(x0)))'), - # ld3 {v15.h, v16.h, v17.h}[0], [x2], x29 LD3_asisdlsop_HX3_r3h + # ld3 {v15.h, v16.h, v17.h}[0], [x2], fp LD3_asisdlsop_HX3_r3h (b'\x4F\x60\xDD\x0D', 'LLIL_SET_REG.w(v15.h[0],LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ ' LLIL_SET_REG.w(v16.h[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x2))));' + \ ' LLIL_SET_REG.w(v17.h[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x4))));' + \ @@ -8680,30 +8855,30 @@ ' LLIL_SET_REG.q(x19,LLIL_ADD.q(LLIL_REG.q(x19),LLIL_REG.q(x17)))'), # ld4 {v29.2s, v30.2s, v31.2s, v0.2s}, [x11] LD4_asisdlse_R4 (b'\x7D\x09\x40\x0C', 'LLIL_SET_REG.d(v29.s[0],LLIL_LOAD.d(LLIL_REG.q(x11)));' + \ - ' LLIL_SET_REG.d(v30.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.d(v31.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x8))));' + \ - ' LLIL_SET_REG.d(v0.d[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0xC))));' + \ - ' LLIL_SET_REG.d(v29.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x10))));' + \ - ' LLIL_SET_REG.d(v30.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x14))));' + \ - ' LLIL_SET_REG.d(v31.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x18))));' + \ - ' LLIL_SET_REG.d(v0.d[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x1C))))'), + ' LLIL_SET_REG.d(v30.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x4))));' + \ + ' LLIL_SET_REG.d(v31.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x8))));' + \ + ' LLIL_SET_REG.d(v0.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0xC))));' + \ + ' LLIL_SET_REG.d(v29.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x10))));' + \ + ' LLIL_SET_REG.d(v30.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x14))));' + \ + ' LLIL_SET_REG.d(v31.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x18))));' + \ + ' LLIL_SET_REG.d(v0.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x11),LLIL_CONST.q(0x1C))))'), # ld4 {v31.4h, v0.4h, v1.4h, v2.4h}, [x14] LD4_asisdlse_R4 (b'\xDF\x05\x40\x0C', 'LLIL_SET_REG.w(v31.h[0],LLIL_LOAD.w(LLIL_REG.q(x14)));' + \ - ' LLIL_SET_REG.w(v0.s[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.w(v2.s[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.w(v4.s[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x6))));' + \ - ' LLIL_SET_REG.w(v31.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x8))));' + \ - ' LLIL_SET_REG.w(v0.s[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xA))));' + \ - ' LLIL_SET_REG.w(v2.s[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xC))));' + \ - ' LLIL_SET_REG.w(v4.s[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xE))));' + \ - ' LLIL_SET_REG.w(v31.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x10))));' + \ - ' LLIL_SET_REG.w(v0.s[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x12))));' + \ - ' LLIL_SET_REG.w(v2.s[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x14))));' + \ - ' LLIL_SET_REG.w(v4.s[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x16))));' + \ - ' LLIL_SET_REG.w(v31.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x18))));' + \ - ' LLIL_SET_REG.w(v0.s[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1A))));' + \ - ' LLIL_SET_REG.w(v2.s[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1C))));' + \ - ' LLIL_SET_REG.w(v4.s[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1E))))'), + ' LLIL_SET_REG.w(v0.h[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x2))));' + \ + ' LLIL_SET_REG.w(v1.h[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x4))));' + \ + ' LLIL_SET_REG.w(v2.h[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x6))));' + \ + ' LLIL_SET_REG.w(v31.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x8))));' + \ + ' LLIL_SET_REG.w(v0.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xA))));' + \ + ' LLIL_SET_REG.w(v1.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xC))));' + \ + ' LLIL_SET_REG.w(v2.h[1],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xE))));' + \ + ' LLIL_SET_REG.w(v31.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x10))));' + \ + ' LLIL_SET_REG.w(v0.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x12))));' + \ + ' LLIL_SET_REG.w(v1.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x14))));' + \ + ' LLIL_SET_REG.w(v2.h[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x16))));' + \ + ' LLIL_SET_REG.w(v31.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x18))));' + \ + ' LLIL_SET_REG.w(v0.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1A))));' + \ + ' LLIL_SET_REG.w(v1.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1C))));' + \ + ' LLIL_SET_REG.w(v2.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1E))))'), # ld4 {v17.8h, v18.8h, v19.8h, v20.8h}, [x26] LD4_asisdlse_R4 (b'\x51\x07\x40\x4C', 'LLIL_SET_REG.w(v17.h[0],LLIL_LOAD.w(LLIL_REG.q(x26)));' + \ ' LLIL_SET_REG.w(v18.h[0],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x26),LLIL_CONST.q(0x2))));' + \ @@ -8818,7 +8993,7 @@ ' LLIL_SET_REG.d(v20.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x18))));' + \ ' LLIL_SET_REG.d(v21.s[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x1C))));' + \ ' LLIL_SET_REG.q(x20,LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x20)))'), - # ld4 {v3.8b, v4.8b, v5.8b, v6.8b}, [x1], x29 LD4_asisdlsep_R4_r + # ld4 {v3.8b, v4.8b, v5.8b, v6.8b}, [x1], fp LD4_asisdlsep_R4_r (b'\x23\x00\xDD\x0C', 'LLIL_SET_REG.b(v3.b[0],LLIL_LOAD.b(LLIL_REG.q(x1)));' + \ ' LLIL_SET_REG.b(v4.b[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1))));' + \ ' LLIL_SET_REG.b(v5.b[0],LLIL_LOAD.b(LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0x2))));' + \ @@ -8944,9 +9119,9 @@ ' LLIL_SET_REG.w(v14.h[3],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x6))))'), # ld4 {v29.s, v30.s, v31.s, v0.s}[3], [x19] LD4_asisdlso_S4_4s (b'\x7D\xB2\x60\x4D', 'LLIL_SET_REG.d(v29.s[3],LLIL_LOAD.d(LLIL_REG.q(x19)));' + \ - ' LLIL_SET_REG.d(v30.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.d(v31.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x8))));' + \ - ' LLIL_SET_REG.d(v1.d[1],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0xC))))'), + ' LLIL_SET_REG.d(v30.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x4))));' + \ + ' LLIL_SET_REG.d(v31.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x8))));' + \ + ' LLIL_SET_REG.d(v0.s[3],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0xC))))'), # ld4 {v25.s, v26.s, v27.s, v28.s}[0], [x18] LD4_asisdlso_S4_4s (b'\x59\xA2\x60\x0D', 'LLIL_SET_REG.d(v25.s[0],LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ ' LLIL_SET_REG.d(v26.s[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x4))));' + \ @@ -9060,10 +9235,10 @@ ' LLIL_SET_REG.q(fp,LLIL_ADD.q(LLIL_REG.q(fp),LLIL_REG.q(x18)))'), # ld4 {v29.h, v30.h, v31.h, v0.h}[6], [lr], #0x8 LD4_asisdlsop_H4_i4h (b'\xDD\x73\xFF\x4D', 'LLIL_SET_REG.w(v29.h[6],LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ - ' LLIL_SET_REG.w(v30.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x2))));' + \ - ' LLIL_SET_REG.w(v31.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.w(v1.s[2],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x6))));' + \ - ' LLIL_SET_REG.q(lr,LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x8)))'), + ' LLIL_SET_REG.w(v30.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x2))));' + \ + ' LLIL_SET_REG.w(v31.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x4))));' + \ + ' LLIL_SET_REG.w(v0.h[6],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x6))));' + \ + ' LLIL_SET_REG.q(lr,LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x8)))'), # ld4 {v2.h, v3.h, v4.h, v5.h}[7], [sp], #0x8 LD4_asisdlsop_H4_i4h (b'\xE2\x7B\xFF\x4D', 'LLIL_SET_REG.w(v2.h[7],LLIL_LOAD.w(LLIL_REG.q(sp)));' + \ ' LLIL_SET_REG.w(v3.h[7],LLIL_LOAD.w(LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0x2))));' + \ @@ -9150,10 +9325,10 @@ ' LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_REG.q(x17)))'), # ld4 {v29.s, v30.s, v31.s, v0.s}[2], [x7], x28 LD4_asisdlsop_SX4_r4s (b'\xFD\xA0\xFC\x4D', 'LLIL_SET_REG.d(v29.s[2],LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ - ' LLIL_SET_REG.d(v30.s[2],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x4))));' + \ - ' LLIL_SET_REG.d(v31.s[2],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x8))));' + \ - ' LLIL_SET_REG.d(v1.d[0],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0xC))));' + \ - ' LLIL_SET_REG.q(x7,LLIL_ADD.q(LLIL_REG.q(x7),LLIL_REG.q(x28)))'), + ' LLIL_SET_REG.d(v30.s[2],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x4))));' + \ + ' LLIL_SET_REG.d(v31.s[2],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x8))));' + \ + ' LLIL_SET_REG.d(v0.s[2],LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0xC))));' + \ + ' LLIL_SET_REG.q(x7,LLIL_ADD.q(LLIL_REG.q(x7),LLIL_REG.q(x28)))'), # st1 {v3.2s}, [x27] ST1_asisdlse_R1_1v (b'\x63\x7B\x00\x0C', 'LLIL_STORE.d(LLIL_REG.q(x27),LLIL_REG.d(v3.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x4)),LLIL_REG.d(v3.s[1]))'), @@ -9259,17 +9434,17 @@ ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x28)),LLIL_REG.q(v16.d[1]))'), # st1 {v30.4h, v31.4h, v0.4h}, [lr] ST1_asisdlse_R3_3v (b'\xDE\x67\x00\x0C', 'LLIL_STORE.w(LLIL_REG.q(lr),LLIL_REG.w(v30.h[0]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x2)),LLIL_REG.w(v31.h[0]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x4)),LLIL_REG.w(v0.s[0]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x6)),LLIL_REG.w(v30.h[1]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x8)),LLIL_REG.w(v31.h[1]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0xA)),LLIL_REG.w(v0.s[1]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0xC)),LLIL_REG.w(v30.h[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0xE)),LLIL_REG.w(v31.h[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x10)),LLIL_REG.w(v0.s[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x12)),LLIL_REG.w(v30.h[3]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x14)),LLIL_REG.w(v31.h[3]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x16)),LLIL_REG.w(v0.s[3]))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x2)),LLIL_REG.w(v31.h[0]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x4)),LLIL_REG.w(v0.h[0]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x6)),LLIL_REG.w(v30.h[1]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x8)),LLIL_REG.w(v31.h[1]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0xA)),LLIL_REG.w(v0.h[1]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0xC)),LLIL_REG.w(v30.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0xE)),LLIL_REG.w(v31.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x10)),LLIL_REG.w(v0.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x12)),LLIL_REG.w(v30.h[3]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x14)),LLIL_REG.w(v31.h[3]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x16)),LLIL_REG.w(v0.h[3]))'), # st1 {v1.2d, v2.2d, v3.2d, v4.2d}, [lr] ST1_asisdlse_R4_4v (b'\xC1\x2F\x00\x4C', 'LLIL_STORE.q(LLIL_REG.q(lr),LLIL_REG.q(v1.d[0]));' + \ ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_CONST.q(0x8)),LLIL_REG.q(v2.d[0]));' + \ @@ -9298,13 +9473,13 @@ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x13),LLIL_CONST.q(0x3C)),LLIL_REG.d(v29.s[3]))'), # st1 {v30.2s, v31.2s, v0.2s, v1.2s}, [x14] ST1_asisdlse_R4_4v (b'\xDE\x29\x00\x0C', 'LLIL_STORE.d(LLIL_REG.q(x14),LLIL_REG.d(v30.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x4)),LLIL_REG.d(v31.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x8)),LLIL_REG.d(v0.d[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xC)),LLIL_REG.d(v2.d[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x10)),LLIL_REG.d(v30.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x14)),LLIL_REG.d(v31.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x18)),LLIL_REG.d(v0.d[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1C)),LLIL_REG.d(v2.d[1]))'), + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x4)),LLIL_REG.d(v31.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x8)),LLIL_REG.d(v0.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0xC)),LLIL_REG.d(v1.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x10)),LLIL_REG.d(v30.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x14)),LLIL_REG.d(v31.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x18)),LLIL_REG.d(v0.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_CONST.q(0x1C)),LLIL_REG.d(v1.s[1]))'), # st1 {v13.2s, v14.2s, v15.2s, v16.2s}, [x2] ST1_asisdlse_R4_4v (b'\x4D\x28\x00\x0C', 'LLIL_STORE.d(LLIL_REG.q(x2),LLIL_REG.d(v13.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x4)),LLIL_REG.d(v14.s[0]));' + \ @@ -9316,10 +9491,10 @@ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x1C)),LLIL_REG.d(v16.s[1]))'), # st1 {v5.2d}, [x10], #0x10 ST1_asisdlsep_I1_i1 (b'\x45\x7D\x9F\x4C', 'LLIL_STORE.q(LLIL_REG.q(x10),LLIL_REG.q(v5.d[0]));' + \ - ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x10),LLIL_CONST.q(0x8)),LLIL_REG.q(v5.d[1]))'), + ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x10),LLIL_CONST.q(0x8)),LLIL_REG.q(v5.d[1])); LLIL_SET_REG.q(x10,LLIL_ADD.q(LLIL_REG.q(x10),LLIL_CONST.q(0x10)))'), # st1 {v20.2d}, [x5], #0x10 ST1_asisdlsep_I1_i1 (b'\xB4\x7C\x9F\x4C', 'LLIL_STORE.q(LLIL_REG.q(x5),LLIL_REG.q(v20.d[0]));' + \ - ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x8)),LLIL_REG.q(v20.d[1]))'), + ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x8)),LLIL_REG.q(v20.d[1])); LLIL_SET_REG.q(x5,LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x10)))'), # st1 {v0.8b}, [x3], #0x8 ST1_asisdlsep_I1_i1 (b'\x60\x70\x9F\x0C', 'LLIL_STORE.b(LLIL_REG.q(x3),LLIL_REG.b(v0.b[0]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x1)),LLIL_REG.b(v0.b[1]));' + \ @@ -9328,9 +9503,10 @@ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x4)),LLIL_REG.b(v0.b[4]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x5)),LLIL_REG.b(v0.b[5]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x6)),LLIL_REG.b(v0.b[6]));' + \ - ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x7)),LLIL_REG.b(v0.b[7]))'), + ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x7)),LLIL_REG.b(v0.b[7])); LLIL_SET_REG.q(x3,LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x8)))'), # st1 {v1.1d}, [x21], #0x8 ST1_asisdlsep_I1_i1 - (b'\xA1\x7E\x9F\x0C', 'LLIL_STORE.q(LLIL_REG.q(x21),LLIL_REG.q(v1.d[0]))'), + (b'\xA1\x7E\x9F\x0C', 'LLIL_STORE.q(LLIL_REG.q(x21),LLIL_REG.q(v1.d[0]));' + \ + ' LLIL_SET_REG.q(x21,LLIL_ADD.q(LLIL_REG.q(x21),LLIL_CONST.q(0x8)))'), # st1 {v26.2s, v27.2s}, [x0], #0x10 ST1_asisdlsep_I2_i2 (b'\x1A\xA8\x9F\x0C', 'LLIL_STORE.d(LLIL_REG.q(x0),LLIL_REG.d(v26.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x0),LLIL_CONST.q(0x4)),LLIL_REG.d(v27.s[0]));' + \ @@ -9353,10 +9529,10 @@ ' LLIL_SET_REG.q(x18,LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x10)))'), # st1 {v31.2s, v0.2s}, [x7], #0x10 ST1_asisdlsep_I2_i2 (b'\xFF\xA8\x9F\x0C', 'LLIL_STORE.d(LLIL_REG.q(x7),LLIL_REG.d(v31.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x4)),LLIL_REG.d(v0.d[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x8)),LLIL_REG.d(v31.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0xC)),LLIL_REG.d(v0.d[1]));' + \ - ' LLIL_SET_REG.q(x7,LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x10)))'), + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x4)),LLIL_REG.d(v0.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x8)),LLIL_REG.d(v31.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0xC)),LLIL_REG.d(v0.s[1]));' + \ + ' LLIL_SET_REG.q(x7,LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x10)))'), # st1 {v26.4s, v27.4s, v28.4s}, [x4], #0x30 ST1_asisdlsep_I3_i3 (b'\x9A\x68\x9F\x4C', 'LLIL_STORE.d(LLIL_REG.q(x4),LLIL_REG.d(v26.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x4)),LLIL_REG.d(v27.s[0]));' + \ @@ -10009,7 +10185,7 @@ (b'\x0D\x0B\xAA\x0D', 'LLIL_STORE.b(LLIL_REG.q(x24),LLIL_REG.b(v13.b[2]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x24),LLIL_CONST.q(0x1)),LLIL_REG.b(v14.b[2]));' + \ ' LLIL_SET_REG.q(x24,LLIL_ADD.q(LLIL_REG.q(x24),LLIL_REG.q(x10)))'), - # st2 {v5.b, v6.b}[10], [x4], x29 ST2_asisdlsop_BX2_r2b + # st2 {v5.b, v6.b}[10], [x4], fp ST2_asisdlsop_BX2_r2b (b'\x85\x08\xBD\x4D', 'LLIL_STORE.b(LLIL_REG.q(x4),LLIL_REG.b(v5.b[10]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x1)),LLIL_REG.b(v6.b[10]));' + \ ' LLIL_SET_REG.q(x4,LLIL_ADD.q(LLIL_REG.q(x4),LLIL_REG.q(fp)))'), @@ -10073,7 +10249,7 @@ (b'\x60\x48\xB5\x0D', 'LLIL_STORE.w(LLIL_REG.q(x3),LLIL_REG.w(v0.h[1]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x2)),LLIL_REG.w(v1.h[1]));' + \ ' LLIL_SET_REG.q(x3,LLIL_ADD.q(LLIL_REG.q(x3),LLIL_REG.q(x21)))'), - # st2 {v30.h, v31.h}[2], [x3], x29 ST2_asisdlsop_HX2_r2h + # st2 {v30.h, v31.h}[2], [x3], fp ST2_asisdlsop_HX2_r2h (b'\x7E\x50\xBD\x0D', 'LLIL_STORE.w(LLIL_REG.q(x3),LLIL_REG.w(v30.h[2]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x3),LLIL_CONST.q(0x2)),LLIL_REG.w(v31.h[2]));' + \ ' LLIL_SET_REG.q(x3,LLIL_ADD.q(LLIL_REG.q(x3),LLIL_REG.q(fp)))'), @@ -10122,11 +10298,11 @@ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x14)),LLIL_REG.d(v4.s[1]))'), # st3 {v30.2s, v31.2s, v0.2s}, [x4] ST3_asisdlse_R3 (b'\x9E\x48\x00\x0C', 'LLIL_STORE.d(LLIL_REG.q(x4),LLIL_REG.d(v30.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x4)),LLIL_REG.d(v31.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x8)),LLIL_REG.d(v0.d[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0xC)),LLIL_REG.d(v30.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x10)),LLIL_REG.d(v31.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x14)),LLIL_REG.d(v0.d[1]))'), + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x4)),LLIL_REG.d(v31.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x8)),LLIL_REG.d(v0.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0xC)),LLIL_REG.d(v30.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x10)),LLIL_REG.d(v31.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x14)),LLIL_REG.d(v0.s[1]))'), # st3 {v3.4s, v4.4s, v5.4s}, [x8] ST3_asisdlse_R3 (b'\x03\x49\x00\x4C', 'LLIL_STORE.d(LLIL_REG.q(x8),LLIL_REG.d(v3.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x4)),LLIL_REG.d(v4.s[0]));' + \ @@ -10195,12 +10371,12 @@ ' LLIL_SET_REG.q(fp,LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x18)))'), # st3 {v30.2s, v31.2s, v0.2s}, [x5], #0x18 ST3_asisdlsep_I3_i (b'\xBE\x48\x9F\x0C', 'LLIL_STORE.d(LLIL_REG.q(x5),LLIL_REG.d(v30.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x4)),LLIL_REG.d(v31.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x8)),LLIL_REG.d(v0.d[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0xC)),LLIL_REG.d(v30.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x10)),LLIL_REG.d(v31.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x14)),LLIL_REG.d(v0.d[1]));' + \ - ' LLIL_SET_REG.q(x5,LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x18)))'), + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x4)),LLIL_REG.d(v31.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x8)),LLIL_REG.d(v0.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0xC)),LLIL_REG.d(v30.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x10)),LLIL_REG.d(v31.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x14)),LLIL_REG.d(v0.s[1]));' + \ + ' LLIL_SET_REG.q(x5,LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x18)))'), # st3 {v23.4s, v24.4s, v25.4s}, [x19], #0x30 ST3_asisdlsep_I3_i (b'\x77\x4A\x9F\x4C', 'LLIL_STORE.d(LLIL_REG.q(x19),LLIL_REG.d(v23.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x4)),LLIL_REG.d(v24.s[0]));' + \ @@ -10265,7 +10441,7 @@ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x2E)),LLIL_REG.b(v24.b[15]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x2F)),LLIL_REG.b(v25.b[15]));' + \ ' LLIL_SET_REG.q(x27,LLIL_ADD.q(LLIL_REG.q(x27),LLIL_REG.q(x25)))'), - # st3 {v14.4s, v15.4s, v16.4s}, [x18], x30 ST3_asisdlsep_R3_r + # st3 {v14.4s, v15.4s, v16.4s}, [x18], lr ST3_asisdlsep_R3_r (b'\x4E\x4A\x9E\x4C', 'LLIL_STORE.d(LLIL_REG.q(x18),LLIL_REG.d(v14.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x4)),LLIL_REG.d(v15.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x8)),LLIL_REG.d(v16.s[0]));' + \ @@ -10281,18 +10457,18 @@ ' LLIL_SET_REG.q(x18,LLIL_ADD.q(LLIL_REG.q(x18),LLIL_REG.q(lr)))'), # st3 {v31.4h, v0.4h, v1.4h}, [x15], x8 ST3_asisdlsep_R3_r (b'\xFF\x45\x88\x0C', 'LLIL_STORE.w(LLIL_REG.q(x15),LLIL_REG.w(v31.h[0]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x2)),LLIL_REG.w(v0.s[0]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x4)),LLIL_REG.w(v2.s[0]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x6)),LLIL_REG.w(v31.h[1]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x8)),LLIL_REG.w(v0.s[1]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0xA)),LLIL_REG.w(v2.s[1]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0xC)),LLIL_REG.w(v31.h[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0xE)),LLIL_REG.w(v0.s[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x10)),LLIL_REG.w(v2.s[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x12)),LLIL_REG.w(v31.h[3]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x14)),LLIL_REG.w(v0.s[3]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x16)),LLIL_REG.w(v2.s[3]));' + \ - ' LLIL_SET_REG.q(x15,LLIL_ADD.q(LLIL_REG.q(x15),LLIL_REG.q(x8)))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x2)),LLIL_REG.w(v0.h[0]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x4)),LLIL_REG.w(v1.h[0]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x6)),LLIL_REG.w(v31.h[1]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x8)),LLIL_REG.w(v0.h[1]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0xA)),LLIL_REG.w(v1.h[1]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0xC)),LLIL_REG.w(v31.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0xE)),LLIL_REG.w(v0.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x10)),LLIL_REG.w(v1.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x12)),LLIL_REG.w(v31.h[3]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x14)),LLIL_REG.w(v0.h[3]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x16)),LLIL_REG.w(v1.h[3]));' + \ + ' LLIL_SET_REG.q(x15,LLIL_ADD.q(LLIL_REG.q(x15),LLIL_REG.q(x8)))'), # st3 {v17.4s, v18.4s, v19.4s}, [x26], x17 ST3_asisdlsep_R3_r (b'\x51\x4B\x91\x4C', 'LLIL_STORE.d(LLIL_REG.q(x26),LLIL_REG.d(v17.s[0]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x26),LLIL_CONST.q(0x4)),LLIL_REG.d(v18.s[0]));' + \ @@ -10391,12 +10567,12 @@ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x1)),LLIL_REG.b(v11.b[14]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x2)),LLIL_REG.b(v12.b[14]));' + \ ' LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x3)))'), - # st3 {v19.b, v20.b, v21.b}[6], [x2], x29 ST3_asisdlsop_BX3_r3b + # st3 {v19.b, v20.b, v21.b}[6], [x2], fp ST3_asisdlsop_BX3_r3b (b'\x53\x38\x9D\x0D', 'LLIL_STORE.b(LLIL_REG.q(x2),LLIL_REG.b(v19.b[6]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x1)),LLIL_REG.b(v20.b[6]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x2)),LLIL_REG.b(v21.b[6]));' + \ ' LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_REG.q(fp)))'), - # st3 {v2.b, v3.b, v4.b}[14], [x4], x30 ST3_asisdlsop_BX3_r3b + # st3 {v2.b, v3.b, v4.b}[14], [x4], lr ST3_asisdlsop_BX3_r3b (b'\x82\x38\x9E\x4D', 'LLIL_STORE.b(LLIL_REG.q(x4),LLIL_REG.b(v2.b[14]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x1)),LLIL_REG.b(v3.b[14]));' + \ ' LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x2)),LLIL_REG.b(v4.b[14]));' + \ @@ -10438,9 +10614,9 @@ ' LLIL_SET_REG.q(x24,LLIL_ADD.q(LLIL_REG.q(x24),LLIL_REG.q(x5)))'), # st3 {v31.d, v0.d, v1.d}[1], [x19], x11 ST3_asisdlsop_DX3_r3d (b'\x7F\xA6\x8B\x4D', 'LLIL_STORE.q(LLIL_REG.q(x19),LLIL_REG.q(v31.d[1]));' + \ - ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x8)),LLIL_REG.q(z1));' + \ - ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x10)),LLIL_REG.q(z3));' + \ - ' LLIL_SET_REG.q(x19,LLIL_ADD.q(LLIL_REG.q(x19),LLIL_REG.q(x11)))'), + ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x8)),LLIL_REG.q(v0.d[1]));' + \ + ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x10)),LLIL_REG.q(v1.d[1]));' + \ + ' LLIL_SET_REG.q(x19,LLIL_ADD.q(LLIL_REG.q(x19),LLIL_REG.q(x11)))'), # st3 {v2.d, v3.d, v4.d}[1], [x27], x8 ST3_asisdlsop_DX3_r3d (b'\x62\xA7\x88\x4D', 'LLIL_STORE.q(LLIL_REG.q(x27),LLIL_REG.q(v2.d[1]));' + \ ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x8)),LLIL_REG.q(v3.d[1]));' + \ @@ -10454,19 +10630,19 @@ # st3 {v13.h, v14.h, v15.h}[7], [x28], #0x6 ST3_asisdlsop_H3_i3h (b'\x8D\x7B\x9F\x4D', 'LLIL_STORE.w(LLIL_REG.q(x28),LLIL_REG.w(v13.h[7]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x2)),LLIL_REG.w(v14.h[7]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x4)),LLIL_REG.w(v15.h[7]))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x4)),LLIL_REG.w(v15.h[7])); LLIL_SET_REG.q(x28,LLIL_ADD.q(LLIL_REG.q(x28),LLIL_CONST.q(0x6)))'), # st3 {v11.h, v12.h, v13.h}[7], [x19], #0x6 ST3_asisdlsop_H3_i3h (b'\x6B\x7A\x9F\x4D', 'LLIL_STORE.w(LLIL_REG.q(x19),LLIL_REG.w(v11.h[7]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x2)),LLIL_REG.w(v12.h[7]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x4)),LLIL_REG.w(v13.h[7]))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x4)),LLIL_REG.w(v13.h[7])); LLIL_SET_REG.q(x19,LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x6)))'), # st3 {v15.h, v16.h, v17.h}[0], [x15], #0x6 ST3_asisdlsop_H3_i3h (b'\xEF\x61\x9F\x0D', 'LLIL_STORE.w(LLIL_REG.q(x15),LLIL_REG.w(v15.h[0]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x2)),LLIL_REG.w(v16.h[0]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x4)),LLIL_REG.w(v17.h[0]))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x4)),LLIL_REG.w(v17.h[0])); LLIL_SET_REG.q(x15,LLIL_ADD.q(LLIL_REG.q(x15),LLIL_CONST.q(0x6)))'), # st3 {v9.h, v10.h, v11.h}[5], [x27], #0x6 ST3_asisdlsop_H3_i3h (b'\x69\x6B\x9F\x4D', 'LLIL_STORE.w(LLIL_REG.q(x27),LLIL_REG.w(v9.h[5]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x2)),LLIL_REG.w(v10.h[5]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x4)),LLIL_REG.w(v11.h[5]))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x4)),LLIL_REG.w(v11.h[5])); LLIL_SET_REG.q(x27,LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x6)))'), # st3 {v15.h, v16.h, v17.h}[5], [x6], x28 ST3_asisdlsop_HX3_r3h (b'\xCF\x68\x9C\x4D', 'LLIL_STORE.w(LLIL_REG.q(x6),LLIL_REG.w(v15.h[5]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0x2)),LLIL_REG.w(v16.h[5]));' + \ @@ -10613,22 +10789,22 @@ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x3C)),LLIL_REG.d(v7.s[3]))'), # st4 {v29.4s, v30.4s, v31.4s, v0.4s}, [x18], #0x40 ST4_asisdlsep_I4_i (b'\x5D\x0A\x9F\x4C', 'LLIL_STORE.d(LLIL_REG.q(x18),LLIL_REG.d(v29.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x4)),LLIL_REG.d(v30.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x8)),LLIL_REG.d(v31.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0xC)),LLIL_REG.d(v0.d[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x10)),LLIL_REG.d(v29.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x14)),LLIL_REG.d(v30.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x18)),LLIL_REG.d(v31.s[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x1C)),LLIL_REG.d(v0.d[1]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x20)),LLIL_REG.d(v29.s[2]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x24)),LLIL_REG.d(v30.s[2]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x28)),LLIL_REG.d(v31.s[2]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x2C)),LLIL_REG.d(v1.d[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x30)),LLIL_REG.d(v29.s[3]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x34)),LLIL_REG.d(v30.s[3]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x38)),LLIL_REG.d(v31.s[3]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x3C)),LLIL_REG.d(v1.d[1]));' + \ - ' LLIL_SET_REG.q(x18,LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x40)))'), + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x4)),LLIL_REG.d(v30.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x8)),LLIL_REG.d(v31.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0xC)),LLIL_REG.d(v0.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x10)),LLIL_REG.d(v29.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x14)),LLIL_REG.d(v30.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x18)),LLIL_REG.d(v31.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x1C)),LLIL_REG.d(v0.s[1]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x20)),LLIL_REG.d(v29.s[2]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x24)),LLIL_REG.d(v30.s[2]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x28)),LLIL_REG.d(v31.s[2]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x2C)),LLIL_REG.d(v0.s[2]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x30)),LLIL_REG.d(v29.s[3]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x34)),LLIL_REG.d(v30.s[3]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x38)),LLIL_REG.d(v31.s[3]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x3C)),LLIL_REG.d(v0.s[3]));' + \ + ' LLIL_SET_REG.q(x18,LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x40)))'), # st4 {v3.8h, v4.8h, v5.8h, v6.8h}, [x8], #0x40 ST4_asisdlsep_I4_i (b'\x03\x05\x9F\x4C', 'LLIL_STORE.w(LLIL_REG.q(x8),LLIL_REG.w(v3.h[0]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x2)),LLIL_REG.w(v4.h[0]));' + \ @@ -11023,10 +11199,10 @@ ' LLIL_SET_REG.q(sp,LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0x20)))'), # st4 {v29.d, v30.d, v31.d, v0.d}[0], [x20], #0x20 ST4_asisdlsop_D4_i4d (b'\x9D\xA6\xBF\x0D', 'LLIL_STORE.q(LLIL_REG.q(x20),LLIL_REG.q(v29.d[0]));' + \ - ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x8)),LLIL_REG.q(v30.d[0]));' + \ - ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x10)),LLIL_REG.q(v31.d[0]));' + \ - ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x18)),LLIL_REG.q(z0));' + \ - ' LLIL_SET_REG.q(x20,LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x20)))'), + ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x8)),LLIL_REG.q(v30.d[0]));' + \ + ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x10)),LLIL_REG.q(v31.d[0]));' + \ + ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x18)),LLIL_REG.q(v0.d[0]));' + \ + ' LLIL_SET_REG.q(x20,LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x20)))'), # st4 {v19.d, v20.d, v21.d, v22.d}[1], [x22], x5 ST4_asisdlsop_DX4_r4d (b'\xD3\xA6\xA5\x4D', 'LLIL_STORE.q(LLIL_REG.q(x22),LLIL_REG.q(v19.d[1]));' + \ ' LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x22),LLIL_CONST.q(0x8)),LLIL_REG.q(v20.d[1]));' + \ @@ -11053,16 +11229,16 @@ ' LLIL_SET_REG.q(x16,LLIL_ADD.q(LLIL_REG.q(x16),LLIL_REG.q(x7)))'), # st4 {v29.h, v30.h, v31.h, v0.h}[2], [x23], #0x8 ST4_asisdlsop_H4_i4h (b'\xFD\x72\xBF\x0D', 'LLIL_STORE.w(LLIL_REG.q(x23),LLIL_REG.w(v29.h[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x2)),LLIL_REG.w(v30.h[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x4)),LLIL_REG.w(v31.h[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x6)),LLIL_REG.w(v0.s[2]));' + \ - ' LLIL_SET_REG.q(x23,LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x8)))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x2)),LLIL_REG.w(v30.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x4)),LLIL_REG.w(v31.h[2]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x6)),LLIL_REG.w(v0.h[2]));' + \ + ' LLIL_SET_REG.q(x23,LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x8)))'), # st4 {v30.h, v31.h, v0.h, v1.h}[6], [x25], #0x8 ST4_asisdlsop_H4_i4h (b'\x3E\x73\xBF\x4D', 'LLIL_STORE.w(LLIL_REG.q(x25),LLIL_REG.w(v30.h[6]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x2)),LLIL_REG.w(v31.h[6]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x4)),LLIL_REG.w(v1.s[2]));' + \ - ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x6)),LLIL_REG.w(v3.s[2]));' + \ - ' LLIL_SET_REG.q(x25,LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x8)))'), + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x2)),LLIL_REG.w(v31.h[6]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x4)),LLIL_REG.w(v0.h[6]));' + \ + ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x6)),LLIL_REG.w(v1.h[6]));' + \ + ' LLIL_SET_REG.q(x25,LLIL_ADD.q(LLIL_REG.q(x25),LLIL_CONST.q(0x8)))'), # st4 {v11.h, v12.h, v13.h, v14.h}[7], [sp], #0x8 ST4_asisdlsop_H4_i4h (b'\xEB\x7B\xBF\x4D', 'LLIL_STORE.w(LLIL_REG.q(sp),LLIL_REG.w(v11.h[7]));' + \ ' LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0x2)),LLIL_REG.w(v12.h[7]));' + \ @@ -11107,10 +11283,10 @@ ' LLIL_SET_REG.q(x9,LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x10)))'), # st4 {v29.s, v30.s, v31.s, v0.s}[0], [x17], #0x10 ST4_asisdlsop_S4_i4s (b'\x3D\xA2\xBF\x0D', 'LLIL_STORE.d(LLIL_REG.q(x17),LLIL_REG.d(v29.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x4)),LLIL_REG.d(v30.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x8)),LLIL_REG.d(v31.s[0]));' + \ - ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0xC)),LLIL_REG.d(v0.d[0]));' + \ - ' LLIL_SET_REG.q(x17,LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x10)))'), + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x4)),LLIL_REG.d(v30.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x8)),LLIL_REG.d(v31.s[0]));' + \ + ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0xC)),LLIL_REG.d(v0.s[0]));' + \ + ' LLIL_SET_REG.q(x17,LLIL_ADD.q(LLIL_REG.q(x17),LLIL_CONST.q(0x10)))'), # st4 {v27.s, v28.s, v29.s, v30.s}[1], [x23], #0x10 ST4_asisdlsop_S4_i4s (b'\xFB\xB2\xBF\x0D', 'LLIL_STORE.d(LLIL_REG.q(x23),LLIL_REG.d(v27.s[1]));' + \ ' LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x4)),LLIL_REG.d(v28.s[1]));' + \ @@ -11151,69 +11327,69 @@ tests_tbl = [ # tbl v3.16b, {v13.16b}, v17.16b TBL_asimdtbl_L1_1 - (b'\xA3\x01\x11\x4E', 'LLIL_INTRINSIC([v3],vqtbl1q_s8,[LLIL_REG.o(v13),LLIL_REG.o(v17)])'), + (b'\xA3\x01\x11\x4E', 'LLIL_INTRINSIC([v3],vqtbl1q_u8,[LLIL_REG.o(v13),LLIL_REG.o(v17)])'), # tbl v28.16b, {v5.16b}, v2.16b TBL_asimdtbl_L1_1 - (b'\xBC\x00\x02\x4E', 'LLIL_INTRINSIC([v28],vqtbl1q_s8,[LLIL_REG.o(v5),LLIL_REG.o(v2)])'), + (b'\xBC\x00\x02\x4E', 'LLIL_INTRINSIC([v28],vqtbl1q_u8,[LLIL_REG.o(v5),LLIL_REG.o(v2)])'), # tbl v30.8b, {v14.16b}, v10.8b TBL_asimdtbl_L1_1 - (b'\xDE\x01\x0A\x0E', 'LLIL_INTRINSIC([v30],vtbl1_s8,[LLIL_REG.o(v14),LLIL_REG.o(v10)])'), + (b'\xDE\x01\x0A\x0E', 'LLIL_INTRINSIC([v30],vqtbl1_u8,[LLIL_REG.o(v14),LLIL_REG.o(v10)])'), # tbl v20.16b, {v30.16b}, v26.16b TBL_asimdtbl_L1_1 - (b'\xD4\x03\x1A\x4E', 'LLIL_INTRINSIC([v20],vqtbl1q_s8,[LLIL_REG.o(v30),LLIL_REG.o(v26)])'), + (b'\xD4\x03\x1A\x4E', 'LLIL_INTRINSIC([v20],vqtbl1q_u8,[LLIL_REG.o(v30),LLIL_REG.o(v26)])'), # tbl v5.8b, {v3.16b, v4.16b}, v2.8b TBL_asimdtbl_L2_2 - (b'\x65\x20\x02\x0E', 'LLIL_INTRINSIC([v5],vtbl2_s8,[LLIL_REG.o(v3),LLIL_REG.o(v4),LLIL_REG.o(v2)])'), + (b'\x65\x20\x02\x0E', 'LLIL_INTRINSIC([v5],vqtbl2_u8,[LLIL_REG.o(v3),LLIL_REG.o(v4),LLIL_REG.o(v2)])'), # tbl v13.8b, {v19.16b, v20.16b}, v3.8b TBL_asimdtbl_L2_2 - (b'\x6D\x22\x03\x0E', 'LLIL_INTRINSIC([v13],vtbl2_s8,[LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v3)])'), + (b'\x6D\x22\x03\x0E', 'LLIL_INTRINSIC([v13],vqtbl2_u8,[LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v3)])'), # tbl v1.16b, {v19.16b, v20.16b}, v6.16b TBL_asimdtbl_L2_2 - (b'\x61\x22\x06\x4E', 'LLIL_INTRINSIC([v1],vqtbl2q_s8,[LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v6)])'), + (b'\x61\x22\x06\x4E', 'LLIL_INTRINSIC([v1],vqtbl2q_u8,[LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v6)])'), # tbl v17.8b, {v17.16b, v18.16b}, v20.8b TBL_asimdtbl_L2_2 - (b'\x31\x22\x14\x0E', 'LLIL_INTRINSIC([v17],vtbl2_s8,[LLIL_REG.o(v17),LLIL_REG.o(v18),LLIL_REG.o(v20)])'), + (b'\x31\x22\x14\x0E', 'LLIL_INTRINSIC([v17],vqtbl2_u8,[LLIL_REG.o(v17),LLIL_REG.o(v18),LLIL_REG.o(v20)])'), # tbl v24.8b, {v9.16b, v10.16b, v11.16b}, v7.8b TBL_asimdtbl_L3_3 - (b'\x38\x41\x07\x0E', 'LLIL_INTRINSIC([v24],vtbl3_s8,[LLIL_REG.o(v9),LLIL_REG.o(v10),LLIL_REG.o(v11),LLIL_REG.o(v7)])'), + (b'\x38\x41\x07\x0E', 'LLIL_INTRINSIC([v24],vqtbl3_u8,[LLIL_REG.o(v9),LLIL_REG.o(v10),LLIL_REG.o(v11),LLIL_REG.o(v7)])'), # tbl v13.16b, {v0.16b, v1.16b, v2.16b}, v3.16b TBL_asimdtbl_L3_3 - (b'\x0D\x40\x03\x4E', 'LLIL_INTRINSIC([v13],vqtbl3q_s8,[LLIL_REG.o(v0),LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3)])'), + (b'\x0D\x40\x03\x4E', 'LLIL_INTRINSIC([v13],vqtbl3q_u8,[LLIL_REG.o(v0),LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3)])'), # tbl v1.8b, {v1.16b, v2.16b, v3.16b}, v23.8b TBL_asimdtbl_L3_3 - (b'\x21\x40\x17\x0E', 'LLIL_INTRINSIC([v1],vtbl3_s8,[LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3),LLIL_REG.o(v23)])'), + (b'\x21\x40\x17\x0E', 'LLIL_INTRINSIC([v1],vqtbl3_u8,[LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3),LLIL_REG.o(v23)])'), # tbl v3.16b, {v23.16b, v24.16b, v25.16b}, v6.16b TBL_asimdtbl_L3_3 - (b'\xE3\x42\x06\x4E', 'LLIL_INTRINSIC([v3],vqtbl3q_s8,[LLIL_REG.o(v23),LLIL_REG.o(v24),LLIL_REG.o(v25),LLIL_REG.o(v6)])'), + (b'\xE3\x42\x06\x4E', 'LLIL_INTRINSIC([v3],vqtbl3q_u8,[LLIL_REG.o(v23),LLIL_REG.o(v24),LLIL_REG.o(v25),LLIL_REG.o(v6)])'), # tbl v31.8b, {v31.16b, v0.16b, v1.16b, v2.16b}, v2.8b TBL_asimdtbl_L4_4 - (b'\xFF\x63\x02\x0E', 'LLIL_INTRINSIC([v31],vtbl4_s8,[LLIL_REG.o(v31),LLIL_REG.b(b0),LLIL_REG.b(b1),LLIL_REG.b(b2),LLIL_REG.o(v2)])'), + (b'\xFF\x63\x02\x0E', 'LLIL_INTRINSIC([v31],vqtbl4_u8,[LLIL_REG.o(v31),LLIL_REG.o(v0),LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v2)])'), # tbl v4.16b, {v1.16b, v2.16b, v3.16b, v4.16b}, v29.16b TBL_asimdtbl_L4_4 - (b'\x24\x60\x1D\x4E', 'LLIL_INTRINSIC([v4],vqtbl4q_s8,[LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3),LLIL_REG.o(v4),LLIL_REG.o(v29)])'), + (b'\x24\x60\x1D\x4E', 'LLIL_INTRINSIC([v4],vqtbl4q_u8,[LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3),LLIL_REG.o(v4),LLIL_REG.o(v29)])'), # tbl v12.8b, {v11.16b, v12.16b, v13.16b, v14.16b}, v4.8b TBL_asimdtbl_L4_4 - (b'\x6C\x61\x04\x0E', 'LLIL_INTRINSIC([v12],vtbl4_s8,[LLIL_REG.o(v11),LLIL_REG.o(v12),LLIL_REG.o(v13),LLIL_REG.o(v14),LLIL_REG.o(v4)])'), + (b'\x6C\x61\x04\x0E', 'LLIL_INTRINSIC([v12],vqtbl4_u8,[LLIL_REG.o(v11),LLIL_REG.o(v12),LLIL_REG.o(v13),LLIL_REG.o(v14),LLIL_REG.o(v4)])'), # tbl v6.8b, {v0.16b, v1.16b, v2.16b, v3.16b}, v26.8b TBL_asimdtbl_L4_4 - (b'\x06\x60\x1A\x0E', 'LLIL_INTRINSIC([v6],vtbl4_s8,[LLIL_REG.o(v0),LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3),LLIL_REG.o(v26)])'), + (b'\x06\x60\x1A\x0E', 'LLIL_INTRINSIC([v6],vqtbl4_u8,[LLIL_REG.o(v0),LLIL_REG.o(v1),LLIL_REG.o(v2),LLIL_REG.o(v3),LLIL_REG.o(v26)])'), # tbx v4.8b, {v2.16b}, v6.8b TBX_asimdtbl_L1_1 - (b'\x44\x10\x06\x0E', 'LLIL_INTRINSIC([v4],vtbx1_s8,[LLIL_REG.o(v2),LLIL_REG.o(v6)])'), + (b'\x44\x10\x06\x0E', 'LLIL_INTRINSIC([v4],vqtbx1_u8,[LLIL_REG.o(v4),LLIL_REG.o(v2),LLIL_REG.o(v6)])'), # tbx v27.16b, {v23.16b}, v12.16b TBX_asimdtbl_L1_1 - (b'\xFB\x12\x0C\x4E', 'LLIL_INTRINSIC([v27],vqtbx1q_s8,[LLIL_REG.o(v23),LLIL_REG.o(v12)])'), + (b'\xFB\x12\x0C\x4E', 'LLIL_INTRINSIC([v27],vqtbx1q_u8,[LLIL_REG.o(v27),LLIL_REG.o(v23),LLIL_REG.o(v12)])'), # tbx v8.16b, {v13.16b}, v9.16b TBX_asimdtbl_L1_1 - (b'\xA8\x11\x09\x4E', 'LLIL_INTRINSIC([v8],vqtbx1q_s8,[LLIL_REG.o(v13),LLIL_REG.o(v9)])'), + (b'\xA8\x11\x09\x4E', 'LLIL_INTRINSIC([v8],vqtbx1q_u8,[LLIL_REG.o(v8),LLIL_REG.o(v13),LLIL_REG.o(v9)])'), # tbx v26.16b, {v21.16b}, v25.16b TBX_asimdtbl_L1_1 - (b'\xBA\x12\x19\x4E', 'LLIL_INTRINSIC([v26],vqtbx1q_s8,[LLIL_REG.o(v21),LLIL_REG.o(v25)])'), + (b'\xBA\x12\x19\x4E', 'LLIL_INTRINSIC([v26],vqtbx1q_u8,[LLIL_REG.o(v26),LLIL_REG.o(v21),LLIL_REG.o(v25)])'), # tbx v2.8b, {v19.16b, v20.16b}, v29.8b TBX_asimdtbl_L2_2 - (b'\x62\x32\x1D\x0E', 'LLIL_INTRINSIC([v2],vtbx2_s8,[LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v29)])'), + (b'\x62\x32\x1D\x0E', 'LLIL_INTRINSIC([v2],vqtbx2_u8,[LLIL_REG.o(v2),LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v29)])'), # tbx v19.8b, {v19.16b, v20.16b}, v15.8b TBX_asimdtbl_L2_2 - (b'\x73\x32\x0F\x0E', 'LLIL_INTRINSIC([v19],vtbx2_s8,[LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v15)])'), + (b'\x73\x32\x0F\x0E', 'LLIL_INTRINSIC([v19],vqtbx2_u8,[LLIL_REG.o(v19),LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v15)])'), # tbx v11.8b, {v6.16b, v7.16b}, v6.8b TBX_asimdtbl_L2_2 - (b'\xCB\x30\x06\x0E', 'LLIL_INTRINSIC([v11],vtbx2_s8,[LLIL_REG.o(v6),LLIL_REG.o(v7),LLIL_REG.o(v6)])'), + (b'\xCB\x30\x06\x0E', 'LLIL_INTRINSIC([v11],vqtbx2_u8,[LLIL_REG.o(v11),LLIL_REG.o(v6),LLIL_REG.o(v7),LLIL_REG.o(v6)])'), # tbx v1.16b, {v14.16b, v15.16b}, v10.16b TBX_asimdtbl_L2_2 - (b'\xC1\x31\x0A\x4E', 'LLIL_INTRINSIC([v1],vqtbx2q_s8,[LLIL_REG.o(v14),LLIL_REG.o(v15),LLIL_REG.o(v10)])'), + (b'\xC1\x31\x0A\x4E', 'LLIL_INTRINSIC([v1],vqtbx2q_u8,[LLIL_REG.o(v1),LLIL_REG.o(v14),LLIL_REG.o(v15),LLIL_REG.o(v10)])'), # tbx v25.16b, {v25.16b, v26.16b, v27.16b}, v5.16b TBX_asimdtbl_L3_3 - (b'\x39\x53\x05\x4E', 'LLIL_INTRINSIC([v25],vqtbx3q_s8,[LLIL_REG.o(v25),LLIL_REG.o(v26),LLIL_REG.o(v27),LLIL_REG.o(v5)])'), + (b'\x39\x53\x05\x4E', 'LLIL_INTRINSIC([v25],vqtbx3q_u8,[LLIL_REG.o(v25),LLIL_REG.o(v25),LLIL_REG.o(v26),LLIL_REG.o(v27),LLIL_REG.o(v5)])'), # tbx v8.8b, {v13.16b, v14.16b, v15.16b}, v19.8b TBX_asimdtbl_L3_3 - (b'\xA8\x51\x13\x0E', 'LLIL_INTRINSIC([v8],vtbx3_s8,[LLIL_REG.o(v13),LLIL_REG.o(v14),LLIL_REG.o(v15),LLIL_REG.o(v19)])'), + (b'\xA8\x51\x13\x0E', 'LLIL_INTRINSIC([v8],vqtbx3_u8,[LLIL_REG.o(v8),LLIL_REG.o(v13),LLIL_REG.o(v14),LLIL_REG.o(v15),LLIL_REG.o(v19)])'), # tbx v15.8b, {v16.16b, v17.16b, v18.16b}, v29.8b TBX_asimdtbl_L3_3 - (b'\x0F\x52\x1D\x0E', 'LLIL_INTRINSIC([v15],vtbx3_s8,[LLIL_REG.o(v16),LLIL_REG.o(v17),LLIL_REG.o(v18),LLIL_REG.o(v29)])'), + (b'\x0F\x52\x1D\x0E', 'LLIL_INTRINSIC([v15],vqtbx3_u8,[LLIL_REG.o(v15),LLIL_REG.o(v16),LLIL_REG.o(v17),LLIL_REG.o(v18),LLIL_REG.o(v29)])'), # tbx v9.8b, {v27.16b, v28.16b, v29.16b}, v6.8b TBX_asimdtbl_L3_3 - (b'\x69\x53\x06\x0E', 'LLIL_INTRINSIC([v9],vtbx3_s8,[LLIL_REG.o(v27),LLIL_REG.o(v28),LLIL_REG.o(v29),LLIL_REG.o(v6)])'), + (b'\x69\x53\x06\x0E', 'LLIL_INTRINSIC([v9],vqtbx3_u8,[LLIL_REG.o(v9),LLIL_REG.o(v27),LLIL_REG.o(v28),LLIL_REG.o(v29),LLIL_REG.o(v6)])'), # tbx v5.16b, {v28.16b, v29.16b, v30.16b, v31.16b}, v25.16b TBX_asimdtbl_L4_4 - (b'\x85\x73\x19\x4E', 'LLIL_INTRINSIC([v5],vqtbx4q_s8,[LLIL_REG.o(v28),LLIL_REG.o(v29),LLIL_REG.o(v30),LLIL_REG.o(v31),LLIL_REG.o(v25)])'), + (b'\x85\x73\x19\x4E', 'LLIL_INTRINSIC([v5],vqtbx4q_u8,[LLIL_REG.o(v5),LLIL_REG.o(v28),LLIL_REG.o(v29),LLIL_REG.o(v30),LLIL_REG.o(v31),LLIL_REG.o(v25)])'), # tbx v8.8b, {v29.16b, v30.16b, v31.16b, v0.16b}, v3.8b TBX_asimdtbl_L4_4 - (b'\xA8\x73\x03\x0E', 'LLIL_INTRINSIC([v8],vtbx4_s8,[LLIL_REG.o(v29),LLIL_REG.o(v30),LLIL_REG.o(v31),LLIL_REG.b(b0),LLIL_REG.o(v3)])'), + (b'\xA8\x73\x03\x0E', 'LLIL_INTRINSIC([v8],vqtbx4_u8,[LLIL_REG.o(v8),LLIL_REG.o(v29),LLIL_REG.o(v30),LLIL_REG.o(v31),LLIL_REG.o(v0),LLIL_REG.o(v3)])'), # tbx v14.8b, {v17.16b, v18.16b, v19.16b, v20.16b}, v12.8b TBX_asimdtbl_L4_4 - (b'\x2E\x72\x0C\x0E', 'LLIL_INTRINSIC([v14],vtbx4_s8,[LLIL_REG.o(v17),LLIL_REG.o(v18),LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v12)])'), + (b'\x2E\x72\x0C\x0E', 'LLIL_INTRINSIC([v14],vqtbx4_u8,[LLIL_REG.o(v14),LLIL_REG.o(v17),LLIL_REG.o(v18),LLIL_REG.o(v19),LLIL_REG.o(v20),LLIL_REG.o(v12)])'), # tbx v27.16b, {v13.16b, v14.16b, v15.16b, v16.16b}, v3.16b TBX_asimdtbl_L4_4 - (b'\xBB\x71\x03\x4E', 'LLIL_INTRINSIC([v27],vqtbx4q_s8,[LLIL_REG.o(v13),LLIL_REG.o(v14),LLIL_REG.o(v15),LLIL_REG.o(v16),LLIL_REG.o(v3)])'), + (b'\xBB\x71\x03\x4E', 'LLIL_INTRINSIC([v27],vqtbx4q_u8,[LLIL_REG.o(v27),LLIL_REG.o(v13),LLIL_REG.o(v14),LLIL_REG.o(v15),LLIL_REG.o(v16),LLIL_REG.o(v3)])'), ] tests_cas = [ @@ -11289,7 +11465,7 @@ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_REG_SPLIT.d(w23,w22));' + \ ' LLIL_GOTO(4);' + \ ' LLIL_SET_REG_SPLIT.q(w5,w4,LLIL_REG.q(temp0))'), - # casp x14, x15, x30, xzr, [sp] CASP_CP64_comswappr + # casp x14, x15, lr, xzr, [sp] CASP_CP64_comswappr (b'\xFE\x7F\x2E\x48', 'LLIL_SET_REG.o(temp0,LLIL_LOAD.o(LLIL_REG.q(sp)));' + \ ' LLIL_IF(LLIL_CMP_E.o(LLIL_REG_SPLIT.q(x15,x14),LLIL_REG.o(temp0)),2,4);' + \ ' LLIL_STORE.o(LLIL_REG.q(sp),LLIL_REG_SPLIT.q(xzr,lr));' + \ @@ -11301,7 +11477,7 @@ ' LLIL_STORE.o(LLIL_REG.q(x5),LLIL_REG_SPLIT.q(x3,x2));' + \ ' LLIL_GOTO(4);' + \ ' LLIL_SET_REG_SPLIT.o(x23,x22,LLIL_REG.o(temp0))'), - # casp x30, xzr, x16, x17, [x16] CASP_CP64_comswappr + # casp lr, xzr, x16, x17, [x16] CASP_CP64_comswappr (b'\x10\x7E\x3E\x48', 'LLIL_SET_REG.o(temp0,LLIL_LOAD.o(LLIL_REG.q(x16)));' + \ ' LLIL_IF(LLIL_CMP_E.o(LLIL_REG_SPLIT.q(xzr,lr),LLIL_REG.o(temp0)),2,4);' + \ ' LLIL_STORE.o(LLIL_REG.q(x16),LLIL_REG_SPLIT.q(x17,x16));' + \ @@ -11325,7 +11501,7 @@ ' LLIL_STORE.o(LLIL_REG.q(x19),LLIL_REG_SPLIT.q(x23,x22));' + \ ' LLIL_GOTO(4);' + \ ' LLIL_SET_REG_SPLIT.o(x15,x14,LLIL_REG.o(temp0))'), - # caspal x8, x9, x28, x29, [x20] CASPAL_CP64_comswappr + # caspal x8, x9, x28, fp, [x20] CASPAL_CP64_comswappr (b'\x9C\xFE\x68\x48', 'LLIL_SET_REG.o(temp0,LLIL_LOAD.o(LLIL_REG.q(x20)));' + \ ' LLIL_IF(LLIL_CMP_E.o(LLIL_REG_SPLIT.q(x9,x8),LLIL_REG.o(temp0)),2,4);' + \ ' LLIL_STORE.o(LLIL_REG.q(x20),LLIL_REG_SPLIT.q(fp,x28));' + \ @@ -11349,7 +11525,7 @@ ' LLIL_STORE.o(LLIL_REG.q(x18),LLIL_REG_SPLIT.q(x3,x2));' + \ ' LLIL_GOTO(4);' + \ ' LLIL_SET_REG_SPLIT.o(x27,x26,LLIL_REG.o(temp0))'), - # caspl x2, x3, x28, x29, [x1] CASPL_CP64_comswappr + # caspl x2, x3, x28, fp, [x1] CASPL_CP64_comswappr (b'\x3C\xFC\x22\x48', 'LLIL_SET_REG.o(temp0,LLIL_LOAD.o(LLIL_REG.q(x1)));' + \ ' LLIL_IF(LLIL_CMP_E.o(LLIL_REG_SPLIT.q(x3,x2),LLIL_REG.o(temp0)),2,4);' + \ ' LLIL_STORE.o(LLIL_REG.q(x1),LLIL_REG_SPLIT.q(fp,x28));' + \ @@ -11601,7 +11777,7 @@ ' LLIL_STORE.q(LLIL_REG.q(x26),LLIL_REG.q(x12));' + \ ' LLIL_GOTO(4);' + \ ' LLIL_SET_REG.q(x20,LLIL_REG.q(temp0))'), - # casl x8, x30, [lr] CASL_C64_ldstexcl + # casl x8, lr, [lr] CASL_C64_ldstexcl (b'\xDE\xFF\xA8\xC8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(lr)));' + \ ' LLIL_IF(LLIL_CMP_E.q(LLIL_REG.q(x8),LLIL_REG.q(temp0)),2,4);' + \ ' LLIL_STORE.q(LLIL_REG.q(lr),LLIL_REG.q(lr));' + \ @@ -11667,7 +11843,7 @@ ' LLIL_STORE.q(LLIL_REG.q(x9),LLIL_REG_SPLIT.d(w11,w10));' + \ ' LLIL_GOTO(4);' + \ ' LLIL_SET_REG_SPLIT.q(w9,w8,LLIL_REG.q(temp0))'), - # caspa x30, xzr, x16, x17, [x8] CASPA_CP64_ldstexcl + # caspa lr, xzr, x16, x17, [x8] CASPA_CP64_ldstexcl (b'\x10\x7D\x7E\x48', 'LLIL_SET_REG.o(temp0,LLIL_LOAD.o(LLIL_REG.q(x8)));' + \ ' LLIL_IF(LLIL_CMP_E.o(LLIL_REG_SPLIT.q(xzr,lr),LLIL_REG.o(temp0)),2,4);' + \ ' LLIL_STORE.o(LLIL_REG.q(x8),LLIL_REG_SPLIT.q(x17,x16));' + \ @@ -11814,7 +11990,7 @@ (b'\x1E\x10\xA2\x6E', 'LLIL_INTRINSIC([v30],vaddw_high_u32,[LLIL_REG.o(v0),LLIL_REG.o(v2)])'), # uaddw v13.2d, v7.2d, v25.2s UADDW_asimddiff_W (b'\xED\x10\xB9\x2E', 'LLIL_INTRINSIC([v13],vaddw_u32,[LLIL_REG.o(v7),LLIL_REG.o(v25)])'), - # umulh x2, x10, x29 UMULH_64_dp_3src + # umulh x2, x10, fp UMULH_64_dp_3src (b'\x42\x55\xDD\x9B', 'LLIL_SET_REG.q(x2,LLIL_LOW_PART.q(LLIL_LSR.o(LLIL_MULU_DP.q(LLIL_REG.q(x10),LLIL_REG.q(fp)),LLIL_CONST.b(0x40))))'), # umulh x1, x23, x27 UMULH_64_dp_3src (b'\xE1\x66\xDB\x9B', 'LLIL_SET_REG.q(x1,LLIL_LOW_PART.q(LLIL_LSR.o(LLIL_MULU_DP.q(LLIL_REG.q(x23),LLIL_REG.q(x27)),LLIL_CONST.b(0x40))))'), @@ -11824,7 +12000,7 @@ (b'\x03\x7F\xB0\x9B', 'LLIL_SET_REG.q(x3,LLIL_MULU_DP.q(LLIL_REG.d(w24),LLIL_REG.d(w16)))'), # umull x17, w1, w16 UMULL_UMADDL_64WA_dp_3src (b'\x31\x7C\xB0\x9B', 'LLIL_SET_REG.q(x17,LLIL_MULU_DP.q(LLIL_REG.d(w1),LLIL_REG.d(w16)))'), - # umull x29, w19, w2 UMULL_UMADDL_64WA_dp_3src + # umull fp, w19, w2 UMULL_UMADDL_64WA_dp_3src (b'\x7D\x7E\xA2\x9B', 'LLIL_SET_REG.q(fp,LLIL_MULU_DP.q(LLIL_REG.d(w19),LLIL_REG.d(w2)))'), # umull v27.2d, v28.2s, v8.2s UMULL_asimddiff_L (b'\x9B\xC3\xA8\x2E', 'LLIL_SET_REG.o(v27,LLIL_MULU_DP.o(LLIL_REG.o(v28),LLIL_REG.o(v8)))'), @@ -11861,29 +12037,29 @@ tests_raddhn_rshrn = [ # raddhn2 v20.16b, v7.8h, v13.8h RADDHN_asimddiff_N - (b'\xF4\x40\x2D\x6E', 'LLIL_INTRINSIC([v20],vraddhn_high_u16,[LLIL_REG.o(v7),LLIL_REG.o(v13)])'), + (b'\xF4\x40\x2D\x6E', 'LLIL_INTRINSIC([v20],vraddhn_high_s16,[LLIL_REG.o(v20),LLIL_REG.o(v7),LLIL_REG.o(v13)])'), # raddhn2 v9.16b, v6.8h, v26.8h RADDHN_asimddiff_N - (b'\xC9\x40\x3A\x6E', 'LLIL_INTRINSIC([v9],vraddhn_high_u16,[LLIL_REG.o(v6),LLIL_REG.o(v26)])'), + (b'\xC9\x40\x3A\x6E', 'LLIL_INTRINSIC([v9],vraddhn_high_s16,[LLIL_REG.o(v9),LLIL_REG.o(v6),LLIL_REG.o(v26)])'), # raddhn v28.2s, v10.2d, v19.2d RADDHN_asimddiff_N - (b'\x5C\x41\xB3\x2E', 'LLIL_INTRINSIC([v28],vraddhn_u64,[LLIL_REG.o(v10),LLIL_REG.o(v19)])'), + (b'\x5C\x41\xB3\x2E', 'LLIL_INTRINSIC([v28],vraddhn_s64,[LLIL_REG.o(v10),LLIL_REG.o(v19)])'), # raddhn2 v22.16b, v26.8h, v7.8h RADDHN_asimddiff_N - (b'\x56\x43\x27\x6E', 'LLIL_INTRINSIC([v22],vraddhn_high_u16,[LLIL_REG.o(v26),LLIL_REG.o(v7)])'), + (b'\x56\x43\x27\x6E', 'LLIL_INTRINSIC([v22],vraddhn_high_s16,[LLIL_REG.o(v22),LLIL_REG.o(v26),LLIL_REG.o(v7)])'), # rshrn v8.8b, v11.8h, #0x5 RSHRN_asimdshf_N - (b'\x68\x8D\x0B\x0F', 'LLIL_INTRINSIC([v8],vrshrn_n_u16,[LLIL_REG.o(v11),LLIL_CONST.q(0x5)])'), + (b'\x68\x8D\x0B\x0F', 'LLIL_INTRINSIC([v8],vrshrn_n_s16,[LLIL_REG.o(v11),LLIL_CONST.q(0x5)])'), # rshrn2 v10.8h, v28.4s, #0x6 RSHRN_asimdshf_N - (b'\x8A\x8F\x1A\x4F', 'LLIL_INTRINSIC([v10],vrshrn_high_n_u32,[LLIL_REG.o(v28),LLIL_CONST.q(0x6)])'), + (b'\x8A\x8F\x1A\x4F', 'LLIL_INTRINSIC([v10],vrshrn_high_n_s32,[LLIL_REG.o(v10),LLIL_REG.o(v28),LLIL_CONST.q(0x6)])'), # rshrn2 v13.8h, v12.4s, #0x2 RSHRN_asimdshf_N - (b'\x8D\x8D\x1E\x4F', 'LLIL_INTRINSIC([v13],vrshrn_high_n_u32,[LLIL_REG.o(v12),LLIL_CONST.q(0x2)])'), + (b'\x8D\x8D\x1E\x4F', 'LLIL_INTRINSIC([v13],vrshrn_high_n_s32,[LLIL_REG.o(v13),LLIL_REG.o(v12),LLIL_CONST.q(0x2)])'), # rshrn2 v27.4s, v29.2d, #0x12 RSHRN_asimdshf_N - (b'\xBB\x8F\x2E\x4F', 'LLIL_INTRINSIC([v27],vrshrn_high_n_u64,[LLIL_REG.o(v29),LLIL_CONST.q(0x12)])'), + (b'\xBB\x8F\x2E\x4F', 'LLIL_INTRINSIC([v27],vrshrn_high_n_s64,[LLIL_REG.o(v27),LLIL_REG.o(v29),LLIL_CONST.q(0x12)])'), # sqrshrn2 v11.4s, v13.2d, #0x7 SQRSHRN_asimdshf_N - (b'\xAB\x9D\x39\x4F', 'LLIL_INTRINSIC([v11],vqrshrn_high_n_s64,[LLIL_REG.o(v13),LLIL_CONST.q(0x7)])'), + (b'\xAB\x9D\x39\x4F', 'LLIL_INTRINSIC([v11],vqrshrn_high_n_s64,[LLIL_REG.o(v11),LLIL_REG.o(v13),LLIL_CONST.q(0x7)])'), # sqrshrn2 v10.16b, v6.8h, #0x8 SQRSHRN_asimdshf_N - (b'\xCA\x9C\x08\x4F', 'LLIL_INTRINSIC([v10],vqrshrn_high_n_s16,[LLIL_REG.o(v6),LLIL_CONST.q(0x8)])'), + (b'\xCA\x9C\x08\x4F', 'LLIL_INTRINSIC([v10],vqrshrn_high_n_s16,[LLIL_REG.o(v10),LLIL_REG.o(v6),LLIL_CONST.q(0x8)])'), # sqrshrn v15.8b, v30.8h, #0x8 SQRSHRN_asimdshf_N (b'\xCF\x9F\x08\x0F', 'LLIL_INTRINSIC([v15],vqrshrn_n_s16,[LLIL_REG.o(v30),LLIL_CONST.q(0x8)])'), # sqrshrn2 v18.16b, v16.8h, #0x8 SQRSHRN_asimdshf_N - (b'\x12\x9E\x08\x4F', 'LLIL_INTRINSIC([v18],vqrshrn_high_n_s16,[LLIL_REG.o(v16),LLIL_CONST.q(0x8)])'), + (b'\x12\x9E\x08\x4F', 'LLIL_INTRINSIC([v18],vqrshrn_high_n_s16,[LLIL_REG.o(v18),LLIL_REG.o(v16),LLIL_CONST.q(0x8)])'), # sqrshrn s2, d19, #0x8 SQRSHRN_asisdshf_N (b'\x62\x9E\x38\x5F', 'LLIL_INTRINSIC([s2],vqrshrnd_n_s64,[LLIL_REG.q(d19),LLIL_CONST.q(0x8)])'), # sqrshrn h30, s20, #0x3 SQRSHRN_asisdshf_N @@ -11906,7 +12082,7 @@ (b'\xF1\x03\x07\xFA', 'LLIL_SET_REG.q(x17,LLIL_SBB.q{*}(LLIL_CONST.q(0x0),LLIL_REG.q(x7),LLIL_NOT(LLIL_FLAG(c))))'), # ngcs x19, x24 NGCS_SBCS_64_addsub_carry (b'\xF3\x03\x18\xFA', 'LLIL_SET_REG.q(x19,LLIL_SBB.q{*}(LLIL_CONST.q(0x0),LLIL_REG.q(x24),LLIL_NOT(LLIL_FLAG(c))))'), - # ngcs x3, x29 NGCS_SBCS_64_addsub_carry + # ngcs x3, fp NGCS_SBCS_64_addsub_carry (b'\xE3\x03\x1D\xFA', 'LLIL_SET_REG.q(x3,LLIL_SBB.q{*}(LLIL_CONST.q(0x0),LLIL_REG.q(fp),LLIL_NOT(LLIL_FLAG(c))))'), # ngcs xzr, x13 NGCS_SBCS_64_addsub_carry (b'\xFF\x03\x0D\xFA', 'LLIL_SBB.q{*}(LLIL_CONST.q(0x0),LLIL_REG.q(x13),LLIL_NOT(LLIL_FLAG(c)))'), @@ -11954,7 +12130,7 @@ (b'\x93\x02\x10\xDA', 'LLIL_SET_REG.q(x19,LLIL_SBB.q(LLIL_REG.q(x20),LLIL_REG.q(x16),LLIL_NOT(LLIL_FLAG(c))))'), # sbc x16, x11, x12 SBC_64_addsub_carry (b'\x70\x01\x0C\xDA', 'LLIL_SET_REG.q(x16,LLIL_SBB.q(LLIL_REG.q(x11),LLIL_REG.q(x12),LLIL_NOT(LLIL_FLAG(c))))'), - # sbc x25, x7, x29 SBC_64_addsub_carry + # sbc x25, x7, fp SBC_64_addsub_carry (b'\xF9\x00\x1D\xDA', 'LLIL_SET_REG.q(x25,LLIL_SBB.q(LLIL_REG.q(x7),LLIL_REG.q(fp),LLIL_NOT(LLIL_FLAG(c))))'), # sbc x25, x9, x18 SBC_64_addsub_carry (b'\x39\x01\x12\xDA', 'LLIL_SET_REG.q(x25,LLIL_SBB.q(LLIL_REG.q(x9),LLIL_REG.q(x18),LLIL_NOT(LLIL_FLAG(c))))'), @@ -11971,7 +12147,7 @@ (b'\xA7\x7C\x1A\x13', 'LLIL_SET_REG.d(w7,LLIL_ASR.d(LLIL_REG.d(w5),LLIL_CONST.d(0x1A)))'), # asr x24, x10, #0x21 ASR_SBFM_64M_bitfield (b'\x58\xFD\x61\x93', 'LLIL_SET_REG.q(x24,LLIL_ASR.q(LLIL_REG.q(x10),LLIL_CONST.q(0x21)))'), - # asr x8, x30, #0x3b ASR_SBFM_64M_bitfield + # asr x8, lr, #0x3b ASR_SBFM_64M_bitfield (b'\xC8\xFF\x7B\x93', 'LLIL_SET_REG.q(x8,LLIL_ASR.q(LLIL_REG.q(lr),LLIL_CONST.q(0x3B)))'), # asr x7, x9, #0x33 ASR_SBFM_64M_bitfield (b'\x27\xFD\x73\x93', 'LLIL_SET_REG.q(x7,LLIL_ASR.q(LLIL_REG.q(x9),LLIL_CONST.q(0x33)))'), @@ -12072,7 +12248,7 @@ (b'\x7A\xFD\x3E\x9B', 'LLIL_SET_REG.q(x26,LLIL_NEG.q(LLIL_MULS_DP.d(LLIL_REG.d(w11),LLIL_REG.d(w30))))'), # smnegl x22, w22, w5 SMNEGL_SMSUBL_64WA_dp_3src (b'\xD6\xFE\x25\x9B', 'LLIL_SET_REG.q(x22,LLIL_NEG.q(LLIL_MULS_DP.d(LLIL_REG.d(w22),LLIL_REG.d(w5))))'), - # smsubl x29, w6, w16, x18 SMSUBL_64WA_dp_3src + # smsubl fp, w6, w16, x18 SMSUBL_64WA_dp_3src (b'\xDD\xC8\x30\x9B', 'LLIL_SET_REG.q(fp,LLIL_SUB.q(LLIL_REG.q(x18),LLIL_MULS_DP.d(LLIL_REG.d(w6),LLIL_REG.d(w16))))'), # smsubl x26, w18, w16, x3 SMSUBL_64WA_dp_3src @@ -12107,16 +12283,15 @@ # smull v4.8h, v22.8b, v18.8b SMULL_asimddiff_L (b'\xC4\xC2\x32\x0E', 'LLIL_SET_REG.o(v4,LLIL_MULS_DP.o(LLIL_REG.o(v22),LLIL_REG.o(v18)))'), # smull2 v1.4s, v13.8h, v24.8h SMULL_asimddiff_L - (b'\xA1\xC1\x78\x4E', 'LLIL_INTRINSIC([v1],vmull_s8,[LLIL_REG.o(v13),LLIL_REG.o(v24)])'), + (b'\xA1\xC1\x78\x4E', 'LLIL_INTRINSIC([v1],vmull_high_s16,[LLIL_REG.o(v13),LLIL_REG.o(v24)])'), # smull v6.4s, v3.4h, v31.4h SMULL_asimddiff_L (b'\x66\xC0\x7F\x0E', 'LLIL_SET_REG.o(v6,LLIL_MULS_DP.o(LLIL_REG.o(v3),LLIL_REG.o(v31)))'), # smull2 v16.2d, v31.4s, v20.4s SMULL_asimddiff_L - (b'\xF0\xC3\xB4\x4E', 'LLIL_INTRINSIC([v16],vmull_s16,[LLIL_REG.o(v31),LLIL_REG.o(v20)])'), + (b'\xF0\xC3\xB4\x4E', 'LLIL_INTRINSIC([v16],vmull_high_s32,[LLIL_REG.o(v31),LLIL_REG.o(v20)])'), # smull v6.4s, v8.4h, v12.h[0] SMULL_asimdelem_L (b'\x06\xA1\x4C\x0F', 'LLIL_SET_REG.o(v6,LLIL_MULS_DP.o(LLIL_REG.o(v8),LLIL_REG.o(v12)))'), # smull2 v11.2d, v31.4s, v8.s[1] SMULL_asimdelem_L - (b'\xEB\xA3\xA8\x4F', - 'LLIL_INTRINSIC([v11],vmull_high_laneq_s32,[LLIL_REG.o(v31),LLIL_REG.o(v8),LLIL_CONST.b(0x1)])'), + (b'\xEB\xA3\xA8\x4F', 'LLIL_INTRINSIC([v11],vmull_high_laneq_s32,[LLIL_REG.o(v31),LLIL_REG.o(v8),LLIL_CONST.b(0x1)])'), # smull v11.2d, v3.2s, v19.s[2] SMULL_asimdelem_L (b'\x6B\xA8\x93\x0F', 'LLIL_SET_REG.o(v11,LLIL_MULS_DP.o(LLIL_REG.o(v3),LLIL_REG.o(v19)))'), # smull v27.4s, v0.4h, v7.h[5] SMULL_asimdelem_L @@ -12144,7 +12319,7 @@ # umnegl x15, w13, w17 UMNEGL_UMSUBL_64WA_dp_3src (b'\xAF\xFD\xB1\x9B', 'LLIL_SET_REG.q(x15,LLIL_SUB.q(LLIL_CONST.q(0x0),LLIL_MULU_DP.d(LLIL_REG.d(w13),LLIL_REG.d(w17))))'), - # umsubl x30, w19, w30, x11 UMSUBL_64WA_dp_3src + # umsubl lr, w19, w30, x11 UMSUBL_64WA_dp_3src (b'\x7E\xAE\xBE\x9B', 'LLIL_SET_REG.q(lr,LLIL_SUB.q(LLIL_REG.q(x11),LLIL_MULU_DP.d(LLIL_REG.d(w19),LLIL_REG.d(w30))))'), # umsubl x28, w23, w5, x24 UMSUBL_64WA_dp_3src @@ -12153,10 +12328,10 @@ # umsubl x20, w15, w19, x21 UMSUBL_64WA_dp_3src (b'\xF4\xD5\xB3\x9B', 'LLIL_SET_REG.q(x20,LLIL_SUB.q(LLIL_REG.q(x21),LLIL_MULU_DP.d(LLIL_REG.d(w15),LLIL_REG.d(w19))))'), - # umsubl x16, w8, w21, x30 UMSUBL_64WA_dp_3src + # umsubl x16, w8, w21, lr UMSUBL_64WA_dp_3src (b'\x10\xF9\xB5\x9B', 'LLIL_SET_REG.q(x16,LLIL_SUB.q(LLIL_REG.q(lr),LLIL_MULU_DP.d(LLIL_REG.d(w8),LLIL_REG.d(w21))))'), - # umulh x2, x10, x29 UMULH_64_dp_3src + # umulh x2, x10, fp UMULH_64_dp_3src (b'\x42\x55\xDD\x9B', 'LLIL_SET_REG.q(x2,LLIL_LOW_PART.q(LLIL_LSR.o(LLIL_MULU_DP.q(LLIL_REG.q(x10),LLIL_REG.q(fp)),LLIL_CONST.b(0x40))))'), # umulh x1, x23, x27 UMULH_64_dp_3src @@ -12172,7 +12347,7 @@ (b'\x03\x7F\xB0\x9B', 'LLIL_SET_REG.q(x3,LLIL_MULU_DP.d(LLIL_REG.d(w24),LLIL_REG.d(w16)))'), # umull x17, w1, w16 UMULL_UMADDL_64WA_dp_3src (b'\x31\x7C\xB0\x9B', 'LLIL_SET_REG.q(x17,LLIL_MULU_DP.d(LLIL_REG.d(w1),LLIL_REG.d(w16)))'), - # umull x29, w19, w2 UMULL_UMADDL_64WA_dp_3src + # umull fp, w19, w2 UMULL_UMADDL_64WA_dp_3src (b'\x7D\x7E\xA2\x9B', 'LLIL_SET_REG.q(fp,LLIL_MULU_DP.d(LLIL_REG.d(w19),LLIL_REG.d(w2)))'), # umull x18, w18, w18 UMULL_UMADDL_64WA_dp_3src (b'\x52\x7E\xB2\x9B', 'LLIL_SET_REG.q(x18,LLIL_MULU_DP.d(LLIL_REG.d(w18),LLIL_REG.d(w18)))'), @@ -12185,17 +12360,18 @@ # umull v30.2d, v1.2s, v4.2s UMULL_asimddiff_L (b'\x3E\xC0\xA4\x2E', 'LLIL_SET_REG.o(v30,LLIL_MULU_DP.o(LLIL_REG.o(v1),LLIL_REG.o(v4)))'), # umull2 v26.2d, v6.4s, v5.s[0] UMULL_asimdelem_L - (b'\xDA\xA0\x85\x6F', - 'LLIL_INTRINSIC([v26],vmull_high_laneq_u32,[LLIL_REG.o(v6),LLIL_REG.o(v5),LLIL_CONST.b(0x0)])'), + (b'\xDA\xA0\x85\x6F', 'LLIL_INTRINSIC([v26],vmull_high_laneq_u32,[LLIL_REG.o(v6),LLIL_REG.o(v5),LLIL_CONST.b(0x0)])'), # umull2 v19.2d, v29.4s, v18.s[1] UMULL_asimdelem_L - (b'\xB3\xA3\xB2\x6F', - 'LLIL_INTRINSIC([v19],vmull_high_laneq_u32,[LLIL_REG.o(v29),LLIL_REG.o(v18),LLIL_CONST.b(0x1)])'), + (b'\xB3\xA3\xB2\x6F', 'LLIL_INTRINSIC([v19],vmull_high_laneq_u32,[LLIL_REG.o(v29),LLIL_REG.o(v18),LLIL_CONST.b(0x1)])'), # umull2 v3.2d, v15.4s, v14.s[2] UMULL_asimdelem_L (b'\xE3\xA9\x8E\x6F', 'LLIL_INTRINSIC([v3],vmull_high_laneq_u32,[LLIL_REG.o(v15),LLIL_REG.o(v14),LLIL_CONST.b(0x2)])'), # umull2 v23.2d, v12.4s, v26.s[1] UMULL_asimdelem_L - (b'\x97\xA1\xBA\x6F', - 'LLIL_INTRINSIC([v23],vmull_high_laneq_u32,[LLIL_REG.o(v12),LLIL_REG.o(v26),LLIL_CONST.b(0x1)])'), + (b'\x97\xA1\xBA\x6F', 'LLIL_INTRINSIC([v23],vmull_high_laneq_u32,[LLIL_REG.o(v12),LLIL_REG.o(v26),LLIL_CONST.b(0x1)])'), + # sqdmulh s29, s11, v1.s[0] SQDMULH_asisdelem_R + (b'\x7D\xC1\x81\x5F', 'LLIL_INTRINSIC([s29],vqdmulhs_laneq_s32,[LLIL_REG.d(s11),LLIL_REG.o(v1),LLIL_CONST.b(0x0)])'), + # sqdmulh s29, s11, v1.s[3] SQDMULH_asisdelem_R + (b'\x7D\xC9\xA1\x5F', 'LLIL_INTRINSIC([s29],vqdmulhs_laneq_s32,[LLIL_REG.d(s11),LLIL_REG.o(v1),LLIL_CONST.b(0x3)])'), ] tests_ldrsw = [ @@ -12203,6 +12379,21 @@ ] tests_grab_bag = [ + # add, sub, cmp and cmn apply the immediate's shift, lsl #0xc scaling it by 0x1000 + # add x0, x1, #0x1, lsl #0xc + (b'\x20\x04\x40\x91', 'LLIL_SET_REG.q(x0,LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1000)))'), + # sub w0, w1, #0x4, lsl #0xc + (b'\x20\x10\x40\x51', 'LLIL_SET_REG.d(w0,LLIL_SUB.d(LLIL_REG.d(w1),LLIL_CONST.d(0x4000)))'), + # cmp w23, #0x4, lsl #0xc + (b'\xFF\x12\x40\x71', 'LLIL_SUB.d{*}(LLIL_REG.d(w23),LLIL_CONST.d(0x4000))'), + # cmn x8, #0xc20, lsl #0xc + (b'\x1F\x81\x70\xB1', 'LLIL_ADD.q{*}(LLIL_REG.q(x8),LLIL_CONST.q(0xC20000))'), + # add w22, w30, #0x7e6, with no shift written + (b'\xD6\x9B\x1F\x11', 'LLIL_SET_REG.d(w22,LLIL_ADD.d(LLIL_REG.d(w30),LLIL_CONST.d(0x7E6)))'), + # irg x0, x1, with no Xm written, excludes no tags + (b'\x20\x10\xDF\x9A', 'LLIL_INTRINSIC([x0],__irg,[LLIL_REG.q(x1),LLIL_CONST.q(0x0)])'), + # irg x0, x1, x2 + (b'\x20\x10\xC2\x9A', 'LLIL_INTRINSIC([x0],__irg,[LLIL_REG.q(x1),LLIL_REG.q(x2)])'), # some vectors loads/stores that do not fill the entire register # shl v19.2d, v21.2d, #0x2 (b'\xB3\x56\x42\x4F', 'LLIL_SET_REG.q(v19.d[0],LLIL_LSL.q(LLIL_REG.q(v21.d[0]),LLIL_CONST.b(0x2)));' + \ @@ -12370,14 +12561,14 @@ # (b'\x63\xFE\x23\x9B', 'LLIL_SET_REG.q(x3,LLIL_SUB.q(LLIL_CONST.q(0x0),LLIL_MULS_DP.q(LLIL_REG.d(w19),LLIL_REG.d(w3))))'), # smnegl x3, w19, w3 # (b'\x63\x06\x23\x9B', 'LLIL_SET_REG.q(x3,LLIL_ADD.q(LLIL_REG.q(x1),LLIL_MULS_DP.q(LLIL_REG.d(w19),LLIL_REG.d(w3))))'), # smaddl x3, w19, w3, x1 # (b'\x63\x06\xA3\x9B', 'LLIL_SET_REG.q(x3,LLIL_ADD.q(LLIL_REG.q(x1),LLIL_MULU_DP.q(LLIL_REG.d(w19),LLIL_REG.d(w3))))'), # umaddl x3, w19, w3, x1 - (b'\x00\xFC\x14\x9B', 'LLIL_SET_REG.q(x0,LLIL_SUB.q(LLIL_CONST.q(0x0),LLIL_MUL.q(LLIL_REG.q(x0),LLIL_REG.q(x20))))'), # mneg x0, x0, x20 + (b'\x00\xFC\x14\x9B', 'LLIL_SET_REG.q(x0,LLIL_SUB.q(LLIL_CONST.q(0x0),LLIL_MUL.q(LLIL_REG.q(x0),LLIL_REG.q(x20))))'), # mneg x0, x0, x20 (b'\x20\x00\x02\x9A', 'LLIL_SET_REG.q(x0,LLIL_ADC.q(LLIL_REG.q(x1),LLIL_REG.q(x2),LLIL_FLAG(c)))'), # adc x0, x1, x2 (b'\x20\x00\x02\xBA', 'LLIL_SET_REG.q(x0,LLIL_ADC.q{*}(LLIL_REG.q(x1),LLIL_REG.q(x2),LLIL_FLAG(c)))'), # adcs x0, x1, x2 - (b'\x08\x75\x93\x13', 'LLIL_SET_REG.d(w8,LLIL_LSR.q(LLIL_OR.q(LLIL_LSL.q(LLIL_REG.d(w8),LLIL_CONST.b(0x20)),LLIL_REG.d(w19)),LLIL_CONST.b(0x1D)))'), # extr w8, w8, w19, #0x1d - (b'\x20\x28\xC2\x93', 'LLIL_SET_REG.q(x0,LLIL_LSR.o(LLIL_OR.o(LLIL_LSL.o(LLIL_REG.q(x1),LLIL_CONST.b(0x40)),LLIL_REG.q(x2)),LLIL_CONST.b(0xA)))'), # extr x0, x1, x2, #10 + (b'\x08\x75\x93\x13', 'LLIL_SET_REG.d(w8,LLIL_LSR.q(LLIL_OR.q(LLIL_LSL.q(LLIL_REG.d(w8),LLIL_CONST.b(0x20)),LLIL_REG.d(w19)),LLIL_CONST.b(0x1D)))'), # extr w8, w8, w19, #0x1d + (b'\x20\x28\xC2\x93', 'LLIL_SET_REG.q(x0,LLIL_LSR.o(LLIL_OR.o(LLIL_LSL.o(LLIL_REG.q(x1),LLIL_CONST.b(0x40)),LLIL_REG.q(x2)),LLIL_CONST.b(0xA)))'), # extr x0, x1, x2, #0xa (b'\xC6\x0C\xC0\xDA', 'LLIL_SET_REG.q(x6,LLIL_BSWAP.q(LLIL_REG.q(x6)))'), # rev x6, x6 - (b'\xCB\x10\xC0\xDA', 'LLIL_SET_REG.q(x11,LLIL_CLZ.q(LLIL_REG.q(x6)))'), # clz x11, x6 - (b'\x63\x00\xC0\xDA', 'LLIL_SET_REG.q(x3,LLIL_RBIT.q(LLIL_REG.q(x3)))'), # rbit x3, x3 + (b'\xCB\x10\xC0\xDA', 'LLIL_SET_REG.q(x11,LLIL_CLZ.q(LLIL_REG.q(x6)))'), # clz x11, x6 + (b'\x63\x00\xC0\xDA', 'LLIL_SET_REG.q(x3,LLIL_RBIT.q(LLIL_REG.q(x3)))'), # rbit x3, x3 # Unknown system register # (b'\x41\x00\x1B\xD5', 'LLIL_INTRINSIC([sysreg_unknown],_WriteStatusReg,[LLIL_REG.q(x1)])'), # msr s3_3_c0_c0_2, x1 # (b'\x43\x00\x3B\xD5', 'LLIL_INTRINSIC([x3],_ReadStatusReg,[LLIL_REG.q(sysreg_unknown)])'), # mrs x3, s3_3_c0_c0_2 @@ -12389,9 +12580,9 @@ (b'\x39\xB5\x15\xD5', 'LLIL_INTRINSIC([],_WriteMSR,[LLIL_CONST.d(0xADA9),LLIL_REG.q(x25)])'), # msr s2_1_c11_c15_4, x7 MSR_SR_systemmove (b'\x87\xBF\x11\xD5', 'LLIL_INTRINSIC([],_WriteMSR,[LLIL_CONST.d(0x8DFC),LLIL_REG.q(x7)])'), - # mrs x30, s3_1_c5_c3_1 MRS_RS_systemmove + # mrs lr, s3_1_c5_c3_1 MRS_RS_systemmove (b'\x3E\x53\x39\xD5', 'LLIL_INTRINSIC([lr],_ReadMSR,[LLIL_CONST.d(0xCA99)])'), - # mrs x29, s3_4_c9_c3_2 MRS_RS_systemmove + # mrs fp, s3_4_c9_c3_2 MRS_RS_systemmove (b'\x5D\x93\x3C\xD5', 'LLIL_INTRINSIC([fp],_ReadMSR,[LLIL_CONST.d(0xE49A)])'), # mrs x16, s2_4_c0_c14_1 MRS_RS_systemmove (b'\x30\x0E\x34\xD5', 'LLIL_INTRINSIC([x16],_ReadMSR,[LLIL_CONST.d(0xA071)])'), @@ -12403,7 +12594,7 @@ (b'\x00\x18\x21\x1E', 'LLIL_SET_REG.d(s0,LLIL_FDIV.d(LLIL_REG.d(s0),LLIL_REG.d(s1)))'), # fdiv s0, s0, s1 (b'\xE0\x0F\x40\xBD', 'LLIL_SET_REG.d(s0,LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0xC))))'), # ldr s0, [sp, #0xc] (b'\xE1\x0B\x40\xBD', 'LLIL_SET_REG.d(s1,LLIL_LOAD.d(LLIL_ADD.q(LLIL_REG.q(sp),LLIL_CONST.q(0x8))))'), # ldr s1, [sp, #0x8] - (b'\x29\x7D\x40\xD3', 'LLIL_SET_REG.q(x9,LLIL_LOW_PART.d(LLIL_REG.q(x9)))'), # ubfx x9, x9, #0, #0x20 + (b'\x29\x7D\x40\xD3', 'LLIL_SET_REG.q(x9,LLIL_LOW_PART.d(LLIL_REG.q(x9)))'), # ubfx x9, x9, #0x0, #0x20 # (b'\x00\xC0\x1E\xD5', 'LLIL_INTRINSIC([vbar_el3],_WriteStatusReg,[LLIL_REG.q(x0)])'), # msr vbar_el3, x0 (b'\x69\x01\x08\x4A', 'LLIL_SET_REG.d(w9,LLIL_XOR.d(LLIL_REG.d(w11),LLIL_REG.d(w8)))'), # eor w9, w11, w8 (b'\x2C\x09\xD5\x4A', 'LLIL_SET_REG.d(w12,LLIL_XOR.d(LLIL_REG.d(w9),LLIL_ROR.d(LLIL_REG.d(w21),LLIL_CONST.b(0x2))))'), # eor w12, w9, w21, ror #0x2 @@ -12416,37 +12607,37 @@ (b'\x3F\x14\x82\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w1),LLIL_ASR.d(LLIL_REG.d(w2),LLIL_CONST.b(0x5)))'), # cmp w1, w2, asr #0x5 # bfi/bfc/bfxil aliases of bfm # BFC_BFM_32M_bitfield 0011001100xxxxxxxxxxxxxxxxxxxxxx - (b'\xF5\x27\x1F\x33', 'LLIL_SET_REG.d(w21,LLIL_AND.d(LLIL_CONST.d(0xFFFFF801),LLIL_REG.d(w21)))'), # bfc w21, #1, #10 - (b'\xFF\x37\x16\x33', 'LLIL_AND.d(LLIL_CONST.d(0xFF0003FF),LLIL_CONST.d(0x0))'), # bfc wzr, #10, #14 (optimized: any BFC on WZR yields 0) - (b'\xF0\x2B\x17\x33', 'LLIL_SET_REG.d(w16,LLIL_AND.d(LLIL_CONST.d(0xFFF001FF),LLIL_REG.d(w16)))'), # bfc w16, #9, #11 - (b'\xEE\x5F\x1E\x33', 'LLIL_SET_REG.d(w14,LLIL_AND.d(LLIL_CONST.d(0xFC000003),LLIL_REG.d(w14)))'), # bfc w14, #2, #24 + (b'\xF5\x27\x1F\x33', 'LLIL_SET_REG.d(w21,LLIL_AND.d(LLIL_CONST.d(0xFFFFF801),LLIL_REG.d(w21)))'), # bfc w21, #0x1, #0xa + (b'\xFF\x37\x16\x33', 'LLIL_AND.d(LLIL_CONST.d(0xFF0003FF),LLIL_CONST.d(0x0))'), # bfc wzr, #0xa, #0xe (optimized: any BFC on WZR yields 0) + (b'\xF0\x2B\x17\x33', 'LLIL_SET_REG.d(w16,LLIL_AND.d(LLIL_CONST.d(0xFFF001FF),LLIL_REG.d(w16)))'), # bfc w16, #0x9, #0xb + (b'\xEE\x5F\x1E\x33', 'LLIL_SET_REG.d(w14,LLIL_AND.d(LLIL_CONST.d(0xFC000003),LLIL_REG.d(w14)))'), # bfc w14, #0x2, #0x18 # BFC_BFM_64M_bitfield 1011001101xxxxxxxxxxxxxxxxxxxxxx - (b'\xF8\x5B\x74\xB3', 'LLIL_SET_REG.q(x24,LLIL_AND.q(LLIL_CONST.q(0xFFFFFFF800000FFF),LLIL_REG.q(x24)))'), # bfc x24, #12, #23 - (b'\xF4\x67\x77\xB3', 'LLIL_SET_REG.q(x20,LLIL_AND.q(LLIL_CONST.q(0xFFFFFFF8000001FF),LLIL_REG.q(x20)))'), # bfc x20, #9, #26 - (b'\xFF\x5F\x6B\xB3', 'LLIL_AND.q(LLIL_CONST.q(0xFFFFE000001FFFFF),LLIL_CONST.q(0x0))'), # bfc xzr, #21, #24 - (b'\xE0\x17\x5D\xB3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_CONST.q(0xFFFFFE07FFFFFFFF),LLIL_REG.q(x0)))'), # bfc x0, #35, #6 + (b'\xF8\x5B\x74\xB3', 'LLIL_SET_REG.q(x24,LLIL_AND.q(LLIL_CONST.q(0xFFFFFFF800000FFF),LLIL_REG.q(x24)))'), # bfc x24, #0xc, #0x17 + (b'\xF4\x67\x77\xB3', 'LLIL_SET_REG.q(x20,LLIL_AND.q(LLIL_CONST.q(0xFFFFFFF8000001FF),LLIL_REG.q(x20)))'), # bfc x20, #0x9, #0x1a + (b'\xFF\x5F\x6B\xB3', 'LLIL_AND.q(LLIL_CONST.q(0xFFFFE000001FFFFF),LLIL_CONST.q(0x0))'), # bfc xzr, #0x15, #0x18 + (b'\xE0\x17\x5D\xB3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_CONST.q(0xFFFFFE07FFFFFFFF),LLIL_REG.q(x0)))'), # bfc x0, #0x23, #0x6 # BFI_BFM_32M_bitfield 00110011000xxxxx0xxxxxxxxxxxxxxx - (b'\xC3\x1D\x1C\x33', 'LLIL_SET_REG.d(w3,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xFFFFF00F),LLIL_REG.d(w3)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0xFF),LLIL_REG.d(w14)),LLIL_CONST.b(0x4))))'), # bfi w3, w14, #4, #8 - (b'\x71\x23\x0C\x33', 'LLIL_SET_REG.d(w17,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xE00FFFFF),LLIL_REG.d(w17)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0x1FF),LLIL_REG.d(w27)),LLIL_CONST.b(0x14))))'), # bfi w17, w27, #20, #9 - (b'\x2F\x3A\x14\x33', 'LLIL_SET_REG.d(w15,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xF8000FFF),LLIL_REG.d(w15)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0x7FFF),LLIL_REG.d(w17)),LLIL_CONST.b(0xC))))'), # bfi w15, w17, #12, #15 - (b'\x42\x0C\x0A\x33', 'LLIL_SET_REG.d(w2,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xFC3FFFFF),LLIL_REG.d(w2)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0xF),LLIL_REG.d(w2)),LLIL_CONST.b(0x16))))'), # bfi w2, w2, #22, #4 + (b'\xC3\x1D\x1C\x33', 'LLIL_SET_REG.d(w3,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xFFFFF00F),LLIL_REG.d(w3)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0xFF),LLIL_REG.d(w14)),LLIL_CONST.b(0x4))))'), # bfi w3, w14, #0x4, #0x8 + (b'\x71\x23\x0C\x33', 'LLIL_SET_REG.d(w17,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xE00FFFFF),LLIL_REG.d(w17)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0x1FF),LLIL_REG.d(w27)),LLIL_CONST.b(0x14))))'), # bfi w17, w27, #0x14, #0x9 + (b'\x2F\x3A\x14\x33', 'LLIL_SET_REG.d(w15,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xF8000FFF),LLIL_REG.d(w15)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0x7FFF),LLIL_REG.d(w17)),LLIL_CONST.b(0xC))))'), # bfi w15, w17, #0xc, #0xf + (b'\x42\x0C\x0A\x33', 'LLIL_SET_REG.d(w2,LLIL_OR.d(LLIL_AND.d(LLIL_CONST.d(0xFC3FFFFF),LLIL_REG.d(w2)),LLIL_LSL.d(LLIL_AND.d(LLIL_CONST.d(0xF),LLIL_REG.d(w2)),LLIL_CONST.b(0x16))))'), # bfi w2, w2, #0x16, #0x4 # BFI_BFM_64M_bitfield 1011001101xxxxxxxxxxxxxxxxxxxxxx - (b'\xE9\x05\x71\xB3', 'LLIL_SET_REG.q(x9,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFFFFFE7FFF),LLIL_REG.q(x9)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0x3),LLIL_REG.q(x15)),LLIL_CONST.b(0xF))))'), # bfi x9, x15, #15, #2 - (b'\x80\x3C\x74\xB3', 'LLIL_SET_REG.q(x0,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFFF0000FFF),LLIL_REG.q(x0)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0xFFFF),LLIL_REG.q(x4)),LLIL_CONST.b(0xC))))'), # bfi x0, x4, #12, #16 - (b'\x76\x6B\x7B\xB3', 'LLIL_SET_REG.q(x22,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFF0000001F),LLIL_REG.q(x22)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0x7FFFFFF),LLIL_REG.q(x27)),LLIL_CONST.b(0x5))))'), # bfi x22, x27, #5, #27 - (b'\xD1\x03\x7F\xB3', 'LLIL_SET_REG.q(x17,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFFFFFFFFFD),LLIL_REG.q(x17)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0x1),LLIL_REG.q(lr)),LLIL_CONST.b(0x1))))'), # bfi x17, x30, #1, #1 + (b'\xE9\x05\x71\xB3', 'LLIL_SET_REG.q(x9,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFFFFFE7FFF),LLIL_REG.q(x9)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0x3),LLIL_REG.q(x15)),LLIL_CONST.b(0xF))))'), # bfi x9, x15, #0xf, #0x2 + (b'\x80\x3C\x74\xB3', 'LLIL_SET_REG.q(x0,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFFF0000FFF),LLIL_REG.q(x0)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0xFFFF),LLIL_REG.q(x4)),LLIL_CONST.b(0xC))))'), # bfi x0, x4, #0xc, #0x10 + (b'\x76\x6B\x7B\xB3', 'LLIL_SET_REG.q(x22,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFF0000001F),LLIL_REG.q(x22)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0x7FFFFFF),LLIL_REG.q(x27)),LLIL_CONST.b(0x5))))'), # bfi x22, x27, #0x5, #0x1b + (b'\xD1\x03\x7F\xB3', 'LLIL_SET_REG.q(x17,LLIL_OR.q(LLIL_AND.q(LLIL_CONST.q(0xFFFFFFFFFFFFFFFD),LLIL_REG.q(x17)),LLIL_LSL.q(LLIL_AND.q(LLIL_CONST.q(0x1),LLIL_REG.q(lr)),LLIL_CONST.b(0x1))))'), # bfi x17, lr, #0x1, #0x1 # BFXIL_BFM_32M_bitfield 00110011000xxxxxxxxxxxxxxxxxxxxx - (b'\x99\x2B\x06\x33', 'LLIL_SET_REG.d(w25,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w25),LLIL_CONST.d(0xFFFFFFE0)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w28),LLIL_CONST.d(0x7C0)),LLIL_CONST.b(0x6))))'), # bfxil w25, w28, #6, #5 - (b'\x83\x4A\x01\x33', 'LLIL_SET_REG.d(w3,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w3),LLIL_CONST.d(0xFFFC0000)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w20),LLIL_CONST.d(0x7FFFE)),LLIL_CONST.b(0x1))))'), # bfxil w3, w20, #1, #18 - (b'\x1C\x29\x09\x33', 'LLIL_SET_REG.d(w28,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w28),LLIL_CONST.d(0xFFFFFFFC)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w8),LLIL_CONST.d(0x600)),LLIL_CONST.b(0x9))))'), # bfxil w28, w8, #9, #2 - (b'\xF9\x7A\x16\x33', 'LLIL_SET_REG.d(w25,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w25),LLIL_CONST.d(0xFFFFFE00)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w23),LLIL_CONST.d(0x7FC00000)),LLIL_CONST.b(0x16))))'), # bfxil w25, w23, #22, #9 + (b'\x99\x2B\x06\x33', 'LLIL_SET_REG.d(w25,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w25),LLIL_CONST.d(0xFFFFFFE0)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w28),LLIL_CONST.d(0x7C0)),LLIL_CONST.b(0x6))))'), # bfxil w25, w28, #0x6, #0x5 + (b'\x83\x4A\x01\x33', 'LLIL_SET_REG.d(w3,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w3),LLIL_CONST.d(0xFFFC0000)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w20),LLIL_CONST.d(0x7FFFE)),LLIL_CONST.b(0x1))))'), # bfxil w3, w20, #0x1, #0x12 + (b'\x1C\x29\x09\x33', 'LLIL_SET_REG.d(w28,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w28),LLIL_CONST.d(0xFFFFFFFC)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w8),LLIL_CONST.d(0x600)),LLIL_CONST.b(0x9))))'), # bfxil w28, w8, #0x9, #0x2 + (b'\xF9\x7A\x16\x33', 'LLIL_SET_REG.d(w25,LLIL_OR.d(LLIL_AND.d(LLIL_REG.d(w25),LLIL_CONST.d(0xFFFFFE00)),LLIL_LSR.d(LLIL_AND.d(LLIL_REG.d(w23),LLIL_CONST.d(0x7FC00000)),LLIL_CONST.b(0x16))))'), # bfxil w25, w23, #0x16, #0x9 # BFXIL_BFM_64M_bitfield 1011001101xxxxxxxxxxxxxxxxxxxxxx - (b'\xF1\xC1\x65\xB3', 'LLIL_SET_REG.q(x17,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x17),LLIL_CONST.q(0xFFFFFFFFFFFFF000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x15),LLIL_CONST.q(0x1FFE000000000)),LLIL_CONST.b(0x25))))'), # bfxil x17, x15, #37, #12 - (b'\x25\xF0\x51\xB3', 'LLIL_SET_REG.q(x5,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x5),LLIL_CONST.q(0xFFFFF00000000000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1FFFFFFFFFFE0000)),LLIL_CONST.b(0x11))))'), # bfxil x5, x1, #17, #44 - (b'\x6E\xBE\x48\xB3', 'LLIL_SET_REG.q(x14,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x14),LLIL_CONST.q(0xFFFFFF0000000000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x19),LLIL_CONST.q(0xFFFFFFFFFF00)),LLIL_CONST.b(0x8))))'), # bfxil x14, x19, #8, #40 - (b'\x0D\xF0\x48\xB3', 'LLIL_SET_REG.q(x13,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x13),LLIL_CONST.q(0xFFE0000000000000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x0),LLIL_CONST.q(0x1FFFFFFFFFFFFF00)),LLIL_CONST.b(0x8))))'), # bfxil x13, x0, #8, #53 - (b'\x62\xFC\x40\xB3', 'LLIL_SET_REG.q(x2,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x2),LLIL_CONST.q(0x0)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x3),LLIL_CONST.q(0xFFFFFFFFFFFFFFFF)),LLIL_CONST.b(0x0))))'), # bfxil x2, x3, #0, #0x40 - (b'\xE0\xFF\x40\xB3', 'LLIL_SET_REG.q(x0,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x0),LLIL_CONST.q(0x0)),LLIL_LSR.q(LLIL_AND.q(LLIL_CONST.q(0x0),LLIL_CONST.q(0xFFFFFFFFFFFFFFFF)),LLIL_CONST.b(0x0))))'), # bfxil x0, xzr, #0, #64 + (b'\xF1\xC1\x65\xB3', 'LLIL_SET_REG.q(x17,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x17),LLIL_CONST.q(0xFFFFFFFFFFFFF000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x15),LLIL_CONST.q(0x1FFE000000000)),LLIL_CONST.b(0x25))))'), # bfxil x17, x15, #0x25, #0xc + (b'\x25\xF0\x51\xB3', 'LLIL_SET_REG.q(x5,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x5),LLIL_CONST.q(0xFFFFF00000000000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1FFFFFFFFFFE0000)),LLIL_CONST.b(0x11))))'), # bfxil x5, x1, #0x11, #0x2c + (b'\x6E\xBE\x48\xB3', 'LLIL_SET_REG.q(x14,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x14),LLIL_CONST.q(0xFFFFFF0000000000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x19),LLIL_CONST.q(0xFFFFFFFFFF00)),LLIL_CONST.b(0x8))))'), # bfxil x14, x19, #0x8, #0x28 + (b'\x0D\xF0\x48\xB3', 'LLIL_SET_REG.q(x13,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x13),LLIL_CONST.q(0xFFE0000000000000)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x0),LLIL_CONST.q(0x1FFFFFFFFFFFFF00)),LLIL_CONST.b(0x8))))'), # bfxil x13, x0, #0x8, #0x35 + (b'\x62\xFC\x40\xB3', 'LLIL_SET_REG.q(x2,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x2),LLIL_CONST.q(0x0)),LLIL_LSR.q(LLIL_AND.q(LLIL_REG.q(x3),LLIL_CONST.q(0xFFFFFFFFFFFFFFFF)),LLIL_CONST.b(0x0))))'), # bfxil x2, x3, #0x0, #0x40 + (b'\xE0\xFF\x40\xB3', 'LLIL_SET_REG.q(x0,LLIL_OR.q(LLIL_AND.q(LLIL_REG.q(x0),LLIL_CONST.q(0x0)),LLIL_LSR.q(LLIL_AND.q(LLIL_CONST.q(0x0),LLIL_CONST.q(0xFFFFFFFFFFFFFFFF)),LLIL_CONST.b(0x0))))'), # bfxil x0, xzr, #0x0, #0x40 # str instructions # STR_32_ldst_immpost 10111000000xxxxxxxxx01xxxxxxxxxx (b'\xC4\xA5\x15\xB8', 'LLIL_STORE.d(LLIL_REG.q(x14),LLIL_REG.d(w4));' + \ @@ -12467,14 +12658,14 @@ (b'\x40\x5D\x1F\xB8', 'LLIL_SET_REG.q(x10,LLIL_ADD.q(LLIL_REG.q(x10),LLIL_CONST.q(0xFFFFFFFFFFFFFFF5)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x10),LLIL_REG.d(w0))'), # str w0, [x10, #-11]! # STR_32_ldst_pos 1011100100xxxxxxxxxxxxxxxxxxxxxx - (b'\x3C\xD5\x3B\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x3BD4)),LLIL_REG.d(w28))'), # str w28, [x9, #15316] - (b'\xF4\xAA\x08\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x8A8)),LLIL_REG.d(w20))'), # str w20, [x23, #2216] - (b'\x04\x91\x10\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x1090)),LLIL_REG.d(w4))'), # str w4, [x8, #4240] - (b'\x73\xE3\x06\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x6E0)),LLIL_REG.d(w19))'), # str w19, [x27, #1760] + (b'\x3C\xD5\x3B\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x3BD4)),LLIL_REG.d(w28))'), # str w28, [x9, #0x3bd4] + (b'\xF4\xAA\x08\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x8A8)),LLIL_REG.d(w20))'), # str w20, [x23, #0x8a8] + (b'\x04\x91\x10\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_CONST.q(0x1090)),LLIL_REG.d(w4))'), # str w4, [x8, #0x1090] + (b'\x73\xE3\x06\xB9', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x27),LLIL_CONST.q(0x6E0)),LLIL_REG.d(w19))'), # str w19, [x27, #0x6e0] # STR_32_ldst_regoff 10111000001xxxxxx1xx10xxxxxxxxxx - (b'\x49\x79\x25\xB8', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x10),LLIL_LSL.q(LLIL_REG.q(x5),LLIL_CONST.b(0x2))),LLIL_REG.d(w9))'), # str w9, [x10, x5, lsl #2] - (b'\x5C\x7B\x27\xB8', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x26),LLIL_LSL.q(LLIL_REG.q(x7),LLIL_CONST.b(0x2))),LLIL_REG.d(w28))'), # str w28, [x26, x7, lsl #2] - (b'\xFA\xF8\x27\xB8', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_LSL.q(LLIL_REG.q(x7),LLIL_CONST.b(0x2))),LLIL_REG.d(w26))'), # str w26, [x7, x7, sxtx #2] + (b'\x49\x79\x25\xB8', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x10),LLIL_LSL.q(LLIL_REG.q(x5),LLIL_CONST.b(0x2))),LLIL_REG.d(w9))'), # str w9, [x10, x5, lsl #0x2] + (b'\x5C\x7B\x27\xB8', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x26),LLIL_LSL.q(LLIL_REG.q(x7),LLIL_CONST.b(0x2))),LLIL_REG.d(w28))'), # str w28, [x26, x7, lsl #0x2] + (b'\xFA\xF8\x27\xB8', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_LSL.q(LLIL_REG.q(x7),LLIL_CONST.b(0x2))),LLIL_REG.d(w26))'), # str w26, [x7, x7, sxtx #0x2] (b'\xB0\xEB\x38\xB8', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_REG.q(x24)),LLIL_REG.d(w16))'), # str w16, [fp, x24, sxtx] # STR_64_ldst_immpost 11111000000xxxxxxxxx01xxxxxxxxxx (b'\x34\x45\x06\xF8', 'LLIL_STORE.q(LLIL_REG.q(x9),LLIL_REG.q(x20));' + \ @@ -12495,31 +12686,31 @@ (b'\xC3\xBC\x1E\xF8', 'LLIL_SET_REG.q(x6,LLIL_ADD.q(LLIL_REG.q(x6),LLIL_CONST.q(0xFFFFFFFFFFFFFFEB)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_REG.q(x3))'), # str x3, [x6, #-21]! # STR_64_ldst_pos 1111100100xxxxxxxxxxxxxxxxxxxxxx - (b'\xED\x1A\x3C\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x7830)),LLIL_REG.q(x13))'), # str x13, [x23, #30768] - (b'\xA3\xA0\x21\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x4340)),LLIL_REG.q(x3))'), # str x3, [x5, #17216] - (b'\x19\x88\x2F\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x0),LLIL_CONST.q(0x5F10)),LLIL_REG.q(x25))'), # str x25, [x0, #24336] - (b'\xBD\x8C\x14\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x2918)),LLIL_REG.q(fp))'), # str x29, [x5, #10520] + (b'\xED\x1A\x3C\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_CONST.q(0x7830)),LLIL_REG.q(x13))'), # str x13, [x23, #0x7830] + (b'\xA3\xA0\x21\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x4340)),LLIL_REG.q(x3))'), # str x3, [x5, #0x4340] + (b'\x19\x88\x2F\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x0),LLIL_CONST.q(0x5F10)),LLIL_REG.q(x25))'), # str x25, [x0, #0x5f10] + (b'\xBD\x8C\x14\xF9', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_CONST.q(0x2918)),LLIL_REG.q(fp))'), # str fp, [x5, #0x2918] # STR_64_ldst_regoff 11111000001xxxxxx1xx10xxxxxxxxxx (b'\xD3\xE9\x21\xF8', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_REG.q(x1)),LLIL_REG.q(x19))'), # str x19, [x14, x1, sxtx] - (b'\xA2\x58\x25\xF8', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w5)),LLIL_CONST.b(0x3))),LLIL_REG.q(x2))'), # str x2, [x5, w5, uxtw #3] - (b'\xF4\xFA\x3A\xF8', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_LSL.q(LLIL_REG.q(x26),LLIL_CONST.b(0x3))),LLIL_REG.q(x20))'), # str x20, [x23, x26, sxtx #3] - (b'\xEE\xF9\x34\xF8', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_LSL.q(LLIL_REG.q(x20),LLIL_CONST.b(0x3))),LLIL_REG.q(x14))'), # str x14, [x15, x20, sxtx #3] + (b'\xA2\x58\x25\xF8', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x5),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w5)),LLIL_CONST.b(0x3))),LLIL_REG.q(x2))'), # str x2, [x5, w5, uxtw #0x3] + (b'\xF4\xFA\x3A\xF8', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x23),LLIL_LSL.q(LLIL_REG.q(x26),LLIL_CONST.b(0x3))),LLIL_REG.q(x20))'), # str x20, [x23, x26, sxtx #0x3] + (b'\xEE\xF9\x34\xF8', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x15),LLIL_LSL.q(LLIL_REG.q(x20),LLIL_CONST.b(0x3))),LLIL_REG.q(x14))'), # str x14, [x15, x20, sxtx #0x3] # IFORM: STR_reg_fpsimd # STR_B_ldst_regoff 00111100001xxxxxx1xx10xxxxxxxxxx - (b'\xFD\xD8\x27\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_SX.q(LLIL_REG.d(w7))),LLIL_REG.b(b29))'), # str b29, [x7, w7, sxtw #0] - (b'\x20\xDA\x30\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_SX.q(LLIL_REG.d(w16))),LLIL_REG.b(b0))'), # str b0, [x17, w16, sxtw #0] + (b'\xFD\xD8\x27\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_SX.q(LLIL_REG.d(w7))),LLIL_REG.b(b29))'), # str b29, [x7, w7, sxtw #0x0] + (b'\x20\xDA\x30\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x17),LLIL_SX.q(LLIL_REG.d(w16))),LLIL_REG.b(b0))'), # str b0, [x17, w16, sxtw #0x0] # STR_BL_ldst_regoff 00111100001xxxxx011x10xxxxxxxxxx - (b'\xCC\x7B\x27\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_REG.q(x7)),LLIL_REG.b(b12))'), # str b12, [lr, x7, lsl #0] - (b'\x1F\x79\x3A\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_REG.q(x26)),LLIL_REG.b(b31))'), # str b31, [x8, x26, lsl #0] + (b'\xCC\x7B\x27\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(lr),LLIL_REG.q(x7)),LLIL_REG.b(b12))'), # str b12, [lr, x7, lsl #0x0] + (b'\x1F\x79\x3A\x3C', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x8),LLIL_REG.q(x26)),LLIL_REG.b(b31))'), # str b31, [x8, x26, lsl #0x0] # STR_H_ldst_regoff 01111100001xxxxxx1xx10xxxxxxxxxx - (b'\xCE\xD9\x36\x7C', 'LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_LSL.q(LLIL_SX.q(LLIL_REG.d(w22)),LLIL_CONST.b(0x1))),LLIL_REG.w(h14))'), # str h14, [x14, w22, sxtw #1] + (b'\xCE\xD9\x36\x7C', 'LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x14),LLIL_LSL.q(LLIL_SX.q(LLIL_REG.d(w22)),LLIL_CONST.b(0x1))),LLIL_REG.w(h14))'), # str h14, [x14, w22, sxtw #0x1] (b'\x39\xCB\x2D\x7C', 'LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x25),LLIL_SX.q(LLIL_REG.d(w13))),LLIL_REG.w(h25))'), # str h25, [x25, w13, sxtw] # STR_S_ldst_regoff 10111100001xxxxxx1xx10xxxxxxxxxx - (b'\xB5\x79\x3F\xBC', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x13),LLIL_LSL.q(LLIL_CONST.q(0x0),LLIL_CONST.b(0x2))),LLIL_REG.d(s21))'), # str s21, [x13, xzr, lsl #2] - (b'\x8B\x7B\x2C\xBC', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_LSL.q(LLIL_REG.q(x12),LLIL_CONST.b(0x2))),LLIL_REG.d(s11))'), # str s11, [x28, x12, lsl #2] + (b'\xB5\x79\x3F\xBC', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x13),LLIL_LSL.q(LLIL_CONST.q(0x0),LLIL_CONST.b(0x2))),LLIL_REG.d(s21))'), # str s21, [x13, xzr, lsl #0x2] + (b'\x8B\x7B\x2C\xBC', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_LSL.q(LLIL_REG.q(x12),LLIL_CONST.b(0x2))),LLIL_REG.d(s11))'), # str s11, [x28, x12, lsl #0x2] # STR_D_ldst_regoff 11111100001xxxxxx1xx10xxxxxxxxxx - (b'\x2C\x59\x22\xFC', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w2)),LLIL_CONST.b(0x3))),LLIL_REG.q(d12))'), # str d12, [x9, w2, uxtw #3] - (b'\x25\xD9\x22\xFC', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_SX.q(LLIL_REG.d(w2)),LLIL_CONST.b(0x3))),LLIL_REG.q(d5))'), # str d5, [x9, w2, sxtw #3] + (b'\x2C\x59\x22\xFC', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w2)),LLIL_CONST.b(0x3))),LLIL_REG.q(d12))'), # str d12, [x9, w2, uxtw #0x3] + (b'\x25\xD9\x22\xFC', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_SX.q(LLIL_REG.d(w2)),LLIL_CONST.b(0x3))),LLIL_REG.q(d5))'), # str d5, [x9, w2, sxtw #0x3] # STR_Q_ldst_regoff 00111100101xxxxxx1xx10xxxxxxxxxx (b'\x0B\xCB\xA1\x3C', 'LLIL_STORE.o(LLIL_ADD.q(LLIL_REG.q(x24),LLIL_SX.q(LLIL_REG.d(w1))),LLIL_REG.o(q11))'), # str q11, [x24, w1, sxtw] (b'\x8E\xCB\xBD\x3C', 'LLIL_STORE.o(LLIL_ADD.q(LLIL_REG.q(x28),LLIL_SX.q(LLIL_REG.d(w29))),LLIL_REG.o(q14))'), # str q14, [x28, w29, sxtw] @@ -12577,20 +12768,20 @@ ' LLIL_STORE.o(LLIL_REG.q(x4),LLIL_REG.o(q9))'), # str q9, [x4, #11]! # IFORM: STR_imm_fpsimd (class unsigned_scaled_offset) # STR_B_ldst_pos 0011110100xxxxxxxxxxxxxxxxxxxxxx - (b'\x0B\xB2\x30\x3D', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x16),LLIL_CONST.q(0xC2C)),LLIL_REG.b(b11))'), # str b11, [x16, #3116] - (b'\x5B\xEE\x27\x3D', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x9FB)),LLIL_REG.b(b27))'), # str b27, [x18, #2555] + (b'\x0B\xB2\x30\x3D', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x16),LLIL_CONST.q(0xC2C)),LLIL_REG.b(b11))'), # str b11, [x16, #0xc2c] + (b'\x5B\xEE\x27\x3D', 'LLIL_STORE.b(LLIL_ADD.q(LLIL_REG.q(x18),LLIL_CONST.q(0x9FB)),LLIL_REG.b(b27))'), # str b27, [x18, #0x9fb] # STR_H_ldst_pos 0111110100xxxxxxxxxxxxxxxxxxxxxx - (b'\x28\x61\x39\x7D', 'LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x1CB0)),LLIL_REG.w(h8))'), # str h8, [x9, #7344] - (b'\x85\x98\x0C\x7D', 'LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x64C)),LLIL_REG.w(h5))'), # str h5, [x4, #1612] + (b'\x28\x61\x39\x7D', 'LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x9),LLIL_CONST.q(0x1CB0)),LLIL_REG.w(h8))'), # str h8, [x9, #0x1cb0] + (b'\x85\x98\x0C\x7D', 'LLIL_STORE.w(LLIL_ADD.q(LLIL_REG.q(x4),LLIL_CONST.q(0x64C)),LLIL_REG.w(h5))'), # str h5, [x4, #0x64c] # STR_S_ldst_pos 1011110100xxxxxxxxxxxxxxxxxxxxxx - (b'\x92\xAE\x15\xBD', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x15AC)),LLIL_REG.d(s18))'), # str s18, [x20, #5548] - (b'\xBF\xD7\x08\xBD', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x8D4)),LLIL_REG.d(s31))'), # str s31, [fp, #2260] + (b'\x92\xAE\x15\xBD', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(x20),LLIL_CONST.q(0x15AC)),LLIL_REG.d(s18))'), # str s18, [x20, #0x15ac] + (b'\xBF\xD7\x08\xBD', 'LLIL_STORE.d(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x8D4)),LLIL_REG.d(s31))'), # str s31, [fp, #0x8d4] # STR_D_ldst_pos 1111110100xxxxxxxxxxxxxxxxxxxxxx - (b'\xF0\xC8\x34\xFD', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x6990)),LLIL_REG.q(d16))'), # str d16, [x7, #27024] - (b'\xBF\x6F\x17\xFD', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x2ED8)),LLIL_REG.q(d31))'), # str d31, [fp, #11992] + (b'\xF0\xC8\x34\xFD', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x6990)),LLIL_REG.q(d16))'), # str d16, [x7, #0x6990] + (b'\xBF\x6F\x17\xFD', 'LLIL_STORE.q(LLIL_ADD.q(LLIL_REG.q(fp),LLIL_CONST.q(0x2ED8)),LLIL_REG.q(d31))'), # str d31, [fp, #0x2ed8] # STR_Q_ldst_pos 0011110110xxxxxxxxxxxxxxxxxxxxxx - (b'\x70\x26\x93\x3D', 'LLIL_STORE.o(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x4C90)),LLIL_REG.o(q16))'), # str q16, [x19, #19600] - (b'\xE8\xB0\x88\x3D', 'LLIL_STORE.o(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x22C0)),LLIL_REG.o(q8))'), # str q8, [x7, #8896] + (b'\x70\x26\x93\x3D', 'LLIL_STORE.o(LLIL_ADD.q(LLIL_REG.q(x19),LLIL_CONST.q(0x4C90)),LLIL_REG.o(q16))'), # str q16, [x19, #0x4c90] + (b'\xE8\xB0\x88\x3D', 'LLIL_STORE.o(LLIL_ADD.q(LLIL_REG.q(x7),LLIL_CONST.q(0x22C0)),LLIL_REG.o(q8))'), # str q8, [x7, #0x22c0] # IFORM: str_p_bi # str_p_bi_ 1110010110xxxxxx000xxxxxxxx0xxxx #(b'\xA6\x12\xB0\xE5', 'LLIL_UNDEF()'), # str p6, [x21, #-124, mul vl] @@ -12601,85 +12792,85 @@ #(b'\x4E\x43\x9B\xE5', 'LLIL_UNDEF()'), # str z14, [x26, #216, mul vl] # signed bitfield insert zeros, lsb is position in DESTINATION register (position 0 in source) # strategy: LSL extracted field to the most significant end, then ASR it back - (b'\x20\x00\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x3F)),LLIL_CONST.b(0x3F)))'), # sbfiz x0, x1, #0, #1 - (b'\x20\x00\x7F\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x3F)),LLIL_CONST.b(0x3E)))'), # sbfiz x0, x1, #1, #1 - (b'\x20\xFC\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_REG.q(x1),LLIL_CONST.q(0x0)))'), # sbfiz x0, x1, #0, #64 + (b'\x20\x00\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x3F)),LLIL_CONST.b(0x3F)))'), # sbfx x0, x1, #0x0, #0x1 + (b'\x20\x00\x7F\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x3F)),LLIL_CONST.b(0x3E)))'), # sbfiz x0, x1, #0x1, #0x1 + (b'\x20\xFC\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_REG.q(x1),LLIL_CONST.q(0x0)))'), # asr x0, x1, #0x0 # signed bitfield extract, lsb is position in SOURCE register (position 0 in destination) - (b'\x20\x00\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x3F)),LLIL_CONST.b(0x3F)))'), # sbfx x0, x1, #0, #1 - (b'\x20\x04\x41\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x2)),LLIL_CONST.b(0x3E)),LLIL_CONST.b(0x3F)))'), # sbfx x0, x1, #1, #1 - (b'\x20\xFC\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_REG.q(x1),LLIL_CONST.q(0x0)))'), # sbfx x0, x1, #0, #64 + (b'\x20\x00\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x3F)),LLIL_CONST.b(0x3F)))'), # sbfx x0, x1, #0x0, #0x1 + (b'\x20\x04\x41\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x2)),LLIL_CONST.b(0x3E)),LLIL_CONST.b(0x3F)))'), # sbfx x0, x1, #0x1, #0x1 + (b'\x20\xFC\x40\x93', 'LLIL_SET_REG.q(x0,LLIL_ASR.q(LLIL_REG.q(x1),LLIL_CONST.q(0x0)))'), # asr x0, x1, #0x0 # unsigned bitfield insert zeros, lsb is position in DESTINATION register (position 0 in source) # should be same as sbfiz, but logical (LSR) instead of arithmetic (ASR) - (b'\x20\x00\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x1)))'), # ubfiz x0, x1, #0, #1 - (b'\x20\x00\x7F\xD3', 'LLIL_SET_REG.q(x0,LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x1)))'), # ubfiz x0, x1, #1, #1 - (b'\x20\x04\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x3)))'), # ubfiz x0, x1, #0, #2 - (b'\x20\x08\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x7)))'), # ubfiz x0, x1, #0, #3 - (b'\x20\xF8\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x7FFFFFFFFFFFFFFF)))'), # ubfiz x0, x1, #0, #63 + (b'\x20\x00\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x1)))'), # ubfx x0, x1, #0x0, #0x1 + (b'\x20\x00\x7F\xD3', 'LLIL_SET_REG.q(x0,LLIL_LSL.q(LLIL_AND.q(LLIL_REG.q(x1),LLIL_CONST.q(0x1)),LLIL_CONST.b(0x1)))'), # ubfiz x0, x1, #0x1, #0x1 + (b'\x20\x04\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x3)))'), # ubfx x0, x1, #0x0, #0x2 + (b'\x20\x08\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x7)))'), # ubfx x0, x1, #0x0, #0x3 + (b'\x20\xF8\x40\xD3', 'LLIL_SET_REG.q(x0,LLIL_AND.q(LLIL_LSR.q(LLIL_REG.q(x1),LLIL_CONST.b(0x0)),LLIL_CONST.q(0x7FFFFFFFFFFFFFFF)))'), # ubfx x0, x1, #0x0, #0x3f # ADDS_32S_addsub_ext # note: since the shift amount is 0, no LLIL_LSL need be generated (b'\x55\x01\x2B\x2B', 'LLIL_SET_REG.d(w21,LLIL_ADD.d{*}(LLIL_REG.d(w10),LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.d(w11)))))'), # adds w21, w10, w11, uxtb - (b'\xC5\xF2\x24\x2B', 'LLIL_SET_REG.d(w5,LLIL_ADD.d{*}(LLIL_REG.d(w22),LLIL_LSL.d(LLIL_SX.d(LLIL_REG.d(w4)),LLIL_CONST.b(0x4))))'), # adds w5, w22, w4, sxtx #4 - (b'\x11\x29\x35\x2B', 'LLIL_SET_REG.d(w17,LLIL_ADD.d{*}(LLIL_REG.d(w8),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w21))),LLIL_CONST.b(0x2))))'), # adds w17, w8, w21, uxth #2 - (b'\x7E\x31\x3B\x2B', 'LLIL_SET_REG.d(w30,LLIL_ADD.d{*}(LLIL_REG.d(w11),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w27))),LLIL_CONST.b(0x4))))'), # adds w30, w11, w27, uxth #4 + (b'\xC5\xF2\x24\x2B', 'LLIL_SET_REG.d(w5,LLIL_ADD.d{*}(LLIL_REG.d(w22),LLIL_LSL.d(LLIL_SX.d(LLIL_REG.d(w4)),LLIL_CONST.b(0x4))))'), # adds w5, w22, w4, sxtx #0x4 + (b'\x11\x29\x35\x2B', 'LLIL_SET_REG.d(w17,LLIL_ADD.d{*}(LLIL_REG.d(w8),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w21))),LLIL_CONST.b(0x2))))'), # adds w17, w8, w21, uxth #0x2 + (b'\x7E\x31\x3B\x2B', 'LLIL_SET_REG.d(w30,LLIL_ADD.d{*}(LLIL_REG.d(w11),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w27))),LLIL_CONST.b(0x4))))'), # adds w30, w11, w27, uxth #0x4 # ADDS_64S_addsub_ext - (b'\x13\x06\x22\xAB', 'LLIL_SET_REG.q(x19,LLIL_ADD.q{*}(LLIL_REG.q(x16),LLIL_LSL.q(LLIL_ZX.q(LLIL_LOW_PART.b(LLIL_REG.d(w2))),LLIL_CONST.b(0x1))))'), # adds x19, x16, w2, uxtb #1 - (b'\xEF\x06\x21\xAB', 'LLIL_SET_REG.q(x15,LLIL_ADD.q{*}(LLIL_REG.q(x23),LLIL_LSL.q(LLIL_ZX.q(LLIL_LOW_PART.b(LLIL_REG.d(w1))),LLIL_CONST.b(0x1))))'), # adds x15, x23, w1, uxtb #1 - (b'\xFA\xA5\x32\xAB', 'LLIL_SET_REG.q(x26,LLIL_ADD.q{*}(LLIL_REG.q(x15),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.w(LLIL_REG.d(w18))),LLIL_CONST.b(0x1))))'), # adds x26, x15, w18, sxth #1 + (b'\x13\x06\x22\xAB', 'LLIL_SET_REG.q(x19,LLIL_ADD.q{*}(LLIL_REG.q(x16),LLIL_LSL.q(LLIL_ZX.q(LLIL_LOW_PART.b(LLIL_REG.d(w2))),LLIL_CONST.b(0x1))))'), # adds x19, x16, w2, uxtb #0x1 + (b'\xEF\x06\x21\xAB', 'LLIL_SET_REG.q(x15,LLIL_ADD.q{*}(LLIL_REG.q(x23),LLIL_LSL.q(LLIL_ZX.q(LLIL_LOW_PART.b(LLIL_REG.d(w1))),LLIL_CONST.b(0x1))))'), # adds x15, x23, w1, uxtb #0x1 + (b'\xFA\xA5\x32\xAB', 'LLIL_SET_REG.q(x26,LLIL_ADD.q{*}(LLIL_REG.q(x15),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.w(LLIL_REG.d(w18))),LLIL_CONST.b(0x1))))'), # adds x26, x15, w18, sxth #0x1 (b'\x00\x04\x20\xAB', 'LLIL_SET_REG.q(x0,LLIL_ADD.q{*}(LLIL_REG.q(x0),LLIL_LSL.q(LLIL_ZX.q(LLIL_LOW_PART.b(LLIL_REG.d(w0))),LLIL_CONST.b(0x1))))'), # adds x0, x0, w0, uxtb #0x1 # note: if size(reg) == size(extend) then no extend (like LLIL_ZX) is needed - (b'\x25\x6D\x2A\xAB', 'LLIL_SET_REG.q(x5,LLIL_ADD.q{*}(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_REG.q(x10),LLIL_CONST.b(0x3))))'), # adds x5, x9, x10, uxtx #3 + (b'\x25\x6D\x2A\xAB', 'LLIL_SET_REG.q(x5,LLIL_ADD.q{*}(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_REG.q(x10),LLIL_CONST.b(0x3))))'), # adds x5, x9, x10, uxtx #0x3 # ADD_32_addsub_ext - (b'\xB0\x2F\x28\x0B', 'LLIL_SET_REG.d(w16,LLIL_ADD.d(LLIL_REG.d(w29),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w8))),LLIL_CONST.b(0x3))))'), # add w16, w29, w8, uxth #3 - (b'\x4D\x73\x2B\x0B', 'LLIL_SET_REG.d(w13,LLIL_ADD.d(LLIL_REG.d(w26),LLIL_LSL.d(LLIL_ZX.d(LLIL_REG.d(w11)),LLIL_CONST.b(0x4))))'), # add w13, w26, w11, uxtx #4 - (b'\x07\xEE\x2E\x0B', 'LLIL_SET_REG.d(w7,LLIL_ADD.d(LLIL_REG.d(w16),LLIL_LSL.d(LLIL_SX.d(LLIL_REG.d(w14)),LLIL_CONST.b(0x3))))'), # add w7, w16, w14, sxtx #3 + (b'\xB0\x2F\x28\x0B', 'LLIL_SET_REG.d(w16,LLIL_ADD.d(LLIL_REG.d(w29),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w8))),LLIL_CONST.b(0x3))))'), # add w16, w29, w8, uxth #0x3 + (b'\x4D\x73\x2B\x0B', 'LLIL_SET_REG.d(w13,LLIL_ADD.d(LLIL_REG.d(w26),LLIL_LSL.d(LLIL_ZX.d(LLIL_REG.d(w11)),LLIL_CONST.b(0x4))))'), # add w13, w26, w11, uxtx #0x4 + (b'\x07\xEE\x2E\x0B', 'LLIL_SET_REG.d(w7,LLIL_ADD.d(LLIL_REG.d(w16),LLIL_LSL.d(LLIL_SX.d(LLIL_REG.d(w14)),LLIL_CONST.b(0x3))))'), # add w7, w16, w14, sxtx #0x3 (b'\x28\x63\x31\x0B', 'LLIL_SET_REG.d(w8,LLIL_ADD.d(LLIL_REG.d(w25),LLIL_ZX.d(LLIL_REG.d(w17))))'), # add w8, w25, w17, uxtx # ADD_64_addsub_ext - (b'\xD2\xE8\x2B\x8B', 'LLIL_SET_REG.q(x18,LLIL_ADD.q(LLIL_REG.q(x6),LLIL_LSL.q(LLIL_REG.q(x11),LLIL_CONST.b(0x2))))'), # add x18, x6, x11, sxtx #2 - (b'\x5D\xC4\x2B\x8B', 'LLIL_SET_REG.q(fp,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_LSL.q(LLIL_SX.q(LLIL_REG.d(w11)),LLIL_CONST.b(0x1))))'), # add x29, x2, w11, sxtw #1 - (b'\x82\x49\x31\x8B', 'LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x12),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w17)),LLIL_CONST.b(0x2))))'), # add x2, x12, w17, uxtw #2 - (b'\xFF\xA5\x2C\x8B', 'LLIL_SET_REG.q(sp,LLIL_ADD.q(LLIL_REG.q(x15),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.w(LLIL_REG.d(w12))),LLIL_CONST.b(0x1))))'), # add sp, x15, w12, sxth #1 + (b'\xD2\xE8\x2B\x8B', 'LLIL_SET_REG.q(x18,LLIL_ADD.q(LLIL_REG.q(x6),LLIL_LSL.q(LLIL_REG.q(x11),LLIL_CONST.b(0x2))))'), # add x18, x6, x11, sxtx #0x2 + (b'\x5D\xC4\x2B\x8B', 'LLIL_SET_REG.q(fp,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_LSL.q(LLIL_SX.q(LLIL_REG.d(w11)),LLIL_CONST.b(0x1))))'), # add fp, x2, w11, sxtw #0x1 + (b'\x82\x49\x31\x8B', 'LLIL_SET_REG.q(x2,LLIL_ADD.q(LLIL_REG.q(x12),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w17)),LLIL_CONST.b(0x2))))'), # add x2, x12, w17, uxtw #0x2 + (b'\xFF\xA5\x2C\x8B', 'LLIL_SET_REG.q(sp,LLIL_ADD.q(LLIL_REG.q(x15),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.w(LLIL_REG.d(w12))),LLIL_CONST.b(0x1))))'), # add sp, x15, w12, sxth #0x1 # CMN_ADDS_32S_addsub_ext # Compare Negative (extended register) adds a register value and a sign or zero-extended register value, followed by an optional left shift amount. - (b'\x7F\x8F\x2E\x2B', 'LLIL_ADD.d{*}(LLIL_REG.d(w27),LLIL_LSL.d(LLIL_SX.d(LLIL_LOW_PART.b(LLIL_REG.d(w14))),LLIL_CONST.b(0x3)))'), # cmn w27, w14, sxtb #3 - (b'\x3F\x8E\x3E\x2B', 'LLIL_ADD.d{*}(LLIL_REG.d(w17),LLIL_LSL.d(LLIL_SX.d(LLIL_LOW_PART.b(LLIL_REG.d(w30))),LLIL_CONST.b(0x3)))'), # cmn w17, w30, sxtb #3 + (b'\x7F\x8F\x2E\x2B', 'LLIL_ADD.d{*}(LLIL_REG.d(w27),LLIL_LSL.d(LLIL_SX.d(LLIL_LOW_PART.b(LLIL_REG.d(w14))),LLIL_CONST.b(0x3)))'), # cmn w27, w14, sxtb #0x3 + (b'\x3F\x8E\x3E\x2B', 'LLIL_ADD.d{*}(LLIL_REG.d(w17),LLIL_LSL.d(LLIL_SX.d(LLIL_LOW_PART.b(LLIL_REG.d(w30))),LLIL_CONST.b(0x3)))'), # cmn w17, w30, sxtb #0x3 (b'\x3F\x83\x3D\x2B', 'LLIL_ADD.d{*}(LLIL_REG.d(w25),LLIL_SX.d(LLIL_LOW_PART.b(LLIL_REG.d(w29))))'), # cmn w25, w29, sxtb - (b'\x7F\x0F\x25\x2B', 'LLIL_ADD.d{*}(LLIL_REG.d(w27),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.d(w5))),LLIL_CONST.b(0x3)))'), # cmn w27, w5, uxtb #3 + (b'\x7F\x0F\x25\x2B', 'LLIL_ADD.d{*}(LLIL_REG.d(w27),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.d(w5))),LLIL_CONST.b(0x3)))'), # cmn w27, w5, uxtb #0x3 # CMN_ADDS_64S_addsub_ext - (b'\xBF\x0D\x2D\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x13),LLIL_LSL.q(LLIL_ZX.q(LLIL_LOW_PART.b(LLIL_REG.d(w13))),LLIL_CONST.b(0x3)))'), # cmn x13, w13, uxtb #3 - (b'\x3F\x65\x22\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_REG.q(x2),LLIL_CONST.b(0x1)))'), # cmn x9, x2, uxtx #1 + (b'\xBF\x0D\x2D\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x13),LLIL_LSL.q(LLIL_ZX.q(LLIL_LOW_PART.b(LLIL_REG.d(w13))),LLIL_CONST.b(0x3)))'), # cmn x13, w13, uxtb #0x3 + (b'\x3F\x65\x22\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_REG.q(x2),LLIL_CONST.b(0x1)))'), # cmn x9, x2, uxtx #0x1 # does the add to 0 get optimized out? - (b'\xDF\xA8\x3F\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x6),LLIL_CONST.q(0x0))'), # cmn x6, wzr, sxth #2 - (b'\x3F\x8B\x3E\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x25),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.b(LLIL_REG.d(w30))),LLIL_CONST.b(0x2)))'), # cmn x25, w30, sxtb #2 + (b'\xDF\xA8\x3F\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x6),LLIL_CONST.q(0x0))'), # cmn x6, wzr, sxth #0x2 + (b'\x3F\x8B\x3E\xAB', 'LLIL_ADD.q{*}(LLIL_REG.q(x25),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.b(LLIL_REG.d(w30))),LLIL_CONST.b(0x2)))'), # cmn x25, w30, sxtb #0x2 # CMP_SUBS_32S_addsub_ext - (b'\x1F\x2B\x2D\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w24),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w13))),LLIL_CONST.b(0x2)))'), # cmp w24, w13, uxth #2 - (b'\xBF\x51\x23\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w13),LLIL_LSL.d(LLIL_REG.d(w3),LLIL_CONST.b(0x4)))'), # cmp w13, w3, uxtw #4 - (b'\x1F\xD0\x31\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w0),LLIL_LSL.d(LLIL_REG.d(w17),LLIL_CONST.b(0x4)))'), # cmp w0, w17, sxtw #4 - (b'\xBF\x53\x3E\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w29),LLIL_LSL.d(LLIL_REG.d(w30),LLIL_CONST.b(0x4)))'), # cmp w29, w30, uxtw #4 + (b'\x1F\x2B\x2D\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w24),LLIL_LSL.d(LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.d(w13))),LLIL_CONST.b(0x2)))'), # cmp w24, w13, uxth #0x2 + (b'\xBF\x51\x23\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w13),LLIL_LSL.d(LLIL_REG.d(w3),LLIL_CONST.b(0x4)))'), # cmp w13, w3, uxtw #0x4 + (b'\x1F\xD0\x31\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w0),LLIL_LSL.d(LLIL_REG.d(w17),LLIL_CONST.b(0x4)))'), # cmp w0, w17, sxtw #0x4 + (b'\xBF\x53\x3E\x6B', 'LLIL_SUB.d{*}(LLIL_REG.d(w29),LLIL_LSL.d(LLIL_REG.d(w30),LLIL_CONST.b(0x4)))'), # cmp w29, w30, uxtw #0x4 # CMP_SUBS_64S_addsub_ext - (b'\x3F\x49\x22\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w2)),LLIL_CONST.b(0x2)))'), # cmp x9, w2, uxtw #2 - (b'\xDF\x93\x31\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(lr),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.b(LLIL_REG.d(w17))),LLIL_CONST.b(0x4)))'), # cmp x30, w17, sxtb #4 - (b'\x7F\x87\x27\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(x27),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.b(LLIL_REG.d(w7))),LLIL_CONST.b(0x1)))'), # cmp x27, w7, sxtb #1 - (b'\x9F\xEC\x34\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(x4),LLIL_LSL.q(LLIL_REG.q(x20),LLIL_CONST.b(0x3)))'), # cmp x4, x20, sxtx #3 + (b'\x3F\x49\x22\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(x9),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w2)),LLIL_CONST.b(0x2)))'), # cmp x9, w2, uxtw #0x2 + (b'\xDF\x93\x31\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(lr),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.b(LLIL_REG.d(w17))),LLIL_CONST.b(0x4)))'), # cmp lr, w17, sxtb #0x4 + (b'\x7F\x87\x27\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(x27),LLIL_LSL.q(LLIL_SX.q(LLIL_LOW_PART.b(LLIL_REG.d(w7))),LLIL_CONST.b(0x1)))'), # cmp x27, w7, sxtb #0x1 + (b'\x9F\xEC\x34\xEB', 'LLIL_SUB.q{*}(LLIL_REG.q(x4),LLIL_LSL.q(LLIL_REG.q(x20),LLIL_CONST.b(0x3)))'), # cmp x4, x20, sxtx #0x3 # SUBS_32S_addsub_ext - (b'\xCD\xC9\x38\x6B', 'LLIL_SET_REG.d(w13,LLIL_SUB.d{*}(LLIL_REG.d(w14),LLIL_LSL.d(LLIL_REG.d(w24),LLIL_CONST.b(0x2))))'), # subs w13, w14, w24, sxtw #2 - (b'\x72\xF0\x2B\x6B', 'LLIL_SET_REG.d(w18,LLIL_SUB.d{*}(LLIL_REG.d(w3),LLIL_LSL.d(LLIL_SX.d(LLIL_REG.d(w11)),LLIL_CONST.b(0x4))))'), # subs w18, w3, w11, sxtx #4 + (b'\xCD\xC9\x38\x6B', 'LLIL_SET_REG.d(w13,LLIL_SUB.d{*}(LLIL_REG.d(w14),LLIL_LSL.d(LLIL_REG.d(w24),LLIL_CONST.b(0x2))))'), # subs w13, w14, w24, sxtw #0x2 + (b'\x72\xF0\x2B\x6B', 'LLIL_SET_REG.d(w18,LLIL_SUB.d{*}(LLIL_REG.d(w3),LLIL_LSL.d(LLIL_SX.d(LLIL_REG.d(w11)),LLIL_CONST.b(0x4))))'), # subs w18, w3, w11, sxtx #0x4 (b'\x77\xC1\x23\x6B', 'LLIL_SET_REG.d(w23,LLIL_SUB.d{*}(LLIL_REG.d(w11),LLIL_REG.d(w3)))'), # subs w23, w11, w3, sxtw - (b'\xD4\x47\x3F\x6B', 'LLIL_SET_REG.d(w20,LLIL_SUB.d{*}(LLIL_REG.d(w30),LLIL_CONST.d(0x0)))'), # subs w20, w30, wzr, uxtw #1 + (b'\xD4\x47\x3F\x6B', 'LLIL_SET_REG.d(w20,LLIL_SUB.d{*}(LLIL_REG.d(w30),LLIL_CONST.d(0x0)))'), # subs w20, w30, wzr, uxtw #0x1 # SUBS_64S_addsub_ext - (b'\x26\x44\x3C\xEB', 'LLIL_SET_REG.q(x6,LLIL_SUB.q{*}(LLIL_REG.q(x1),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w28)),LLIL_CONST.b(0x1))))'), # subs x6, x1, w28, uxtw #1 + (b'\x26\x44\x3C\xEB', 'LLIL_SET_REG.q(x6,LLIL_SUB.q{*}(LLIL_REG.q(x1),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w28)),LLIL_CONST.b(0x1))))'), # subs x6, x1, w28, uxtw #0x1 (b'\x8A\xE2\x2E\xEB', 'LLIL_SET_REG.q(x10,LLIL_SUB.q{*}(LLIL_REG.q(x20),LLIL_REG.q(x14)))'), # subs x10, x20, x14, sxtx - (b'\xC2\x4B\x3A\xEB', 'LLIL_SET_REG.q(x2,LLIL_SUB.q{*}(LLIL_REG.q(lr),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w26)),LLIL_CONST.b(0x2))))'), # subs x2, x30, w26, uxtw #2 - (b'\x04\x4A\x20\xEB', 'LLIL_SET_REG.q(x4,LLIL_SUB.q{*}(LLIL_REG.q(x16),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w0)),LLIL_CONST.b(0x2))))'), # subs x4, x16, w0, uxtw #2 + (b'\xC2\x4B\x3A\xEB', 'LLIL_SET_REG.q(x2,LLIL_SUB.q{*}(LLIL_REG.q(lr),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w26)),LLIL_CONST.b(0x2))))'), # subs x2, lr, w26, uxtw #0x2 + (b'\x04\x4A\x20\xEB', 'LLIL_SET_REG.q(x4,LLIL_SUB.q{*}(LLIL_REG.q(x16),LLIL_LSL.q(LLIL_ZX.q(LLIL_REG.d(w0)),LLIL_CONST.b(0x2))))'), # subs x4, x16, w0, uxtw #0x2 # SUB_32_addsub_ext (b'\x9E\x82\x2C\x4B', 'LLIL_SET_REG.d(w30,LLIL_SUB.d(LLIL_REG.d(w20),LLIL_SX.d(LLIL_LOW_PART.b(LLIL_REG.d(w12)))))'), # sub w30, w20, w12, sxtb (b'\xB9\x42\x32\x4B', 'LLIL_SET_REG.d(w25,LLIL_SUB.d(LLIL_REG.d(w21),LLIL_REG.d(w18)))'), # sub w25, w21, w18, uxtw - (b'\xD9\x66\x3C\x4B', 'LLIL_SET_REG.d(w25,LLIL_SUB.d(LLIL_REG.d(w22),LLIL_LSL.d(LLIL_ZX.d(LLIL_REG.d(w28)),LLIL_CONST.b(0x1))))'), # sub w25, w22, w28, uxtx #1 - (b'\xCD\x4F\x22\x4B', 'LLIL_SET_REG.d(w13,LLIL_SUB.d(LLIL_REG.d(w30),LLIL_LSL.d(LLIL_REG.d(w2),LLIL_CONST.b(0x3))))'), # sub w13, w30, w2, uxtw #3 + (b'\xD9\x66\x3C\x4B', 'LLIL_SET_REG.d(w25,LLIL_SUB.d(LLIL_REG.d(w22),LLIL_LSL.d(LLIL_ZX.d(LLIL_REG.d(w28)),LLIL_CONST.b(0x1))))'), # sub w25, w22, w28, uxtx #0x1 + (b'\xCD\x4F\x22\x4B', 'LLIL_SET_REG.d(w13,LLIL_SUB.d(LLIL_REG.d(w30),LLIL_LSL.d(LLIL_REG.d(w2),LLIL_CONST.b(0x3))))'), # sub w13, w30, w2, uxtw #0x3 # SUB_64_addsub_ext - (b'\xF7\x8D\x3F\xCB', 'LLIL_SET_REG.q(x23,LLIL_SUB.q(LLIL_REG.q(x15),LLIL_CONST.q(0x0)))'), # sub x23, x15, wzr, sxtb #3 - (b'\xFF\x64\x27\xCB', 'LLIL_SET_REG.q(sp,LLIL_SUB.q(LLIL_REG.q(x7),LLIL_LSL.q(LLIL_REG.q(x7),LLIL_CONST.b(0x1))))'), # sub sp, x7, x7, lsl #1 - (b'\xA5\x23\x23\xCB', 'LLIL_SET_REG.q(x5,LLIL_SUB.q(LLIL_REG.q(fp),LLIL_ZX.q(LLIL_LOW_PART.w(LLIL_REG.d(w3)))))'), # sub x5, x29, w3, uxth - (b'\xA4\x69\x37\xCB', 'LLIL_SET_REG.q(x4,LLIL_SUB.q(LLIL_REG.q(x13),LLIL_LSL.q(LLIL_REG.q(x23),LLIL_CONST.b(0x2))))'), # sub x4, x13, x23, uxtx #2 + (b'\xF7\x8D\x3F\xCB', 'LLIL_SET_REG.q(x23,LLIL_SUB.q(LLIL_REG.q(x15),LLIL_CONST.q(0x0)))'), # sub x23, x15, wzr, sxtb #0x3 + (b'\xFF\x64\x27\xCB', 'LLIL_SET_REG.q(sp,LLIL_SUB.q(LLIL_REG.q(x7),LLIL_LSL.q(LLIL_REG.q(x7),LLIL_CONST.b(0x1))))'), # sub sp, x7, x7, lsl #0x1 + (b'\xA5\x23\x23\xCB', 'LLIL_SET_REG.q(x5,LLIL_SUB.q(LLIL_REG.q(fp),LLIL_ZX.q(LLIL_LOW_PART.w(LLIL_REG.d(w3)))))'), # sub x5, fp, w3, uxth + (b'\xA4\x69\x37\xCB', 'LLIL_SET_REG.q(x4,LLIL_SUB.q(LLIL_REG.q(x13),LLIL_LSL.q(LLIL_REG.q(x23),LLIL_CONST.b(0x2))))'), # sub x4, x13, x23, uxtx #0x2 (b'\x21\xF0\x9F\xF8', 'LLIL_INTRINSIC([],__prefetch,[LLIL_LOAD.q(LLIL_ADD.q(LLIL_REG.q(x1),LLIL_CONST.q(0xFFFFFFFFFFFFFFFF)))])'), # prfum pldl1strm, [x1, #-0x1] (b'\x21\x00\x80\xF9', 'LLIL_INTRINSIC([],__prefetch,[LLIL_LOAD.q(LLIL_REG.q(x1))])'), # prfm pldl1strm, [x1] (b'\x24\x98\x41\xBA', 'LLIL_IF(LLIL_FLAG_GROUP(ls),1,3);' + \ @@ -12694,13 +12885,13 @@ # (b'\x41\x7C\x43\x9B', 'LLIL_SET_REG.q(x1,LLIL_LOW_PART.q(LLIL_LSR.o(LLIL_MULS_DP.q(LLIL_REG.q(x2),LLIL_REG.q(x3)),LLIL_CONST.b(0x40))))'), # smulh x1, x2, x3 # (b'\x41\x7C\x23\x9B', 'LLIL_SET_REG.q(x1,LLIL_MULS_DP.q(LLIL_REG.d(w2),LLIL_REG.d(w3)))'), # smull x1, w2, w3 # (b'\x41\x7C\xA3\x9B', 'LLIL_SET_REG.q(x1,LLIL_MULU_DP.q(LLIL_REG.d(w2),LLIL_REG.d(w3)))'), # umull x1, w2, w3 - (b'\x41\x00\x03\x8B', 'LLIL_SET_REG.q(x1,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # add x1,x2,x3 - (b'\x41\x00\x03\xAB', 'LLIL_SET_REG.q(x1,LLIL_ADD.q{*}(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # adds x1,x2,x3 with IL_FLAGWRITE_ALL - (b'\x41\x00\x03\x8A', 'LLIL_SET_REG.q(x1,LLIL_AND.q(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # and x1,x2,x3 - (b'\x41\x00\x03\xEA', 'LLIL_SET_REG.q(x1,LLIL_AND.q{*}(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # ands x1,x2,x3 with IL_FLAGWRITE_ALL - (b'\x41\x00\x03\xDA', 'LLIL_SET_REG.q(x1,LLIL_SBB.q(LLIL_REG.q(x2),LLIL_REG.q(x3),LLIL_NOT(LLIL_FLAG(c))))'), # sbc x1,x2,x3 - (b'\x41\x00\x03\xFA', 'LLIL_SET_REG.q(x1,LLIL_SBB.q{*}(LLIL_REG.q(x2),LLIL_REG.q(x3),LLIL_NOT(LLIL_FLAG(c))))'), # sbcs x1,x2,x3 with IL_FLAGWRITE_ALL - (b'\xE9\x03\x1F\xFA', 'LLIL_SET_REG.q(x9,LLIL_SBB.q{*}(LLIL_CONST.q(0x0),LLIL_CONST.q(0x0),LLIL_NOT(LLIL_FLAG(c))))'), # ngcs x9, xzr + (b'\x41\x00\x03\x8B', 'LLIL_SET_REG.q(x1,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # add x1, x2, x3 + (b'\x41\x00\x03\xAB', 'LLIL_SET_REG.q(x1,LLIL_ADD.q{*}(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # adds x1, x2, x3 + (b'\x41\x00\x03\x8A', 'LLIL_SET_REG.q(x1,LLIL_AND.q(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # and x1, x2, x3 + (b'\x41\x00\x03\xEA', 'LLIL_SET_REG.q(x1,LLIL_AND.q{*}(LLIL_REG.q(x2),LLIL_REG.q(x3)))'), # ands x1, x2, x3 + (b'\x41\x00\x03\xDA', 'LLIL_SET_REG.q(x1,LLIL_SBB.q(LLIL_REG.q(x2),LLIL_REG.q(x3),LLIL_NOT(LLIL_FLAG(c))))'), # sbc x1, x2, x3 + (b'\x41\x00\x03\xFA', 'LLIL_SET_REG.q(x1,LLIL_SBB.q{*}(LLIL_REG.q(x2),LLIL_REG.q(x3),LLIL_NOT(LLIL_FLAG(c))))'), # sbcs x1, x2, x3 + (b'\xE9\x03\x1F\xFA', 'LLIL_SET_REG.q(x9,LLIL_SBB.q{*}(LLIL_CONST.q(0x0),LLIL_CONST.q(0x0),LLIL_NOT(LLIL_FLAG(c))))'), # ngcs x9, xzr (b'\x01\x00\x00\xD4', 'LLIL_SET_REG.d(syscall_info,LLIL_CONST.d(0x40000000));' + \ ' LLIL_SYSCALL()'), # svc #0; ret; ZwAccessCheck() on win-arm64 (b'\x21\x00\x00\xD4', 'LLIL_SET_REG.d(syscall_info,LLIL_CONST.d(0x40000001));' + \ @@ -12800,49 +12991,49 @@ # FEAT_CSSC integer min/max and absolute value (lifted to dedicated LLIL ops) tests_cssc = [ - # smax w0, w1, w2 + # smax w0, w1, w2 (b'\x20\x60\xc2\x1a', 'LLIL_SET_REG.d(w0,LLIL_MAXS.d(LLIL_REG.d(w1),LLIL_REG.d(w2)))'), - # smax x0, x1, x2 + # smax x0, x1, x2 (b'\x20\x60\xc2\x9a', 'LLIL_SET_REG.q(x0,LLIL_MAXS.q(LLIL_REG.q(x1),LLIL_REG.q(x2)))'), - # umax w0, w1, w2 + # umax w0, w1, w2 (b'\x20\x64\xc2\x1a', 'LLIL_SET_REG.d(w0,LLIL_MAXU.d(LLIL_REG.d(w1),LLIL_REG.d(w2)))'), - # umax x0, x1, x2 + # umax x0, x1, x2 (b'\x20\x64\xc2\x9a', 'LLIL_SET_REG.q(x0,LLIL_MAXU.q(LLIL_REG.q(x1),LLIL_REG.q(x2)))'), - # smin w0, w1, w2 + # smin w0, w1, w2 (b'\x20\x68\xc2\x1a', 'LLIL_SET_REG.d(w0,LLIL_MINS.d(LLIL_REG.d(w1),LLIL_REG.d(w2)))'), - # smin x0, x1, x2 + # smin x0, x1, x2 (b'\x20\x68\xc2\x9a', 'LLIL_SET_REG.q(x0,LLIL_MINS.q(LLIL_REG.q(x1),LLIL_REG.q(x2)))'), - # umin w0, w1, w2 + # umin w0, w1, w2 (b'\x20\x6c\xc2\x1a', 'LLIL_SET_REG.d(w0,LLIL_MINU.d(LLIL_REG.d(w1),LLIL_REG.d(w2)))'), - # umin x0, x1, x2 + # umin x0, x1, x2 (b'\x20\x6c\xc2\x9a', 'LLIL_SET_REG.q(x0,LLIL_MINU.q(LLIL_REG.q(x1),LLIL_REG.q(x2)))'), - # abs w0, w1 + # abs w0, w1 (b'\x20\x20\xc0\x5a', 'LLIL_SET_REG.d(w0,LLIL_ABS.d(LLIL_REG.d(w1)))'), - # abs x0, x1 + # abs x0, x1 (b'\x20\x20\xc0\xda', 'LLIL_SET_REG.q(x0,LLIL_ABS.q(LLIL_REG.q(x1)))'), - # smax w0, w1, #0x5 + # smax w0, w1, #0x5 (b'\x20\x14\xc0\x11', 'LLIL_SET_REG.d(w0,LLIL_MAXS.d(LLIL_REG.d(w1),LLIL_CONST.d(0x5)))'), - # umin w0, w1, #0x7 + # umin w0, w1, #0x7 (b'\x20\x1c\xcc\x11', 'LLIL_SET_REG.d(w0,LLIL_MINU.d(LLIL_REG.d(w1),LLIL_CONST.d(0x7)))'), - # ctz w0, w1 + # ctz w0, w1 (b'\x20\x18\xc0\x5a', 'LLIL_SET_REG.d(w0,LLIL_CTZ.d(LLIL_REG.d(w1)))'), - # ctz x0, x1 + # ctz x0, x1 (b'\x20\x18\xc0\xda', 'LLIL_SET_REG.q(x0,LLIL_CTZ.q(LLIL_REG.q(x1)))'), - # cnt w0, w1 (FEAT_CSSC scalar population count) + # cnt w0, w1 (FEAT_CSSC scalar population count) (b'\x20\x1c\xc0\x5a', 'LLIL_SET_REG.d(w0,LLIL_POPCNT.d(LLIL_REG.d(w1)))'), - # cnt x0, x1 (FEAT_CSSC scalar population count) + # cnt x0, x1 (FEAT_CSSC scalar population count) (b'\x20\x1c\xc0\xda', 'LLIL_SET_REG.q(x0,LLIL_POPCNT.q(LLIL_REG.q(x1)))'), # Vector/SVE forms of these mnemonics are not FEAT_CSSC scalar ops and must not be lifted # as whole-register scalar operations. The NEON cnt has a per-element intrinsic; the others # have no native scalar representation and are left unimplemented. - # cnt v0.8b, v1.8b + # cnt v0.8b, v1.8b (b'\x20\x58\x20\x0e', 'LLIL_INTRINSIC([v0],_PopulationCount,[LLIL_REG.o(v1)])'), - # cnt v0.16b, v1.16b + # cnt v0.16b, v1.16b (b'\x20\x58\x20\x4e', 'LLIL_INTRINSIC([v0],_PopulationCount,[LLIL_REG.o(v1)])'), - # abs v0.8b, v1.8b + # abs v0.8b, v1.8b (b'\x20\xb8\x20\x0e', 'LLIL_UNIMPL()'), - # abs v0.2d, v1.2d + # abs v0.2d, v1.2d (b'\x20\xb8\xe0\x4e', 'LLIL_UNIMPL()'), ] @@ -12851,16 +13042,16 @@ # enabled, so we lift the integer forms as plain arithmetic -- as we do for PAC above. The SVE forms # are unlifted, like every other SVE encoding. tests_cpa = [ - # addpt x8, x27, x21, lsl #4 ADDPT_64_addsub_pt + # addpt x8, x27, x21, lsl #0x4 ADDPT_64_addsub_pt (b'\x68\x33\x15\x9a', 'LLIL_SET_REG.q(x8,LLIL_ADD.q(LLIL_REG.q(x27),LLIL_LSL.q(LLIL_REG.q(x21),LLIL_CONST.b(0x4))))'), # addpt x8, x27, x21 ADDPT_64_addsub_pt (b'\x68\x23\x15\x9a', 'LLIL_SET_REG.q(x8,LLIL_ADD.q(LLIL_REG.q(x27),LLIL_REG.q(x21)))'), - # addpt x8, sp, x5 (Rn==31 is SP, not XZR) ADDPT_64_addsub_pt + # addpt x8, sp, x5 ADDPT_64_addsub_pt (b'\xe8\x23\x05\x9a', 'LLIL_SET_REG.q(x8,LLIL_ADD.q(LLIL_REG.q(sp),LLIL_REG.q(x5)))'), - # addpt x1, x2, xzr (Rm==31 is XZR, not SP) ADDPT_64_addsub_pt + # addpt x1, x2, xzr ADDPT_64_addsub_pt (b'\x41\x20\x1f\x9a', 'LLIL_SET_REG.q(x1,LLIL_ADD.q(LLIL_REG.q(x2),LLIL_CONST.q(0x0)))'), - # subpt x17, x13, x3, lsl #7 SUBPT_64_addsub_pt + # subpt x17, x13, x3, lsl #0x7 SUBPT_64_addsub_pt (b'\xb1\x3d\x03\xda', 'LLIL_SET_REG.q(x17,LLIL_SUB.q(LLIL_REG.q(x13),LLIL_LSL.q(LLIL_REG.q(x3),LLIL_CONST.b(0x7))))'), # subpt sp, sp, x5 SUBPT_64_addsub_pt @@ -12884,11 +13075,11 @@ # Apple's vendor-specific instructions, which occupy encoding space that ARM leaves unallocated. # See arch/arm64/apple_vendor.cpp. tests_apple_vendor = [ - # genter #0 + # genter #0x0 (b'\x20\x14\x20\x00', 'LLIL_INTRINSIC([],__genter,[LLIL_CONST.d(0x0)])'), - # genter #5 + # genter #0x5 (b'\x25\x14\x20\x00', 'LLIL_INTRINSIC([],__genter,[LLIL_CONST.d(0x5)])'), - # genter #31 + # genter #0x1f (b'\x3f\x14\x20\x00', 'LLIL_INTRINSIC([],__genter,[LLIL_CONST.d(0x1F)])'), # gexit (leaves guarded mode like eret, so the block ends here) (b'\x00\x14\x20\x00', 'LLIL_INTRINSIC([],__gexit,[]); LLIL_TRAP(0)'), @@ -12917,30 +13108,35 @@ # mul53hi v6.2d, v7.2d (b'\xe6\x04\x20\x00', 'LLIL_INTRINSIC([v6],__mul53hi,[LLIL_REG.o(v6),LLIL_REG.o(v7)])'), - # AMX and the SPTM monitor entry are disassembled but not yet lifted + # AMX is disassembled but not yet lifted # amx_ldx x3 (b'\x03\x10\x20\x00', 'LLIL_UNIMPL()'), # amx_set (b'\x20\x12\x20\x00', 'LLIL_UNIMPL()'), # amx_genlut x3 (b'\xc3\x12\x20\x00', 'LLIL_UNIMPL()'), - # apple_unknown_sptm #0 - (b'\x00\x00\xe0\xd4', 'LLIL_UNIMPL()'), - # apple_unknown_sptm #0x1234 - (b'\x80\x46\xe2\xd4', 'LLIL_UNIMPL()'), # Encodings adjacent to the vendor instructions that must stay undefined # AMX op 23, one of the reserved holes above amx_genlut (b'\xe0\x12\x20\x00', 'LLIL_UNDEF()'), # 0x00201401, unallocated between gexit and genter (b'\x01\x14\x20\x00', 'LLIL_UNDEF()'), - # the SPTM encoding requires a zero LL field, so 0xd4e00001 is not one +] + +# The monitor entry Apple firmware makes through the exception-generation space is ARM's TENTER, +# from FEAT_TEV. It is not yet lifted. +tests_tenter = [ + # tenter #0x0 + (b'\x00\x00\xe0\xd4', 'LLIL_UNIMPL()'), + # tenter #0x34, nb + (b'\x80\x06\xe2\xd4', 'LLIL_UNIMPL()'), + # TENTER requires a zero LL field, so 0xd4e00001 is undefined (b'\x01\x00\xe0\xd4', 'LLIL_UNDEF()'), ] disasm_test_cases = [ - # genter's immediate renders like the base disassembler's, bare for zero and 0x-prefixed otherwise - (b'\x20\x14\x20\x00', 'genter #0'), + # genter's immediate renders like exarmo's, 0x-prefixed even for zero + (b'\x20\x14\x20\x00', 'genter #0x0'), (b'\x25\x14\x20\x00', 'genter #0x5'), (b'\x3f\x14\x20\x00', 'genter #0x1f'), (b'\x00\x14\x20\x00', 'gexit '), @@ -12957,7 +13153,8 @@ (b'\xe6\x04\x20\x00', 'mul53hi v6.2d, v7.2d'), (b'\x1f\x00\x20\x00', 'mul53lo v31.2d, v0.2d'), (b'\xe0\x07\x20\x00', 'mul53hi v0.2d, v31.2d'), - (b'\x80\x46\xe2\xd4', 'apple_unknown_sptm #0x1234'), + (b'\x00\x00\xe0\xd4', 'tenter #0x0'), + (b'\x80\x06\xe2\xd4', 'tenter #0x34, nb'), # every AMX operation, indexed by the op field at bits [9:5], each with a different GPR so that # the operand field is exercised across its range @@ -12992,15 +13189,15 @@ # FEAT_PAuth_LR. Most of these lift to a NOP, so their operands only show up here. # the registers each of these works on are fixed by the encoding, leaving no operands to render - (b'\xfe\xa3\xc1\xda', 'paciasppc '), - (b'\xfe\xa7\xc1\xda', 'pacibsppc '), - (b'\xfe\x83\xc1\xda', 'pacnbiasppc '), - (b'\xfe\x87\xc1\xda', 'pacnbibsppc '), - (b'\xfe\x8b\xc1\xda', 'pacia171615 '), - (b'\xfe\x8f\xc1\xda', 'pacib171615 '), - (b'\xfe\xbb\xc1\xda', 'autia171615 '), - (b'\xfe\xbf\xc1\xda', 'autib171615 '), - (b'\xff\x24\x03\xd5', 'pacm '), + (b'\xfe\xa3\xc1\xda', 'paciasppc'), + (b'\xfe\xa7\xc1\xda', 'pacibsppc'), + (b'\xfe\x83\xc1\xda', 'pacnbiasppc'), + (b'\xfe\x87\xc1\xda', 'pacnbibsppc'), + (b'\xfe\x8b\xc1\xda', 'pacia171615'), + (b'\xfe\x8f\xc1\xda', 'pacib171615'), + (b'\xfe\xbb\xc1\xda', 'autia171615'), + (b'\xfe\xbf\xc1\xda', 'autib171615'), + (b'\xff\x24\x03\xd5', 'pacm'), # the modifier is a register (b'\xbe\x90\xc1\xda', 'autiasppcr x5'), (b'\x3e\x95\xc1\xda', 'autibsppcr x9'), @@ -13012,10 +13209,33 @@ (b'\x3f\x00\xa0\xf3', 'autibsppc 0xfffffffffffffffc'), (b'\x3f\x00\x00\x55', 'retaasppc 0xfffffffffffffffc'), (b'\x3f\x00\x20\x55', 'retabsppc 0xfffffffffffffffc'), + # an IMPLEMENTATION DEFINED system register goes by Apple's name, and an architectural one by ARM's + (b'\x00\xf1\x3e\xd5', 'mrs x0, sprr_config_el1'), + (b'\x01\xf1\x1e\xd5', 'msr sprr_config_el1, x1'), + (b'\x00\x00\x38\xd5', 'mrs x0, midr_el1'), +] + +# Expected operand text, split at OperandSeparatorTokens. Binary Ninja attaches stack variable and +# integer display annotations by operand number, so a comma inside one operand must not be a +# separator. +operand_test_cases = [ + # ldr x0, [x1, #0x8] + (b'\x20\x04\x40\xf9', ['x0', '[x1, #0x8]']), + # ldr x0, [x1], #0x8 + (b'\x20\x84\x40\xf8', ['x0', '[x1], #0x8']), + # ldr x0, [x1, x2, lsl #0x3] + (b'\x20\x78\x62\xf8', ['x0', '[x1, x2, lsl #0x3]']), + # add x0, x1, x2, lsl #0x3 + (b'\x20\x0c\x02\x8b', ['x0', 'x1', 'x2, lsl #0x3']), + # add x0, x1, #0x1, lsl #0xc, whose shift is written on the immediate + (b'\x20\x04\x40\x91', ['x0', 'x1', '#0x1, lsl #0xc']), + # ld1 {v0.16b}, [x0] + (b'\x00\x70\x40\x4c', ['{v0.16b}', '[x0]']), ] test_cases = \ tests_apple_vendor + \ + tests_tenter + \ tests_cpa + \ tests_cssc + \ tests_shll + \ @@ -13024,6 +13244,7 @@ tests_load_acquire_store_release + \ tests_movk + \ tests_mvni + \ + tests_mte_tags + \ tests_2791 + \ tests_msr + \ tests_ucvtf + \ @@ -13048,14 +13269,17 @@ tests_movn + \ tests_movz + \ tests_orr + \ + tests_bsl_bit_bif + \ tests_umov + \ tests_fsub + \ tests_fadd + \ tests_f_mathops + \ + tests_frint_fmadd + \ tests_fml + \ tests_fmul + \ tests_fcvt + \ tests_fcm + \ + tests_cmge_cmhs + \ tests_fcmla + \ tests_fccmp_fccmpe + \ tests_fcmp_fcmpe + \ @@ -13156,6 +13380,20 @@ def disassemble(data, addr=0): tokens = arch.get_instruction_text(data, addr)[0] return ''.join(map(str, tokens)) if tokens else '' +def operands(data, addr=0): + """The instruction's text after the mnemonic, divided where an OperandSeparatorToken falls.""" + arch = binaryninja.Architecture['aarch64'] + tokens = arch.get_instruction_text(data, addr)[0] or [] + result = [''] + for token in tokens: + if token.type == InstructionTextTokenType.OperandSeparatorToken: + result.append('') + else: + result[-1] += str(token) + mnemonic_and_first = result[0].split(None, 1) + result[0] = mnemonic_and_first[1] if len(mnemonic_and_first) > 1 else '' + return result + def lift_at(data, addr): """Lift a single instruction placed at addr, in a BinaryView of its own.""" bv = new_view(b'\x00' * addr + data + EPILOG) @@ -13278,6 +13516,19 @@ def test_all_disassembly(no_fail=False): return True +def test_all_operands(no_fail=False): + for test_i, (data, expected_operands) in enumerate(operand_test_cases): + actual_operands = operands(data) + if actual_operands != expected_operands: + print('OPERAND MISMATCH AT TEST %d!' % test_i) + print('\t input: %s %s' % (data.hex(), disassemble(data))) + print('\texpected: %s' % expected_operands) + print('\t actual: %s' % actual_operands) + if not no_fail: + return False + + return True + def test_all_position_dependent(no_fail=False): for test_i, (data, addr, expected_lift) in enumerate(tests_position_dependent): actual_lift, _ = lift_at(data, addr) @@ -13295,7 +13546,8 @@ def run_all(no_fail=False): lifts_ok = test_all_lifts(no_fail) position_dependent_ok = test_all_position_dependent(no_fail) disassembly_ok = test_all_disassembly(no_fail) - if lifts_ok and position_dependent_ok and disassembly_ok: + operands_ok = test_all_operands(no_fail) + if lifts_ok and position_dependent_ok and disassembly_ok and operands_ok: print('success!', file=sys.stderr) return True diff --git a/arch/arm64/build.rs b/arch/arm64/build.rs new file mode 100644 index 000000000..0d9a9c076 --- /dev/null +++ b/arch/arm64/build.rs @@ -0,0 +1,42 @@ +use std::env; +use std::fs; +use std::path::{Path, PathBuf}; + +// Copy the C headers of the exarmo-aarch64-capi this crate links into arm64-exarmo/include under +// BN_RUST_TARGET_DIR, where the plugin includes them from. +fn main() { + let source = PathBuf::from( + env::var("DEP_EXARMO_AARCH64_INCLUDE").expect("exarmo-aarch64-capi reports its include directory"), + ); + let dest = match env::var("BN_RUST_TARGET_DIR") { + Ok(target_dir) => PathBuf::from(target_dir).join("arm64-exarmo").join("include"), + Err(_) => PathBuf::from(env::var("OUT_DIR").unwrap()).join("include"), + }; + + println!("cargo::rerun-if-env-changed=DEP_EXARMO_AARCH64_INCLUDE"); + println!("cargo::rerun-if-env-changed=BN_RUST_TARGET_DIR"); + println!("cargo::rerun-if-changed={}", source.display()); + println!("cargo::rerun-if-changed={}", dest.display()); + + copy_headers(&source, &dest); +} + +// Copy only the headers whose contents differ, so that an unchanged header keeps its timestamp and +// does not trigger a rebuild of the plugin. +fn copy_headers(source: &Path, dest: &Path) { + fs::create_dir_all(dest).unwrap(); + for entry in fs::read_dir(source).unwrap() { + let entry = entry.unwrap(); + let from = entry.path(); + let to = dest.join(entry.file_name()); + if entry.file_type().unwrap().is_dir() { + copy_headers(&from, &to); + continue; + } + + let contents = fs::read(&from).unwrap(); + if fs::read(&to).ok().as_deref() != Some(contents.as_slice()) { + fs::write(&to, contents).unwrap(); + } + } +} diff --git a/arch/arm64/disassembler/.gitignore b/arch/arm64/disassembler/.gitignore deleted file mode 100644 index a972878f4..000000000 --- a/arch/arm64/disassembler/.gitignore +++ /dev/null @@ -1,134 +0,0 @@ -# Created by https://www.gitignore.io - -### Python ### -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - - -### Linux ### -*~ - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - - -### OSX ### -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - - -### C ### -# Object files -*.o -*.ko -*.obj -*.elf - -# Precompiled Headers -*.gch -*.pch - -# Libraries -*.lib -*.a -*.la -*.lo - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex - -# Debug files -*.dSYM/ - diff --git a/arch/arm64/disassembler/Makefile-asan b/arch/arm64/disassembler/Makefile-asan deleted file mode 100644 index ea96fde67..000000000 --- a/arch/arm64/disassembler/Makefile-asan +++ /dev/null @@ -1,21 +0,0 @@ -DECODE_OBJS = pcode.o decode.o decode0.o decode1.o decode2.o decode_fields32.o decode_scratchpad.o encodings_dec.o - -FORMAT_OBJS = format.o encodings_fmt.o operations.o sysregs_gen.o sysregs_fmt_gen.o regs.o - -HEADERS = decode.h decode1.h decode2.h format.h pcode.h operations.h sysregs_gen.h sysregs_fmt_gen.h decode_fields32.h encodings_dec.h encodings_fmt.h regs.h - -CFLAGS = -O2 -fsanitize=address -ggdb - -.PHONY: all clean - -all: test - -%.o: %.c %.h - gcc -c $(CFLAGS) $< -o $@ - -test: test.c $(DECODE_OBJS) $(FORMAT_OBJS) - gcc $(CFLAGS) test.c *.o -o test - -clean: - rm -f *.o *.so *.a test - rm -rf gofer.so.dSYM test.dSYM diff --git a/arch/arm64/disassembler/Makefile-local b/arch/arm64/disassembler/Makefile-local deleted file mode 100644 index 2e0263403..000000000 --- a/arch/arm64/disassembler/Makefile-local +++ /dev/null @@ -1,50 +0,0 @@ -# $ make -f Makefile-local - -DECODE_OBJS = pcode.o decode.o decode0.o decode1.o decode2.o decode_fields32.o decode_scratchpad.o encodings_dec.o - -FORMAT_OBJS = format.o encodings_fmt.o operations.o sysregs_gen.o sysregs_fmt_gen.o regs.o - -HEADERS = decode.h decode1.h decode2.h format.h pcode.h operations.h sysregs_gen.h sysregs_fmt_gen.h decode_fields32.h encodings_dec.h encodings_fmt.h regs.h - -#CFLAGS = -g -Wunused -CFLAGS = -Os -#CFLAGS = -g -Wpedantic -#CFLAGS = -ofast - -#$(info $(GENERATED_OBJECTS)) - -.PHONY: all clean - -all: libdecode.a libformat.a gofer.so test - -%.o: %.c $(HEADERS) - gcc -c $(CFLAGS) $< -o $@ - -libdecode.a: $(DECODE_OBJS) - ar rvs libdecode.a $(DECODE_OBJS) - -libformat.a: $(FORMAT_OBJS) - ar rvs libformat.a $(FORMAT_OBJS) - -#------------------------------------------------------------------------------ -# test tools -#------------------------------------------------------------------------------ - -gofer.so: gofer.c libdecode.a - gcc $(CFLAGS) \ - libdecode.a libformat.a \ - -shared -o gofer.so gofer.c \ - -Wl,-headerpad_max_install_names - #install_name_tool -change libcapstone.3.dylib gofer.so - #install_name_tool -add_rpath `pwd` gofer.so - -test: test.c libdecode.a - gcc $(CFLAGS) test.c libdecode.a libformat.a -o test - -#------------------------------------------------------------------------------ -# -#------------------------------------------------------------------------------ -clean: - rm -f *.o *.so *.a test - rm -rf gofer.so.dSYM test.dSYM - diff --git a/arch/arm64/disassembler/arm64dis.h b/arch/arm64/disassembler/arm64dis.h deleted file mode 100644 index 31bf4afef..000000000 --- a/arch/arm64/disassembler/arm64dis.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#include "decode.h" -#include "format.h" diff --git a/arch/arm64/disassembler/context_layout.h b/arch/arm64/disassembler/context_layout.h deleted file mode 100644 index 9f6f84bed..000000000 --- a/arch/arm64/disassembler/context_layout.h +++ /dev/null @@ -1,429 +0,0 @@ -/* GENERATED by gen_ctx_layout.py from the fields declared in - context_fields.h. Edit those files instead. */ - - union - { - uint64_t Pdn; - uint64_t Rdn; - uint64_t Vdn; - uint64_t Zdn; - uint64_t alias; - uint64_t b40; - uint64_t cc; - uint64_t data; - uint64_t imm1; - uint64_t imm16; - uint64_t imm19; - uint64_t imm26; - uint64_t immhi; - uint64_t n; - uint64_t ngrp; - uint64_t op4; - uint64_t options; - uint64_t sys_crm; - bool priority; - }; - union - { - uint64_t LL; - uint64_t PNn; - uint64_t Rn; - uint64_t Vn; - uint64_t ZAn; - uint64_t Zn; - uint64_t b5; - uint64_t cmode; - uint64_t dn; - uint64_t domain; - uint64_t hw; - uint64_t imm5b; - uint64_t immlo; - uint64_t nvec; - uint64_t setflags; - uint64_t sys_crn; - uint64_t value2; - }; - union - { - uint64_t C; - uint64_t CRm; - uint64_t O; - uint64_t Op0; - uint64_t P; - uint64_t Pdm; - uint64_t TT; - uint64_t US; - uint64_t bit_pos; - uint64_t c; - uint64_t cmp_with_zero; - uint64_t comment; - uint64_t cond; - uint64_t container_size; - uint64_t decode_fltsize; - uint64_t dstsize; - uint64_t esize; - uint64_t flagmask; - uint64_t fltsize; - uint64_t i4A; - uint64_t imm12; - uint64_t imm9h; - uint64_t imms; - uint64_t is_tbl; - uint64_t memcpy_d; - uint64_t memset_d; - uint64_t op3; - uint64_t op54; - uint64_t opc3; - uint64_t option; - uint64_t page; - uint64_t pos; - uint64_t shift_type; - uint64_t uns; - uint64_t writeback; - bool auth_then_branch; - bool withstatus; - }; - union - { - uint64_t S10; - uint64_t Vd; - uint64_t ZAd; - uint64_t containers; - uint64_t dm; - uint64_t dst_index; - uint64_t dtypeh; - uint64_t exact; - uint64_t field; - uint64_t hi; - uint64_t i3; - uint64_t i4; - uint64_t imm13; - uint64_t imm14; - uint64_t imm8; - uint64_t imm9l; - uint64_t immb; - uint64_t immr; - uint64_t intsize; - uint64_t m; - uint64_t memcpy_n; - uint64_t memset_n; - uint64_t nXS; - uint64_t op0; - uint64_t opcode2; - uint64_t pac; - uint64_t pat; - uint64_t s_esize; - uint64_t srcsize; - uint64_t swsize; - uint64_t t2; - uint64_t tag_offset; - uint64_t tsz; - bool acquirepc; - }; - union - { - uint64_t Vm; - uint64_t ZAda; - uint64_t d; - uint64_t d0; - uint64_t dst; - uint64_t flags; - uint64_t i4h; - uint64_t mask; - uint64_t memcpy_s; - uint64_t memset_s; - uint64_t min_EL; - uint64_t op1_neg; - uint64_t operation_; - uint64_t sel_a; - uint64_t signal_all_nans; - uint64_t ssize; - uint64_t stream; - uint64_t t; - uint64_t types; - }; - union - { - uint64_t E; - uint64_t Pt; - uint64_t Rv; - uint64_t ZAt; - uint64_t Zk; - uint64_t b; - uint64_t d_esize; - uint64_t dst_unsigned; - uint64_t dtype; - uint64_t ftype; - uint64_t imm6; - uint64_t imm8h; - uint64_t lsb; - uint64_t mbytes; - uint64_t mreg; - uint64_t num; - uint64_t offs_size; - uint64_t op2; - uint64_t op31; - uint64_t opt; - uint64_t r; - uint64_t select; - uint64_t simm7; - uint64_t size; - uint64_t ssz; - uint64_t tsize; - uint64_t tstride; - bool soft; - }; - union - { - uint64_t PNg; - uint64_t Pv; - uint64_t W; - uint64_t ac; - uint64_t dstride; - uint64_t dtypel; - uint64_t i4B; - uint64_t imm2; - uint64_t int_U; - uint64_t isBefore; - uint64_t need_secure; - uint64_t neg_i; - uint64_t o0; - uint64_t op; - uint64_t op1_unsigned; - uint64_t osize; - uint64_t pacinst; - uint64_t position; - uint64_t rpt; - uint64_t rw; - uint64_t scale; - uint64_t sel; - uint64_t tb; - uint64_t tmask; - uint64_t vertical; - bool auth_combined; - bool issrc2; - }; - union - { - uint64_t PNd; - uint64_t Rd; - uint64_t V; - uint64_t Zm; - uint64_t d1; - uint64_t merging; - uint64_t nzcv; - uint64_t rn_unknown; - uint64_t sys_op0; - uint64_t wback; - bool release; - }; - union - { - uint64_t S; - uint64_t cmph; - uint64_t csize; - uint64_t double_table; - uint64_t e; - uint64_t elsize; - uint64_t eq; - uint64_t i; - uint64_t i4C; - uint64_t imm7; - uint64_t immh; - uint64_t isize; - uint64_t k; - uint64_t msz; - uint64_t op1; - uint64_t op21; - uint64_t op3_neg; - uint64_t pairs; - uint64_t regs; - uint64_t rot; - uint64_t s1; - uint64_t src_index; - uint64_t wmask; - bool ispair; - }; - union - { - uint64_t B; - uint64_t Ra; - uint64_t cmpl; - uint64_t condition; - uint64_t f; - uint64_t fracbits; - uint64_t index; - uint64_t level; - uint64_t lt; - uint64_t memcpy_stage; - uint64_t memset_stage; - uint64_t ntblr; - uint64_t off4; - uint64_t opc; - uint64_t pattern; - uint64_t s2; - uint64_t sel1; - uint64_t source_is_sp; - uint64_t src_unsigned; - uint64_t sub_op; - uint64_t sys_op1; - bool acqrel; - }; - union - { - uint64_t D; - uint64_t Rm; - uint64_t Rt2; - uint64_t Za; - uint64_t da; - uint64_t h; - uint64_t imm8l; - uint64_t offs_unsigned; - uint64_t rmode; - uint64_t sh; - uint64_t sys_op2; - uint64_t v; - bool autia1716; - bool autib1716; - bool pacia1716; - bool pacib1716; - bool rnontemporal; - }; - union - { - uint64_t CRn; - uint64_t Pg; - uint64_t T; - uint64_t datasize; - uint64_t i2; - uint64_t operand; - uint64_t use_key_a; - uint64_t vl; - bool wnontemporal; - }; - union - { - uint64_t g; - uint64_t i3h; - uint64_t idxdsize; - uint64_t len; - uint64_t op2_unsigned; - uint64_t sel2; - uint64_t sf; - uint64_t sys_L; - uint64_t tagchecked; - uint64_t width; - }; - union - { - uint64_t K; - uint64_t Pn; - uint64_t Rt; - uint64_t U; - uint64_t imm64; - uint64_t pref_hint; - uint64_t sel_b; - uint64_t shift_amount; - }; - union - { - uint64_t Z; - uint64_t Zda; - uint64_t elements; - uint64_t extend_type; - uint64_t imm; - uint64_t offset; - uint64_t replicate; - uint64_t rsize; - uint64_t u0; - uint64_t xs; - }; - union - { - uint64_t L; - uint64_t N; - uint64_t i1; - uint64_t i2h; - uint64_t off2; - uint64_t prfop; - uint64_t rd; - uint64_t unsigned_; - }; - union - { - uint64_t Pd; - uint64_t Q; - uint64_t VR; - uint64_t i2l; - uint64_t invert; - uint64_t msize; - uint64_t neg_r; - uint64_t nreg; - uint64_t sub_i; - }; - union - { - uint64_t A; - uint64_t Zd; - uint64_t Zt; - uint64_t a; - uint64_t cmp_op; - uint64_t i4l; - uint64_t round; - uint64_t sub_r; - bool nontemporal; - }; - union - { - uint64_t Rs; - uint64_t ff; - uint64_t imm4; - uint64_t imm9; - uint64_t o2; - uint64_t tszh; - uint64_t u1; - }; - union - { - uint64_t imm3; - uint64_t imm5; - uint64_t opc2; - uint64_t selem; - uint64_t sz; - }; - union - { - uint64_t M; - uint64_t Pm; - uint64_t R; - uint64_t ne; - uint64_t off3; - uint64_t postindex; - }; - union - { - uint64_t H; - uint64_t o1; - uint64_t o3; - uint64_t tszl; - }; - union - { - uint64_t i3l; - uint64_t rounding; - uint64_t s; - uint64_t shift; - uint64_t wb_unknown; - }; - union - { - uint64_t opcode; - uint64_t regsize; - uint64_t rt_unknown; - }; - union - { - uint64_t part; - bool acquire; - }; - uint64_t Rmhi; diff --git a/arch/arm64/disassembler/decode.c b/arch/arm64/disassembler/decode.c deleted file mode 100644 index 99d8bba07..000000000 --- a/arch/arm64/disassembler/decode.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "decode.h" -#include "feature_flags.h" - -int decode_spec(context* ctx, Instruction* dec); // from decode0.cpp -int decode_scratchpad(context* ctx, Instruction* dec); // from decode_scratchpad.c - -int aarch64_decompose(uint32_t instructionValue, Instruction* instr, uint64_t address) -{ - context ctx = {0}; - ctx.halted = 1; // enable disassembly of exception instructions like DCPS1 - ctx.insword = instructionValue; - ctx.address = address; - ARCH_FEATURES_ENABLE_ALL(ctx.decode_features); - ARCH_FEATURES_ENABLE_ALL(ctx.pcode_features); - ctx.EDSCR_HDE = 1; - - /* have the spec-generated code populate all the pcode variables */ - int rc = decode_spec(&ctx, instr); - - if (rc != DECODE_STATUS_OK) - { - /* exceptional cases where we accept a non-OK decode status */ - if (rc == DECODE_STATUS_END_OF_INSTRUCTION && instr->encoding == ENC_HINT_HM_HINTS) - { - while (0) - ; - } - /* no exception! fail! */ - else - return rc; - } - - /* if UDF encoding, return undefined */ - // if(instr->encoding == ENC_UDF_ONLY_PERM_UNDEF) - // return DECODE_STATUS_UNDEFINED; - - /* convert the pcode variables to list of operands, etc. */ - return decode_scratchpad(&ctx, instr); -} diff --git a/arch/arm64/disassembler/decode.h b/arch/arm64/disassembler/decode.h deleted file mode 100644 index b19e5ac72..000000000 --- a/arch/arm64/disassembler/decode.h +++ /dev/null @@ -1,574 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include "feature_flags.h" -#include "operations.h" - -#include "encodings_dec.h" -#include "regs.h" -#include "sysregs_gen.h" -#include "sysregs_fmt_gen.h" - -#ifdef _MSC_VER - #undef REG_NONE // collides with winnt's define -#endif - -#ifdef __cplusplus - #define restrict __restrict -#endif - -/* these are used in lookup tables elsewhere, modify with caution */ -enum ArrangementSpec -{ - ARRSPEC_NONE = 0, - - ARRSPEC_FULL = 1, /* 128-bit v-reg unsplit, eg: REG_V0_Q0 */ - - /* 128 bit v-reg considered as... */ - ARRSPEC_2DOUBLES = 2, /* (.2d) two 64-bit double-precision: REG_V0_D1, REG_V0_D0 */ - ARRSPEC_4SINGLES = - 3, /* (.4s) four 32-bit single-precision: REG_V0_S3, REG_V0_S2, REG_V0_S1, REG_V0_S0 */ - ARRSPEC_8HALVES = - 4, /* (.8h) eight 16-bit half-precision: REG_V0_H7, REG_V0_H6, (..., REG_V0_H0 */ - ARRSPEC_16BYTES = 5, /* (.16b) sixteen 8-bit values: REG_V0_B15, REG_V0_B14, (..., REG_V0_B01 */ - - /* low 64-bit of v-reg considered as... */ - ARRSPEC_1DOUBLE = 6, /* (.d) one 64-bit double-precision: REG_V0_D0 */ - ARRSPEC_2SINGLES = 7, /* (.2s) two 32-bit single-precision: REG_V0_S1, REG_V0_S0 */ - ARRSPEC_4HALVES = - 8, /* (.4h) four 16-bit half-precision: REG_V0_H3, REG_V0_H2, REG_V0_H1, REG_V0_H0 */ - ARRSPEC_8BYTES = 9, /* (.8b) eight 8-bit values: REG_V0_B7, REG_V0_B6, (..., REG_V0_B0 */ - - /* low 32-bit of v-reg considered as... */ - ARRSPEC_1SINGLE = 10, /* (.s) one 32-bit single-precision: REG_V0_S0 */ - ARRSPEC_2HALVES = 11, /* (.2h) two 16-bit half-precision: REG_V0_H1, REG_V0_H0 */ - ARRSPEC_4BYTES = 12, /* (.4b) four 8-bit values: REG_V0_B3, REG_V0_B2, REG_V0_B1, REG_V0_B0 */ - - /* low 16-bit of v-reg considered as... */ - ARRSPEC_1HALF = 13, /* (.h) one 16-bit half-precision: REG_V0_H0 */ - - /* low 8-bit of v-reg considered as... */ - ARRSPEC_1BYTE = 14 /* (.b) one 8-bit byte: REG_V0_B0 */ -}; - -enum SliceIndicator -{ - SLICE_NONE = -1, - SLICE_HORIZONTAL = 0, /* same values as read from fields32 */ - SLICE_VERTICAL = 1 -}; - -//----------------------------------------------------------------------------- -// decode return values -//----------------------------------------------------------------------------- - -#define DECODE_STATUS_OK 0 // success! the resulting named encoding is accurate -#define DECODE_STATUS_RESERVED -1 // spec says this space is reserved, eg: RESERVED_36_asisdsame -#define DECODE_STATUS_UNMATCHED -2 // decoding logic fell through the spec's checks -#define DECODE_STATUS_UNALLOCATED \ - -3 // spec says this space is unallocated, eg: UNALLOCATED_10_branch_reg -#define DECODE_STATUS_UNDEFINED \ - -4 // spec says this encoding is undefined, often due to a disallowed field - // or a missing feature, eg: "if !HaveBF16Ext() then UNDEFINED;" -#define DECODE_STATUS_END_OF_INSTRUCTION \ - -5 // spec decode EndOfInstruction(), instruction executes as NOP -#define DECODE_STATUS_LOST -6 // descended past checks, ie: "SEE encoding_up_higher" -#define DECODE_STATUS_UNREACHABLE -7 // ran into pcode Unreachable() -#define DECODE_STATUS_ASSERT_FAILED -8 // failed an assert -#define DECODE_STATUS_ERROR_OPERANDS -9 - -//----------------------------------------------------------------------------- -// floating point condition register values -//----------------------------------------------------------------------------- - -#define FPCR_AHP ((uint64_t)1 << 26) -#define FPCR_DN ((uint64_t)1 << 25) -#define FPCR_FZ ((uint64_t)1 << 24) -#define FPCR_RMode (uint64_t)0xC00000 // [23,22] -#define FPCR_Stride (uint64_t)0x300000 // [21,20] -#define FPCR_FZ16 ((uint64_t)1 << 19) -#define FPCR_Len (uint64_t)0x30000 // [18:16] -#define FPCR_IDE ((uint64_t)1 << 15) -#define FPCR_IXE ((uint64_t)1 << 12) -#define FPCR_UFE ((uint64_t)1 << 11) -#define FPCR_OFE ((uint64_t)1 << 10) -#define FPCR_DZE ((uint64_t)1 << 9) -#define FPCR_IOE ((uint64_t)1 << 8) - -#define FPCR_GET_AHP(X) SLICE(X, 26, 26) -#define FPCR_GET_DN(X) SLICE(X, 25, 25) -#define FPCR_GET_FZ(X) SLICE(X, 24, 24) -#define FPCR_GET_RMode(X) SLICE(X, 23, 22) -#define FPCR_GET_Stride(X) SLICE(X, 21, 20) -#define FPCR_GET_FZ16(X) SLICE(X, 19, 19) -#define FPCR_GET_Len(X) SLICE(X, 18, 16) -#define FPCR_GET_IDE(X) SLICE(X, 15, 15) -#define FPCR_GET_IXE(X) SLICE(X, 12, 12) -#define FPCR_GET_UFE(X) SLICE(X, 11, 11) -#define FPCR_GET_OFE(X) SLICE(X, 10, 10) -#define FPCR_GET_DZE(X) SLICE(X, 9, 9) -#define FPCR_GET_IOE(X) SLICE(X, 8, 8) - -//----------------------------------------------------------------------------- -// : TLBI operands -//----------------------------------------------------------------------------- -#define TLBI_OP(op1, crn, crm, op2) (((op1 & 7) << 11) | ((crn & 0xF) << 7) | ((crm & 0xF) << 3) | ((op2) & 7)) - -//----------------------------------------------------------------------------- -// : AT operands -//----------------------------------------------------------------------------- -#define AT_OP(op1, crm, op2) (TLBI_OP(op1, 7, crm, op2)) - -//----------------------------------------------------------------------------- -// : DC operands -//----------------------------------------------------------------------------- -#define DC_OP(op1, crm, op2) (TLBI_OP(op1, 7, crm, op2)) - -//----------------------------------------------------------------------------- -// disassembly context (INPUT into disassembler) -//----------------------------------------------------------------------------- - -typedef struct context_ -{ - uint32_t insword; - uint64_t address; - uint64_t decode_features[2]; // bitmask of ARCH_FEATURE_XXX - uint64_t pcode_features[2]; // bitmask of ARCH_FEATURE_XXX - // uint32_t exception_level; // used by AArch64.CheckSystemAccess() - // uint32_t security_state; - uint8_t pstate_btype; // used by BTypeCompatible_BTI() - uint8_t pstate_el; - uint8_t pstate_uao; - bool BTypeCompatible; - uint8_t BTypeNext; - bool halted; // is CPU halted? used by Halted() - uint64_t FPCR; // floating point control register - bool EDSCR_HDE; // External Debug Status and Control Register, Halting debug enable - - /* specification scratchpad. The fields are declared in context_fields.h - and packed by gen_ctx_layout.py into context_layout.h so that fields - never used by the same instruction share storage. */ -#include "context_layout.h" -} context; - -//----------------------------------------------------------------------------- -// Instruction definition (OUTPUT from disassembler) -//----------------------------------------------------------------------------- - -enum OperandClass -{ // syntax example - NONE = 0, // --------------------------- --------------------- - IMM32 = 1, - IMM64 = 2, - FIMM32 = 3, - STR_IMM = 4, - REG = 5, - MULTI_REG = 6, - SYS_REG = 7, - MEM_REG = 8, - MEM_PRE_IDX = 9, - MEM_POST_IDX = 10, - MEM_OFFSET = 11, - MEM_EXTENDED = 12, - SME_TILE = 13, - INDEXED_ELEMENT = 14, // .[{, #}] p12.d[w15, #15] - ACCUM_ARRAY = 15, // ZA[, #] ZA[w13, #8] - LABEL = 16, - CONDITION = 17, - NAME = 18, - IMPLEMENTATION_SPECIFIC = 19 -}; - -enum Condition -{ - COND_EQ, - COND_NE, - COND_CS, - COND_CC, - COND_MI, - COND_PL, - COND_VS, - COND_VC, - COND_HI, - COND_LS, - COND_GE, - COND_LT, - COND_GT, - COND_LE, - COND_AL, - COND_NV, - END_CONDITION -}; - -enum ShiftType -{ - ShiftType_NONE, - ShiftType_LSL, - ShiftType_LSR, - ShiftType_ASR, - ShiftType_ROR, - ShiftType_UXTW, - ShiftType_SXTW, - ShiftType_SXTX, - ShiftType_UXTX, - ShiftType_SXTB, - ShiftType_SXTH, - ShiftType_UXTH, - ShiftType_UXTB, - ShiftType_MSL, - ShiftType_END, -}; - -enum Group -{ - GROUP_UNALLOCATED, - GROUP_DATA_PROCESSING_IMM, - GROUP_BRANCH_EXCEPTION_SYSTEM, - GROUP_LOAD_STORE, - GROUP_DATA_PROCESSING_REG, - GROUP_DATA_PROCESSING_SIMD, - GROUP_DATA_PROCESSING_SIMD2, - END_GROUP -}; - -enum FlagEffect -{ - FLAGEFFECT_NONE=0, // doesn't set flags - FLAGEFFECT_SETS=1, // sets flags, but unknown which type - FLAGEFFECT_SETS_NORMAL=2, // sets flags after normal comparison - FLAGEFFECT_SETS_FLOAT=3 // sets flags after float comparison -}; - -enum ImplSpec -{ - OP0 = 0, - OP1 = 1, - CRN = 2, - CRM = 3, - OP2 = 4 -}; - -enum ATOp -{ - AT_OP_INVALID=-1, - AT_OP_S1E1R=AT_OP(0b000, 0b1000, 0b000), - AT_OP_S1E1W=AT_OP(0b000, 0b1000, 0b001), - AT_OP_S1E0R=AT_OP(0b000, 0b1000, 0b010), - AT_OP_S1E0W=AT_OP(0b000, 0b1000, 0b011), - AT_OP_S1E1RP=AT_OP(0b000, 0b1001, 0b000), - AT_OP_S1E1WP=AT_OP(0b000, 0b1001, 0b001), - AT_OP_S1E1A=AT_OP(0b000, 0b1001, 0b010), - AT_OP_S1E2R=AT_OP(0b100, 0b1000, 0b000), - AT_OP_S1E2W=AT_OP(0b100, 0b1000, 0b001), - AT_OP_S12E1R=AT_OP(0b100, 0b1000, 0b100), - AT_OP_S12E1W=AT_OP(0b100, 0b1000, 0b101), - AT_OP_S12E0R=AT_OP(0b100, 0b1000, 0b110), - AT_OP_S12E0W=AT_OP(0b100, 0b1000, 0b111), - AT_OP_S1E2A=AT_OP(0b100, 0b1001, 0b010), - AT_OP_S1E3R=AT_OP(0b110, 0b1000, 0b000), - AT_OP_S1E3W=AT_OP(0b110, 0b1000, 0b001), - AT_OP_S1E3A=AT_OP(0b110, 0b1001, 0b010), -}; - -enum TlbiOp -{ - TLBI_INVALID=-1, - TLBI_VMALLE1OS=TLBI_OP(0b000, 0b1000, 0b0001, 0b000), - TLBI_VAE1OS=TLBI_OP(0b000, 0b1000, 0b0001, 0b001), - TLBI_ASIDE1OS=TLBI_OP(0b000, 0b1000, 0b0001, 0b010), - TLBI_VAAE1OS=TLBI_OP(0b000, 0b1000, 0b0001, 0b011), - TLBI_VALE1OS=TLBI_OP(0b000, 0b1000, 0b0001, 0b101), - TLBI_VAALE1OS=TLBI_OP(0b000, 0b1000, 0b0001, 0b111), - TLBI_RVAE1IS=TLBI_OP(0b000, 0b1000, 0b0010, 0b001), - TLBI_RVAAE1IS=TLBI_OP(0b000, 0b1000, 0b0010, 0b011), - TLBI_RVALE1IS=TLBI_OP(0b000, 0b1000, 0b0010, 0b101), - TLBI_RVAALE1IS=TLBI_OP(0b000, 0b1000, 0b0010, 0b111), - TLBI_VMALLE1IS=TLBI_OP(0b000, 0b1000, 0b0011, 0b000), - TLBI_VAE1IS=TLBI_OP(0b000, 0b1000, 0b0011, 0b001), - TLBI_ASIDE1IS=TLBI_OP(0b000, 0b1000, 0b0011, 0b010), - TLBI_VAAE1IS=TLBI_OP(0b000, 0b1000, 0b0011, 0b011), - TLBI_VALE1IS=TLBI_OP(0b000, 0b1000, 0b0011, 0b101), - TLBI_VAALE1IS=TLBI_OP(0b000, 0b1000, 0b0011, 0b111), - TLBI_RVAE1OS=TLBI_OP(0b000, 0b1000, 0b0101, 0b001), - TLBI_RVAAE1OS=TLBI_OP(0b000, 0b1000, 0b0101, 0b011), - TLBI_RVALE1OS=TLBI_OP(0b000, 0b1000, 0b0101, 0b101), - TLBI_RVAALE1OS=TLBI_OP(0b000, 0b1000, 0b0101, 0b111), - TLBI_RVAE1=TLBI_OP(0b000, 0b1000, 0b0110, 0b001), - TLBI_RVAAE1=TLBI_OP(0b000, 0b1000, 0b0110, 0b011), - TLBI_RVALE1=TLBI_OP(0b000, 0b1000, 0b0110, 0b101), - TLBI_RVAALE1=TLBI_OP(0b000, 0b1000, 0b0110, 0b111), - TLBI_VMALLE1=TLBI_OP(0b000, 0b1000, 0b0111, 0b000), - TLBI_VAE1=TLBI_OP(0b000, 0b1000, 0b0111, 0b001), - TLBI_ASIDE1=TLBI_OP(0b000, 0b1000, 0b0111, 0b010), - TLBI_VAAE1=TLBI_OP(0b000, 0b1000, 0b0111, 0b011), - TLBI_VALE1=TLBI_OP(0b000, 0b1000, 0b0111, 0b101), - TLBI_VAALE1=TLBI_OP(0b000, 0b1000, 0b0111, 0b111), - TLBI_VMALLE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0001, 0b000), - TLBI_VAE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0001, 0b001), - TLBI_ASIDE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0001, 0b010), - TLBI_VAAE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0001, 0b011), - TLBI_VALE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0001, 0b101), - TLBI_VAALE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0001, 0b111), - TLBI_RVAE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0010, 0b001), - TLBI_RVAAE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0010, 0b011), - TLBI_RVALE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0010, 0b101), - TLBI_RVAALE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0010, 0b111), - TLBI_VMALLE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0011, 0b000), - TLBI_VAE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0011, 0b001), - TLBI_ASIDE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0011, 0b010), - TLBI_VAAE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0011, 0b011), - TLBI_VALE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0011, 0b101), - TLBI_VAALE1ISNXS=TLBI_OP(0b000, 0b1001, 0b0011, 0b111), - TLBI_RVAE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0101, 0b001), - TLBI_RVAAE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0101, 0b011), - TLBI_RVALE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0101, 0b101), - TLBI_RVAALE1OSNXS=TLBI_OP(0b000, 0b1001, 0b0101, 0b111), - TLBI_RVAE1NXS=TLBI_OP(0b000, 0b1001, 0b0110, 0b001), - TLBI_RVAAE1NXS=TLBI_OP(0b000, 0b1001, 0b0110, 0b011), - TLBI_RVALE1NXS=TLBI_OP(0b000, 0b1001, 0b0110, 0b101), - TLBI_RVAALE1NXS=TLBI_OP(0b000, 0b1001, 0b0110, 0b111), - TLBI_VMALLE1NXS=TLBI_OP(0b000, 0b1001, 0b0111, 0b000), - TLBI_VAE1NXS=TLBI_OP(0b000, 0b1001, 0b0111, 0b001), - TLBI_ASIDE1NXS=TLBI_OP(0b000, 0b1001, 0b0111, 0b010), - TLBI_VAAE1NXS=TLBI_OP(0b000, 0b1001, 0b0111, 0b011), - TLBI_VALE1NXS=TLBI_OP(0b000, 0b1001, 0b0111, 0b101), - TLBI_VAALE1NXS=TLBI_OP(0b000, 0b1001, 0b0111, 0b111), - TLBI_IPAS2E1IS=TLBI_OP(0b100, 0b1000, 0b0000, 0b001), - TLBI_RIPAS2E1IS=TLBI_OP(0b100, 0b1000, 0b0000, 0b010), - TLBI_IPAS2LE1IS=TLBI_OP(0b100, 0b1000, 0b0000, 0b101), - TLBI_RIPAS2LE1IS=TLBI_OP(0b100, 0b1000, 0b0000, 0b110), - TLBI_ALLE2OS=TLBI_OP(0b100, 0b1000, 0b0001, 0b000), - TLBI_VAE2OS=TLBI_OP(0b100, 0b1000, 0b0001, 0b001), - TLBI_ALLE1OS=TLBI_OP(0b100, 0b1000, 0b0001, 0b100), - TLBI_VALE2OS=TLBI_OP(0b100, 0b1000, 0b0001, 0b101), - TLBI_VMALLS12E1OS=TLBI_OP(0b100, 0b1000, 0b0001, 0b110), - TLBI_RVAE2IS=TLBI_OP(0b100, 0b1000, 0b0010, 0b001), - TLBI_VMALLWS2E1IS=TLBI_OP(0b100, 0b1000, 0b0010, 0b010), - TLBI_RVALE2IS=TLBI_OP(0b100, 0b1000, 0b0010, 0b101), - TLBI_ALLE2IS=TLBI_OP(0b100, 0b1000, 0b0011, 0b000), - TLBI_VAE2IS=TLBI_OP(0b100, 0b1000, 0b0011, 0b001), - TLBI_ALLE1IS=TLBI_OP(0b100, 0b1000, 0b0011, 0b100), - TLBI_VALE2IS=TLBI_OP(0b100, 0b1000, 0b0011, 0b101), - TLBI_VMALLS12E1IS=TLBI_OP(0b100, 0b1000, 0b0011, 0b110), - TLBI_IPAS2E1OS=TLBI_OP(0b100, 0b1000, 0b0100, 0b000), - TLBI_IPAS2E1=TLBI_OP(0b100, 0b1000, 0b0100, 0b001), - TLBI_RIPAS2E1=TLBI_OP(0b100, 0b1000, 0b0100, 0b010), - TLBI_RIPAS2E1OS=TLBI_OP(0b100, 0b1000, 0b0100, 0b011), - TLBI_IPAS2LE1OS=TLBI_OP(0b100, 0b1000, 0b0100, 0b100), - TLBI_IPAS2LE1=TLBI_OP(0b100, 0b1000, 0b0100, 0b101), - TLBI_RIPAS2LE1=TLBI_OP(0b100, 0b1000, 0b0100, 0b110), - TLBI_RIPAS2LE1OS=TLBI_OP(0b100, 0b1000, 0b0100, 0b111), - TLBI_RVAE2OS=TLBI_OP(0b100, 0b1000, 0b0101, 0b001), - TLBI_VMALLWS2E1OS=TLBI_OP(0b100, 0b1000, 0b0101, 0b010), - TLBI_RVALE2OS=TLBI_OP(0b100, 0b1000, 0b0101, 0b101), - TLBI_RVAE2=TLBI_OP(0b100, 0b1000, 0b0110, 0b001), - TLBI_VMALLWS2E1=TLBI_OP(0b100, 0b1000, 0b0110, 0b010), - TLBI_RVALE2=TLBI_OP(0b100, 0b1000, 0b0110, 0b101), - TLBI_ALLE2=TLBI_OP(0b100, 0b1000, 0b0111, 0b000), - TLBI_VAE2=TLBI_OP(0b100, 0b1000, 0b0111, 0b001), - TLBI_ALLE1=TLBI_OP(0b100, 0b1000, 0b0111, 0b100), - TLBI_VALE2=TLBI_OP(0b100, 0b1000, 0b0111, 0b101), - TLBI_VMALLS12E1=TLBI_OP(0b100, 0b1000, 0b0111, 0b110), - TLBI_IPAS2E1ISNXS=TLBI_OP(0b100, 0b1001, 0b0000, 0b001), - TLBI_RIPAS2E1ISNXS=TLBI_OP(0b100, 0b1001, 0b0000, 0b010), - TLBI_IPAS2LE1ISNXS=TLBI_OP(0b100, 0b1001, 0b0000, 0b101), - TLBI_RIPAS2LE1ISNXS=TLBI_OP(0b100, 0b1001, 0b0000, 0b110), - TLBI_ALLE2OSNXS=TLBI_OP(0b100, 0b1001, 0b0001, 0b000), - TLBI_VAE2OSNXS=TLBI_OP(0b100, 0b1001, 0b0001, 0b001), - TLBI_ALLE1OSNXS=TLBI_OP(0b100, 0b1001, 0b0001, 0b100), - TLBI_VALE2OSNXS=TLBI_OP(0b100, 0b1001, 0b0001, 0b101), - TLBI_VMALLS12E1OSNXS=TLBI_OP(0b100, 0b1001, 0b0001, 0b110), - TLBI_RVAE2ISNXS=TLBI_OP(0b100, 0b1001, 0b0010, 0b001), - TLBI_VMALLWS2E1ISNXS=TLBI_OP(0b100, 0b1001, 0b0010, 0b010), - TLBI_RVALE2ISNXS=TLBI_OP(0b100, 0b1001, 0b0010, 0b101), - TLBI_ALLE2ISNXS=TLBI_OP(0b100, 0b1001, 0b0011, 0b000), - TLBI_VAE2ISNXS=TLBI_OP(0b100, 0b1001, 0b0011, 0b001), - TLBI_ALLE1ISNXS=TLBI_OP(0b100, 0b1001, 0b0011, 0b100), - TLBI_VALE2ISNXS=TLBI_OP(0b100, 0b1001, 0b0011, 0b101), - TLBI_VMALLS12E1ISNXS=TLBI_OP(0b100, 0b1001, 0b0011, 0b110), - TLBI_IPAS2E1OSNXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b000), - TLBI_IPAS2E1NXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b001), - TLBI_RIPAS2E1NXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b010), - TLBI_RIPAS2E1OSNXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b011), - TLBI_IPAS2LE1OSNXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b100), - TLBI_IPAS2LE1NXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b101), - TLBI_RIPAS2LE1NXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b110), - TLBI_RIPAS2LE1OSNXS=TLBI_OP(0b100, 0b1001, 0b0100, 0b111), - TLBI_RVAE2OSNXS=TLBI_OP(0b100, 0b1001, 0b0101, 0b001), - TLBI_VMALLWS2E1OSNXS=TLBI_OP(0b100, 0b1001, 0b0101, 0b010), - TLBI_RVALE2OSNXS=TLBI_OP(0b100, 0b1001, 0b0101, 0b101), - TLBI_RVAE2NXS=TLBI_OP(0b100, 0b1001, 0b0110, 0b001), - TLBI_VMALLWS2E1NXS=TLBI_OP(0b100, 0b1001, 0b0110, 0b010), - TLBI_RVALE2NXS=TLBI_OP(0b100, 0b1001, 0b0110, 0b101), - TLBI_ALLE2NXS=TLBI_OP(0b100, 0b1001, 0b0111, 0b000), - TLBI_VAE2NXS=TLBI_OP(0b100, 0b1001, 0b0111, 0b001), - TLBI_ALLE1NXS=TLBI_OP(0b100, 0b1001, 0b0111, 0b100), - TLBI_VALE2NXS=TLBI_OP(0b100, 0b1001, 0b0111, 0b101), - TLBI_VMALLS12E1NXS=TLBI_OP(0b100, 0b1001, 0b0111, 0b110), - TLBI_ALLE3OS=TLBI_OP(0b110, 0b1000, 0b0001, 0b000), - TLBI_VAE3OS=TLBI_OP(0b110, 0b1000, 0b0001, 0b001), - TLBI_PAALLOS=TLBI_OP(0b110, 0b1000, 0b0001, 0b100), - TLBI_VALE3OS=TLBI_OP(0b110, 0b1000, 0b0001, 0b101), - TLBI_RVAE3IS=TLBI_OP(0b110, 0b1000, 0b0010, 0b001), - TLBI_RVALE3IS=TLBI_OP(0b110, 0b1000, 0b0010, 0b101), - TLBI_ALLE3IS=TLBI_OP(0b110, 0b1000, 0b0011, 0b000), - TLBI_VAE3IS=TLBI_OP(0b110, 0b1000, 0b0011, 0b001), - TLBI_VALE3IS=TLBI_OP(0b110, 0b1000, 0b0011, 0b101), - TLBI_RPAOS=TLBI_OP(0b110, 0b1000, 0b0100, 0b011), - TLBI_RPALOS=TLBI_OP(0b110, 0b1000, 0b0100, 0b111), - TLBI_RVAE3OS=TLBI_OP(0b110, 0b1000, 0b0101, 0b001), - TLBI_RVALE3OS=TLBI_OP(0b110, 0b1000, 0b0101, 0b101), - TLBI_RVAE3=TLBI_OP(0b110, 0b1000, 0b0110, 0b001), - TLBI_RVALE3=TLBI_OP(0b110, 0b1000, 0b0110, 0b101), - TLBI_ALLE3=TLBI_OP(0b110, 0b1000, 0b0111, 0b000), - TLBI_VAE3=TLBI_OP(0b110, 0b1000, 0b0111, 0b001), - TLBI_PAALL=TLBI_OP(0b110, 0b1000, 0b0111, 0b100), - TLBI_VALE3=TLBI_OP(0b110, 0b1000, 0b0111, 0b101), - TLBI_ALLE3OSNXS=TLBI_OP(0b110, 0b1001, 0b0001, 0b000), - TLBI_VAE3OSNXS=TLBI_OP(0b110, 0b1001, 0b0001, 0b001), - TLBI_VALE3OSNXS=TLBI_OP(0b110, 0b1001, 0b0001, 0b101), - TLBI_RVAE3ISNXS=TLBI_OP(0b110, 0b1001, 0b0010, 0b001), - TLBI_RVALE3ISNXS=TLBI_OP(0b110, 0b1001, 0b0010, 0b101), - TLBI_ALLE3ISNXS=TLBI_OP(0b110, 0b1001, 0b0011, 0b000), - TLBI_VAE3ISNXS=TLBI_OP(0b110, 0b1001, 0b0011, 0b001), - TLBI_VALE3ISNXS=TLBI_OP(0b110, 0b1001, 0b0011, 0b101), - TLBI_RVAE3OSNXS=TLBI_OP(0b110, 0b1001, 0b0101, 0b001), - TLBI_RVALE3OSNXS=TLBI_OP(0b110, 0b1001, 0b0101, 0b101), - TLBI_RVAE3NXS=TLBI_OP(0b110, 0b1001, 0b0110, 0b001), - TLBI_RVALE3NXS=TLBI_OP(0b110, 0b1001, 0b0110, 0b101), - TLBI_ALLE3NXS=TLBI_OP(0b110, 0b1001, 0b0111, 0b000), - TLBI_VAE3NXS=TLBI_OP(0b110, 0b1001, 0b0111, 0b001), - TLBI_VALE3NXS=TLBI_OP(0b110, 0b1001, 0b0111, 0b101), -}; - -enum DCOp -{ - DC_OP_INVALID=-1, - DC_OP_IVAC=DC_OP(0b000, 0b0110, 0b001), - DC_OP_ISW=DC_OP(0b000, 0b0110, 0b010), - DC_OP_IGVAC=DC_OP(0b000, 0b0110, 0b011), - DC_OP_IGSW=DC_OP(0b000, 0b0110, 0b100), - DC_OP_IGDVAC=DC_OP(0b000, 0b0110, 0b101), - DC_OP_IGDSW=DC_OP(0b000, 0b0110, 0b110), - DC_OP_CSW=DC_OP(0b000, 0b1010, 0b010), - DC_OP_CGSW=DC_OP(0b000, 0b1010, 0b100), - DC_OP_CGDSW=DC_OP(0b000, 0b1010, 0b110), - DC_OP_CISW=DC_OP(0b000, 0b1110, 0b010), - DC_OP_CIGSW=DC_OP(0b000, 0b1110, 0b100), - DC_OP_CIGDSW=DC_OP(0b000, 0b1110, 0b110), - DC_OP_CIVAPS=DC_OP(0b000, 0b1111, 0b001), - DC_OP_CIGDVAPS=DC_OP(0b000, 0b1111, 0b101), - DC_OP_ZVA=DC_OP(0b011, 0b0100, 0b001), - DC_OP_GVA=DC_OP(0b011, 0b0100, 0b011), - DC_OP_GZVA=DC_OP(0b011, 0b0100, 0b100), - DC_OP_CVAC=DC_OP(0b011, 0b1010, 0b001), - DC_OP_CGVAC=DC_OP(0b011, 0b1010, 0b011), - DC_OP_CGDVAC=DC_OP(0b011, 0b1010, 0b101), - DC_OP_CVAOC=DC_OP(0b011, 0b1011, 0b000), - DC_OP_CVAU=DC_OP(0b011, 0b1011, 0b001), - DC_OP_CGDVAOC=DC_OP(0b011, 0b1011, 0b111), - DC_OP_CVAP=DC_OP(0b011, 0b1100, 0b001), - DC_OP_CGVAP=DC_OP(0b011, 0b1100, 0b011), - DC_OP_CGDVAP=DC_OP(0b011, 0b1100, 0b101), - DC_OP_CVADP=DC_OP(0b011, 0b1101, 0b001), - DC_OP_CGVADP=DC_OP(0b011, 0b1101, 0b011), - DC_OP_CGDVADP=DC_OP(0b011, 0b1101, 0b101), - DC_OP_CIVAC=DC_OP(0b011, 0b1110, 0b001), - DC_OP_CIGVAC=DC_OP(0b011, 0b1110, 0b011), - DC_OP_CIGDVAC=DC_OP(0b011, 0b1110, 0b101), - DC_OP_CIVAOC=DC_OP(0b011, 0b1111, 0b000), - DC_OP_CIGDVAOC=DC_OP(0b011, 0b1111, 0b111), - DC_OP_CIPAE=DC_OP(0b100, 0b1110, 0b000), - DC_OP_CIGDPAE=DC_OP(0b100, 0b1110, 0b111), - DC_OP_CIPAPA=DC_OP(0b110, 0b1110, 0b001), - DC_OP_CIGDPAPA=DC_OP(0b110, 0b1110, 0b101), -}; - -#ifndef __cplusplus -typedef enum SystemReg SystemReg; -typedef enum OperandClass OperandClass; -typedef enum Register Register; -typedef enum Condition Condition; -typedef enum ShiftType ShiftType; -typedef enum Operation Operation; -typedef enum Group Group; -typedef enum ArrangementSpec ArrangementSpec; -typedef enum SliceIndicator SliceIndicator; -typedef enum ImplSpec ImplSpec; -typedef enum TlbiOp TlbiOp; -#endif - -#define MAX_REGISTERS 5 -#define MAX_NAME 16 - -struct InstructionOperand -{ - OperandClass operandClass; - ArrangementSpec arrSpec; - - // These fields are used by disjoint sets of operand classes, so they share storage. - union - { - Register reg[MAX_REGISTERS]; - char name[MAX_NAME]; // for class NAME - Condition cond; // for class CONDITION - SystemReg sysreg; // for class SYS_REG - }; - - union - { - struct // for class SME_TILE - { - uint16_t tile; - SliceIndicator slice; - }; - uint8_t implspec[MAX_REGISTERS]; // for class IMPLEMENTATION_SPECIFIC - }; - - uint32_t lane; - uint64_t immediate; - ShiftType shiftType; - uint32_t shiftValue; - bool laneUsed; - bool shiftValueUsed; - bool signedImm; - char pred_qual; // predicate register qualifier ('z' or 'm') - bool mul_vl; // whether MEM_OFFSET has the offset "mul vl" -}; - -#ifndef __cplusplus -typedef struct InstructionOperand InstructionOperand; -#endif - -#define MAX_OPERANDS 5 - -struct Instruction -{ - uint32_t insword; - enum ENCODING encoding; - - enum Operation operation; - InstructionOperand operands[MAX_OPERANDS]; - - enum FlagEffect setflags; -}; - -#ifndef __cplusplus -typedef struct Instruction Instruction; -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif - - int aarch64_decompose(uint32_t instructionValue, Instruction* instr, uint64_t address); - size_t aarch64_get_register_size(enum Register); - -#ifdef __cplusplus -} -#endif diff --git a/arch/arm64/disassembler/decode0.c b/arch/arm64/disassembler/decode0.c deleted file mode 100644 index e100f6375..000000000 --- a/arch/arm64/disassembler/decode0.c +++ /dev/null @@ -1,2950 +0,0 @@ -/* GENERATED FILE */ -#include -#include - -#include "decode.h" -#include "decode1.h" -#include "pcode.h" - -int decode_spec(context *ctx, Instruction *dec) -{ - uint32_t op0, op1, op2, op3, op4, op5, op6; - - dec->insword = ctx->insword; - dec->setflags = (ctx->S==1) ? FLAGEFFECT_SETS : FLAGEFFECT_NONE; - /* GROUP: root */ - op0 = INSWORD>>31; - op1 = (INSWORD>>25)&15; - if(!op0 && !op1) { - /* GROUP: reserved */ - op0 = (INSWORD>>29)&3; - op1 = (INSWORD>>16)&0x1ff; - if(!op0 && !op1) - return decode_iclass_perm_undef(ctx, dec); - if(!op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_2_reserved - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_1_reserved - RESERVED(ENC_UNKNOWN); // group: reserved - } - if(op0 && !op1) { - /* GROUP: sme */ - op0 = (INSWORD>>29)&3; - op1 = (INSWORD>>10)&0x7fff; - op2 = INSWORD&0x3f; - if(!op0 && !(op1&0x305f) && !(op2&0x24)) { - /* GROUP: mortlach2_prod4 */ - op0 = (INSWORD>>24)&1; - op1 = (INSWORD>>21)&1; - op2 = (INSWORD>>15)&1; - op3 = (INSWORD>>3)&3; - op4 = (INSWORD>>1)&1; - if(!op0 && !op1 && !op2 && !(op3&1)) - return decode_iclass_mortlach_f32f32_prod4(ctx, dec); - if(!op0 && !op1 && !op2 && op3&1 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_38_mortlach2_prod4 - if(!op0 && op1 && !op2 && !op3) - return decode_iclass_mortlach_f8f32_prod4(ctx, dec); - if(!op0 && op1 && !op2 && op3==1 && !op4) - return decode_iclass_mortlach_f8f16_prod4(ctx, dec); - if(!op0 && op1 && !op2 && op3==2 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_40_mortlach2_prod4 - if(!op0 && op1 && !op2 && (op3&2)==2 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_39_mortlach2_prod4 - if(op0 && !op1 && !op2 && !(op3&1)) - return decode_iclass_mortlach_b16f32_prod4(ctx, dec); - if(op0 && !op1 && !op2 && op3&1 && !op4) - return decode_iclass_mortlach_f16f16_prod4(ctx, dec); - if(op0 && op1 && !op2 && !(op3&1)) - return decode_iclass_mortlach_f16f32_prod4(ctx, dec); - if(op0 && op1 && !op2 && op3&1 && !op4) - return decode_iclass_mortlach_b16b16_prod4(ctx, dec); - if(!op1 && op2 && op3&1) - return decode_iclass_mortlach_i16i32_prod4(ctx, dec); - if(op1 && op2 && op3&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_36_mortlach2_prod4 - if(!op2 && op3&1 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_37_mortlach2_prod4 - if(op2 && !(op3&1)) - return decode_iclass_mortlach_i8i32_prod4(ctx, dec); - UNMATCHED; - } - if(!op0 && !(op1&0x305f) && (op2&0x24)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_31_sme - if(!op0 && (op1&0x305f)==1 && !(op2&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_25_sme - if(!op0 && (op1&0x305e)==2 && !(op2&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_22_sme - if(!op0 && (op1&0x305c)==4 && !(op2&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_17_sme - if(!op0 && (op1&0x3058)==8 && !(op2&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_13_sme - if(!op0 && (op1&0x3050)==0x40 && !(op2&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_9_sme - if(!op0 && (op1&0x3010)==0x1000 && !(op2&4)) { - /* GROUP: mortlach2_ss_prod */ - op0 = (INSWORD>>24)&1; - op1 = (INSWORD>>21)&1; - op2 = (INSWORD>>15)&1; - op3 = (INSWORD>>13)&1; - op4 = (INSWORD>>3)&1; - op5 = (INSWORD>>1)&1; - if(!op0 && !op1 && !op2 && !op3 && !op4) - return decode_iclass_mortlach_f32f32_1in2ss_prod(ctx, dec); - if(!op0 && !op1 && !op2 && !op3 && op4 && !op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_44_mortlach2_ss_prod - if(!op0 && op1 && !op2 && !op3 && !op4) - return decode_iclass_mortlach_f8f32_2in4ss_prod(ctx, dec); - if(!op0 && op1 && !op2 && !op3 && op4 && !op5) - return decode_iclass_mortlach_f8f16_2in4ss_prod(ctx, dec); - if(op0 && !op1 && !op2 && !op3 && !op4) - return decode_iclass_mortlach_b16f32_2in4ss_prod(ctx, dec); - if(op0 && !op1 && !op2 && !op3 && op4 && !op5) - return decode_iclass_mortlach_f16f16_1in2ss_prod(ctx, dec); - if(op0 && op1 && !op2 && !op3 && !op4) - return decode_iclass_mortlach_f16f32_2in4ss_prod(ctx, dec); - if(op0 && op1 && !op2 && !op3 && op4 && !op5) - return decode_iclass_mortlach_b16b16_1in2ss_prod(ctx, dec); - if(!op1 && op2 && !op3 && op4) - return decode_iclass_mortlach_i16i32_2in4ss_prod(ctx, dec); - if(op1 && op2 && !op3 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_42_mortlach2_ss_prod - if(!op2 && !op3 && op4 && op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_43_mortlach2_ss_prod - if(op2 && !op3 && !op4) - return decode_iclass_mortlach_i8i32_2in4ss_prod(ctx, dec); - if(op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_41_mortlach2_ss_prod - UNMATCHED; - } - if(!op0 && !(op1&0x2010) && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_6_sme - if(!op0 && (op1&0x2010)==0x10) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_3_sme - if(!op0 && (op1&0x3000)==0x2000 && !(op2&12)) { - /* GROUP: mortlach_32bit_fp_prod */ - op0 = (INSWORD>>24)&1; - op1 = (INSWORD>>21)&1; - op2 = (INSWORD>>4)&1; - if(!op0 && !op1) - return decode_iclass_mortlach_f32f32_prod(ctx, dec); - if(!op0 && op1 && !op2) - return decode_iclass_mortlach_f8f32_prod(ctx, dec); - if(!op0 && op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_45_mortlach_32bit_fp_prod - if(op0 && !op1) - return decode_iclass_mortlach_b16f32_prod(ctx, dec); - if(op0 && op1) - return decode_iclass_mortlach_f16f32_prod(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x3000)==0x2000 && (op2&12)==8) { - /* GROUP: mortlach2_misc_prod */ - op0 = (INSWORD>>24)&1; - op1 = (INSWORD>>21)&1; - op2 = (INSWORD>>4)&1; - op3 = (INSWORD>>1)&1; - if(!op0 && !op1) - return decode_iclass_mortlach_bini32_prod(ctx, dec); - if(!op0 && op1 && !op2 && !op3) - return decode_iclass_mortlach_f8f16_prod(ctx, dec); - if(!op0 && op1 && op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_48_mortlach2_misc_prod - if(!op0 && op1 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_47_mortlach2_misc_prod - if(op0 && !op1 && !op3) - return decode_iclass_mortlach_f16f16_prod(ctx, dec); - if(op0 && op1 && !op3) - return decode_iclass_mortlach_b16b16_prod(ctx, dec); - if(op0 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_46_mortlach2_misc_prod - UNMATCHED; - } - if(op0==1 && !(op1&0x6000)) { - /* GROUP: mortlach_multi_mem_ctg */ - op0 = (INSWORD>>20)&7; - op1 = (INSWORD>>15)&1; - op2 = (INSWORD>>1)&1; - if(!(op0&6) && !op1) - return decode_iclass_mortlach_multi2_cld_cldnt_ss_ctg(ctx, dec); - if(!(op0&6) && op1 && !op2) - return decode_iclass_mortlach_multi4_cld_cldnt_ss_ctg(ctx, dec); - if((op0&6)==2 && !op1) - return decode_iclass_mortlach_multi2_cst_cstnt_ss_ctg(ctx, dec); - if((op0&6)==2 && op1 && !op2) - return decode_iclass_mortlach_multi4_cst_cstnt_ss_ctg(ctx, dec); - if((op0&5)==1 && op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_51_mortlach_multi_mem_ctg - if(op0==4 && !op1) - return decode_iclass_mortlach_multi2_cld_cldnt_si_ctg(ctx, dec); - if(op0==4 && op1 && !op2) - return decode_iclass_mortlach_multi4_cld_cldnt_si_ctg(ctx, dec); - if(op0==6 && !op1) - return decode_iclass_mortlach_multi2_cst_cstnt_si_ctg(ctx, dec); - if(op0==6 && op1 && !op2) - return decode_iclass_mortlach_multi4_cst_cstnt_si_ctg(ctx, dec); - if((op0&5)==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_49_mortlach_multi_mem_ctg - if(!(op0&1) && op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_50_mortlach_multi_mem_ctg - UNMATCHED; - } - if(op0==1 && (op1&0x6000)==0x4000) { - /* GROUP: mortlach_multi_mem_nctg */ - op0 = (INSWORD>>20)&7; - op1 = (INSWORD>>15)&1; - op2 = (INSWORD>>2)&1; - if(!(op0&6) && !op1) - return decode_iclass_mortlach_multi2_cld_cldnt_ss_nctg(ctx, dec); - if(!(op0&6) && op1 && !op2) - return decode_iclass_mortlach_multi4_cld_cldnt_ss_nctg(ctx, dec); - if((op0&6)==2 && !op1) - return decode_iclass_mortlach_multi2_cst_cstnt_ss_nctg(ctx, dec); - if((op0&6)==2 && op1 && !op2) - return decode_iclass_mortlach_multi4_cst_cstnt_ss_nctg(ctx, dec); - if((op0&5)==1 && op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_54_mortlach_multi_mem_nctg - if(op0==4 && !op1) - return decode_iclass_mortlach_multi2_cld_cldnt_si_nctg(ctx, dec); - if(op0==4 && op1 && !op2) - return decode_iclass_mortlach_multi4_cld_cldnt_si_nctg(ctx, dec); - if(op0==6 && !op1) - return decode_iclass_mortlach_multi2_cst_cstnt_si_nctg(ctx, dec); - if(op0==6 && op1 && !op2) - return decode_iclass_mortlach_multi4_cst_cstnt_si_nctg(ctx, dec); - if((op0&5)==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_52_mortlach_multi_mem_nctg - if(!(op0&1) && op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_53_mortlach_multi_mem_nctg - UNMATCHED; - } - if(op0==1 && (op1&0x3000)==0x2000 && !(op2&4)) { - /* GROUP: mortlach_32bit_int_prod */ - op0 = (INSWORD>>21)&1; - op1 = (INSWORD>>3)&1; - if(!op0 && op1) - return decode_iclass_mortlach_i16i32_prod(ctx, dec); - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_55_mortlach_32bit_int_prod - if(!op1) - return decode_iclass_mortlach_i8i32_prod(ctx, dec); - UNMATCHED; - } - if(!(op0&2) && (op1&0x3000)==0x2000 && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_4_sme - if(!(op0&2) && (op1&0x307f)==0x3000 && (op2&0x28)==8) { - /* GROUP: mortlach2_64bit_prod4 */ - op0 = (INSWORD>>29)&1; - op1 = (INSWORD>>24)&1; - op2 = (INSWORD>>21)&1; - if(!op0 && !op1 && !op2) - return decode_iclass_mortlach_f64f64_prod4(ctx, dec); - if(!op0 && !op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_57_mortlach2_64bit_prod4 - if(!op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_56_mortlach2_64bit_prod4 - if(op0) - return decode_iclass_mortlach_i16i64_prod4(ctx, dec); - UNMATCHED; - } - if(!(op0&2) && (op1&0x307f)==0x3000 && (op2&0x28)==0x28) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_32_sme - if(!(op0&2) && (op1&0x307f)==0x3001 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_26_sme - if(!(op0&2) && (op1&0x307e)==0x3002 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_23_sme - if(!(op0&2) && (op1&0x307c)==0x3004 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_18_sme - if(!(op0&2) && (op1&0x3078)==0x3008 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_14_sme - if(!(op0&2) && (op1&0x3070)==0x3010 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_10_sme - if(!(op0&2) && (op1&0x3060)==0x3020 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_8_sme - if(!(op0&2) && (op1&0x3040)==0x3040 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_7_sme - if(!(op0&2) && (op1&0x3000)==0x3000 && !(op2&8)) { - /* GROUP: mortlach_64bit_prod */ - op0 = (INSWORD>>29)&1; - op1 = (INSWORD>>24)&1; - op2 = (INSWORD>>21)&1; - if(!op0 && !op1 && !op2) - return decode_iclass_mortlach_f64f64_prod(ctx, dec); - if(!op0 && !op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_59_mortlach_64bit_prod - if(!op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_58_mortlach_64bit_prod - if(op0) - return decode_iclass_mortlach_i16i64_prod(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x7f00)==0x200) { - /* GROUP: mortlach_zero */ - op0 = (INSWORD>>8)&0x3ff; - if(!op0) - return decode_iclass_mortlach_zero(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_60_mortlach_zero - UNMATCHED; - } - if(op0==2 && (op1&0x7f00)==0x300) { - /* GROUP: mortlach_multizero */ - op0 = (INSWORD>>3)&0x3ff; - if(!op0) - return decode_iclass_mortlach_multi_zero(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_61_mortlach_multizero - UNMATCHED; - } - if(op0==2 && (op1&0x7f00)==0x1200) - return decode_iclass_mortlach_zero_zt(ctx, dec); - if(op0==2 && (op1&0x7f00)==0x1300) { - /* GROUP: mortlach_mov_zt */ - op0 = (INSWORD>>17)&1; - op1 = (INSWORD>>15)&3; - op2 = (INSWORD>>14)&1; - if(!op0 && !op1) - return decode_iclass_mortlach_extract_zt(ctx, dec); - if(!op0 && op1==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_63_mortlach_mov_zt - if(op0 && !op1) - return decode_iclass_mortlach_insert_zt(ctx, dec); - if(op0 && op1==2 && !op2) - return decode_iclass_mortlach_move_to_zt(ctx, dec); - if(op0 && op1==2 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_64_mortlach_mov_zt - if(op1&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_62_mortlach_mov_zt - UNMATCHED; - } - if(op0==2 && (op1&0x6e00)==0x600) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_11_sme - if(op0==2 && (op1&0x7e00)==0x2600) { - /* GROUP: mortlach_zt_expand_nctg */ - op0 = (INSWORD>>16)&7; - op1 = (INSWORD>>14)&3; - op4 = (INSWORD>>6)&1; - op2 = (INSWORD>>5)&1; - op3 = (INSWORD>>2)&3; - if(!(op0&6) && !op1 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_68_mortlach_zt_expand_nctg - if(op0==2 && !op1 && !op4 && !op2 && !op3) - return decode_iclass_mortlach_expand_4dst3src_nctg(ctx, dec); - if(op0==2 && !op1 && op4 && !op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_70_mortlach_zt_expand_nctg - if(op0==3 && !op1 && !op2 && !op3) - return decode_iclass_mortlach_expand_4dst2src_nctg(ctx, dec); - if((op0&6)==2 && !op1 && op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_69_mortlach_zt_expand_nctg - if((op0&4)==4 && !op1 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_67_mortlach_zt_expand_nctg - if(op1==2 && !op3) - return decode_iclass_mortlach_expand_4dst_nctg(ctx, dec); - if(!(op1&1) && op3==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_66_mortlach_zt_expand_nctg - if(op1&1 && !(op3&2)) - return decode_iclass_mortlach_expand_2dst_nctg(ctx, dec); - if((op3&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_65_mortlach_zt_expand_nctg - UNMATCHED; - } - if(op0==2 && (op1&0x7e00)==0x3600) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_15_sme - if(op0==2 && (op1&0x6e00)==0x2200) { - /* GROUP: mortlach_zt_expand_ctg */ - op0 = (INSWORD>>22)&1; - op1 = (INSWORD>>14)&0x1f; - op4 = (INSWORD>>6)&1; - op2 = (INSWORD>>5)&1; - op3 = INSWORD&3; - if(!op0 && !(op1&0x1b) && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_74_mortlach_zt_expand_ctg - if(!op0 && op1==8 && !op4 && !op2 && !op3) - return decode_iclass_mortlach_expand_4dst3src_ctg(ctx, dec); - if(!op0 && op1==8 && op4 && !op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_76_mortlach_zt_expand_ctg - if(!op0 && op1==12 && !op2 && !op3) - return decode_iclass_mortlach_expand_4dst2src_ctg(ctx, dec); - if(!op0 && (op1&0x1b)==8 && op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_75_mortlach_zt_expand_ctg - if(!op0 && (op1&0x13)==0x10 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_73_mortlach_zt_expand_ctg - if(!op0 && (op1&3)==2 && !op3) - return decode_iclass_mortlach_expand_4dst_ctg(ctx, dec); - if(!op0 && !(op1&1) && op3==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_72_mortlach_zt_expand_ctg - if(!op0 && op1&1 && !(op3&1)) - return decode_iclass_mortlach_expand_2dst_ctg(ctx, dec); - if(!op0 && op3&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_71_mortlach_zt_expand_ctg - if(op0) - return decode_iclass_mortlach_expand_1dst(ctx, dec); - UNMATCHED; - } - if(op0==2 && !(op1&0x4e80) && !(op2&0x10)) { - /* GROUP: mortlach_ins */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>18)&1; - op2 = (INSWORD>>15)&3; - op3 = (INSWORD>>10)&7; - op4 = (INSWORD>>5)&3; - op5 = (INSWORD>>3)&1; - if(!op0 && op1 && !op2 && op3==2 && !(op4&1) && !op5) - return decode_iclass_mortlach_multi2_za_insert_ctg(ctx, dec); - if(!op0 && op1 && !op2 && op3==3 && !op4 && !op5) - return decode_iclass_mortlach_multi4_za_insert_ctg(ctx, dec); - if(!op0 && op1 && !op2 && op3==3 && op4==2 && !op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_84_mortlach_ins - if(!op0 && op1 && op2==1 && (op3&6)==2 && !(op4&1) && !op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_83_mortlach_ins - if(!op1) - return decode_iclass_mortlach_insert_pred(ctx, dec); - if(op1 && !(op2&2) && !op3 && !(op4&1) && !op5) - return decode_iclass_mortlach_multi2_insert_ctg(ctx, dec); - if(op1 && !(op2&2) && op3==1 && !op4 && !op5) - return decode_iclass_mortlach_multi4_insert_ctg(ctx, dec); - if(op1 && !(op2&2) && op3==1 && op4==2 && !op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_82_mortlach_ins - if(op1 && !(op2&2) && !(op3&4) && !(op4&1) && op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_80_mortlach_ins - if(op1 && !(op2&2) && !(op3&4) && op4&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_79_mortlach_ins - if(op1 && !(op2&2) && (op3&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_78_mortlach_ins - if(op1 && (op2&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_77_mortlach_ins - if(op0 && op1 && !(op2&2) && (op3&6)==2 && !(op4&1) && !op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_81_mortlach_ins - UNMATCHED; - } - if(op0==2 && !(op1&0x4e80) && (op2&0x10)==0x10) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_16_sme - if(op0==2 && (op1&0x4e80)==0x80) { - /* GROUP: mortlach_ext */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>18)&1; - op2 = (INSWORD>>15)&3; - op3 = (INSWORD>>10)&7; - op4 = (INSWORD>>8)&3; - op5 = INSWORD&3; - if(!op0 && op1 && !op2 && op3==2 && !op4 && !(op5&1)) - return decode_iclass_mortlach_multi2_za_extract_ctg(ctx, dec); - if(!op0 && op1 && !op2 && op3==2 && op4==2 && !(op5&1)) - return decode_iclass_mortlach_multi2_za_extract_zero(ctx, dec); - if(!op0 && op1 && !op2 && op3==3 && !op4 && !op5) - return decode_iclass_mortlach_multi4_za_extract_ctg(ctx, dec); - if(!op0 && op1 && !op2 && op3==3 && op4==2 && !op5) - return decode_iclass_mortlach_multi4_za_extract_zero(ctx, dec); - if(!op0 && op1 && !op2 && op3==3 && !(op4&1) && op5==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_93_mortlach_ext - if(!op0 && op1 && op2==1 && (op3&6)==2 && !(op4&1) && !(op5&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_92_mortlach_ext - if(!op1 && !op3 && (op4&2)==2) - return decode_iclass_mortlach_extract_zero(ctx, dec); - if(!op1 && !(op4&2)) - return decode_iclass_mortlach_extract_pred(ctx, dec); - if(!op1 && op3 && (op4&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_86_mortlach_ext - if(op1 && !(op2&2) && !op3 && !op4 && !(op5&1)) - return decode_iclass_mortlach_multi2_extract_ctg(ctx, dec); - if(op1 && !(op2&2) && !op3 && op4==2 && !(op5&1)) - return decode_iclass_mortlach_multi2_extract_zero(ctx, dec); - if(op1 && !(op2&2) && op3==1 && !op4 && !op5) - return decode_iclass_mortlach_multi4_extract_ctg(ctx, dec); - if(op1 && !(op2&2) && op3==1 && op4==2 && !op5) - return decode_iclass_mortlach_multi4_extract_zero(ctx, dec); - if(op1 && !(op2&2) && op3==1 && !(op4&1) && op5==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_91_mortlach_ext - if(op1 && !(op2&2) && !(op3&4) && !(op4&1) && op5&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_89_mortlach_ext - if(op1 && !(op2&2) && !(op3&4) && op4&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_88_mortlach_ext - if(op1 && !(op2&2) && (op3&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_87_mortlach_ext - if(op1 && (op2&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_85_mortlach_ext - if(op0 && op1 && !(op2&2) && (op3&6)==2 && !(op4&1) && !(op5&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_90_mortlach_ext - UNMATCHED; - } - if(op0==2 && (op1&0x4e00)==0x400 && !(op2&8)) { - /* GROUP: mortlach_hvadd */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>17)&3; - op2 = (INSWORD>>4)&1; - if(!op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_94_mortlach_hvadd - if(op0 && !op1 && !op2) - return decode_iclass_mortlach_addhv(ctx, dec); - if(op0 && !op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_96_mortlach_hvadd - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_95_mortlach_hvadd - UNMATCHED; - } - if(op0==2 && (op1&0x4e00)==0x400 && (op2&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_12_sme - if(op0==2 && (op1&0x4800)==0x800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_5_sme - if(op0==2 && (op1&0x6c20)==0x4800) { - /* GROUP: mortlach_multi_array_1a */ - op0 = (INSWORD>>22)&1; - op1 = (INSWORD>>10)&7; - op2 = (INSWORD>>2)&7; - op3 = (INSWORD>>1)&1; - if(!op0 && !op1 && !op2 && op3) - return decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_long_sm(ctx, dec); - if(!op0 && !op1 && op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_100_mortlach_multi_array_1a - if(!op0 && op1==2) - return decode_iclass_mortlach_multi2_zz_za_fma_long_sm(ctx, dec); - if(!op0 && op1==3) - return decode_iclass_mortlach_multi1_zz_za_fma_long_sm(ctx, dec); - if(!op0 && op1==4) - return decode_iclass_mortlach_multi2_z_za_fpdot_sm(ctx, dec); - if(!op0 && op1==5 && (op2&2)==2) - return decode_iclass_mortlach_multi2_z_za_mixed_dot_sm(ctx, dec); - if(op0 && !op1 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_99_mortlach_multi_array_1a - if(op0 && op1==2) - return decode_iclass_mortlach_multi2_zz_za_mla_long_sm(ctx, dec); - if(op0 && op1==3) - return decode_iclass_mortlach_multi1_zz_za_mla_long_sm(ctx, dec); - if(op0 && op1==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_97_mortlach_multi_array_1a - if(op0 && op1==5 && (op2&2)==2) - return decode_iclass_mortlach_multi2_z_za_2way_dot_sm(ctx, dec); - if(!op1 && !op3) - return decode_iclass_mortlach_multi2_zz_za_mla_long_long_sm(ctx, dec); - if(op1==1) - return decode_iclass_mortlach_multi1_zz_za_mla_long_long_sm(ctx, dec); - if(op1==5 && !(op2&2)) - return decode_iclass_mortlach_multi2_z_za_4way_dot_sm(ctx, dec); - if(op1==6 && !(op2&4)) - return decode_iclass_mortlach_multi2_zz_za_float_sm(ctx, dec); - if(op1==6 && (op2&4)==4) - return decode_iclass_mortlach_multi2_zz_za_int_sm(ctx, dec); - if(op1==7 && !(op2&4)) - return decode_iclass_mortlach_multi2_zz_za_f16_sm(ctx, dec); - if(op1==7 && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_98_mortlach_multi_array_1a - UNMATCHED; - } - if(op0==2 && (op1&0x6c20)==0x4c00) { - /* GROUP: mortlach_multi_array_1b */ - op0 = (INSWORD>>22)&1; - op1 = (INSWORD>>10)&7; - op2 = (INSWORD>>2)&7; - op3 = (INSWORD>>1)&1; - if(!op0 && !op1 && !op2 && op3) - return decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_long_sm(ctx, dec); - if(!op0 && !op1 && op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_107_mortlach_multi_array_1b - if(!op0 && op1==1 && !op2) - return decode_iclass_mortlach_multi1_zz_za_fp8_fma_long_long_sm(ctx, dec); - if(!op0 && op1==1 && op2==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_108_mortlach_multi_array_1b - if(!op0 && op1==2) - return decode_iclass_mortlach_multi4_zz_za_fma_long_sm(ctx, dec); - if(!op0 && op1==3 && !(op2&6)) - return decode_iclass_mortlach_multi1_zz_za_fp8_fma_long_sm(ctx, dec); - if(!op0 && (op1&5)==1 && (op2&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_105_mortlach_multi_array_1b - if(!op0 && (op1&5)==1 && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_102_mortlach_multi_array_1b - if(!op0 && op1==4) - return decode_iclass_mortlach_multi4_z_za_fpdot_sm(ctx, dec); - if(!op0 && op1==5 && (op2&2)==2) - return decode_iclass_mortlach_multi4_z_za_mixed_dot_sm(ctx, dec); - if(op0 && !op1 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_106_mortlach_multi_array_1b - if(op0 && op1==2) - return decode_iclass_mortlach_multi4_zz_za_mla_long_sm(ctx, dec); - if(op0 && (op1&5)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_101_mortlach_multi_array_1b - if(op0 && op1==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_103_mortlach_multi_array_1b - if(op0 && op1==5 && (op2&2)==2) - return decode_iclass_mortlach_multi4_z_za_2way_dot_sm(ctx, dec); - if(!op1 && !op3) - return decode_iclass_mortlach_multi4_zz_za_mla_long_long_sm(ctx, dec); - if(op1==5 && !(op2&2)) - return decode_iclass_mortlach_multi4_z_za_4way_dot_sm(ctx, dec); - if(op1==6 && !(op2&4)) - return decode_iclass_mortlach_multi4_zz_za_float_sm(ctx, dec); - if(op1==6 && (op2&4)==4) - return decode_iclass_mortlach_multi4_zz_za_int_sm(ctx, dec); - if(op1==7 && !(op2&4)) - return decode_iclass_mortlach_multi4_zz_za_f16_sm(ctx, dec); - if(op1==7 && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_104_mortlach_multi_array_1b - UNMATCHED; - } - if(op0==2 && (op1&0x683c)==0x483c) { - /* GROUP: mortlach_multi_sve_6 */ - op0 = (INSWORD>>10)&3; - op1 = INSWORD&15; - if(op0==1 && !(op1&3)) - return decode_iclass_mortlach_multi4_lut6_16_ctg(ctx, dec); - if(op0==1 && (op1&3)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_112_mortlach_multi_sve_6 - if(op0==1 && (op1&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_110_mortlach_multi_sve_6 - if(op0==3 && !(op1&12)) - return decode_iclass_mortlach_multi4_lut6_16_nctg(ctx, dec); - if(op0==3 && (op1&12)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_113_mortlach_multi_sve_6 - if(op0==3 && (op1&8)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_111_mortlach_multi_sve_6 - if(!(op0&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_109_mortlach_multi_sve_6 - UNMATCHED; - } - if(op0==2 && (op1&0x6860)==0x6800) { - /* GROUP: mortlach_multi_array_2a */ - op0 = (INSWORD>>22)&1; - op1 = (INSWORD>>19)&3; - op2 = (INSWORD>>17)&3; - op3 = (INSWORD>>10)&7; - op4 = (INSWORD>>5)&1; - op5 = (INSWORD>>2)&7; - op6 = (INSWORD>>1)&1; - if(!op0 && !op3 && op4 && !op5 && !op6) - return decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_long_mm(ctx, dec); - if(!op0 && !op3 && op4 && op5==1 && !op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_130_mortlach_multi_array_2a - if(!op0 && !op3 && op4 && (op5&6)==4 && !op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_128_mortlach_multi_array_2a - if(!op0 && !op3 && op4 && !(op5&2) && op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_124_mortlach_multi_array_2a - if(!op0 && op3==2 && !op4 && !(op5&1)) - return decode_iclass_mortlach_multi2_zz_za_fma_long_mm(ctx, dec); - if(!op0 && op3==2 && op4 && !op5) - return decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_mm(ctx, dec); - if(!op0 && op3==2 && op4 && op5==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_129_mortlach_multi_array_2a - if(!op0 && op3==2 && op4 && (op5&3)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_125_mortlach_multi_array_2a - if(!op0 && (op3&5)==1 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_116_mortlach_multi_array_2a - if(!op0 && op3==4 && !(op5&2)) - return decode_iclass_mortlach_multi2_z_za_fpdot_mm(ctx, dec); - if(!op0 && op3==5 && !op4 && (op5&6)==2) - return decode_iclass_mortlach_multi2_z_za_mixed_dot_mm(ctx, dec); - if(!op0 && op3==5 && !op4 && (op5&6)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_126_mortlach_multi_array_2a - if(!op0 && op3==6 && op4 && !(op5&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_122_mortlach_multi_array_2a - if(!op0 && (op3&5)==5 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_117_mortlach_multi_array_2a - if(!op0 && !(op3&1) && op4 && (op5&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_118_mortlach_multi_array_2a - if(op0 && op3==2 && !op4 && !(op5&1)) - return decode_iclass_mortlach_multi2_zz_za_mla_long_mm(ctx, dec); - if(op0 && op3==4 && !op4 && !(op5&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_123_mortlach_multi_array_2a - if(op0 && op3==5 && !op4 && (op5&2)==2) - return decode_iclass_mortlach_multi2_z_za_2way_dot_mm(ctx, dec); - if(op0 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_114_mortlach_multi_array_2a - if(!op1 && !op2 && op3==7 && !op4 && !(op5&4)) - return decode_iclass_mortlach_multi2_z_za_float_mm(ctx, dec); - if(!op1 && !op2 && op3==7 && !op4 && (op5&4)==4) - return decode_iclass_mortlach_multi2_z_za_int_mm(ctx, dec); - if(!op1 && op2==2 && op3==7 && !op4 && !(op5&4)) - return decode_iclass_mortlach_multi2_z_za_f16_mm(ctx, dec); - if(!op1 && op2==2 && op3==7 && !op4 && (op5&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_131_mortlach_multi_array_2a - if(!op1 && op2&1 && op3==7 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_127_mortlach_multi_array_2a - if(!op3 && !op4 && !op6) - return decode_iclass_mortlach_multi2_zz_za_mla_long_long_mm(ctx, dec); - if(!op3 && !op4 && op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_120_mortlach_multi_array_2a - if(op3==2 && !op4 && op5&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_121_mortlach_multi_array_2a - if((op3&5)==1 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_115_mortlach_multi_array_2a - if(op3==4 && !op4 && (op5&2)==2) - return decode_iclass_mortlach_multi2_zz_za_f16_mm(ctx, dec); - if(op3==5 && !op4 && !(op5&2)) - return decode_iclass_mortlach_multi2_z_za_4way_dot_mm(ctx, dec); - if(op3==6 && !op4 && !(op5&4)) - return decode_iclass_mortlach_multi2_zz_za_float_mm(ctx, dec); - if(op3==6 && !op4 && (op5&4)==4) - return decode_iclass_mortlach_multi2_zz_za_int_mm(ctx, dec); - if(op1 && op3==7 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_119_mortlach_multi_array_2a - UNMATCHED; - } - if(op0==2 && (op1&0x6860)==0x6840) { - /* GROUP: mortlach_multi_array_2b */ - op0 = (INSWORD>>22)&1; - op1 = (INSWORD>>19)&3; - op2 = (INSWORD>>17)&3; - op3 = (INSWORD>>10)&7; - op4 = (INSWORD>>5)&3; - op5 = (INSWORD>>2)&7; - op6 = (INSWORD>>1)&1; - if(!op0 && !(op2&1) && !op3 && op4==1 && !op5 && !op6) - return decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_long_mm(ctx, dec); - if(!op0 && !(op2&1) && !op3 && op4==1 && op5==1 && !op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_150_mortlach_multi_array_2b - if(!op0 && !(op2&1) && !op3 && op4==1 && (op5&6)==4 && !op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_147_mortlach_multi_array_2b - if(!op0 && !(op2&1) && !op3 && op4==1 && !(op5&2) && op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_144_mortlach_multi_array_2b - if(!op0 && !(op2&1) && op3==2 && !op4 && !(op5&1)) - return decode_iclass_mortlach_multi4_zz_za_fma_long_mm(ctx, dec); - if(!op0 && !(op2&1) && op3==2 && op4==1 && !op5) - return decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_mm(ctx, dec); - if(!op0 && !(op2&1) && op3==2 && op4==1 && op5==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_148_mortlach_multi_array_2b - if(!op0 && !(op2&1) && op3==2 && op4==1 && (op5&3)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_145_mortlach_multi_array_2b - if(!op0 && !(op2&1) && (op3&5)==1 && op4==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_136_mortlach_multi_array_2b - if(!op0 && !(op2&1) && op3==4 && !(op4&2) && !(op5&2)) - return decode_iclass_mortlach_multi4_z_za_fpdot_mm(ctx, dec); - if(!op0 && !(op2&1) && op3==5 && !op4 && (op5&6)==2) - return decode_iclass_mortlach_multi4_z_za_mixed_dot_mm(ctx, dec); - if(!op0 && !(op2&1) && op3==5 && !op4 && (op5&6)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_146_mortlach_multi_array_2b - if(!op0 && !(op2&1) && op3==6 && op4==1 && !(op5&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_142_mortlach_multi_array_2b - if(!op0 && !(op2&1) && (op3&5)==5 && op4==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_137_mortlach_multi_array_2b - if(!op0 && !(op2&1) && !(op3&1) && op4==1 && (op5&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_138_mortlach_multi_array_2b - if(op0 && !(op2&1) && op3==2 && !op4 && !(op5&1)) - return decode_iclass_mortlach_multi4_zz_za_mla_long_mm(ctx, dec); - if(op0 && !(op2&1) && op3==4 && !op4 && !(op5&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_143_mortlach_multi_array_2b - if(op0 && !(op2&1) && op3==5 && !op4 && (op5&2)==2) - return decode_iclass_mortlach_multi4_z_za_2way_dot_mm(ctx, dec); - if(op0 && !(op2&1) && op4==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_134_mortlach_multi_array_2b - if(!op1 && !op2 && op3==7 && !op4 && !(op5&4)) - return decode_iclass_mortlach_multi4_z_za_float_mm(ctx, dec); - if(!op1 && !op2 && op3==7 && !op4 && (op5&4)==4) - return decode_iclass_mortlach_multi4_z_za_int_mm(ctx, dec); - if(!op1 && op2==2 && op3==7 && !op4 && !(op5&4)) - return decode_iclass_mortlach_multi4_z_za_f16_mm(ctx, dec); - if(!op1 && op2==2 && op3==7 && !op4 && (op5&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_149_mortlach_multi_array_2b - if(!(op2&1) && !op3 && !op4 && !op6) - return decode_iclass_mortlach_multi4_zz_za_mla_long_long_mm(ctx, dec); - if(!(op2&1) && !op3 && !op4 && op6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_140_mortlach_multi_array_2b - if(!(op2&1) && op3==2 && !op4 && op5&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_141_mortlach_multi_array_2b - if(!(op2&1) && (op3&5)==1 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_135_mortlach_multi_array_2b - if(!(op2&1) && op3==4 && !op4 && (op5&2)==2) - return decode_iclass_mortlach_multi4_zz_za_f16_mm(ctx, dec); - if(!(op2&1) && op3==5 && !op4 && !(op5&2)) - return decode_iclass_mortlach_multi4_z_za_4way_dot_mm(ctx, dec); - if(!(op2&1) && op3==6 && !op4 && !(op5&4)) - return decode_iclass_mortlach_multi4_zz_za_float_mm(ctx, dec); - if(!(op2&1) && op3==6 && !op4 && (op5&4)==4) - return decode_iclass_mortlach_multi4_zz_za_int_mm(ctx, dec); - if(!(op2&1) && (op4&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_133_mortlach_multi_array_2b - if(op2&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_132_mortlach_multi_array_2b - if(op1 && !(op2&1) && op3==7 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_139_mortlach_multi_array_2b - UNMATCHED; - } - if(op0==2 && (op1&0x683c)==0x683c) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_19_sme - if(op0==2 && (op1&0x4c00)==0x4000) { - /* GROUP: mortlach_multi_indexed_1 */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>12)&1; - op2 = (INSWORD>>2)&7; - if(!op0) - return decode_iclass_mortlach_multi1_mla_long_long_idx_s(ctx, dec); - if(op0==1 && !op2) - return decode_iclass_mortlach_multi1_fp8_fma_long_long_idx(ctx, dec); - if(op0==1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_151_mortlach_multi_indexed_1 - if(op0==2 && !op1 && !(op2&1)) - return decode_iclass_mortlach_multi1_mla_long_long_idx_d(ctx, dec); - if(op0==2 && !op1 && op2&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_152_mortlach_multi_indexed_1 - if(op0==2 && op1) - return decode_iclass_mortlach_multi1_fma_long_idx(ctx, dec); - if(op0==3 && !op1 && !(op2&4)) - return decode_iclass_mortlach_multi1_fp8_fma_long_idx(ctx, dec); - if(op0==3 && !op1 && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_153_mortlach_multi_indexed_1 - if(op0==3 && op1) - return decode_iclass_mortlach_multi1_mla_long_idx(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x4c20)==0x4400) { - /* GROUP: mortlach_multi_indexed_2 */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>11)&3; - op2 = (INSWORD>>5)&1; - op3 = (INSWORD>>3)&3; - if(!op0 && !(op1&2)) - return decode_iclass_mortlach_multi2_mla_long_long_idx_s(ctx, dec); - if(!op0 && (op1&2)==2) - return decode_iclass_mortlach_multi2_zza_idx_h(ctx, dec); - if(op0==1) - return decode_iclass_mortlach_multi2_zza_idx_s(ctx, dec); - if(op0==2 && !op1 && !op2) - return decode_iclass_mortlach_multi2_mla_long_long_idx_d(ctx, dec); - if(op0==2 && op1==1 && !op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_155_mortlach_multi_indexed_2 - if(op0==2 && !(op1&2) && op2 && !op3) - return decode_iclass_mortlach_multi2_fp8_fma_long_long_idx(ctx, dec); - if(op0==2 && !(op1&2) && op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_156_mortlach_multi_indexed_2 - if(op0==2 && (op1&2)==2 && !op2) - return decode_iclass_mortlach_multi2_fma_long_idx(ctx, dec); - if(op0==2 && (op1&2)==2 && op2 && !(op3&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_157_mortlach_multi_indexed_2 - if(op0==2 && (op1&2)==2 && op2 && (op3&2)==2) - return decode_iclass_mortlach_multi2_fp8_fma_long_idx(ctx, dec); - if(op0==3 && !op1 && !op2) - return decode_iclass_mortlach_multi2_zza_idx_d(ctx, dec); - if(op0==3 && op1==1 && !op2) - return decode_iclass_mortlach_multi2_fp8_fvdot_idx_s(ctx, dec); - if(op0==3 && (op1&2)==2 && !op2) - return decode_iclass_mortlach_multi2_mla_long_idx(ctx, dec); - if(op0==3 && op2 && !(op3&2)) - return decode_iclass_mortlach_multi2_fp8_fdot_idx(ctx, dec); - if(op0==3 && op2 && (op3&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_154_mortlach_multi_indexed_2 - UNMATCHED; - } - if(op0==2 && (op1&0x4c20)==0x4420) { - /* GROUP: mortlach_multi_indexed_3 */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>11)&3; - op2 = (INSWORD>>4)&7; - op3 = (INSWORD>>3)&1; - if(!op0 && !(op1&2) && !(op2&4)) - return decode_iclass_mortlach_multi4_mla_long_long_idx_s(ctx, dec); - if(!op0 && !(op1&2) && op2==4 && !op3) - return decode_iclass_mortlach_multi4_fp8_fma_long_long_idx(ctx, dec); - if(!op0 && !(op1&2) && op2==4 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_165_mortlach_multi_indexed_3 - if(!op0 && (op1&2)==2 && !(op2&4)) - return decode_iclass_mortlach_multi4_zza_idx_h(ctx, dec); - if(!op0 && (op1&2)==2 && op2==4) - return decode_iclass_mortlach_multi4_fp8_fdot_idx_h(ctx, dec); - if(!op0 && op2==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_161_mortlach_multi_indexed_3 - if(!op0 && (op2&6)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_159_mortlach_multi_indexed_3 - if(op0==1 && !(op2&4)) - return decode_iclass_mortlach_multi4_zza_idx_s(ctx, dec); - if(op0==2 && !op1 && !(op2&6)) - return decode_iclass_mortlach_multi4_mla_long_long_idx_d(ctx, dec); - if(op0==2 && op1==1 && !(op2&6)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_163_mortlach_multi_indexed_3 - if(op0==2 && !(op1&2) && (op2&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_162_mortlach_multi_indexed_3 - if(op0==2 && (op1&2)==2 && !(op2&6)) - return decode_iclass_mortlach_multi4_fma_long_idx(ctx, dec); - if(op0==2 && (op1&2)==2 && op2==2) - return decode_iclass_mortlach_multi4_fp8_fma_long_idx(ctx, dec); - if(op0==2 && (op1&2)==2 && op2==3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_164_mortlach_multi_indexed_3 - if(op0==3 && !(op1&2) && !(op2&6)) - return decode_iclass_mortlach_multi4_zza_idx_d(ctx, dec); - if(op0==3 && (op1&2)==2 && !(op2&6)) - return decode_iclass_mortlach_multi4_mla_long_idx(ctx, dec); - if(op0==3 && (op2&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_160_mortlach_multi_indexed_3 - if(op0 && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_158_mortlach_multi_indexed_3 - UNMATCHED; - } - if(op0==2 && (op1&0x4c3e)==0x4828) { - /* GROUP: mortlach_multi_sve_2a */ - op0 = (INSWORD>>10)&1; - op1 = (INSWORD>>8)&3; - op2 = (INSWORD>>5)&7; - if(!op0 && !op1 && !(op2&6)) - return decode_iclass_mortlach_multi2_z_z_minmax_sm(ctx, dec); - if(!op0 && !op1 && op2==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_172_mortlach_multi_sve_2a - if(!op0 && op1==1 && !(op2&6)) - return decode_iclass_mortlach_multi2_z_z_fminmax_sm(ctx, dec); - if(!op0 && op1==1 && op2==4) - return decode_iclass_mortlach_multi2_z_z_fscale_sm(ctx, dec); - if(!op0 && op1==1 && op2==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_173_mortlach_multi_sve_2a - if(!op0 && !(op1&2) && (op2&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_167_mortlach_multi_sve_2a - if(!op0 && op1==2) - return decode_iclass_mortlach_multi2_z_z_shift_sm(ctx, dec); - if(!op0 && op1==3 && !op2) - return decode_iclass_mortlach_multi2_z_z_add_sm(ctx, dec); - if(!op0 && op1==3 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_168_mortlach_multi_sve_2a - if(op0 && !op1 && !op2) - return decode_iclass_mortlach_multi2_z_z_sqdmulh_sm(ctx, dec); - if(op0 && !op1 && (op2&3)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_170_mortlach_multi_sve_2a - if(op0 && !op1 && op2&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_169_mortlach_multi_sve_2a - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_166_mortlach_multi_sve_2a - if(!op1 && op2==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_171_mortlach_multi_sve_2a - UNMATCHED; - } - if(op0==2 && (op1&0x4c3e)==0x482a && !(op2&2)) { - /* GROUP: mortlach_multi_sve_2b */ - op0 = (INSWORD>>10)&1; - op1 = (INSWORD>>8)&3; - op2 = (INSWORD>>5)&7; - if(!op0 && !op1 && !(op2&6)) - return decode_iclass_mortlach_multi4_z_z_minmax_sm(ctx, dec); - if(!op0 && !op1 && op2==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_180_mortlach_multi_sve_2b - if(!op0 && op1==1 && !(op2&6)) - return decode_iclass_mortlach_multi4_z_z_fminmax_sm(ctx, dec); - if(!op0 && op1==1 && op2==4) - return decode_iclass_mortlach_multi4_z_z_fscale_sm(ctx, dec); - if(!op0 && op1==1 && op2==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_181_mortlach_multi_sve_2b - if(!op0 && !(op1&2) && (op2&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_175_mortlach_multi_sve_2b - if(!op0 && op1==2) - return decode_iclass_mortlach_multi4_z_z_shift_sm(ctx, dec); - if(!op0 && op1==3 && !op2) - return decode_iclass_mortlach_multi4_z_z_add_sm(ctx, dec); - if(!op0 && op1==3 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_176_mortlach_multi_sve_2b - if(op0 && !op1 && !op2) - return decode_iclass_mortlach_multi4_z_z_sqdmulh_sm(ctx, dec); - if(op0 && !op1 && (op2&3)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_178_mortlach_multi_sve_2b - if(op0 && !op1 && op2&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_177_mortlach_multi_sve_2b - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_174_mortlach_multi_sve_2b - if(!op1 && op2==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_179_mortlach_multi_sve_2b - UNMATCHED; - } - if(op0==2 && (op1&0x4c3e)==0x482a && (op2&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_27_sme - if(op0==2 && (op1&0x4c3c)==0x4c28) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_20_sme - if(op0==2 && (op1&0x48ff)==0x482e && !(op2&2)) { - /* GROUP: mortlach_multi_sve_2d0 */ - op0 = (INSWORD>>7)&7; - if(!op0) - return decode_iclass_mortlach_multi4_z_z_minmax_mm(ctx, dec); - if(op0==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_183_mortlach_multi_sve_2d0 - if(op0==2) - return decode_iclass_mortlach_multi4_z_z_fminmax_mm(ctx, dec); - if(op0==3) - return decode_iclass_mortlach_multi4_z_z_fscale_mm(ctx, dec); - if((op0&6)==4) - return decode_iclass_mortlach_multi4_z_z_shift_mm(ctx, dec); - if((op0&6)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_182_mortlach_multi_sve_2d0 - UNMATCHED; - } - if(op0==2 && (op1&0x48ff)==0x482f && !(op2&2)) { - /* GROUP: mortlach_multi_sve_2d1 */ - op0 = (INSWORD>>5)&0x1f; - if(!op0) - return decode_iclass_mortlach_multi4_z_z_sqdmulh_mm(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_184_mortlach_multi_sve_2d1 - UNMATCHED; - } - if(op0==2 && (op1&0x48fe)==0x48ae && !(op2&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_33_sme - if(op0==2 && (op1&0x487f)==0x482c) { - /* GROUP: mortlach_multi_sve_2c0 */ - op0 = (INSWORD>>7)&7; - if(!op0) - return decode_iclass_mortlach_multi2_z_z_minmax_mm(ctx, dec); - if(op0==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_186_mortlach_multi_sve_2c0 - if(op0==2) - return decode_iclass_mortlach_multi2_z_z_fminmax_mm(ctx, dec); - if(op0==3) - return decode_iclass_mortlach_multi2_z_z_fscale_mm(ctx, dec); - if((op0&6)==4) - return decode_iclass_mortlach_multi2_z_z_shift_mm(ctx, dec); - if((op0&6)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_185_mortlach_multi_sve_2c0 - UNMATCHED; - } - if(op0==2 && (op1&0x487f)==0x482d) { - /* GROUP: mortlach_multi_sve_2c1 */ - op0 = (INSWORD>>5)&0x1f; - if(!op0) - return decode_iclass_mortlach_multi2_z_z_sqdmulh_mm(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_187_mortlach_multi_sve_2c1 - UNMATCHED; - } - if(op0==2 && (op1&0x487e)==0x482e && (op2&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_28_sme - if(op0==2 && (op1&0x487c)==0x486c) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_21_sme - if(op0==2 && (op1&0x4838)==0x4820) { - /* GROUP: mortlach_multi_sve_1 */ - op0 = (INSWORD>>16)&3; - op1 = (INSWORD>>5)&3; - op2 = INSWORD&3; - if(op0==1 && !op1 && !op2) - return decode_iclass_mortlach_multi4_select_int(ctx, dec); - if(op0==1 && !op1 && op2==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_192_mortlach_multi_sve_1 - if(op0==1 && op1==2 && !(op2&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_191_mortlach_multi_sve_1 - if(op0==3 && !(op1&1) && !(op2&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_190_mortlach_multi_sve_1 - if(!(op0&1) && !(op1&1) && !(op2&1)) - return decode_iclass_mortlach_multi2_select_int(ctx, dec); - if(!(op1&1) && op2&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_189_mortlach_multi_sve_1 - if(op1&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_188_mortlach_multi_sve_1 - UNMATCHED; - } - if(op0==2 && (op1&0x4838)==0x4830) { - /* GROUP: mortlach_multi_sve_3 */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>10)&7; - op2 = (INSWORD>>1)&1; - if(!op0 && op1==5) - return decode_iclass_mortlach_multi2_z_z_long_zip(ctx, dec); - if(op0==1 && op1==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_194_mortlach_multi_sve_3 - if(op0==2 && op1==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_195_mortlach_multi_sve_3 - if(op0==3 && op1==5) - return decode_iclass_mortlach_multi2_qrshr(ctx, dec); - if(!op1) - return decode_iclass_mortlach_multi2_fclamp(ctx, dec); - if(op1==1) - return decode_iclass_mortlach_multi2_clamp_int(ctx, dec); - if(op1==2 && !op2) - return decode_iclass_mortlach_multi4_fclamp(ctx, dec); - if(op1==3 && !op2) - return decode_iclass_mortlach_multi4_clamp_int(ctx, dec); - if((op1&6)==2 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_193_mortlach_multi_sve_3 - if(op1==4) - return decode_iclass_mortlach_multi2_z_z_zip(ctx, dec); - if((op1&6)==6) - return decode_iclass_mortlach_multi4_qrshr(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x483f)==0x4838) { - /* GROUP: mortlach_multi_sve_4 */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>18)&7; - op2 = (INSWORD>>16)&3; - op3 = (INSWORD>>5)&3; - op4 = INSWORD&3; - if(!op0 && !op1 && op2==1 && !(op4&1)) - return decode_iclass_mortlach_multi2_fpint_cvrt(ctx, dec); - if(!op0 && !op1 && op2==2 && !(op4&1)) - return decode_iclass_mortlach_multi2_intfp_cvrt(ctx, dec); - if(!op0 && op1==4 && op2==1 && !(op3&2) && !op4) - return decode_iclass_mortlach_multi4_fpint_cvrt(ctx, dec); - if(!op0 && op1==4 && op2==2 && !(op3&2) && !op4) - return decode_iclass_mortlach_multi4_intfp_cvrt(ctx, dec); - if(!op0 && op1==5 && !op2 && !(op3&2)) - return decode_iclass_mortlach_multi4_narrow_fp8_cvrt(ctx, dec); - if(!op0 && op1==5 && op2==3 && !op3 && !(op4&1)) - return decode_iclass_mortlach_multi4_z_z_long_zip(ctx, dec); - if(op0==1 && !op1 && op2==1 && !(op4&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_218_mortlach_multi_sve_4 - if(op0==1 && op1==1 && op2==3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_211_mortlach_multi_sve_4 - if(op0==1 && op1==5 && !op2 && !(op3&2) && (op4&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_225_mortlach_multi_sve_4 - if(op0==1 && (op1&6)==4 && !op2 && !(op3&2) && !(op4&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_219_mortlach_multi_sve_4 - if(!(op0&2) && !op1 && !op2) - return decode_iclass_mortlach_multi2_narrow_fp_cvrt(ctx, dec); - if(!(op0&2) && !op1 && op2==3) - return decode_iclass_mortlach_multi2_narrow_int_cvrt(ctx, dec); - if(!(op0&2) && op1==1 && !op2 && !(op3&1)) - return decode_iclass_mortlach_multi2_narrow_fp8_cvrt(ctx, dec); - if(!(op0&2) && op1==1 && !op2 && op3&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_212_mortlach_multi_sve_4 - if(op0==2 && !op1 && !op2) - return decode_iclass_mortlach_multi2_wide_fp_cvrt(ctx, dec); - if(op0==2 && op1==1 && !op2 && (op3&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_220_mortlach_multi_sve_4 - if(op0==2 && (op1&3)==1 && !op2 && !(op3&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_213_mortlach_multi_sve_4 - if(op0==3 && !(op1&6) && !op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_200_mortlach_multi_sve_4 - if(op0==3 && op1==5 && !op2 && !(op3&2) && (op4&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_226_mortlach_multi_sve_4 - if(op0==3 && (op1&6)==4 && !op2 && !(op3&2) && !(op4&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_221_mortlach_multi_sve_4 - if((op0&2)==2 && !op1 && op2==3 && op4&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_215_mortlach_multi_sve_4 - if((op0&2)==2 && !op1 && op2&1 && !(op4&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_201_mortlach_multi_sve_4 - if(!(op0&1) && op1==4 && !op2 && !(op3&2) && !(op4&2)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_222_mortlach_multi_sve_4 - if(!op1 && op2==1 && op4&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_203_mortlach_multi_sve_4 - if(!op1 && op2==2 && op4&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_204_mortlach_multi_sve_4 - if(op1==1 && op2==1) - return decode_iclass_mortlach_multi2_wide_int(ctx, dec); - if(op1==1 && op2==2) - return decode_iclass_mortlach_multi2_wide_fp8_cvrt(ctx, dec); - if((op1&6)==2 && !(op3&1) && !(op4&1)) - return decode_iclass_mortlach_multi2_frint(ctx, dec); - if(op1==4 && op2==1 && !(op3&2) && op4==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_223_mortlach_multi_sve_4 - if(op1==4 && op2==1 && (op3&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_205_mortlach_multi_sve_4 - if(op1==4 && op2==2 && !(op3&2) && op4==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_224_mortlach_multi_sve_4 - if(op1==4 && op2==3) - return decode_iclass_mortlach_multi4_narrow_int_cvrt(ctx, dec); - if(op1==4 && op2!=3 && !(op3&2) && (op4&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_206_mortlach_multi_sve_4 - if(op1==5 && op2==1 && !(op3&1) && !(op4&2)) - return decode_iclass_mortlach_multi4_wide_int(ctx, dec); - if(op1==5 && op2==1 && !(op3&1) && (op4&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_216_mortlach_multi_sve_4 - if(op1==5 && op2==1 && op3&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_207_mortlach_multi_sve_4 - if(op1==5 && op2==2 && !op3 && !(op4&1)) - return decode_iclass_mortlach_multi4_z_z_zip(ctx, dec); - if(op1==5 && op2==3 && (op3&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_208_mortlach_multi_sve_4 - if(op1==5 && (op2&2)==2 && !op3 && op4&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_217_mortlach_multi_sve_4 - if(op1==5 && (op2&2)==2 && op3==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_209_mortlach_multi_sve_4 - if((op1&6)==4 && !(op2&1) && (op3&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_198_mortlach_multi_sve_4 - if((op1&6)==6 && !op3 && !op4) - return decode_iclass_mortlach_multi4_frint(ctx, dec); - if((op1&6)==6 && !op3 && op4==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_210_mortlach_multi_sve_4 - if((op1&6)==6 && op3==2 && !(op4&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_199_mortlach_multi_sve_4 - if((op1&2)==2 && !(op3&1) && op4&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_197_mortlach_multi_sve_4 - if((op1&2)==2 && op3&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_196_mortlach_multi_sve_4 - if(op0 && !op1 && op2==2 && !(op4&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_214_mortlach_multi_sve_4 - if(op0 && op1==4 && op2==1 && !(op3&2) && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_227_mortlach_multi_sve_4 - if(op0 && op1==4 && op2==2 && !(op3&2) && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_228_mortlach_multi_sve_4 - if(op0 && op1==5 && op2==3 && !op3 && !(op4&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_229_mortlach_multi_sve_4 - if(op0!=1 && op1==1 && op2==3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_202_mortlach_multi_sve_4 - UNMATCHED; - } - if(op0==2 && (op1&0x483f)==0x4839 && !(op2&0x21)) { - /* GROUP: mortlach_multi_sve_5a */ - op0 = (INSWORD>>16)&3; - op1 = (INSWORD>>6)&1; - op2 = (INSWORD>>1)&1; - if(op0==1 && !op1 && !op2) - return decode_iclass_mortlach_multi4_fmul_mm(ctx, dec); - if(op0==1 && !op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_232_mortlach_multi_sve_5a - if(op0==1 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_231_mortlach_multi_sve_5a - if(op0==3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_230_mortlach_multi_sve_5a - if(!(op0&1)) - return decode_iclass_mortlach_multi2_fmul_mm(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x483f)==0x4839 && (op2&0x21)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_34_sme - if(op0==2 && (op1&0x483f)==0x4839 && (op2&0x20)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_29_sme - if(op0==2 && (op1&0x483f)==0x483a && !(op2&0x21)) { - /* GROUP: mortlach_multi_sve_5b */ - op0 = (INSWORD>>16)&1; - op1 = (INSWORD>>6)&1; - op2 = (INSWORD>>1)&1; - if(!op0) - return decode_iclass_mortlach_multi2_fmul_sm(ctx, dec); - if(op0 && !op1 && !op2) - return decode_iclass_mortlach_multi4_fmul_sm(ctx, dec); - if(op0 && !op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_234_mortlach_multi_sve_5b - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_233_mortlach_multi_sve_5b - UNMATCHED; - } - if(op0==2 && (op1&0x483f)==0x483a && (op2&0x21)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_35_sme - if(op0==2 && (op1&0x483f)==0x483a && (op2&0x20)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_30_sme - if(op0==2 && (op1&0x483f)==0x483b) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_24_sme - if(op0==3) { - /* GROUP: mortlach_mem */ - op0 = (INSWORD>>21)&15; - op1 = (INSWORD>>16)&0x1f; - op2 = (INSWORD>>15)&1; - op3 = (INSWORD>>10)&0x1f; - op4 = (INSWORD>>2)&7; - if(!(op0&9) && !(op4&4)) - return decode_iclass_mortlach_contig_load(ctx, dec); - if((op0&9)==1 && !(op4&4)) - return decode_iclass_mortlach_contig_store(ctx, dec); - if((op0&14)==8 && !op1 && !op2 && !(op3&7) && !(op4&4)) - return decode_iclass_mortlach_ctxt_ldst(ctx, dec); - if((op0&14)==8 && op2 && !op3 && !op4) - return decode_iclass_mortlach_zt_ldst(ctx, dec); - if((op0&14)==8 && op2 && !op3 && op4==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_245_mortlach_mem - if((op0&14)==8 && op2 && !op3 && (op4&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_244_mortlach_mem - if((op0&14)==8 && op2 && op3==8 && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_243_mortlach_mem - if((op0&14)==8 && op2 && (op3&0x17)==0x10 && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_242_mortlach_mem - if((op0&14)==8 && (op3&7)==1 && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_240_mortlach_mem - if((op0&14)==8 && (op3&6)==2 && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_239_mortlach_mem - if((op0&14)==8 && (op3&4)==4 && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_238_mortlach_mem - if((op0&14)==8 && op1 && !op2 && !(op3&7) && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_241_mortlach_mem - if((op0&14)==10 && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_236_mortlach_mem - if((op0&14)==12 && !(op4&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_237_mortlach_mem - if(op0==14 && !(op4&4)) - return decode_iclass_mortlach_contig_qload(ctx, dec); - if(op0==15 && !(op4&4)) - return decode_iclass_mortlach_contig_qstore(ctx, dec); - if((op4&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_235_mortlach_mem - UNMATCHED; - } - UNMATCHED; - } - if(op1==2) { - /* GROUP: sve */ - op0 = INSWORD>>29; - op1 = (INSWORD>>17)&0xff; - op2 = (INSWORD>>10)&0x3f; - op3 = (INSWORD>>4)&1; - if(!op0 && !(op1&0x90) && !(op2&0x38)) { - /* GROUP: sve_int_pred_bin */ - op0 = (INSWORD>>18)&7; - if(!(op0&6)) - return decode_iclass_sve_int_bin_pred_arit_0(ctx, dec); - if((op0&6)==2) - return decode_iclass_sve_int_bin_pred_arit_1(ctx, dec); - if(op0==4) - return decode_iclass_sve_int_bin_pred_arit_2(ctx, dec); - if(op0==5) - return decode_iclass_sve_int_bin_pred_div(ctx, dec); - if((op0&6)==6) - return decode_iclass_sve_int_bin_pred_log(ctx, dec); - UNMATCHED; - } - if(!op0 && !(op1&0x90) && (op2&0x38)==8) { - /* GROUP: sve_int_pred_red */ - op0 = (INSWORD>>18)&7; - if(!op0) - return decode_iclass_sve_int_reduce_0(ctx, dec); - if(op0==1) - return decode_iclass_sve_int_reduce_0q(ctx, dec); - if(op0==2) - return decode_iclass_sve_int_reduce_1(ctx, dec); - if(op0==3) - return decode_iclass_sve_int_reduce_1q(ctx, dec); - if((op0&6)==4) - return decode_iclass_sve_int_movprfx_pred(ctx, dec); - if(op0==6) - return decode_iclass_sve_int_reduce_2(ctx, dec); - if(op0==7) - return decode_iclass_sve_int_reduce_2q(ctx, dec); - UNMATCHED; - } - if(!op0 && !(op1&0x90) && (op2&0x38)==0x20) { - /* GROUP: sve_int_pred_shift */ - op0 = (INSWORD>>19)&3; - if(!(op0&2)) - return decode_iclass_sve_int_bin_pred_shift_0(ctx, dec); - if(op0==2) - return decode_iclass_sve_int_bin_pred_shift_1(ctx, dec); - if(op0==3) - return decode_iclass_sve_int_bin_pred_shift_2(ctx, dec); - UNMATCHED; - } - if(!op0 && !(op1&0x90) && (op2&0x38)==0x28) { - /* GROUP: sve_int_pred_un */ - op0 = (INSWORD>>19)&3; - if(!(op0&1)) - return decode_iclass_sve_int_un_pred_arit_0(ctx, dec); - if(op0&1) - return decode_iclass_sve_int_un_pred_arit_1(ctx, dec); - UNMATCHED; - } - if(!op0 && !(op1&0x90) && (op2&0x10)==0x10) { - /* GROUP: sve_int_muladd_pred */ - op0 = (INSWORD>>15)&1; - if(!op0) - return decode_iclass_sve_int_mlas_vvv_pred(ctx, dec); - if(op0) - return decode_iclass_sve_int_mladdsub_vvv_pred(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && (op2&0x38)==8) { - /* GROUP: sve_int_unpred_logical */ - op0 = (INSWORD>>10)&7; - if(!(op0&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_265_sve_int_unpred_logical - if(op0==4) - return decode_iclass_sve_int_bin_cons_log(ctx, dec); - if(op0==5) - return decode_iclass_sve_int_rotate_imm(ctx, dec); - if((op0&6)==6) - return decode_iclass_sve_int_tern_log(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && (op2&0x3c)==0x10) { - /* GROUP: sve_index */ - op0 = (INSWORD>>10)&3; - if(!op0) - return decode_iclass_sve_int_index_ii(ctx, dec); - if(op0==1) - return decode_iclass_sve_int_index_ri(ctx, dec); - if(op0==2) - return decode_iclass_sve_int_index_ir(ctx, dec); - if(op0==3) - return decode_iclass_sve_int_index_rr(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && (op2&0x3c)==0x14) { - /* GROUP: sve_alloca */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>11)&1; - if(!op0 && !op1) - return decode_iclass_sve_int_arith_vl(ctx, dec); - if(!op0 && op1) - return decode_iclass_sve_int_arith_svl(ctx, dec); - if(op0 && !op1) - return decode_iclass_sve_int_read_vl_a(ctx, dec); - if(op0 && op1) - return decode_iclass_sve_int_read_svl_a(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && (op2&0x38)==0x18) { - /* GROUP: sve_int_unpred_arit_b */ - op0 = (INSWORD>>10)&7; - if(!(op0&4)) - return decode_iclass_sve_int_mul_b(ctx, dec); - if((op0&6)==4) - return decode_iclass_sve_int_sqdmulh(ctx, dec); - if(op0==6) - return decode_iclass_sve_int_addqp(ctx, dec); - if(op0==7) - return decode_iclass_sve_int_addsubp(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && (op2&0x38)==0x20) { - /* GROUP: sve_int_unpred_shift */ - op0 = (INSWORD>>12)&1; - if(!op0) - return decode_iclass_sve_int_bin_cons_shift_a(ctx, dec); - if(op0) - return decode_iclass_sve_int_bin_cons_shift_b(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && (op2&0x3c)==0x2c) { - /* GROUP: sve_int_unpred_misc */ - op0 = (INSWORD>>10)&3; - if(!(op0&2)) - return decode_iclass_sve_int_bin_cons_misc_0_b(ctx, dec); - if(op0==2) - return decode_iclass_sve_int_bin_cons_misc_0_c(ctx, dec); - if(op0==3) - return decode_iclass_sve_int_bin_cons_misc_0_d(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && (op2&0x30)==0x30) { - /* GROUP: sve_countelt */ - op0 = (INSWORD>>20)&1; - op1 = (INSWORD>>11)&7; - if(!op0 && !(op1&6)) - return decode_iclass_sve_int_countvlv0(ctx, dec); - if(!op0 && op1==4) - return decode_iclass_sve_int_count(ctx, dec); - if(!op0 && op1==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_268_sve_countelt - if(op0 && !op1) - return decode_iclass_sve_int_countvlv1(ctx, dec); - if(op0 && op1==4) - return decode_iclass_sve_int_pred_pattern_a(ctx, dec); - if(op0 && (op1&3)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_267_sve_countelt - if((op1&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_266_sve_countelt - if((op1&6)==6) - return decode_iclass_sve_int_pred_pattern_b(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0xd0)==0x90 && !(op2&0x38)) { - /* GROUP: sve_perm_extract */ - op0 = (INSWORD>>22)&1; - if(!op0) - return decode_iclass_sve_int_perm_extract_i(ctx, dec); - if(op0) - return decode_iclass_sve_intx_perm_extract_i(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0xd0)==0xd0 && !(op2&0x38)) { - /* GROUP: sve_perm_inter_long */ - op0 = (INSWORD>>22)&1; - if(!op0) - return decode_iclass_sve_int_perm_bin_long_perm_zz(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_269_sve_perm_inter_long - UNMATCHED; - } - if(!op0 && (op1&0x98)==0x80) { - /* GROUP: sve_maskimm */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>18)&3; - if(op0==3 && !op1) - return decode_iclass_sve_int_dup_mask_imm(ctx, dec); - if(op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_270_sve_maskimm - if(op0!=3 && !op1) - return decode_iclass_sve_int_log_imm(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x98)==0x88) { - /* GROUP: sve_wideimm_pred */ - op0 = (INSWORD>>13)&7; - if(!(op0&4)) - return decode_iclass_sve_int_dup_imm_pred(ctx, dec); - if((op0&6)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_271_sve_wideimm_pred - if(op0==6) - return decode_iclass_sve_int_dup_fpimm_pred(ctx, dec); - if(op0==7) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_272_sve_wideimm_pred - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x90 && op2==9) { - /* GROUP: sve_perm_quads_a */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>20)&1; - if(!op0) - return decode_iclass_sve_int_perm_dupq_i(ctx, dec); - if(op0==1 && !op1) - return decode_iclass_sve_int_perm_extq(ctx, dec); - if(op0==1 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_274_sve_perm_quads_a - if((op0&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_273_sve_perm_quads_a - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x90 && op2==14) { - /* GROUP: sve_perm_unpred_d */ - op0 = (INSWORD>>19)&3; - op1 = (INSWORD>>16)&7; - op2 = (INSWORD>>9)&1; - op3 = (INSWORD>>4)&1; - if(!op0 && !op1) - return decode_iclass_sve_int_perm_dup_r(ctx, dec); - if(!op0 && op1==4) - return decode_iclass_sve_int_perm_insrs(ctx, dec); - if(!op0 && (op1&3)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_277_sve_perm_unpred_d - if(!op0 && (op1&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_275_sve_perm_unpred_d - if(op0==1 && !(op1&1) && !op3) - return decode_iclass_sve_int_mov_v2p(ctx, dec); - if(op0==1 && !(op1&1) && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_278_sve_perm_unpred_d - if(op0==1 && op1&1 && !op2) - return decode_iclass_sve_int_mov_p2v(ctx, dec); - if(op0==1 && op1&1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_279_sve_perm_unpred_d - if(op0==2 && !(op1&4)) - return decode_iclass_sve_int_perm_unpk(ctx, dec); - if(op0==2 && op1==4) - return decode_iclass_sve_int_perm_insrv(ctx, dec); - if(op0==2 && op1==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_281_sve_perm_unpred_d - if(op0==2 && (op1&6)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_280_sve_perm_unpred_d - if(op0==3 && !op1) - return decode_iclass_sve_int_perm_reverse_z(ctx, dec); - if(op0==3 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_276_sve_perm_unpred_d - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x90 && op2==15) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_259_sve - if(!op0 && (op1&0x90)==0x90 && (op2&0x38)==0x10) { - /* GROUP: sve_perm_predicates */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>16)&0x1f; - op2 = (INSWORD>>9)&15; - op3 = (INSWORD>>4)&1; - if(!op0 && (op1&0x1e)==0x10 && !op2 && !op3) - return decode_iclass_sve_int_perm_punpk(ctx, dec); - if(!(op1&0x10) && !(op2&1) && !op3) - return decode_iclass_sve_int_perm_bin_perm_pp(ctx, dec); - if(op1==0x14 && !op2 && !op3) - return decode_iclass_sve_int_perm_reverse_p(ctx, dec); - if(op1==0x15 && !op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_290_sve_perm_predicates - if((op1&0x1a)==0x10 && op2==2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_288_sve_perm_predicates - if((op1&0x1a)==0x10 && (op2&13)==4 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_287_sve_perm_predicates - if((op1&0x1a)==0x10 && (op2&9)==8 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_286_sve_perm_predicates - if((op1&0x1a)==0x12 && !(op2&1) && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_285_sve_perm_predicates - if((op1&0x18)==0x18 && !(op2&1) && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_284_sve_perm_predicates - if(!(op2&1) && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_283_sve_perm_predicates - if(op2&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_282_sve_perm_predicates - if(op0 && (op1&0x1e)==0x10 && !op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_289_sve_perm_predicates - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x90 && (op2&0x30)==0x20) { - /* GROUP: sve_perm_pred */ - op0 = (INSWORD>>20)&1; - op1 = (INSWORD>>17)&7; - op2 = (INSWORD>>16)&1; - op3 = (INSWORD>>13)&1; - if(!op0 && !op1 && !op2 && !op3) - return decode_iclass_sve_int_perm_cpy_v(ctx, dec); - if(!op0 && !op1 && op2 && !op3) - return decode_iclass_sve_int_perm_compact(ctx, dec); - if(!op0 && !op1 && op3) - return decode_iclass_sve_int_perm_last_r(ctx, dec); - if(!op0 && op1==1 && op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_294_sve_perm_pred - if(!op0 && op1==1 && !op3) - return decode_iclass_sve_int_perm_last_v(ctx, dec); - if(!op0 && (op1&6)==2) - return decode_iclass_sve_int_perm_rev(ctx, dec); - if(!op0 && op1==4 && !op2 && op3) - return decode_iclass_sve_int_perm_cpy_r(ctx, dec); - if(!op0 && op1==4 && !op3) - return decode_iclass_sve_int_perm_clast_zz(ctx, dec); - if(!op0 && op1==5 && !op3) - return decode_iclass_sve_int_perm_clast_vz(ctx, dec); - if(!op0 && op1==6 && !op2 && !op3) - return decode_iclass_sve_int_perm_splice(ctx, dec); - if(!op0 && op1==6 && !op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_295_sve_perm_pred - if(!op0 && op1==6 && op2 && !op3) - return decode_iclass_sve_intx_perm_splice(ctx, dec); - if(!op0 && op1==7 && !op2) - return decode_iclass_sve_int_perm_revd(ctx, dec); - if(!op0 && op1==7 && op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_296_sve_perm_pred - if(!op0 && (op1&4)==4 && op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_292_sve_perm_pred - if(!op0 && (op1&3)==1 && !op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_293_sve_perm_pred - if(op0 && !op1 && !op2 && !op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_297_sve_perm_pred - if(op0 && !op1 && op2 && !op3) - return decode_iclass_sve_int_perm_expand(ctx, dec); - if(op0 && !op1 && op3) - return decode_iclass_sve_int_perm_clast_rz(ctx, dec); - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_291_sve_perm_pred - UNMATCHED; - } - if(op0==1 && !(op1&0x90)) { - /* GROUP: sve_cmpvec */ - op0 = (INSWORD>>14)&1; - if(!op0) - return decode_iclass_sve_int_cmp_0(ctx, dec); - if(op0) - return decode_iclass_sve_int_cmp_1(ctx, dec); - UNMATCHED; - } - if(op0==1 && (op1&0x98)==0x80 && (op2&0x30)==0x30) { - /* GROUP: sve_pred_gen_b */ - op0 = (INSWORD>>9)&1; - if(!op0) - return decode_iclass_sve_int_brkp(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_298_sve_pred_gen_b - UNMATCHED; - } - if(op0==1 && (op1&0x98)==0x88 && (op2&0x30)==0x10) { - /* GROUP: sve_pred_gen_c */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>16)&15; - op2 = (INSWORD>>9)&1; - op3 = (INSWORD>>4)&1; - if(!op0 && op1==8 && !op2 && !op3) - return decode_iclass_sve_int_brkn(ctx, dec); - if(!op0 && op1==8 && !op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_304_sve_pred_gen_c - if(op0 && op1==8 && !op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_303_sve_pred_gen_c - if(!op1 && !op2) - return decode_iclass_sve_int_break(ctx, dec); - if(!(op1&7) && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_302_sve_pred_gen_c - if((op1&7)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_301_sve_pred_gen_c - if((op1&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_300_sve_pred_gen_c - if((op1&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_299_sve_pred_gen_c - UNMATCHED; - } - if(op0==1 && (op1&0x98)==0x88 && (op2&0x30)==0x30) { - /* GROUP: sve_pred_gen_d */ - op0 = (INSWORD>>16)&15; - op1 = (INSWORD>>11)&7; - op2 = (INSWORD>>9)&3; - op3 = (INSWORD>>5)&15; - op4 = (INSWORD>>4)&1; - if(!op0 && !(op2&1) && !op4) - return decode_iclass_sve_int_ptest(ctx, dec); - if(!op0 && op2&1 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_310_sve_pred_gen_d - if(op0==1 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_308_sve_pred_gen_d - if(op0==8 && !op1 && !op2 && !op4) - return decode_iclass_sve_int_pfirst(ctx, dec); - if(op0==8 && !op1 && op2==2 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_315_sve_pred_gen_d - if(op0==8 && op1==4 && op2==2 && !op3 && !op4) - return decode_iclass_sve_int_pfalse(ctx, dec); - if(op0==8 && op1==4 && op2==2 && op3 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_318_sve_pred_gen_d - if(op0==8 && op1==6 && !op2 && !op4) - return decode_iclass_sve_int_rdffr(ctx, dec); - if(op0==9 && !op1 && !op2 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_316_sve_pred_gen_d - if(op0==9 && !op1 && op2==2 && !op4) - return decode_iclass_sve_int_pnext(ctx, dec); - if(op0==9 && op1==4 && op2==2 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_317_sve_pred_gen_d - if(op0==9 && op1==6 && !op2 && !op3 && !op4) - return decode_iclass_sve_int_rdffr_2(ctx, dec); - if(op0==9 && op1==6 && !op2 && op3 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_319_sve_pred_gen_d - if((op0&14)==8 && op1==2 && !(op2&1) && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_312_sve_pred_gen_d - if((op0&14)==8 && !(op1&5) && op2&1 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_311_sve_pred_gen_d - if((op0&14)==8 && op1==4 && !(op2&2) && !op4) - return decode_iclass_sve_int_ptrue(ctx, dec); - if((op0&14)==8 && op1==4 && op2==3 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_314_sve_pred_gen_d - if((op0&14)==8 && op1==6 && op2 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_313_sve_pred_gen_d - if((op0&14)==8 && op1&1 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_309_sve_pred_gen_d - if(!(op0&6) && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_307_sve_pred_gen_d - if((op0&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_306_sve_pred_gen_d - if((op0&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_305_sve_pred_gen_d - UNMATCHED; - } - if(op0==1 && (op1&0x9c)==0x90 && (op2&0x30)==0x20) { - /* GROUP: sve_pred_count_a */ - op0 = (INSWORD>>11)&7; - op1 = (INSWORD>>9)&1; - if(!op0 && op1) - return decode_iclass_sve_int_pcount_pn(ctx, dec); - if(!op1) - return decode_iclass_sve_int_pcount_pred(ctx, dec); - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_320_sve_pred_count_a - UNMATCHED; - } - if(op0==1 && (op1&0x9c)==0x94 && (op2&0x3c)==0x20) { - /* GROUP: sve_pred_count_b */ - op0 = (INSWORD>>18)&1; - op1 = (INSWORD>>11)&1; - if(!op0 && !op1) - return decode_iclass_sve_int_count_v_sat(ctx, dec); - if(!op0 && op1) - return decode_iclass_sve_int_count_r_sat(ctx, dec); - if(op0 && !op1) - return decode_iclass_sve_int_count_v(ctx, dec); - if(op0 && op1) - return decode_iclass_sve_int_count_r(ctx, dec); - UNMATCHED; - } - if(op0==1 && (op1&0x9c)==0x94 && (op2&0x3c)==0x24) { - /* GROUP: sve_pred_wrffr */ - op0 = (INSWORD>>18)&1; - op1 = (INSWORD>>16)&3; - op2 = (INSWORD>>9)&7; - op3 = (INSWORD>>5)&15; - op4 = INSWORD&0x1f; - if(!op0 && !op1 && !op2 && !op4) - return decode_iclass_sve_int_wrffr(ctx, dec); - if(op0 && !op1 && !op2 && !op3 && !op4) - return decode_iclass_sve_int_setffr(ctx, dec); - if(op0 && !op1 && !op2 && op3 && !op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_324_sve_pred_wrffr - if(!op1 && !op2 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_323_sve_pred_wrffr - if(!op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_322_sve_pred_wrffr - if(op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_321_sve_pred_wrffr - UNMATCHED; - } - if(op0==1 && (op1&0x9c)==0x94 && (op2&0x38)==0x28) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_255_sve - if(op0==1 && (op1&0x98)==0x98 && (op2&0x30)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_246_sve - if(op0==1 && (op1&0x90)==0x90 && !(op2&0x30)) { - /* GROUP: sve_cmpgpr */ - op0 = (INSWORD>>12)&3; - op1 = (INSWORD>>10)&3; - op2 = INSWORD&15; - if(!(op0&2)) - return decode_iclass_sve_int_while_rr(ctx, dec); - if(op0==2 && !op1 && !op2) - return decode_iclass_sve_int_cterm(ctx, dec); - if(op0==2 && !op1 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_326_sve_cmpgpr - if(op0==3 && !op1) - return decode_iclass_sve_int_whilenc(ctx, dec); - if((op0&2)==2 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_325_sve_cmpgpr - UNMATCHED; - } - if(op0==1 && (op1&0x90)==0x90 && (op2&0x30)==0x10 && op3) { - /* GROUP: sve_while_pn */ - op0 = (INSWORD>>16)&0x1f; - op1 = (INSWORD>>11)&7; - op2 = (INSWORD>>5)&0x3f; - op3 = (INSWORD>>3)&1; - if(!op0 && op1==6) - return decode_iclass_sve_int_ctr_to_mask(ctx, dec); - if(!op0 && op1==7 && !op2 && !op3) - return decode_iclass_sve_int_pn_ptrue(ctx, dec); - if(!op0 && op1==7 && !op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_329_sve_while_pn - if(!op0 && op1==7 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_328_sve_while_pn - if((op1&6)==2) - return decode_iclass_sve_int_while_rr_pair(ctx, dec); - if(!(op1&2)) - return decode_iclass_sve_int_while_rr_pn(ctx, dec); - if(op0 && (op1&6)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_327_sve_while_pn - UNMATCHED; - } - if(op0==1 && (op1&0x90)==0x90 && (op2&0x30)==0x30) { - /* GROUP: sve_wideimm_unpred */ - op0 = (INSWORD>>19)&3; - op1 = (INSWORD>>16)&1; - if(!op0) - return decode_iclass_sve_int_arith_imm0(ctx, dec); - if(op0==1) - return decode_iclass_sve_int_arith_imm1(ctx, dec); - if(op0==2) - return decode_iclass_sve_int_arith_imm2(ctx, dec); - if(op0==3 && !op1) - return decode_iclass_sve_int_dup_imm(ctx, dec); - if(op0==3 && op1) - return decode_iclass_sve_int_dup_fpimm(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0xb0)==0x20 && (op2&0x3e)==0x32) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_260_sve - if(op0==2 && !(op1&0x90) && !(op2&0x20)) { - /* GROUP: sve_intx_muladd_unpred */ - op0 = (INSWORD>>10)&0x1f; - if(!(op0&0x1e)) - return decode_iclass_sve_intx_dot(ctx, dec); - if((op0&0x1e)==2) - return decode_iclass_sve_intx_qdmlalbt(ctx, dec); - if((op0&0x1c)==4) - return decode_iclass_sve_intx_cdot(ctx, dec); - if((op0&0x18)==8) - return decode_iclass_sve_intx_cmla(ctx, dec); - if((op0&0x18)==0x10) - return decode_iclass_sve_intx_mlal_long(ctx, dec); - if((op0&0x1c)==0x18) - return decode_iclass_sve_intx_qdmlal_long(ctx, dec); - if((op0&0x1e)==0x1c) - return decode_iclass_sve_intx_qrdmlah(ctx, dec); - if(op0==0x1e) - return decode_iclass_sve_intx_mixed_dot(ctx, dec); - if(op0==0x1f) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_330_sve_intx_muladd_unpred - UNMATCHED; - } - if(op0==2 && !(op1&0x90) && (op2&0x30)==0x20) { - /* GROUP: sve_intx_predicated */ - op0 = (INSWORD>>17)&15; - op1 = (INSWORD>>13)&1; - if(op0==2 && op1) - return decode_iclass_sve_intx_accumulate_long_pairs(ctx, dec); - if(op0==3 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_333_sve_intx_predicated - if((op0&14)==6 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_332_sve_intx_predicated - if(!(op0&10) && op1) - return decode_iclass_sve_intx_pred_arith_unary(ctx, dec); - if(!(op0&8) && !op1) - return decode_iclass_sve_intx_bin_pred_shift_sat_round(ctx, dec); - if((op0&12)==8 && !op1) - return decode_iclass_sve_intx_pred_arith_binary(ctx, dec); - if((op0&12)==8 && op1) - return decode_iclass_sve_intx_arith_binary_pairs(ctx, dec); - if((op0&12)==12 && !op1) - return decode_iclass_sve_intx_pred_arith_binary_sat(ctx, dec); - if((op0&12)==12 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_331_sve_intx_predicated - UNMATCHED; - } - if(op0==2 && (op1&0x90)==0x10) { - /* GROUP: sve_intx_by_indexed_elem */ - op0 = (INSWORD>>10)&0x3f; - if(!(op0&0x3e)) - return decode_iclass_sve_intx_dot_by_indexed_elem(ctx, dec); - if((op0&0x3e)==2) - return decode_iclass_sve_intx_mla_by_indexed_elem(ctx, dec); - if((op0&0x3e)==4) - return decode_iclass_sve_intx_qrdmlah_by_indexed_elem(ctx, dec); - if((op0&0x3e)==6) - return decode_iclass_sve_intx_mixed_dot_by_indexed_elem(ctx, dec); - if((op0&0x38)==8) - return decode_iclass_sve_intx_qdmla_long_by_indexed_elem(ctx, dec); - if((op0&0x3c)==0x10) - return decode_iclass_sve_intx_cdot_by_indexed_elem(ctx, dec); - if((op0&0x3c)==0x14) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_334_sve_intx_by_indexed_elem - if((op0&0x3c)==0x18) - return decode_iclass_sve_intx_cmla_by_indexed_elem(ctx, dec); - if((op0&0x3c)==0x1c) - return decode_iclass_sve_intx_qrdcmla_by_indexed_elem(ctx, dec); - if((op0&0x30)==0x20) - return decode_iclass_sve_intx_mla_long_by_indexed_elem(ctx, dec); - if((op0&0x38)==0x30) - return decode_iclass_sve_intx_mul_long_by_indexed_elem(ctx, dec); - if((op0&0x3c)==0x38) - return decode_iclass_sve_intx_qdmul_long_by_indexed_elem(ctx, dec); - if((op0&0x3e)==0x3c) - return decode_iclass_sve_intx_qdmulh_by_indexed_elem(ctx, dec); - if(op0==0x3e) - return decode_iclass_sve_intx_mul_by_indexed_elem(ctx, dec); - if(op0==0x3f) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_335_sve_intx_by_indexed_elem - UNMATCHED; - } - if(op0==2 && (op1&0x90)==0x80 && !(op2&0x20)) { - /* GROUP: sve_intx_cons_widening */ - op0 = (INSWORD>>13)&3; - if(!(op0&2)) - return decode_iclass_sve_intx_cons_arith_long(ctx, dec); - if(op0==2) - return decode_iclass_sve_intx_cons_arith_wide(ctx, dec); - if(op0==3) - return decode_iclass_sve_intx_cons_mul_long(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x90)==0x80 && (op2&0x30)==0x20) { - /* GROUP: sve_intx_constructive */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>10)&15; - if(!op0 && (op1&12)==8) - return decode_iclass_sve_intx_shift_long(ctx, dec); - if(op0 && (op1&12)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_336_sve_intx_constructive - if(!(op1&12)) - return decode_iclass_sve_intx_clong(ctx, dec); - if((op1&14)==4) - return decode_iclass_sve_intx_eorx(ctx, dec); - if(op1==6) - return decode_iclass_sve_intx_mmla(ctx, dec); - if(op1==7) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_337_sve_intx_constructive - if((op1&12)==12) - return decode_iclass_sve_intx_perm_bit(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x90)==0x80 && (op2&0x30)==0x30) { - /* GROUP: sve_intx_acc */ - op0 = (INSWORD>>17)&15; - op1 = (INSWORD>>11)&7; - if(!op0 && op1==3) - return decode_iclass_sve_intx_cadd(ctx, dec); - if(!(op1&6)) - return decode_iclass_sve_intx_aba_long(ctx, dec); - if(op1==2) - return decode_iclass_sve_intx_adc_long(ctx, dec); - if((op1&6)==4) - return decode_iclass_sve_intx_sra(ctx, dec); - if(op1==6) - return decode_iclass_sve_intx_shift_insert(ctx, dec); - if(op1==7) - return decode_iclass_sve_intx_aba(ctx, dec); - if(op0 && op1==3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_338_sve_intx_acc - UNMATCHED; - } - if(op0==2 && (op1&0x90)==0x90 && !(op2&0x20)) { - /* GROUP: sve_intx_narrowing */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>17)&3; - op2 = (INSWORD>>16)&1; - op3 = (INSWORD>>13)&3; - op4 = (INSWORD>>10)&1; - op5 = (INSWORD>>5)&1; - if(!op0 && !op1 && !op2 && op3==2) - return decode_iclass_sve_intx_extract_narrow(ctx, dec); - if(!op0 && !op1 && op2 && op3==2 && !op4 && !op5) - return decode_iclass_sve_intx_multi_extract_narrow(ctx, dec); - if(!op0 && !op1 && op2 && op3==2 && !op4 && op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_344_sve_intx_narrowing - if(!op0 && !op1 && op2 && op3==2 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_343_sve_intx_narrowing - if(!op0 && !(op3&2)) - return decode_iclass_sve_intx_shift_narrow(ctx, dec); - if(!op0 && op1 && op3==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_341_sve_intx_narrowing - if(op0 && !(op3&2) && !op4 && !op5) - return decode_iclass_sve_intx_multi_shift_narrow(ctx, dec); - if(op0 && !(op3&2) && !op4 && op5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_342_sve_intx_narrowing - if(op0 && !(op3&2) && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_339_sve_intx_narrowing - if(op0 && op3==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_340_sve_intx_narrowing - if(op3==3) - return decode_iclass_sve_intx_arith_narrow(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x90)==0x90 && (op2&0x38)==0x28) { - /* GROUP: sve_intx_histseg_lut */ - op2 = (INSWORD>>23)&1; - op0 = (INSWORD>>22)&1; - op1 = (INSWORD>>10)&7; - if(!op2 && !op0 && op1==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_346_sve_intx_histseg_lut - if(!op2 && !op0 && op1==3) - return decode_iclass_sve_intx_lut6_8(ctx, dec); - if(op2 && !op0 && (op1&5)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_345_sve_intx_histseg_lut - if(op0 && op1==1) - return decode_iclass_sve_intx_lut4_8(ctx, dec); - if(op0 && op1==3) - return decode_iclass_sve_intx_lut6_16(ctx, dec); - if(!op1) - return decode_iclass_sve_intx_histseg(ctx, dec); - if(op1==4) - return decode_iclass_sve_intx_lut2_8(ctx, dec); - if((op1&5)==5) - return decode_iclass_sve_intx_lut4_16(ctx, dec); - if((op1&3)==2) - return decode_iclass_sve_intx_lut2_16(ctx, dec); - UNMATCHED; - } - if(op0==2 && (op1&0x90)==0x90 && (op2&0x38)==0x38) { - /* GROUP: sve_intx_crypto */ - op0 = (INSWORD>>18)&7; - op1 = (INSWORD>>16)&3; - op2 = (INSWORD>>10)&7; - op3 = (INSWORD>>5)&0x1f; - op4 = INSWORD&1; - if(!op0 && !op1 && !(op2&6) && !op3) - return decode_iclass_sve_crypto_unary(ctx, dec); - if(!op0 && !op1 && !(op2&6) && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_352_sve_intx_crypto - if(!op0 && op1==1 && !(op2&6)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_351_sve_intx_crypto - if(!op0 && (op1&2)==2 && !(op2&6)) - return decode_iclass_sve_crypto_binary_dest(ctx, dec); - if(!(op0&1) && (op1&2)==2 && (op2&6)==2) - return decode_iclass_sve_crypto_binary_multi2(ctx, dec); - if(op0&1 && (op1&2)==2 && (op2&6)==2) - return decode_iclass_sve_crypto_binary_multi4(ctx, dec); - if(!op1 && (op2&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_349_sve_intx_crypto - if(op1==1 && (op2&6)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_350_sve_intx_crypto - if((op2&6)==4) - return decode_iclass_sve_crypto_binary_const(ctx, dec); - if(op2==6 && !op4) - return decode_iclass_sve_crypto_pmull_multi(ctx, dec); - if(op2==7 && !op4) - return decode_iclass_sve_crypto_pmlal_multi(ctx, dec); - if((op2&6)==6 && op4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_348_sve_intx_crypto - if(op0 && !(op2&6)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_347_sve_intx_crypto - UNMATCHED; - } - if(op0==3 && (op1&0xb0)==0x10 && (op2&0x3c)==0x1c) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_256_sve - if(op0==3 && (op1&0xb0)==0x10 && (op2&0x33)==0x22) { - /* GROUP: sve_fp8_fma_w */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>13)&1; - if(!op0) - return decode_iclass_sve_fp8_fma_long_long(ctx, dec); - if(op0 && !op1) - return decode_iclass_sve_fp8_fma_long(ctx, dec); - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_353_sve_fp8_fma_w - UNMATCHED; - } - if(op0==3 && (op1&0xb0)==0x10 && (op2&0x33)==0x23) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_257_sve - if(op0==3 && (op1&0xb0)==0x10 && (op2&0x34)==0x34) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_249_sve - if(op0==3 && (op1&0xb0)==0x30 && (op2&0x32)==0x22) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_250_sve - if(op0==3 && (op1&0xb0)==0x30 && (op2&0x14)==0x14) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_247_sve - if(op0==3 && (op1&0x9f)==1 && (op2&0x38)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_264_sve - if(op0==3 && (op1&0x9e)==4 && (op2&0x38)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_261_sve - if(op0==3 && !(op1&0x9a) && (op2&0x30)==0x30) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_251_sve - if(op0==3 && (op1&0x9a)==2 && (op2&0x20)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_248_sve - if(op0==3 && (op1&0x9c)==8 && (op2&0x30)==0x30) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_252_sve - if(op0==3 && (op1&0x9c)==12 && (op2&0x20)==0x20) { - /* GROUP: sve_fp_zeroing_unary */ - op0 = (INSWORD>>16)&7; - if(!(op0&6)) - return decode_iclass_sve_fp_z2op_p_zd_a(ctx, dec); - if(op0==2) - return decode_iclass_sve_fp_z2op_p_zd_b_0(ctx, dec); - if(op0==3) - return decode_iclass_sve_fp_z2op_p_zd_b_1(ctx, dec); - if((op0&6)==4) - return decode_iclass_sve_fp_z2op_p_zd_c(ctx, dec); - if((op0&6)==6) - return decode_iclass_sve_fp_z2op_p_zd_d(ctx, dec); - UNMATCHED; - } - if(op0==3 && (op1&0x90)==0x10 && op2==11) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_262_sve - if(op0==3 && (op1&0x90)==0x10 && (op2&0x3c)==12) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_253_sve - if(op0==3 && (op1&0x90)==0x10 && (op2&0x34)==0x10) { - /* GROUP: sve_fp_fma_w_by_indexed_elem */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>13)&1; - if(!op0 && !op1) - return decode_iclass_sve_fp_fdot_by_indexed_elem(ctx, dec); - if(!op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_354_sve_fp_fma_w_by_indexed_elem - if(op0) - return decode_iclass_sve_fp_fma_long_by_indexed_elem(ctx, dec); - UNMATCHED; - } - if(op0==3 && (op1&0x90)==0x10 && (op2&0x36)==0x20) { - /* GROUP: sve_fp_fma_w */ - op0 = (INSWORD>>23)&1; - op1 = (INSWORD>>13)&1; - if(!op0 && !op1) - return decode_iclass_sve_fp_fdot(ctx, dec); - if(!op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_355_sve_fp_fma_w - if(op0) - return decode_iclass_sve_fp_fma_long(ctx, dec); - UNMATCHED; - } - if(op0==3 && (op1&0x90)==0x10 && (op2&0x36)==0x24) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_254_sve - if(op0==3 && (op1&0x90)==0x10 && (op2&0x3e)==0x3a) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_258_sve - if(op0==3 && (op1&0x9c)==0x84 && (op2&0x3c)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_263_sve - if(op0==3 && (op1&0x9c)==0x84 && (op2&0x3c)==12) { - /* GROUP: sve_fp_unary_unpred */ - op0 = (INSWORD>>22)&3; - op1 = (INSWORD>>16)&7; - op2 = (INSWORD>>10)&3; - op3 = (INSWORD>>5)&1; - if(!op0 && !(op1&6)) - return decode_iclass_sve_fp8_fcvt_wide(ctx, dec); - if(!op0 && op1==2 && !op3) - return decode_iclass_sve_fp8_fcvt_narrow(ctx, dec); - if(!op0 && op1==2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_361_sve_fp_unary_unpred - if(!op0 && op1==3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_359_sve_fp_unary_unpred - if(op1==4) - return decode_iclass_sve_fp_ucvtf_wide(ctx, dec); - if(op1==5 && !(op2&2) && !op3) - return decode_iclass_sve_fp_fcvtzu_narrow(ctx, dec); - if(op1==5 && !(op2&2) && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_360_sve_fp_unary_unpred - if(op1==5 && (op2&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_358_sve_fp_unary_unpred - if((op1&6)==6 && !op2) - return decode_iclass_sve_fp_2op_u_zd(ctx, dec); - if((op1&6)==6 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_357_sve_fp_unary_unpred - if(op0 && !(op1&4)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_356_sve_fp_unary_unpred - UNMATCHED; - } - if(op0==3 && (op1&0x9c)==0x88 && (op2&0x38)==8) { - /* GROUP: sve_fp_cmpzero */ - op0 = (INSWORD>>18)&1; - if(!op0) - return decode_iclass_sve_fp_2op_p_pd(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_362_sve_fp_cmpzero - UNMATCHED; - } - if(op0==3 && (op1&0x9c)==0x8c && (op2&0x38)==8) { - /* GROUP: sve_fp_slowreduce */ - op0 = (INSWORD>>18)&1; - if(!op0) - return decode_iclass_sve_fp_2op_p_vd(ctx, dec); - if(op0) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_363_sve_fp_slowreduce - UNMATCHED; - } - if(op0==3 && (op1&0x90)==0x80 && (op2&0x38)==0x20) { - /* GROUP: sve_fp_pred */ - op0 = (INSWORD>>19)&3; - op1 = (INSWORD>>10)&7; - op2 = (INSWORD>>6)&15; - if(!(op0&2)) - return decode_iclass_sve_fp_2op_p_zds(ctx, dec); - if(op0==2 && !op1) - return decode_iclass_sve_fp_ftmad(ctx, dec); - if(op0==2 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_364_sve_fp_pred - if(op0==3 && !op2) - return decode_iclass_sve_fp_2op_i_p_zds(ctx, dec); - if(op0==3 && op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_365_sve_fp_pred - UNMATCHED; - } - if(op0==3 && (op1&0x90)==0x80 && (op2&0x38)==0x28) { - /* GROUP: sve_fp_unary */ - op0 = (INSWORD>>18)&7; - if(!(op0&6)) - return decode_iclass_sve_fp_2op_p_zd_a(ctx, dec); - if(op0==2) - return decode_iclass_sve_fp_2op_p_zd_b_0(ctx, dec); - if(op0==3) - return decode_iclass_sve_fp_2op_p_zd_b_1(ctx, dec); - if((op0&6)==4) - return decode_iclass_sve_fp_2op_p_zd_c(ctx, dec); - if((op0&6)==6) - return decode_iclass_sve_fp_2op_p_zd_d(ctx, dec); - UNMATCHED; - } - if(op0==3 && (op1&0x90)==0x90) { - /* GROUP: sve_fp_fma */ - op0 = (INSWORD>>15)&1; - if(!op0) - return decode_iclass_sve_fp_3op_p_zds_a(ctx, dec); - if(op0) - return decode_iclass_sve_fp_3op_p_zds_b(ctx, dec); - UNMATCHED; - } - if(op0==4) { - /* GROUP: sve_mem32 */ - op0 = (INSWORD>>23)&3; - op1 = (INSWORD>>21)&3; - op2 = (INSWORD>>13)&7; - op3 = (INSWORD>>4)&1; - if(!op0 && op1&1 && !(op2&4) && !op3) - return decode_iclass_sve_mem_32b_prfm_sv(ctx, dec); - if(!op0 && op1&1 && !(op2&4) && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_366_sve_mem32 - if(op0==1 && op1&1 && !(op2&4)) - return decode_iclass_sve_mem_32b_gld_sv_a(ctx, dec); - if(op0==2 && op1&1 && !(op2&4)) - return decode_iclass_sve_mem_32b_gld_sv_b(ctx, dec); - if(op0==3 && !(op1&2) && !op2 && !op3) - return decode_iclass_sve_mem_32b_pfill(ctx, dec); - if(op0==3 && !(op1&2) && !op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_370_sve_mem32 - if(op0==3 && !(op1&2) && op2==2) - return decode_iclass_sve_mem_32b_fill(ctx, dec); - if(op0==3 && !(op1&2) && (op2&5)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_367_sve_mem32 - if(op0==3 && (op1&2)==2 && !(op2&4) && !op3) - return decode_iclass_sve_mem_prfm_si(ctx, dec); - if(op0==3 && (op1&2)==2 && !(op2&4) && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_368_sve_mem32 - if(!op1 && (op2&6)==4) - return decode_iclass_sve_mem_32b_gldnt_vs(ctx, dec); - if(!op1 && op2==6 && !op3) - return decode_iclass_sve_mem_prfm_ss(ctx, dec); - if(!op1 && op2==7 && !op3) - return decode_iclass_sve_mem_32b_prfm_vi(ctx, dec); - if(!op1 && (op2&6)==6 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_369_sve_mem32 - if(op1==1 && (op2&4)==4) - return decode_iclass_sve_mem_32b_gld_vi(ctx, dec); - if((op1&2)==2 && (op2&4)==4) - return decode_iclass_sve_mem_ld_dup(ctx, dec); - if(op0!=3 && !(op1&1) && !(op2&4)) - return decode_iclass_sve_mem_32b_gld_vs(ctx, dec); - UNMATCHED; - } - if(op0==5) { - /* GROUP: sve_memcld */ - op0 = (INSWORD>>21)&3; - op1 = (INSWORD>>20)&1; - op2 = (INSWORD>>13)&7; - if(!op0 && !op1 && op2==7) - return decode_iclass_sve_mem_cldnt_si(ctx, dec); - if(!op0 && op1 && op2==1) - return decode_iclass_sve_mem_cld_si_q(ctx, dec); - if(!op0 && op1 && op2==7) - return decode_iclass_sve_mem_eldq_si(ctx, dec); - if(!op0 && op2==4) - return decode_iclass_sve_mem_cld_ss_q(ctx, dec); - if(!op0 && op2==6) - return decode_iclass_sve_mem_cldnt_ss(ctx, dec); - if(op0==1 && op2==4) - return decode_iclass_sve_mem_eldq_ss(ctx, dec); - if((op0&2)==2 && op2==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_371_sve_memcld - if(!op1 && op2==1) - return decode_iclass_sve_mem_ldqr_si(ctx, dec); - if(!op1 && op2==5) - return decode_iclass_sve_mem_cld_si(ctx, dec); - if(op1 && op2==5) - return decode_iclass_sve_mem_cldnf_si(ctx, dec); - if(!op2) - return decode_iclass_sve_mem_ldqr_ss(ctx, dec); - if(op2==2) - return decode_iclass_sve_mem_cld_ss(ctx, dec); - if(op2==3) - return decode_iclass_sve_mem_cldff_ss(ctx, dec); - if(op0 && !op1 && op2==7) - return decode_iclass_sve_mem_eld_si(ctx, dec); - if(op0 && op1 && op2==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_372_sve_memcld - if(op0 && op1 && op2==7) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_373_sve_memcld - if(op0 && op2==6) - return decode_iclass_sve_mem_eld_ss(ctx, dec); - UNMATCHED; - } - if(op0==6) { - /* GROUP: sve_mem64 */ - op0 = (INSWORD>>23)&3; - op1 = (INSWORD>>21)&3; - op2 = (INSWORD>>13)&7; - op3 = (INSWORD>>4)&1; - if(!op0 && !op1 && op2==5) - return decode_iclass_sve_mem_64b_gldq_vs(ctx, dec); - if(!op0 && op1==1 && !(op2&4) && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_375_sve_mem64 - if(!op0 && op1==3 && (op2&4)==4 && !op3) - return decode_iclass_sve_mem_64b_prfm_sv2(ctx, dec); - if(!op0 && op1==3 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_374_sve_mem64 - if(!op0 && op1&1 && !(op2&4) && !op3) - return decode_iclass_sve_mem_64b_prfm_sv(ctx, dec); - if(!op1 && op2==7 && !op3) - return decode_iclass_sve_mem_64b_prfm_vi(ctx, dec); - if(!op1 && op2==7 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_377_sve_mem64 - if(!op1 && (op2&5)==4) - return decode_iclass_sve_mem_64b_gldnt_vs(ctx, dec); - if(op1==1 && (op2&4)==4) - return decode_iclass_sve_mem_64b_gld_vi(ctx, dec); - if(op1==2 && (op2&4)==4) - return decode_iclass_sve_mem_64b_gld_vs2(ctx, dec); - if(!(op1&1) && !(op2&4)) - return decode_iclass_sve_mem_64b_gld_vs(ctx, dec); - if(op0 && !op1 && op2==5) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_376_sve_mem64 - if(op0 && op1==3 && (op2&4)==4) - return decode_iclass_sve_mem_64b_gld_sv2(ctx, dec); - if(op0 && op1&1 && !(op2&4)) - return decode_iclass_sve_mem_64b_gld_sv(ctx, dec); - UNMATCHED; - } - if(op0==7 && (op2&0x38)==8) { - /* GROUP: sve_memsst_nt */ - op0 = (INSWORD>>22)&7; - op1 = (INSWORD>>21)&1; - if(!op0 && op1) - return decode_iclass_sve_mem_sstq_64b_vs(ctx, dec); - if(!(op0&1) && !op1) - return decode_iclass_sve_mem_sstnt_64b_vs(ctx, dec); - if(op0&1 && !op1) - return decode_iclass_sve_mem_sstnt_32b_vs(ctx, dec); - if(op0 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_378_sve_memsst_nt - UNMATCHED; - } - if(op0==7 && (op2&0x38)==0x18) { - /* GROUP: sve_memcst_nt */ - op0 = (INSWORD>>21)&3; - if(!op0) - return decode_iclass_sve_mem_cstnt_ss(ctx, dec); - if(op0) - return decode_iclass_sve_mem_est_ss(ctx, dec); - UNMATCHED; - } - if(op0==7 && !(op2&0x28)) { - /* GROUP: sve_memst_cs */ - op0 = (INSWORD>>22)&7; - op1 = (INSWORD>>20)&3; - op2 = (INSWORD>>14)&1; - op3 = (INSWORD>>4)&1; - if(!(op0&4) && !op1 && !op2) - return decode_iclass_sve_mem_estq_si(ctx, dec); - if(!(op0&4) && op1==1 && !op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_380_sve_memst_cs - if(!(op0&4) && (op1&2)==2 && !op2) - return decode_iclass_sve_mem_estq_ss(ctx, dec); - if((op0&6)==4 && !op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_379_sve_memst_cs - if(op0==6 && !op2 && !op3) - return decode_iclass_sve_mem_pspill(ctx, dec); - if(op0==6 && !op2 && op3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_382_sve_memst_cs - if(op0==6 && op2) - return decode_iclass_sve_mem_spill(ctx, dec); - if(op0==7 && !op2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_381_sve_memst_cs - if(op0!=6 && op2) - return decode_iclass_sve_mem_cst_ss(ctx, dec); - UNMATCHED; - } - if(op0==7 && (op2&0x38)==0x28) { - /* GROUP: sve_memst_ss2 */ - op0 = (INSWORD>>21)&3; - if(!op0) - return decode_iclass_sve_mem_sst_vs2(ctx, dec); - if(op0==1) - return decode_iclass_sve_mem_sst_sv2(ctx, dec); - if(op0==2) - return decode_iclass_sve_mem_sst_vi_a(ctx, dec); - if(op0==3) - return decode_iclass_sve_mem_sst_vi_b(ctx, dec); - UNMATCHED; - } - if(op0==7 && (op2&0x38)==0x38) { - /* GROUP: sve_memst_si */ - op0 = (INSWORD>>21)&3; - op1 = (INSWORD>>20)&1; - if(!op0 && op1) - return decode_iclass_sve_mem_cstnt_si(ctx, dec); - if(!op1) - return decode_iclass_sve_mem_cst_si(ctx, dec); - if(op0 && op1) - return decode_iclass_sve_mem_est_si(ctx, dec); - UNMATCHED; - } - if(op0==7 && (op2&0x28)==0x20) { - /* GROUP: sve_memst_ss */ - op0 = (INSWORD>>21)&3; - if(!op0) - return decode_iclass_sve_mem_sst_vs_a(ctx, dec); - if(op0==1) - return decode_iclass_sve_mem_sst_sv_a(ctx, dec); - if(op0==2) - return decode_iclass_sve_mem_sst_vs_b(ctx, dec); - if(op0==3) - return decode_iclass_sve_mem_sst_sv_b(ctx, dec); - UNMATCHED; - } - if(!op0 && (op1&0x90)==0x10 && !(op2&0x38)) - return decode_iclass_sve_int_bin_cons_arit_0(ctx, dec); - if(!op0 && (op1&0x90)==0x10 && (op2&0x3c)==0x28) - return decode_iclass_sve_int_bin_cons_misc_0_a(ctx, dec); - if(!op0 && (op1&0x90)==0x90 && op2==8) - return decode_iclass_sve_int_perm_dup_i(ctx, dec); - if(!op0 && (op1&0x90)==0x90 && (op2&0x3e)==10) - return decode_iclass_sve_int_perm_tbl_3src(ctx, dec); - if(!op0 && (op1&0x90)==0x90 && op2==12) - return decode_iclass_sve_int_perm_tbl(ctx, dec); - if(!op0 && (op1&0x90)==0x90 && op2==13) - return decode_iclass_sve_int_perm_tbxquads(ctx, dec); - if(!op0 && (op1&0x90)==0x90 && (op2&0x38)==0x18) - return decode_iclass_sve_int_perm_bin_perm_zz(ctx, dec); - if(!op0 && (op1&0x90)==0x90 && (op2&0x30)==0x30) - return decode_iclass_sve_int_sel_vvv(ctx, dec); - if(op0==1 && (op1&0x90)==0x10) - return decode_iclass_sve_int_ucmp_vi(ctx, dec); - if(op0==1 && (op1&0x98)==0x80 && (op2&0x30)==0x10) - return decode_iclass_sve_int_pred_log(ctx, dec); - if(op0==1 && (op1&0x90)==0x80 && !(op2&0x10)) - return decode_iclass_sve_int_scmp_vi(ctx, dec); - if(op0==1 && (op1&0x90)==0x90 && (op2&0x30)==0x10 && !op3) - return decode_iclass_sve_int_pred_dup(ctx, dec); - if(op0==2 && !(op1&0xf0) && (op2&0x3e)==0x32) - return decode_iclass_sve_intx_dot2(ctx, dec); - if(op0==2 && (op1&0xf0)==0x40 && (op2&0x3e)==0x32) - return decode_iclass_sve_intx_dot2_by_indexed_elem(ctx, dec); - if(op0==2 && !(op1&0x90) && (op2&0x3e)==0x30) - return decode_iclass_sve_intx_clamp(ctx, dec); - if(op0==2 && !(op1&0x90) && (op2&0x3d)==0x34) - return decode_iclass_sve_ptr_muladd_unpred(ctx, dec); - if(op0==2 && !(op1&0x90) && (op2&0x3d)==0x35) - return decode_iclass_sve_abal(ctx, dec); - if(op0==2 && !(op1&0x90) && (op2&0x38)==0x38) - return decode_iclass_sve_int_perm_binquads(ctx, dec); - if(op0==2 && (op1&0x90)==0x90 && (op2&0x38)==0x20) - return decode_iclass_sve_intx_match(ctx, dec); - if(op0==2 && (op1&0x90)==0x90 && (op2&0x38)==0x30) - return decode_iclass_sve_intx_histcnt(ctx, dec); - if(op0==3 && (op1&0xd0)==0x10 && op2==0x38) - return decode_iclass_sve_fp8_fmmla(ctx, dec); - if(op0==3 && (op1&0xd0)==0x50 && op2==0x38) - return decode_iclass_sve_fp_fmmla_nw(ctx, dec); - if(op0==3 && (op1&0xb0)==0x10 && (op2&0x3c)==0x14) - return decode_iclass_sve_fp8_fma_long_by_indexed_elem(ctx, dec); - if(op0==3 && !(op1&0x9f) && (op2&0x38)==0x20) - return decode_iclass_sve_fp_fcadd(ctx, dec); - if(op0==3 && !(op1&0x9e) && (op2&0x38)==0x28) - return decode_iclass_sve_fp_fcvt2z(ctx, dec); - if(op0==3 && (op1&0x9e)==4 && (op2&0x38)==0x28) - return decode_iclass_sve_fp_fcvt2(ctx, dec); - if(op0==3 && (op1&0x9c)==8 && (op2&0x38)==0x20) - return decode_iclass_sve_fp_pairwise(ctx, dec); - if(op0==3 && (op1&0x9c)==8 && (op2&0x38)==0x28) - return decode_iclass_sve_fp_fast_redq(ctx, dec); - if(op0==3 && !(op1&0x90) && !(op2&0x20)) - return decode_iclass_sve_fp_fcmla(ctx, dec); - if(op0==3 && (op1&0x90)==0x10 && !(op2&0x3c)) - return decode_iclass_sve_fp_fma_by_indexed_elem(ctx, dec); - if(op0==3 && (op1&0x90)==0x10 && (op2&0x3c)==4) - return decode_iclass_sve_fp_fcmla_by_indexed_elem(ctx, dec); - if(op0==3 && (op1&0x90)==0x10 && op2==9) - return decode_iclass_sve_fp_clamp(ctx, dec); - if(op0==3 && (op1&0x90)==0x10 && (op2&0x3d)==8) - return decode_iclass_sve_fp_fmul_by_indexed_elem(ctx, dec); - if(op0==3 && (op1&0x90)==0x10 && (op2&0x3c)==0x30) - return decode_iclass_sve_fp8_fma_long_long_by_indexed_elem(ctx, dec); - if(op0==3 && (op1&0x90)==0x10 && op2==0x39) - return decode_iclass_sve_fp_fmmla(ctx, dec); - if(op0==3 && (op1&0x9c)==0x80 && (op2&0x38)==8) - return decode_iclass_sve_fp_fast_red(ctx, dec); - if(op0==3 && (op1&0x90)==0x80 && !(op2&0x38)) - return decode_iclass_sve_fp_3op_u_zd(ctx, dec); - if(op0==3 && (op1&0x90)==0x80 && (op2&0x10)==0x10) - return decode_iclass_sve_fp_3op_p_pd(ctx, dec); - UNMATCHED; - } - if((op1&13)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_0_A64 - if((op1&14)==8) { - /* GROUP: dpimm */ - op0 = (INSWORD>>29)&3; - op1 = (INSWORD>>22)&15; - if(op0==3 && (op1&14)==14) - return decode_iclass_dp_1src_imm(ctx, dec); - if(!(op1&12)) - return decode_iclass_pcreladdr(ctx, dec); - if((op1&14)==4) - return decode_iclass_addsub_imm(ctx, dec); - if(op1==6) - return decode_iclass_addsub_immtags(ctx, dec); - if(op1==7) - return decode_iclass_minmax_imm(ctx, dec); - if((op1&14)==8) - return decode_iclass_log_imm(ctx, dec); - if((op1&14)==10) - return decode_iclass_movewide(ctx, dec); - if((op1&14)==12) - return decode_iclass_bitfield(ctx, dec); - if(op0!=3 && (op1&14)==14) - return decode_iclass_extract(ctx, dec); - UNMATCHED; - } - if((op1&14)==10) { - /* GROUP: control */ - op0 = INSWORD>>29; - op1 = (INSWORD>>12)&0x3fff; - op2 = INSWORD&0x1f; - if(op0==2 && !(op1&0x3000)) - return decode_iclass_condbranch(ctx, dec); - if(op0==2 && (op1&0x3000)==0x1000) - return decode_iclass_miscbranch(ctx, dec); - if(op0==3 && (op1&0x3008)==8) - return decode_iclass_compbranch_regs2(ctx, dec); - if((op0&6)==2 && (op1&0x2000)==0x2000) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_383_control - if(op0==6 && !(op1&0x3000)) - return decode_iclass_exception(ctx, dec); - if(op0==6 && (op1&0x3fec)==0x1000) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_394_control - if(op0==6 && (op1&0x3ffc)==0x1020) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_396_control - if(op0==6 && op1==0x1030) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_397_control - if(op0==6 && op1==0x1031) - return decode_iclass_systeminstrswithreg(ctx, dec); - if(op0==6 && op1==0x1032 && op2==0x1f) - return decode_iclass_hints(ctx, dec); - if(op0==6 && op1==0x1032 && op2!=0x1f) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_398_control - if(op0==6 && op1==0x1033) - return decode_iclass_barriers(ctx, dec); - if(op0==6 && (op1&0x3fcc)==0x1040) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_392_control - if(op0==6 && (op1&0x3f8f)==0x1004) - return decode_iclass_pstate(ctx, dec); - if(op0==6 && (op1&0x3f8f)==0x1005) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_395_control - if(op0==6 && (op1&0x3f8e)==0x1006) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_393_control - if(op0==6 && (op1&0x3f88)==0x1008) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_391_control - if(op0==6 && (op1&0x3f80)==0x1200) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_390_control - if(op0==6 && (op1&0x3d80)==0x1080) - return decode_iclass_systeminstrs(ctx, dec); - if(op0==6 && (op1&0x3d00)==0x1100) - return decode_iclass_systemmove(ctx, dec); - if(op0==6 && (op1&0x3d80)==0x1400) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_389_control - if(op0==6 && (op1&0x3d80)==0x1480) - return decode_iclass_syspairinstrs(ctx, dec); - if(op0==6 && (op1&0x3d00)==0x1500) - return decode_iclass_systemmovepr(ctx, dec); - if(op0==6 && (op1&0x3800)==0x1800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_386_control - if(op0==6 && (op1&0x2000)==0x2000) - return decode_iclass_branch_reg(ctx, dec); - if(op0==7 && (op1&0x3008)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_387_control - if(op0==7 && (op1&0x2000)==0x2000) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_384_control - if(!(op0&3)) - return decode_iclass_branch_imm(ctx, dec); - if((op0&3)==1 && !(op1&0x2000)) - return decode_iclass_compbranch(ctx, dec); - if((op0&3)==1 && (op1&0x2000)==0x2000) - return decode_iclass_testbranch(ctx, dec); - if((op0&3)==3 && !(op1&0x300c)) - return decode_iclass_compbranch_regs(ctx, dec); - if((op0&3)==3 && (op1&0x300c)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_388_control - if((op0&3)==3 && (op1&0x3004)==0x1000) - return decode_iclass_compbranch_imm(ctx, dec); - if((op0&3)==3 && (op1&0x3004)==0x1004) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_385_control - UNMATCHED; - } - if((op1&7)==5) { - /* GROUP: dpreg */ - op0 = (INSWORD>>30)&1; - op1 = (INSWORD>>28)&1; - op2 = (INSWORD>>21)&15; - op3 = (INSWORD>>10)&0x3f; - if(!op0 && op1 && op2==6) - return decode_iclass_dp_2src(ctx, dec); - if(op0 && op1 && op2==6) - return decode_iclass_dp_1src(ctx, dec); - if(!op1 && !(op2&8)) - return decode_iclass_log_shift(ctx, dec); - if(!op1 && (op2&9)==8) - return decode_iclass_addsub_shift(ctx, dec); - if(!op1 && (op2&9)==9) - return decode_iclass_addsub_ext(ctx, dec); - if(op1 && !op2 && !op3) - return decode_iclass_addsub_carry(ctx, dec); - if(op1 && !op2 && (op3&0x38)==8) - return decode_iclass_addsub_pt(ctx, dec); - if(op1 && !op2 && (op3&0x38)==0x18) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_401_dpreg - if(op1 && !op2 && op3==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_406_dpreg - if(op1 && !op2 && (op3&0x28)==0x28) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_400_dpreg - if(op1 && !op2 && (op3&0x1f)==1) - return decode_iclass_rmif(ctx, dec); - if(op1 && !op2 && (op3&0x1e)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_404_dpreg - if(op1 && !op2 && (op3&0x1a)==0x10) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_402_dpreg - if(op1 && !op2 && (op3&15)==2) - return decode_iclass_setf(ctx, dec); - if(op1 && !op2 && (op3&15)==3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_405_dpreg - if(op1 && !op2 && (op3&14)==6) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_403_dpreg - if(op1 && op2==2 && !(op3&2)) - return decode_iclass_condcmp_reg(ctx, dec); - if(op1 && op2==2 && (op3&2)==2) - return decode_iclass_condcmp_imm(ctx, dec); - if(op1 && op2==4) - return decode_iclass_condsel(ctx, dec); - if(op1 && (op2&9)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_399_dpreg - if(op1 && (op2&8)==8) - return decode_iclass_dp_3src(ctx, dec); - UNMATCHED; - } - if((op1&7)==7) { - /* GROUP: simd_dp */ - op0 = INSWORD>>28; - op1 = (INSWORD>>23)&3; - op2 = (INSWORD>>19)&15; - op3 = (INSWORD>>10)&0x1ff; - if(!(op0&13) && !(op1&2) && (op2&7)==5 && (op3&0x183)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_432_simd_dp - if(!(op0&13) && op1==3 && op3&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_412_simd_dp - if(op0==4 && !(op1&2) && (op2&7)==5 && (op3&0x183)==2) - return decode_iclass_cryptoaes(ctx, dec); - if(op0==5 && !(op1&2) && !(op2&4) && !(op3&0x23)) - return decode_iclass_cryptosha3(ctx, dec); - if(op0==5 && !(op1&2) && !(op2&4) && (op3&0x23)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_423_simd_dp - if(op0==5 && !(op1&2) && !(op2&4) && (op3&0x21)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_417_simd_dp - if(op0==5 && !(op1&2) && (op2&7)==5 && (op3&0x183)==2) - return decode_iclass_cryptosha2(ctx, dec); - if(op0==7 && !(op1&2) && !(op2&4) && !(op3&1)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_414_simd_dp - if((op0&14)==6 && !(op1&2) && (op2&7)==5 && (op3&0x183)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_433_simd_dp - if((op0&13)==5 && !op1 && !(op2&12) && (op3&0x21)==1) - return decode_iclass_asisdone(ctx, dec); - if((op0&13)==5 && op1==1 && !(op2&12) && (op3&0x21)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_424_simd_dp - if((op0&13)==5 && !(op1&2) && op2==7 && (op3&0x183)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_437_simd_dp - if((op0&13)==5 && !(op1&2) && (op2&12)==8 && (op3&0x31)==1) - return decode_iclass_asisdsamefp16(ctx, dec); - if((op0&13)==5 && !(op1&2) && (op2&12)==8 && (op3&0x31)==0x11) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_425_simd_dp - if((op0&13)==5 && !(op1&2) && op2==15 && (op3&0x183)==2) - return decode_iclass_asisdmiscfp16(ctx, dec); - if((op0&13)==5 && !(op1&2) && !(op2&4) && (op3&0x21)==0x21) - return decode_iclass_asisdsame2(ctx, dec); - if((op0&13)==5 && !(op1&2) && (op2&7)==4 && (op3&0x183)==2) - return decode_iclass_asisdmisc(ctx, dec); - if((op0&13)==5 && !(op1&2) && (op2&7)==6 && (op3&0x183)==2) - return decode_iclass_asisdpair(ctx, dec); - if((op0&13)==5 && !(op1&2) && (op2&4)==4 && (op3&0x183)==0x82) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_426_simd_dp - if((op0&13)==5 && !(op1&2) && (op2&4)==4 && (op3&0x103)==0x102) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_418_simd_dp - if((op0&13)==5 && !(op1&2) && (op2&4)==4 && !(op3&3)) - return decode_iclass_asisddiff(ctx, dec); - if((op0&13)==5 && !(op1&2) && (op2&4)==4 && op3&1) - return decode_iclass_asisdsame(ctx, dec); - if((op0&13)==5 && op1==2 && op3&1) - return decode_iclass_asisdshf(ctx, dec); - if((op0&13)==5 && (op1&2)==2 && !(op3&1)) - return decode_iclass_asisdelem(ctx, dec); - if((op0&12)==4 && op1==3 && op3&1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_410_simd_dp - if(!(op0&11) && !(op1&2) && !(op2&4) && !(op3&0x23)) - return decode_iclass_asimdtbl(ctx, dec); - if(!(op0&11) && !(op1&2) && !(op2&4) && (op3&0x23)==2) - return decode_iclass_asimdperm(ctx, dec); - if((op0&11)==2 && !(op1&2) && !(op2&4) && !(op3&0x21)) - return decode_iclass_asimdext(ctx, dec); - if(!(op0&9) && !op1 && !(op2&12) && (op3&0x21)==1) - return decode_iclass_asimdins(ctx, dec); - if(!(op0&9) && op1==1 && !(op2&12) && (op3&0x21)==1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_419_simd_dp - if(!(op0&9) && !(op1&2) && op2==7 && (op3&0x183)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_434_simd_dp - if(!(op0&9) && !(op1&2) && (op2&12)==8 && (op3&0x31)==1) - return decode_iclass_asimdsamefp16(ctx, dec); - if(!(op0&9) && !(op1&2) && (op2&12)==8 && (op3&0x31)==0x11) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_420_simd_dp - if(!(op0&9) && !(op1&2) && op2==15 && (op3&0x183)==2) - return decode_iclass_asimdmiscfp16(ctx, dec); - if(!(op0&9) && !(op1&2) && !(op2&4) && (op3&0x21)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_413_simd_dp - if(!(op0&9) && !(op1&2) && !(op2&4) && (op3&0x21)==0x21) - return decode_iclass_asimdsame2(ctx, dec); - if(!(op0&9) && !(op1&2) && (op2&7)==4 && (op3&0x183)==2) - return decode_iclass_asimdmisc(ctx, dec); - if(!(op0&9) && !(op1&2) && (op2&7)==6 && (op3&0x183)==2) - return decode_iclass_asimdall(ctx, dec); - if(!(op0&9) && !(op1&2) && (op2&4)==4 && (op3&0x183)==0x82) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_421_simd_dp - if(!(op0&9) && !(op1&2) && (op2&4)==4 && (op3&0x103)==0x102) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_415_simd_dp - if(!(op0&9) && !(op1&2) && (op2&4)==4 && !(op3&3)) - return decode_iclass_asimddiff(ctx, dec); - if(!(op0&9) && !(op1&2) && (op2&4)==4 && op3&1) - return decode_iclass_asimdsame(ctx, dec); - if(!(op0&9) && op1==2 && !op2 && op3&1) - return decode_iclass_asimdimm(ctx, dec); - if(!(op0&9) && op1==2 && op2 && op3&1) - return decode_iclass_asimdshf(ctx, dec); - if(!(op0&9) && (op1&2)==2 && !(op3&1)) - return decode_iclass_asimdelem(ctx, dec); - if((op0&13)==8) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_407_simd_dp - if(op0==12 && !op1 && !(op2&8) && (op3&0x20)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_422_simd_dp - if(op0==12 && !op1 && (op2&12)==8 && (op3&0x30)==0x20) - return decode_iclass_crypto3_imm2(ctx, dec); - if(op0==12 && !op1 && (op2&12)==8 && (op3&0x30)==0x30) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_428_simd_dp - if(op0==12 && !op1 && (op2&12)==12 && (op3&0x2c)==0x20) - return decode_iclass_cryptosha512_3(ctx, dec); - if(op0==12 && !op1 && (op2&12)==12 && (op3&0x2c)==0x24) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_435_simd_dp - if(op0==12 && !op1 && (op2&12)==12 && (op3&0x28)==0x28) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_429_simd_dp - if(op0==12 && !op1 && !(op3&0x20)) - return decode_iclass_crypto4(ctx, dec); - if(op0==12 && op1==1 && !(op2&12)) - return decode_iclass_crypto3_imm6(ctx, dec); - if(op0==12 && op1==1 && op2==8 && !(op3&0x1e0)) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_440_simd_dp - if(op0==12 && op1==1 && op2==8 && (op3&0x1fc)==0x20) - return decode_iclass_cryptosha512_2(ctx, dec); - if(op0==12 && op1==1 && op2==8 && (op3&0x1fc)==0x30) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_443_simd_dp - if(op0==12 && op1==1 && op2==8 && (op3&0x1ec)==0x24) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_442_simd_dp - if(op0==12 && op1==1 && op2==8 && (op3&0x1e8)==0x28) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_441_simd_dp - if(op0==12 && op1==1 && op2==8 && (op3&0x1c0)==0x40) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_439_simd_dp - if(op0==12 && op1==1 && op2==8 && (op3&0x180)==0x80) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_438_simd_dp - if(op0==12 && op1==1 && op2==8 && (op3&0x100)==0x100) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_436_simd_dp - if(op0==12 && op1==1 && op2==9) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_430_simd_dp - if(op0==12 && op1==1 && (op2&14)==10) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_427_simd_dp - if(op0==12 && op1==1 && (op2&4)==4) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_416_simd_dp - if(op0==12 && (op1&2)==2) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_411_simd_dp - if(op0==14) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_409_simd_dp - if((op0&13)==13) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_408_simd_dp - if((op0&5)==1 && !(op1&2) && !(op2&4)) - return decode_iclass_float2fix(ctx, dec); - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && !(op3&0x3f)) - return decode_iclass_float2int(ctx, dec); - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && (op3&0x3f)==0x20) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_431_simd_dp - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && (op3&0x1f)==0x10) - return decode_iclass_floatdp1(ctx, dec); - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && (op3&15)==8) - return decode_iclass_floatcmp(ctx, dec); - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && (op3&7)==4) - return decode_iclass_floatimm(ctx, dec); - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && (op3&3)==1) - return decode_iclass_floatccmp(ctx, dec); - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && (op3&3)==2) - return decode_iclass_floatdp2(ctx, dec); - if((op0&5)==1 && !(op1&2) && (op2&4)==4 && (op3&3)==3) - return decode_iclass_floatsel(ctx, dec); - if((op0&5)==1 && (op1&2)==2) - return decode_iclass_floatdp3(ctx, dec); - UNMATCHED; - } - if((op1&5)==4) { - /* GROUP: ldst */ - op0 = INSWORD>>28; - op1 = (INSWORD>>26)&1; - op2 = (INSWORD>>10)&0x7fff; - if(!op0 && !op1 && (op2&0x4800)==0x4800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_449_ldst - if(op0==1 && op1 && (op2&0x4800)==0x4800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_450_ldst - if(!(op0&11) && !op1 && (op2&0x6800)==0x800) - return decode_iclass_comswappr(ctx, dec); - if(!(op0&11) && !op1 && (op2&0x6800)==0x4000) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_451_ldst - if(!(op0&11) && !op1 && (op2&0x6800)==0x6000) - return decode_iclass_comswappr_unpriv(ctx, dec); - if(!(op0&11) && op1 && !(op2&0x6fc0)) - return decode_iclass_asisdlse(ctx, dec); - if(!(op0&11) && op1 && (op2&0x6fc0)==0x40) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_474_ldst - if(!(op0&11) && op1 && (op2&0x6800)==0x2000) - return decode_iclass_asisdlsep(ctx, dec); - if(!(op0&11) && op1 && (op2&0x4800)==0x800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_445_ldst - if(!(op0&11) && op1 && (op2&0x6f80)==0x4880) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_470_ldst - if(!(op0&11) && op1 && (op2&0x6f00)==0x4900) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_465_ldst - if(!(op0&11) && op1 && (op2&0x6e00)==0x4a00) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_460_ldst - if(!(op0&11) && op1 && (op2&0x6c00)==0x4c00) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_456_ldst - if(!(op0&11) && op1 && (op2&0x6780)==0x4000) - return decode_iclass_asisdlso(ctx, dec); - if(!(op0&11) && op1 && (op2&0x6000)==0x6000) - return decode_iclass_asisdlsop(ctx, dec); - if(!(op0&11) && op1 && (op2&0x2f80)==0x80) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_466_ldst - if(!(op0&11) && op1 && (op2&0x2f00)==0x100) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_461_ldst - if(!(op0&11) && op1 && (op2&0x2e00)==0x200) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_457_ldst - if(!(op0&11) && op1 && (op2&0x2c00)==0x400) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_452_ldst - if((op0&11)==1 && !op1 && (op2&0x4803)==0x4003) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_458_ldst - if((op0&11)==1 && !op1 && (op2&0x483f)==0x4802) - return decode_iclass_rcwcomswap(ctx, dec); - if((op0&11)==1 && !op1 && (op2&0x483f)==0x4803) - return decode_iclass_rcwcomswappr(ctx, dec); - if((op0&11)==1 && !op1 && (op2&0x483e)==0x4806) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_471_ldst - if((op0&11)==1 && !op1 && (op2&0x483a)==0x480a) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_467_ldst - if((op0&11)==1 && !op1 && (op2&0x4832)==0x4812) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_462_ldst - if((op0&11)==1 && !op1 && (op2&0x4822)==0x4822) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_459_ldst - if((op0&11)==1 && !op1 && (op2&0x4803)==0x4800) - return decode_iclass_memop_128(ctx, dec); - if((op0&11)==1 && !op1 && (op2&0x4803)==0x4801) - return decode_iclass_memop_unpriv(ctx, dec); - if(op0==9 && !op1 && (op2&0x4803)==0x4003) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_463_ldst - if(op0==9 && op1 && (op2&0x4800)==0x4800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_453_ldst - if((op0&14)==8 && !op1 && (op2&0x4800)==0x4800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_446_ldst - if(op0==13 && !op1 && (op2&0x7fe3)==0x47c3) - return decode_iclass_ldst_gcs(ctx, dec); - if(op0==13 && !op1 && (op2&0x7fe3)==0x67c3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_485_ldst - if(op0==13 && !op1 && (op2&0x5c03)==0x4003) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_472_ldst - if(op0==13 && !op1 && (op2&0x5e03)==0x4403) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_475_ldst - if(op0==13 && !op1 && (op2&0x5f03)==0x4603) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_477_ldst - if(op0==13 && !op1 && (op2&0x5f83)==0x4703) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_479_ldst - if(op0==13 && !op1 && (op2&0x5fc3)==0x4783) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_481_ldst - if(op0==13 && !op1 && (op2&0x5fe3)==0x47e3) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_483_ldst - if(op0==13 && !op1 && (op2&0x5803)==0x5003) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_468_ldst - if(op0==13 && !op1 && (op2&0x4800)==0x4800) - return decode_iclass_ldsttags(ctx, dec); - if((op0&11)==8 && !op1 && (op2&0x6800)==0x800) - return decode_iclass_ldstexclp(ctx, dec); - if((op0&11)==8 && !op1 && (op2&0x6800)==0x4000) - return decode_iclass_ldstexclr_unpriv(ctx, dec); - if((op0&11)==8 && !op1 && (op2&0x6800)==0x6000) - return decode_iclass_comswap_unpriv(ctx, dec); - if((op0&11)==8 && op1) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_444_ldst - if((op0&7)==4 && !op1 && (op2&0x4800)==0x4800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_447_ldst - if((op0&7)==5 && op1 && (op2&0x4800)==0x4800) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_448_ldst - if(!(op0&3) && !op1 && !(op2&0x6800)) - return decode_iclass_ldstexclr(ctx, dec); - if(!(op0&3) && !op1 && (op2&0x6800)==0x2000) - return decode_iclass_ldstord(ctx, dec); - if(!(op0&3) && !op1 && (op2&0x6800)==0x2800) - return decode_iclass_comswap(ctx, dec); - if((op0&3)==1 && !op1 && (op2&0x6803)==0x4002) - return decode_iclass_ldiappstilp(ctx, dec); - if((op0&3)==1 && !op1 && (op2&0x6fff)==0x6002) - return decode_iclass_ldapstl_writeback(ctx, dec); - if((op0&3)==1 && !op1 && (op2&0x6fff)==0x6006) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_486_ldst - if((op0&3)==1 && !op1 && (op2&0x6ffb)==0x600a) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_484_ldst - if((op0&3)==1 && !op1 && (op2&0x6ff3)==0x6012) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_482_ldst - if((op0&3)==1 && !op1 && (op2&0x6fe3)==0x6022) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_480_ldst - if((op0&3)==1 && !op1 && (op2&0x6fc3)==0x6042) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_478_ldst - if((op0&3)==1 && !op1 && (op2&0x6f83)==0x6082) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_476_ldst - if((op0&3)==1 && !op1 && (op2&0x6f03)==0x6102) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_473_ldst - if((op0&3)==1 && !op1 && (op2&0x6e03)==0x6202) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_469_ldst - if((op0&3)==1 && !op1 && (op2&0x6c03)==0x6402) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_464_ldst - if((op0&3)==1 && !op1 && (op2&0x4803)==0x4000) - return decode_iclass_ldapstl_unscaled(ctx, dec); - if((op0&3)==1 && op1 && (op2&0x4803)==0x4000) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_454_ldst - if((op0&3)==1 && op1 && (op2&0x4803)==0x4002) - return decode_iclass_ldapstl_simd(ctx, dec); - if((op0&3)==1 && op1 && (op2&0x4803)==0x4003) - UNALLOCATED(ENC_UNKNOWN); // iclass: UNALLOCATED_455_ldst - if((op0&3)==1 && !(op2&0x4000)) - return decode_iclass_loadlit(ctx, dec); - if((op0&3)==1 && (op2&0x4803)==0x4001) - return decode_iclass_memcms(ctx, dec); - if((op0&3)==2 && !(op2&0x6000)) - return decode_iclass_ldstnapair_offs(ctx, dec); - if((op0&3)==2 && (op2&0x6000)==0x2000) - return decode_iclass_ldstpair_post(ctx, dec); - if((op0&3)==2 && (op2&0x6000)==0x4000) - return decode_iclass_ldstpair_off(ctx, dec); - if((op0&3)==2 && (op2&0x6000)==0x6000) - return decode_iclass_ldstpair_pre(ctx, dec); - if((op0&3)==3 && !(op2&0x4803)) - return decode_iclass_ldst_unscaled(ctx, dec); - if((op0&3)==3 && (op2&0x4803)==1) - return decode_iclass_ldst_immpost(ctx, dec); - if((op0&3)==3 && (op2&0x4803)==2) - return decode_iclass_ldst_unpriv(ctx, dec); - if((op0&3)==3 && (op2&0x4803)==3) - return decode_iclass_ldst_immpre(ctx, dec); - if((op0&3)==3 && (op2&0x4803)==0x800) - return decode_iclass_memop(ctx, dec); - if((op0&3)==3 && (op2&0x4803)==0x802) - return decode_iclass_ldst_regoff(ctx, dec); - if((op0&3)==3 && (op2&0x4801)==0x801) - return decode_iclass_ldst_pac(ctx, dec); - if((op0&3)==3 && (op2&0x4000)==0x4000) - return decode_iclass_ldst_pos(ctx, dec); - UNMATCHED; - } - UNMATCHED; -} diff --git a/arch/arm64/disassembler/decode1.c b/arch/arm64/disassembler/decode1.c deleted file mode 100644 index 90c498986..000000000 --- a/arch/arm64/disassembler/decode1.c +++ /dev/null @@ -1,8788 +0,0 @@ -/* GENERATED FILE */ -#include -#include - -#include "operations.h" -#include "encodings_dec.h" -#include "decode.h" -#include "decode2.h" -#include "pcode.h" - -int decode_iclass_barriers(context *ctx, Instruction *dec) -{ - uint32_t CRm=(INSWORD>>8)&15, op2=(INSWORD>>5)&7, Rt=INSWORD&0x1f; - if((CRm&3)==2 && op2==1 && Rt==0x1f && HasXS()) return DSB(ctx, dec); // -> DSB_BOn_barriers - if((CRm&3)==2 && op2==3 && Rt==0x1f) UNALLOCATED(ENC_UNALLOCATED_823_BARRIERS); - if((CRm&3)==3 && (op2&5)==1 && Rt==0x1f) UNALLOCATED(ENC_UNALLOCATED_822_BARRIERS); - if(!op2 && Rt==0x1f) UNALLOCATED(ENC_UNALLOCATED_821_BARRIERS); - if(op2==2 && Rt==0x1f) return CLREX(ctx, dec); // -> CLREX_BN_barriers - if(op2==4 && Rt==0x1f) return DSB(ctx, dec); // -> DSB_BO_barriers - if(op2==5 && Rt==0x1f) return DMB(ctx, dec); // -> DMB_BO_barriers - if(op2==6 && Rt==0x1f) return ISB(ctx, dec); // -> ISB_BI_barriers - if(op2==7 && Rt==0x1f && HasSB()) return SB(ctx, dec); // -> SB_only_barriers - if(!(CRm&2) && (op2&5)==1 && Rt==0x1f) UNALLOCATED(ENC_UNALLOCATED_820_BARRIERS); - if(Rt!=0x1f) UNALLOCATED(ENC_UNALLOCATED_819_BARRIERS); - UNMATCHED; -} - -int decode_iclass_compbranch(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>24)&1; - if(!sf && !op) return CBZ(ctx, dec); // -> CBZ_32_compbranch - if(!sf && op) return CBNZ(ctx, dec); // -> CBNZ_32_compbranch - if(sf && !op) return CBZ(ctx, dec); // -> CBZ_64_compbranch - if(sf && op) return CBNZ(ctx, dec); // -> CBNZ_64_compbranch - UNMATCHED; -} - -int decode_iclass_compbranch_regs2(context *ctx, Instruction *dec) -{ - uint32_t cc=(INSWORD>>21)&7, H=(INSWORD>>14)&1; - if(!cc && !H && HasCMPBR()) return CBBcc_regs(ctx, dec); // -> CBBGT_8_regs - if(!cc && H && HasCMPBR()) return CBHcc_regs(ctx, dec); // -> CBHGT_16_regs - if(cc==1 && !H && HasCMPBR()) return CBBcc_regs(ctx, dec); // -> CBBGE_8_regs - if(cc==1 && H && HasCMPBR()) return CBHcc_regs(ctx, dec); // -> CBHGE_16_regs - if(cc==2 && !H && HasCMPBR()) return CBBcc_regs(ctx, dec); // -> CBBHI_8_regs - if(cc==2 && H && HasCMPBR()) return CBHcc_regs(ctx, dec); // -> CBHHI_16_regs - if(cc==3 && !H && HasCMPBR()) return CBBcc_regs(ctx, dec); // -> CBBHS_8_regs - if(cc==3 && H && HasCMPBR()) return CBHcc_regs(ctx, dec); // -> CBHHS_16_regs - if(cc==6 && !H && HasCMPBR()) return CBBcc_regs(ctx, dec); // -> CBBEQ_8_regs - if(cc==6 && H && HasCMPBR()) return CBHcc_regs(ctx, dec); // -> CBHEQ_16_regs - if(cc==7 && !H && HasCMPBR()) return CBBcc_regs(ctx, dec); // -> CBBNE_8_regs - if(cc==7 && H && HasCMPBR()) return CBHcc_regs(ctx, dec); // -> CBHNE_16_regs - if((cc&6)==4) UNALLOCATED(ENC_UNALLOCATED_824_COMPBRANCH_REGS2); - UNMATCHED; -} - -int decode_iclass_compbranch_imm(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, cc=(INSWORD>>21)&7; - if(!sf && !cc && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBGT_32_imm - if(!sf && cc==1 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBLT_32_imm - if(!sf && cc==2 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBHI_32_imm - if(!sf && cc==3 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBLO_32_imm - if(!sf && cc==6 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBEQ_32_imm - if(!sf && cc==7 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBNE_32_imm - if(sf && !cc && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBGT_64_imm - if(sf && cc==1 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBLT_64_imm - if(sf && cc==2 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBHI_64_imm - if(sf && cc==3 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBLO_64_imm - if(sf && cc==6 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBEQ_64_imm - if(sf && cc==7 && HasCMPBR()) return CBcc_imm(ctx, dec); // -> CBNE_64_imm - if((cc&6)==4) UNALLOCATED(ENC_UNALLOCATED_825_COMPBRANCH_IMM); - UNMATCHED; -} - -int decode_iclass_compbranch_regs(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, cc=(INSWORD>>21)&7; - if(!sf && !cc && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBGT_32_regs - if(!sf && cc==1 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBGE_32_regs - if(!sf && cc==2 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBHI_32_regs - if(!sf && cc==3 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBHS_32_regs - if(!sf && cc==6 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBEQ_32_regs - if(!sf && cc==7 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBNE_32_regs - if(sf && !cc && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBGT_64_regs - if(sf && cc==1 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBGE_64_regs - if(sf && cc==2 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBHI_64_regs - if(sf && cc==3 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBHS_64_regs - if(sf && cc==6 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBEQ_64_regs - if(sf && cc==7 && HasCMPBR()) return CBcc_regs(ctx, dec); // -> CBNE_64_regs - if((cc&6)==4) UNALLOCATED(ENC_UNALLOCATED_826_COMPBRANCH_REGS); - UNMATCHED; -} - -int decode_iclass_condbranch(context *ctx, Instruction *dec) -{ - uint32_t o0=(INSWORD>>4)&1; - if(!o0) return B_cond(ctx, dec); // -> B_only_condbranch - if(o0 && HasHBC()) return BC_cond(ctx, dec); // -> BC_only_condbranch - UNMATCHED; -} - -int decode_iclass_exception(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>21)&7, op2=(INSWORD>>2)&7, LL=INSWORD&3; - if(!opc && !op2 && !LL) UNALLOCATED(ENC_UNALLOCATED_832_EXCEPTION); - if(!opc && !op2 && LL==1) return SVC(ctx, dec); // -> SVC_EX_exception - if(!opc && !op2 && LL==2) return HVC(ctx, dec); // -> HVC_EX_exception - if(!opc && !op2 && LL==3) return SMC(ctx, dec); // -> SMC_EX_exception - if(opc==1 && !op2 && !LL) return BRK(ctx, dec); // -> BRK_EX_exception - if(opc==1 && !op2 && LL) UNALLOCATED(ENC_UNALLOCATED_830_EXCEPTION); - if(opc==2 && !op2 && !LL) return HLT(ctx, dec); // -> HLT_EX_exception - if(opc==2 && !op2 && LL) UNALLOCATED(ENC_UNALLOCATED_831_EXCEPTION); - if(opc==5 && !op2 && !LL) UNALLOCATED(ENC_UNALLOCATED_833_EXCEPTION); - if(opc==5 && !op2 && LL==1) return DCPS1(ctx, dec); // -> DCPS1_DC_exception - if(opc==5 && !op2 && LL==2) return DCPS2(ctx, dec); // -> DCPS2_DC_exception - if(opc==5 && !op2 && LL==3) return DCPS3(ctx, dec); // -> DCPS3_DC_exception - if((opc&3)==3 && !op2) UNALLOCATED(ENC_UNALLOCATED_829_EXCEPTION); - if((opc&5)==4 && !op2) UNALLOCATED(ENC_UNALLOCATED_828_EXCEPTION); - if(op2) UNALLOCATED(ENC_UNALLOCATED_827_EXCEPTION); - UNMATCHED; -} - -int decode_iclass_hints(context *ctx, Instruction *dec) -{ - uint32_t CRm=(INSWORD>>8)&15, op2=(INSWORD>>5)&7; - if(!CRm && !op2) return NOP(ctx, dec); // -> NOP_HI_hints - if(!CRm && op2==1) return YIELD(ctx, dec); // -> YIELD_HI_hints - if(!CRm && op2==2) return WFE(ctx, dec); // -> WFE_HI_hints - if(!CRm && op2==3) return WFI(ctx, dec); // -> WFI_HI_hints - if(!CRm && op2==4) return SEV(ctx, dec); // -> SEV_HI_hints - if(!CRm && op2==5) return SEVL(ctx, dec); // -> SEVL_HI_hints - if(!CRm && op2==6 && HasDGH()) return DGH(ctx, dec); // -> DGH_HI_hints - if(!CRm && op2==7 && HasPAuth()) return XPAC(ctx, dec); // -> XPACLRI_HI_hints - if(CRm==1 && !op2 && HasPAuth()) return PACIA(ctx, dec); // -> PACIA1716_HI_hints - if(CRm==1 && op2==2 && HasPAuth()) return PACIB(ctx, dec); // -> PACIB1716_HI_hints - if(CRm==1 && op2==4 && HasPAuth()) return AUTIA(ctx, dec); // -> AUTIA1716_HI_hints - if(CRm==1 && op2==6 && HasPAuth()) return AUTIB(ctx, dec); // -> AUTIB1716_HI_hints - if(CRm==2 && !op2 && HasRAS()) return ESB(ctx, dec); // -> ESB_HI_hints - if(CRm==2 && op2==1 && HasSPE()) return PSB(ctx, dec); // -> PSB_HC_hints - if(CRm==2 && op2==2 && HasTRF()) return TSB(ctx, dec); // -> TSB_HC_hints - if(CRm==2 && op2==3 && HasGCS()) return GCSB(ctx, dec); // -> GCSB_HD_hints - if(CRm==2 && op2==4) return CSDB(ctx, dec); // -> CSDB_HI_hints - if(CRm==2 && op2==6 && HasCLRBHB()) return CLRBHB(ctx, dec); // -> CLRBHB_HI_hints - if(CRm==3 && !op2 && HasPAuth()) return PACIA(ctx, dec); // -> PACIAZ_HI_hints - if(CRm==3 && op2==1 && HasPAuth()) return PACIA(ctx, dec); // -> PACIASP_HI_hints - if(CRm==3 && op2==2 && HasPAuth()) return PACIB(ctx, dec); // -> PACIBZ_HI_hints - if(CRm==3 && op2==3 && HasPAuth()) return PACIB(ctx, dec); // -> PACIBSP_HI_hints - if(CRm==3 && op2==4 && HasPAuth()) return AUTIA(ctx, dec); // -> AUTIAZ_HI_hints - if(CRm==3 && op2==5 && HasPAuth()) return AUTIA(ctx, dec); // -> AUTIASP_HI_hints - if(CRm==3 && op2==6 && HasPAuth()) return AUTIB(ctx, dec); // -> AUTIBZ_HI_hints - if(CRm==3 && op2==7 && HasPAuth()) return AUTIB(ctx, dec); // -> AUTIBSP_HI_hints - if(CRm==4 && op2==7 && HasPAuth_LR()) return PACM(ctx, dec); // -> PACM_HI_hints - if(CRm==5 && !op2 && HasCHK()) return CHKFEAT(ctx, dec); // -> CHKFEAT_HF_hints - if(CRm==6 && op2==4 && HasCMH()) return STCPH(ctx, dec); // -> STCPH_HI_hints - if(CRm==6 && !(op2&6) && HasPCDPHINT()) return STSHH(ctx, dec); // -> STSHH_HI_hints - if(CRm==6 && (op2&6)==2 && HasCMH()) return SHUH(ctx, dec); // -> SHUH_HI_hints - if(CRm==4 && !(op2&1) && HasBTI()) return BTI(ctx, dec); // -> BTI_HB_hints - if(1) return HINT(ctx, dec); // -> HINT_HM_hints - UNMATCHED; -} - -int decode_iclass_miscbranch(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>21)&7, op2=INSWORD&0x1f; - if(!opc && op2==0x1f && HasPAuth_LR()) return RETASPPC_imm(ctx, dec); // -> RETAASPPC_only_miscbranch - if(opc==1 && op2==0x1f && HasPAuth_LR()) return RETASPPC_imm(ctx, dec); // -> RETABSPPC_only_miscbranch - if(!(opc&6) && op2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_836_MISCBRANCH); - if((opc&6)==2) UNALLOCATED(ENC_UNALLOCATED_835_MISCBRANCH); - if((opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_834_MISCBRANCH); - UNMATCHED; -} - -int decode_iclass_pstate(context *ctx, Instruction *dec) -{ - uint32_t op1=(INSWORD>>16)&7, op2=(INSWORD>>5)&7, Rt=INSWORD&0x1f; - if(!((op1 << 3) | op2) && Rt==0x1f && HasFlagM()) return CFINV(ctx, dec); // -> CFINV_M_pstate - if(((op1 << 3) | op2)==1 && Rt==0x1f && HasFlagM2()) return XAFLAG(ctx, dec); // -> XAFLAG_M_pstate - if(((op1 << 3) | op2)==2 && Rt==0x1f && HasFlagM2()) return AXFLAG(ctx, dec); // -> AXFLAG_M_pstate - if(((op1 << 3) | op2)&0x3e && Rt==0x1f) return MSR_imm(ctx, dec); // -> MSR_SI_pstate - if(Rt==0x1e) UNALLOCATED(ENC_UNALLOCATED_841_PSTATE); - if((Rt&0x1e)==0x1c) UNALLOCATED(ENC_UNALLOCATED_840_PSTATE); - if((Rt&0x1c)==0x18) UNALLOCATED(ENC_UNALLOCATED_839_PSTATE); - if((Rt&0x18)==0x10) UNALLOCATED(ENC_UNALLOCATED_838_PSTATE); - if(!(Rt&0x10)) UNALLOCATED(ENC_UNALLOCATED_837_PSTATE); - UNMATCHED; -} - -int decode_iclass_systeminstrs(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>21)&1; - if(!L) return SYS(ctx, dec); // -> SYS_CR_systeminstrs - if(L) return SYSL(ctx, dec); // -> SYSL_RC_systeminstrs - UNMATCHED; -} - -int decode_iclass_systeminstrswithreg(context *ctx, Instruction *dec) -{ - uint32_t CRm=(INSWORD>>8)&15, op2=(INSWORD>>5)&7; - if(!CRm && !op2 && HasWFxT()) return WFET(ctx, dec); // -> WFET_only_systeminstrswithreg - if(!CRm && op2==1 && HasWFxT()) return WFIT(ctx, dec); // -> WFIT_only_systeminstrswithreg - if(!CRm && (op2&6)==2) UNALLOCATED(ENC_UNALLOCATED_844_SYSTEMINSTRSWITHREG); - if(!CRm && (op2&4)==4) UNALLOCATED(ENC_UNALLOCATED_843_SYSTEMINSTRSWITHREG); - if(CRm) UNALLOCATED(ENC_UNALLOCATED_842_SYSTEMINSTRSWITHREG); - UNMATCHED; -} - -int decode_iclass_syspairinstrs(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>21)&1; - if(!L && HasSYSINSTR128()) return SYSP(ctx, dec); // -> SYSP_CR_syspairinstrs - if(L) UNALLOCATED(ENC_UNALLOCATED_845_SYSPAIRINSTRS); - UNMATCHED; -} - -int decode_iclass_systemmove(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>21)&1; - if(!L) return MSR_reg(ctx, dec); // -> MSR_SR_systemmove - if(L) return MRS(ctx, dec); // -> MRS_RS_systemmove - UNMATCHED; -} - -int decode_iclass_systemmovepr(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>21)&1; - if(!L && HasSYSREG128()) return MSRR(ctx, dec); // -> MSRR_SR_systemmovepr - if(L && HasSYSREG128()) return MRRS(ctx, dec); // -> MRRS_RS_systemmovepr - UNMATCHED; -} - -int decode_iclass_testbranch(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>24)&1; - if(!op) return TBZ(ctx, dec); // -> TBZ_only_testbranch - if(op) return TBNZ(ctx, dec); // -> TBNZ_only_testbranch - UNMATCHED; -} - -int decode_iclass_branch_imm(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD>>31; - if(!op) return B_uncond(ctx, dec); // -> B_only_branch_imm - if(op) return BL(ctx, dec); // -> BL_only_branch_imm - UNMATCHED; -} - -int decode_iclass_branch_reg(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>21)&15, op2=(INSWORD>>16)&0x1f, op3=(INSWORD>>10)&0x3f, Rn=(INSWORD>>5)&0x1f, op4=INSWORD&0x1f; - if(opc==2 && op2==0x1f && op3==2 && Rn==0x1f && op4==0x1f && HasPAuth()) return RETA(ctx, dec); // -> RETAA_64E_branch_reg - if(opc==2 && op2==0x1f && op3==2 && Rn==0x1f && op4!=0x1f && HasPAuth_LR()) return RETASPPCR_reg(ctx, dec); // -> RETAASPPCR_64M_branch_reg - if(opc==2 && op2==0x1f && op3==3 && Rn==0x1f && op4==0x1f && HasPAuth()) return RETA(ctx, dec); // -> RETAB_64E_branch_reg - if(opc==2 && op2==0x1f && op3==3 && Rn==0x1f && op4!=0x1f && HasPAuth_LR()) return RETASPPCR_reg(ctx, dec); // -> RETABSPPCR_64M_branch_reg - if(opc==4 && op2==0x1f && !op3 && Rn==0x1f && !op4) return ERET(ctx, dec); // -> ERET_64E_branch_reg - if(opc==4 && op2==0x1f && op3==2 && Rn==0x1f && op4==0x1f && HasPAuth()) return ERETA(ctx, dec); // -> ERETAA_64E_branch_reg - if(opc==4 && op2==0x1f && op3==3 && Rn==0x1f && op4==0x1f && HasPAuth()) return ERETA(ctx, dec); // -> ERETAB_64E_branch_reg - if(opc==5 && op2==0x1f && !op3 && Rn==0x1f && !op4) return DRPS(ctx, dec); // -> DRPS_64E_branch_reg - if((opc&14)==4 && op2==0x1f && !op3 && Rn==0x1f && op4) UNALLOCATED(ENC_UNALLOCATED_866_BRANCH_REG); - if(opc==4 && op2==0x1f && (op3&0x3e)==2 && Rn==0x1f && op4==0x1d) UNALLOCATED(ENC_UNALLOCATED_870_BRANCH_REG); - if(opc==4 && op2==0x1f && (op3&0x3e)==2 && Rn==0x1f && (op4&0x1d)==0x19) UNALLOCATED(ENC_UNALLOCATED_869_BRANCH_REG); - if(opc==4 && op2==0x1f && (op3&0x3e)==2 && Rn==0x1f && (op4&0x19)==0x11) UNALLOCATED(ENC_UNALLOCATED_868_BRANCH_REG); - if(opc==4 && op2==0x1f && (op3&0x3e)==2 && Rn==0x1f && (op4&0x11)==1) UNALLOCATED(ENC_UNALLOCATED_867_BRANCH_REG); - if(!opc && op2==0x1f && !op3 && !op4) return BR(ctx, dec); // -> BR_64_branch_reg - if(!opc && op2==0x1f && op3==2 && op4==0x1f && HasPAuth()) return BRA(ctx, dec); // -> BRAAZ_64_branch_reg - if(!opc && op2==0x1f && op3==3 && op4==0x1f && HasPAuth()) return BRA(ctx, dec); // -> BRABZ_64_branch_reg - if(opc==1 && op2==0x1f && !op3 && !op4) return BLR(ctx, dec); // -> BLR_64_branch_reg - if(opc==1 && op2==0x1f && !op3 && op4) UNALLOCATED(ENC_UNALLOCATED_862_BRANCH_REG); - if(opc==1 && op2==0x1f && op3==2 && op4==0x1f && HasPAuth()) return BLRA(ctx, dec); // -> BLRAAZ_64_branch_reg - if(opc==1 && op2==0x1f && op3==3 && op4==0x1f && HasPAuth()) return BLRA(ctx, dec); // -> BLRABZ_64_branch_reg - if(opc==2 && op2==0x1f && !op3 && !op4) return RET(ctx, dec); // -> RET_64R_branch_reg - if(opc==5 && op2==0x1f && (op3&0x3e)==2 && Rn==0x1f && op4&1) UNALLOCATED(ENC_UNALLOCATED_865_BRANCH_REG); - if(!(opc&13) && op2==0x1f && !op3 && op4) UNALLOCATED(ENC_UNALLOCATED_861_BRANCH_REG); - if(opc==2 && op2==0x1f && (op3&0x3e)==2 && Rn!=0x1f) UNALLOCATED(ENC_UNALLOCATED_860_BRANCH_REG); - if((opc&14)==4 && op2==0x1f && op3==1 && Rn==0x1f) UNALLOCATED(ENC_UNALLOCATED_863_BRANCH_REG); - if((opc&14)==4 && op2==0x1f && (op3&0x3e)==2 && Rn==0x1f && !(op4&1)) UNALLOCATED(ENC_UNALLOCATED_864_BRANCH_REG); - if(!(opc&14) && op2==0x1f && (op3&0x3e)==2 && op4!=0x1f) UNALLOCATED(ENC_UNALLOCATED_857_BRANCH_REG); - if((opc&14)==4 && op2==0x1f && !(op3&0x3c) && Rn!=0x1f) UNALLOCATED(ENC_UNALLOCATED_855_BRANCH_REG); - if(opc==1 && op2==0x1f && op3==1) UNALLOCATED(ENC_UNALLOCATED_859_BRANCH_REG); - if(opc==8 && op2==0x1f && op3==2 && HasPAuth()) return BRA(ctx, dec); // -> BRAA_64P_branch_reg - if(opc==8 && op2==0x1f && op3==3 && HasPAuth()) return BRA(ctx, dec); // -> BRAB_64P_branch_reg - if(opc==9 && op2==0x1f && op3==2 && HasPAuth()) return BLRA(ctx, dec); // -> BLRAA_64P_branch_reg - if(opc==9 && op2==0x1f && op3==3 && HasPAuth()) return BLRA(ctx, dec); // -> BLRAB_64P_branch_reg - if(!(opc&13) && op2==0x1f && op3==1) UNALLOCATED(ENC_UNALLOCATED_858_BRANCH_REG); - if(opc==3 && op2==0x1f && !(op3&0x3c)) UNALLOCATED(ENC_UNALLOCATED_854_BRANCH_REG); - if((opc&14)==8 && op2==0x1f && !(op3&0x3e)) UNALLOCATED(ENC_UNALLOCATED_856_BRANCH_REG); - if((opc&14)==6 && op2==0x1f && !(op3&0x3c)) UNALLOCATED(ENC_UNALLOCATED_852_BRANCH_REG); - if((opc&14)==10 && op2==0x1f && !(op3&0x3c)) UNALLOCATED(ENC_UNALLOCATED_853_BRANCH_REG); - if((opc&12)==12 && op2==0x1f && !(op3&0x3c)) UNALLOCATED(ENC_UNALLOCATED_851_BRANCH_REG); - if(op2==0x1f && (op3&0x3c)==4) UNALLOCATED(ENC_UNALLOCATED_850_BRANCH_REG); - if(op2==0x1f && (op3&0x38)==8) UNALLOCATED(ENC_UNALLOCATED_849_BRANCH_REG); - if(op2==0x1f && (op3&0x30)==0x10) UNALLOCATED(ENC_UNALLOCATED_848_BRANCH_REG); - if(op2==0x1f && (op3&0x20)==0x20) UNALLOCATED(ENC_UNALLOCATED_847_BRANCH_REG); - if(op2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_846_BRANCH_REG); - UNMATCHED; -} - -int decode_iclass_memop_128(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>30)&1, A=(INSWORD>>23)&1, R=(INSWORD>>22)&1, o3=(INSWORD>>15)&1, opc=(INSWORD>>12)&7; - if(!S && !A && !R && !o3 && opc==1 && HasLSE128()) return LDCLRP(ctx, dec); // -> LDCLRP_128_memop_128 - if(!S && !A && !R && !o3 && opc==3 && HasLSE128()) return LDSETP(ctx, dec); // -> LDSETP_128_memop_128 - if(!S && !A && !R && o3 && !opc && HasLSE128()) return SWPP(ctx, dec); // -> SWPP_128_memop_128 - if(!S && !A && !R && o3 && opc==1 && HasD128() && HasTHE()) return RCWCLRP(ctx, dec); // -> RCWCLRP_128_memop_128 - if(!S && !A && !R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSWPP(ctx, dec); // -> RCWSWPP_128_memop_128 - if(!S && !A && !R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSETP(ctx, dec); // -> RCWSETP_128_memop_128 - if(!S && !A && R && !o3 && opc==1 && HasLSE128()) return LDCLRP(ctx, dec); // -> LDCLRPL_128_memop_128 - if(!S && !A && R && !o3 && opc==3 && HasLSE128()) return LDSETP(ctx, dec); // -> LDSETPL_128_memop_128 - if(!S && !A && R && o3 && !opc && HasLSE128()) return SWPP(ctx, dec); // -> SWPPL_128_memop_128 - if(!S && !A && R && o3 && opc==1 && HasD128() && HasTHE()) return RCWCLRP(ctx, dec); // -> RCWCLRPL_128_memop_128 - if(!S && !A && R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSWPP(ctx, dec); // -> RCWSWPPL_128_memop_128 - if(!S && !A && R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSETP(ctx, dec); // -> RCWSETPL_128_memop_128 - if(!S && A && !R && !o3 && opc==1 && HasLSE128()) return LDCLRP(ctx, dec); // -> LDCLRPA_128_memop_128 - if(!S && A && !R && !o3 && opc==3 && HasLSE128()) return LDSETP(ctx, dec); // -> LDSETPA_128_memop_128 - if(!S && A && !R && o3 && !opc && HasLSE128()) return SWPP(ctx, dec); // -> SWPPA_128_memop_128 - if(!S && A && !R && o3 && opc==1 && HasD128() && HasTHE()) return RCWCLRP(ctx, dec); // -> RCWCLRPA_128_memop_128 - if(!S && A && !R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSWPP(ctx, dec); // -> RCWSWPPA_128_memop_128 - if(!S && A && !R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSETP(ctx, dec); // -> RCWSETPA_128_memop_128 - if(!S && A && R && !o3 && opc==1 && HasLSE128()) return LDCLRP(ctx, dec); // -> LDCLRPAL_128_memop_128 - if(!S && A && R && !o3 && opc==3 && HasLSE128()) return LDSETP(ctx, dec); // -> LDSETPAL_128_memop_128 - if(!S && A && R && o3 && !opc && HasLSE128()) return SWPP(ctx, dec); // -> SWPPAL_128_memop_128 - if(!S && A && R && o3 && opc==1 && HasD128() && HasTHE()) return RCWCLRP(ctx, dec); // -> RCWCLRPAL_128_memop_128 - if(!S && A && R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSWPP(ctx, dec); // -> RCWSWPPAL_128_memop_128 - if(!S && A && R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSETP(ctx, dec); // -> RCWSETPAL_128_memop_128 - if(S && !A && !R && o3 && opc==1 && HasD128() && HasTHE()) return RCWSCLRP(ctx, dec); // -> RCWSCLRP_128_memop_128 - if(S && !A && !R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSSWPP(ctx, dec); // -> RCWSSWPP_128_memop_128 - if(S && !A && !R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSSETP(ctx, dec); // -> RCWSSETP_128_memop_128 - if(S && !A && R && o3 && opc==1 && HasD128() && HasTHE()) return RCWSCLRP(ctx, dec); // -> RCWSCLRPL_128_memop_128 - if(S && !A && R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSSWPP(ctx, dec); // -> RCWSSWPPL_128_memop_128 - if(S && !A && R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSSETP(ctx, dec); // -> RCWSSETPL_128_memop_128 - if(S && A && !R && o3 && opc==1 && HasD128() && HasTHE()) return RCWSCLRP(ctx, dec); // -> RCWSCLRPA_128_memop_128 - if(S && A && !R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSSWPP(ctx, dec); // -> RCWSSWPPA_128_memop_128 - if(S && A && !R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSSETP(ctx, dec); // -> RCWSSETPA_128_memop_128 - if(S && A && R && o3 && opc==1 && HasD128() && HasTHE()) return RCWSCLRP(ctx, dec); // -> RCWSCLRPAL_128_memop_128 - if(S && A && R && o3 && opc==2 && HasD128() && HasTHE()) return RCWSSWPP(ctx, dec); // -> RCWSSWPPAL_128_memop_128 - if(S && A && R && o3 && opc==3 && HasD128() && HasTHE()) return RCWSSETP(ctx, dec); // -> RCWSSETPAL_128_memop_128 - if(S && o3 && !opc) UNALLOCATED(ENC_UNALLOCATED_874_MEMOP_128); - if(!S && !o3 && !(opc&5)) UNALLOCATED(ENC_UNALLOCATED_873_MEMOP_128); - if(S && !o3 && !(opc&4)) UNALLOCATED(ENC_UNALLOCATED_872_MEMOP_128); - if((opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_871_MEMOP_128); - UNMATCHED; -} - -int decode_iclass_asisdlse(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>22)&1, opcode=(INSWORD>>12)&15; - if(!L && !opcode && HasAdvSIMD()) return ST4_advsimd_mult(ctx, dec); // -> ST4_asisdlse_R4 - if(!L && opcode==2 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlse_R4_4v - if(!L && opcode==4 && HasAdvSIMD()) return ST3_advsimd_mult(ctx, dec); // -> ST3_asisdlse_R3 - if(!L && opcode==6 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlse_R3_3v - if(!L && opcode==7 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlse_R1_1v - if(!L && opcode==8 && HasAdvSIMD()) return ST2_advsimd_mult(ctx, dec); // -> ST2_asisdlse_R2 - if(!L && opcode==10 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlse_R2_2v - if(L && !opcode && HasAdvSIMD()) return LD4_advsimd_mult(ctx, dec); // -> LD4_asisdlse_R4 - if(L && opcode==2 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlse_R4_4v - if(L && opcode==4 && HasAdvSIMD()) return LD3_advsimd_mult(ctx, dec); // -> LD3_asisdlse_R3 - if(L && opcode==6 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlse_R3_3v - if(L && opcode==7 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlse_R1_1v - if(L && opcode==8 && HasAdvSIMD()) return LD2_advsimd_mult(ctx, dec); // -> LD2_asisdlse_R2 - if(L && opcode==10 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlse_R2_2v - if(opcode==5) UNALLOCATED(ENC_UNALLOCATED_877_ASISDLSE); - if((opcode&5)==1) UNALLOCATED(ENC_UNALLOCATED_876_ASISDLSE); - if((opcode&12)==12) UNALLOCATED(ENC_UNALLOCATED_875_ASISDLSE); - UNMATCHED; -} - -int decode_iclass_asisdlsep(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>22)&1, Rm=(INSWORD>>16)&0x1f, opcode=(INSWORD>>12)&15; - if(!L && Rm==0x1f && !opcode && HasAdvSIMD()) return ST4_advsimd_mult(ctx, dec); // -> ST4_asisdlsep_I4_i - if(!L && Rm==0x1f && opcode==2 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_I4_i4 - if(!L && Rm==0x1f && opcode==4 && HasAdvSIMD()) return ST3_advsimd_mult(ctx, dec); // -> ST3_asisdlsep_I3_i - if(!L && Rm==0x1f && opcode==6 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_I3_i3 - if(!L && Rm==0x1f && opcode==7 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_I1_i1 - if(!L && Rm==0x1f && opcode==8 && HasAdvSIMD()) return ST2_advsimd_mult(ctx, dec); // -> ST2_asisdlsep_I2_i - if(!L && Rm==0x1f && opcode==10 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_I2_i2 - if(!L && Rm!=0x1f && !opcode && HasAdvSIMD()) return ST4_advsimd_mult(ctx, dec); // -> ST4_asisdlsep_R4_r - if(!L && Rm!=0x1f && opcode==2 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_R4_r4 - if(!L && Rm!=0x1f && opcode==4 && HasAdvSIMD()) return ST3_advsimd_mult(ctx, dec); // -> ST3_asisdlsep_R3_r - if(!L && Rm!=0x1f && opcode==6 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_R3_r3 - if(!L && Rm!=0x1f && opcode==7 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_R1_r1 - if(!L && Rm!=0x1f && opcode==8 && HasAdvSIMD()) return ST2_advsimd_mult(ctx, dec); // -> ST2_asisdlsep_R2_r - if(!L && Rm!=0x1f && opcode==10 && HasAdvSIMD()) return ST1_advsimd_mult(ctx, dec); // -> ST1_asisdlsep_R2_r2 - if(L && Rm==0x1f && !opcode && HasAdvSIMD()) return LD4_advsimd_mult(ctx, dec); // -> LD4_asisdlsep_I4_i - if(L && Rm==0x1f && opcode==2 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_I4_i4 - if(L && Rm==0x1f && opcode==4 && HasAdvSIMD()) return LD3_advsimd_mult(ctx, dec); // -> LD3_asisdlsep_I3_i - if(L && Rm==0x1f && opcode==6 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_I3_i3 - if(L && Rm==0x1f && opcode==7 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_I1_i1 - if(L && Rm==0x1f && opcode==8 && HasAdvSIMD()) return LD2_advsimd_mult(ctx, dec); // -> LD2_asisdlsep_I2_i - if(L && Rm==0x1f && opcode==10 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_I2_i2 - if(L && Rm!=0x1f && !opcode && HasAdvSIMD()) return LD4_advsimd_mult(ctx, dec); // -> LD4_asisdlsep_R4_r - if(L && Rm!=0x1f && opcode==2 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_R4_r4 - if(L && Rm!=0x1f && opcode==4 && HasAdvSIMD()) return LD3_advsimd_mult(ctx, dec); // -> LD3_asisdlsep_R3_r - if(L && Rm!=0x1f && opcode==6 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_R3_r3 - if(L && Rm!=0x1f && opcode==7 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_R1_r1 - if(L && Rm!=0x1f && opcode==8 && HasAdvSIMD()) return LD2_advsimd_mult(ctx, dec); // -> LD2_asisdlsep_R2_r - if(L && Rm!=0x1f && opcode==10 && HasAdvSIMD()) return LD1_advsimd_mult(ctx, dec); // -> LD1_asisdlsep_R2_r2 - if(opcode==5) UNALLOCATED(ENC_UNALLOCATED_880_ASISDLSEP); - if((opcode&5)==1) UNALLOCATED(ENC_UNALLOCATED_879_ASISDLSEP); - if((opcode&12)==12) UNALLOCATED(ENC_UNALLOCATED_878_ASISDLSEP); - UNMATCHED; -} - -int decode_iclass_asisdlso(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>22)&1, R=(INSWORD>>21)&1, o2=(INSWORD>>16)&1, opcode=(INSWORD>>13)&7, S=(INSWORD>>12)&1, size=(INSWORD>>10)&3; - if(!L && !R && !o2 && opcode==4 && !S && size==1 && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlso_D1_1d - if(!L && !R && !o2 && opcode==5 && !S && size==1 && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlso_D3_3d - if(!L && !R && o2 && opcode==4 && !S && size==1 && HasAdvSIMD() && HasLRCPC3()) return STL1_advsimd_sngl(ctx, dec); // -> STL1_asisdlso_D1 - if(!L && R && !o2 && opcode==4 && !S && size==1 && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlso_D2_2d - if(!L && R && !o2 && opcode==5 && !S && size==1 && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlso_D4_4d - if(L && !R && !o2 && opcode==4 && !S && size==1 && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlso_D1_1d - if(L && !R && !o2 && opcode==5 && !S && size==1 && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlso_D3_3d - if(L && !R && o2 && opcode==4 && !S && size==1 && HasAdvSIMD() && HasLRCPC3()) return LDAP1_advsimd_sngl(ctx, dec); // -> LDAP1_asisdlso_D1 - if(L && R && !o2 && opcode==4 && !S && size==1 && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlso_D2_2d - if(L && R && !o2 && opcode==5 && !S && size==1 && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlso_D4_4d - if(!R && o2 && opcode==4 && S && size==1) UNALLOCATED(ENC_UNALLOCATED_889_ASISDLSO); - if(!L && !R && !o2 && opcode==4 && !size && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlso_S1_1s - if(!L && !R && !o2 && opcode==5 && !size && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlso_S3_3s - if(!L && R && !o2 && opcode==4 && !size && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlso_S2_2s - if(!L && R && !o2 && opcode==5 && !size && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlso_S4_4s - if(L && !R && !o2 && opcode==4 && !size && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlso_S1_1s - if(L && !R && !o2 && opcode==5 && !size && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlso_S3_3s - if(L && R && !o2 && opcode==4 && !size && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlso_S2_2s - if(L && R && !o2 && opcode==5 && !size && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlso_S4_4s - if(!R && o2 && opcode==4 && size!=1) UNALLOCATED(ENC_UNALLOCATED_887_ASISDLSO); - if(!L && !R && !o2 && opcode==2 && !(size&1) && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlso_H1_1h - if(!L && !R && !o2 && opcode==3 && !(size&1) && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlso_H3_3h - if(!L && R && !o2 && opcode==2 && !(size&1) && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlso_H2_2h - if(!L && R && !o2 && opcode==3 && !(size&1) && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlso_H4_4h - if(L && !R && !o2 && opcode==2 && !(size&1) && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlso_H1_1h - if(L && !R && !o2 && opcode==3 && !(size&1) && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlso_H3_3h - if(L && !R && !o2 && opcode==6 && !S && HasAdvSIMD()) return LD1R_advsimd(ctx, dec); // -> LD1R_asisdlso_R1 - if(L && !R && !o2 && opcode==7 && !S && HasAdvSIMD()) return LD3R_advsimd(ctx, dec); // -> LD3R_asisdlso_R3 - if(L && R && !o2 && opcode==2 && !(size&1) && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlso_H2_2h - if(L && R && !o2 && opcode==3 && !(size&1) && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlso_H4_4h - if(L && R && !o2 && opcode==6 && !S && HasAdvSIMD()) return LD2R_advsimd(ctx, dec); // -> LD2R_asisdlso_R2 - if(L && R && !o2 && opcode==7 && !S && HasAdvSIMD()) return LD4R_advsimd(ctx, dec); // -> LD4R_asisdlso_R4 - if(!o2 && (opcode&6)==4 && S && size==1) UNALLOCATED(ENC_UNALLOCATED_888_ASISDLSO); - if(!L && !R && !o2 && !opcode && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlso_B1_1b - if(!L && !R && !o2 && opcode==1 && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlso_B3_3b - if(!L && R && !o2 && !opcode && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlso_B2_2b - if(!L && R && !o2 && opcode==1 && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlso_B4_4b - if(L && !R && !o2 && !opcode && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlso_B1_1b - if(L && !R && !o2 && opcode==1 && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlso_B3_3b - if(L && R && !o2 && !opcode && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlso_B2_2b - if(L && R && !o2 && opcode==1 && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlso_B4_4b - if(!R && o2 && opcode!=4) UNALLOCATED(ENC_UNALLOCATED_882_ASISDLSO); - if(L && !o2 && (opcode&6)==6 && S) UNALLOCATED(ENC_UNALLOCATED_886_ASISDLSO); - if(!o2 && (opcode&6)==2 && size&1) UNALLOCATED(ENC_UNALLOCATED_884_ASISDLSO); - if(!o2 && (opcode&6)==4 && (size&2)==2) UNALLOCATED(ENC_UNALLOCATED_885_ASISDLSO); - if(!L && !o2 && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_883_ASISDLSO); - if(R && o2) UNALLOCATED(ENC_UNALLOCATED_881_ASISDLSO); - UNMATCHED; -} - -int decode_iclass_asisdlsop(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>22)&1, R=(INSWORD>>21)&1, Rm=(INSWORD>>16)&0x1f, opcode=(INSWORD>>13)&7, S=(INSWORD>>12)&1, size=(INSWORD>>10)&3; - if(!L && !R && Rm==0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_D1_i1d - if(!L && !R && Rm==0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_D3_i3d - if(!L && !R && Rm!=0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_DX1_r1d - if(!L && !R && Rm!=0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_DX3_r3d - if(!L && R && Rm==0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_D2_i2d - if(!L && R && Rm==0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_D4_i4d - if(!L && R && Rm!=0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_DX2_r2d - if(!L && R && Rm!=0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_DX4_r4d - if(L && !R && Rm==0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_D1_i1d - if(L && !R && Rm==0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_D3_i3d - if(L && !R && Rm!=0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_DX1_r1d - if(L && !R && Rm!=0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_DX3_r3d - if(L && R && Rm==0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_D2_i2d - if(L && R && Rm==0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_D4_i4d - if(L && R && Rm!=0x1f && opcode==4 && !S && size==1 && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_DX2_r2d - if(L && R && Rm!=0x1f && opcode==5 && !S && size==1 && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_DX4_r4d - if(!L && !R && Rm==0x1f && opcode==4 && !size && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_S1_i1s - if(!L && !R && Rm==0x1f && opcode==5 && !size && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_S3_i3s - if(!L && !R && Rm!=0x1f && opcode==4 && !size && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_SX1_r1s - if(!L && !R && Rm!=0x1f && opcode==5 && !size && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_SX3_r3s - if(!L && R && Rm==0x1f && opcode==4 && !size && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_S2_i2s - if(!L && R && Rm==0x1f && opcode==5 && !size && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_S4_i4s - if(!L && R && Rm!=0x1f && opcode==4 && !size && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_SX2_r2s - if(!L && R && Rm!=0x1f && opcode==5 && !size && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_SX4_r4s - if(L && !R && Rm==0x1f && opcode==4 && !size && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_S1_i1s - if(L && !R && Rm==0x1f && opcode==5 && !size && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_S3_i3s - if(L && !R && Rm!=0x1f && opcode==4 && !size && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_SX1_r1s - if(L && !R && Rm!=0x1f && opcode==5 && !size && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_SX3_r3s - if(L && R && Rm==0x1f && opcode==4 && !size && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_S2_i2s - if(L && R && Rm==0x1f && opcode==5 && !size && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_S4_i4s - if(L && R && Rm!=0x1f && opcode==4 && !size && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_SX2_r2s - if(L && R && Rm!=0x1f && opcode==5 && !size && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_SX4_r4s - if(!L && !R && Rm==0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_H1_i1h - if(!L && !R && Rm==0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_H3_i3h - if(!L && !R && Rm!=0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_HX1_r1h - if(!L && !R && Rm!=0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_HX3_r3h - if(!L && R && Rm==0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_H2_i2h - if(!L && R && Rm==0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_H4_i4h - if(!L && R && Rm!=0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_HX2_r2h - if(!L && R && Rm!=0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_HX4_r4h - if(L && !R && Rm==0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_H1_i1h - if(L && !R && Rm==0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_H3_i3h - if(L && !R && Rm==0x1f && opcode==6 && !S && HasAdvSIMD()) return LD1R_advsimd(ctx, dec); // -> LD1R_asisdlsop_R1_i - if(L && !R && Rm==0x1f && opcode==7 && !S && HasAdvSIMD()) return LD3R_advsimd(ctx, dec); // -> LD3R_asisdlsop_R3_i - if(L && !R && Rm!=0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_HX1_r1h - if(L && !R && Rm!=0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_HX3_r3h - if(L && !R && Rm!=0x1f && opcode==6 && !S && HasAdvSIMD()) return LD1R_advsimd(ctx, dec); // -> LD1R_asisdlsop_RX1_r - if(L && !R && Rm!=0x1f && opcode==7 && !S && HasAdvSIMD()) return LD3R_advsimd(ctx, dec); // -> LD3R_asisdlsop_RX3_r - if(L && R && Rm==0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_H2_i2h - if(L && R && Rm==0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_H4_i4h - if(L && R && Rm==0x1f && opcode==6 && !S && HasAdvSIMD()) return LD2R_advsimd(ctx, dec); // -> LD2R_asisdlsop_R2_i - if(L && R && Rm==0x1f && opcode==7 && !S && HasAdvSIMD()) return LD4R_advsimd(ctx, dec); // -> LD4R_asisdlsop_R4_i - if(L && R && Rm!=0x1f && opcode==2 && !(size&1) && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_HX2_r2h - if(L && R && Rm!=0x1f && opcode==3 && !(size&1) && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_HX4_r4h - if(L && R && Rm!=0x1f && opcode==6 && !S && HasAdvSIMD()) return LD2R_advsimd(ctx, dec); // -> LD2R_asisdlsop_RX2_r - if(L && R && Rm!=0x1f && opcode==7 && !S && HasAdvSIMD()) return LD4R_advsimd(ctx, dec); // -> LD4R_asisdlsop_RX4_r - if(!L && !R && Rm==0x1f && !opcode && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_B1_i1b - if(!L && !R && Rm==0x1f && opcode==1 && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_B3_i3b - if(!L && !R && Rm!=0x1f && !opcode && HasAdvSIMD()) return ST1_advsimd_sngl(ctx, dec); // -> ST1_asisdlsop_BX1_r1b - if(!L && !R && Rm!=0x1f && opcode==1 && HasAdvSIMD()) return ST3_advsimd_sngl(ctx, dec); // -> ST3_asisdlsop_BX3_r3b - if(!L && R && Rm==0x1f && !opcode && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_B2_i2b - if(!L && R && Rm==0x1f && opcode==1 && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_B4_i4b - if(!L && R && Rm!=0x1f && !opcode && HasAdvSIMD()) return ST2_advsimd_sngl(ctx, dec); // -> ST2_asisdlsop_BX2_r2b - if(!L && R && Rm!=0x1f && opcode==1 && HasAdvSIMD()) return ST4_advsimd_sngl(ctx, dec); // -> ST4_asisdlsop_BX4_r4b - if(L && !R && Rm==0x1f && !opcode && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_B1_i1b - if(L && !R && Rm==0x1f && opcode==1 && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_B3_i3b - if(L && !R && Rm!=0x1f && !opcode && HasAdvSIMD()) return LD1_advsimd_sngl(ctx, dec); // -> LD1_asisdlsop_BX1_r1b - if(L && !R && Rm!=0x1f && opcode==1 && HasAdvSIMD()) return LD3_advsimd_sngl(ctx, dec); // -> LD3_asisdlsop_BX3_r3b - if(L && R && Rm==0x1f && !opcode && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_B2_i2b - if(L && R && Rm==0x1f && opcode==1 && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_B4_i4b - if(L && R && Rm!=0x1f && !opcode && HasAdvSIMD()) return LD2_advsimd_sngl(ctx, dec); // -> LD2_asisdlsop_BX2_r2b - if(L && R && Rm!=0x1f && opcode==1 && HasAdvSIMD()) return LD4_advsimd_sngl(ctx, dec); // -> LD4_asisdlsop_BX4_r4b - if((opcode&6)==4 && S && size==1) UNALLOCATED(ENC_UNALLOCATED_894_ASISDLSOP); - if(L && (opcode&6)==6 && S) UNALLOCATED(ENC_UNALLOCATED_893_ASISDLSOP); - if((opcode&6)==2 && size&1) UNALLOCATED(ENC_UNALLOCATED_891_ASISDLSOP); - if((opcode&6)==4 && (size&2)==2) UNALLOCATED(ENC_UNALLOCATED_892_ASISDLSOP); - if(!L && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_890_ASISDLSOP); - UNMATCHED; -} - -int decode_iclass_memop(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, A=(INSWORD>>23)&1, R=(INSWORD>>22)&1, Rs=(INSWORD>>16)&0x1f, o3=(INSWORD>>15)&1, opc=(INSWORD>>12)&7, Rt=INSWORD&0x1f; - if(!size && VR && !A && !R && o3 && !opc && Rt==0x1f && HasLSFE()) return STBFADD(ctx, dec); // -> STBFADD_16 - if(!size && VR && !A && !R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STBFMAX(ctx, dec); // -> STBFMAX_16 - if(!size && VR && !A && !R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STBFMIN(ctx, dec); // -> STBFMIN_16 - if(!size && VR && !A && !R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STBFMAXNM(ctx, dec); // -> STBFMAXNM_16 - if(!size && VR && !A && !R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STBFMINNM(ctx, dec); // -> STBFMINNM_16 - if(!size && VR && !A && R && o3 && !opc && Rt==0x1f && HasLSFE()) return STBFADD(ctx, dec); // -> STBFADDL_16 - if(!size && VR && !A && R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STBFMAX(ctx, dec); // -> STBFMAXL_16 - if(!size && VR && !A && R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STBFMIN(ctx, dec); // -> STBFMINL_16 - if(!size && VR && !A && R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STBFMAXNM(ctx, dec); // -> STBFMAXNML_16 - if(!size && VR && !A && R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STBFMINNM(ctx, dec); // -> STBFMINNML_16 - if(size==1 && VR && !A && !R && o3 && !opc && Rt==0x1f && HasLSFE()) return STFADD(ctx, dec); // -> STFADD_16 - if(size==1 && VR && !A && !R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STFMAX(ctx, dec); // -> STFMAX_16 - if(size==1 && VR && !A && !R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STFMIN(ctx, dec); // -> STFMIN_16 - if(size==1 && VR && !A && !R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STFMAXNM(ctx, dec); // -> STFMAXNM_16 - if(size==1 && VR && !A && !R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STFMINNM(ctx, dec); // -> STFMINNM_16 - if(size==1 && VR && !A && R && o3 && !opc && Rt==0x1f && HasLSFE()) return STFADD(ctx, dec); // -> STFADDL_16 - if(size==1 && VR && !A && R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STFMAX(ctx, dec); // -> STFMAXL_16 - if(size==1 && VR && !A && R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STFMIN(ctx, dec); // -> STFMINL_16 - if(size==1 && VR && !A && R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STFMAXNM(ctx, dec); // -> STFMAXNML_16 - if(size==1 && VR && !A && R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STFMINNM(ctx, dec); // -> STFMINNML_16 - if(size==2 && VR && !A && !R && o3 && !opc && Rt==0x1f && HasLSFE()) return STFADD(ctx, dec); // -> STFADD_32 - if(size==2 && VR && !A && !R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STFMAX(ctx, dec); // -> STFMAX_32 - if(size==2 && VR && !A && !R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STFMIN(ctx, dec); // -> STFMIN_32 - if(size==2 && VR && !A && !R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STFMAXNM(ctx, dec); // -> STFMAXNM_32 - if(size==2 && VR && !A && !R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STFMINNM(ctx, dec); // -> STFMINNM_32 - if(size==2 && VR && !A && R && o3 && !opc && Rt==0x1f && HasLSFE()) return STFADD(ctx, dec); // -> STFADDL_32 - if(size==2 && VR && !A && R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STFMAX(ctx, dec); // -> STFMAXL_32 - if(size==2 && VR && !A && R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STFMIN(ctx, dec); // -> STFMINL_32 - if(size==2 && VR && !A && R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STFMAXNM(ctx, dec); // -> STFMAXNML_32 - if(size==2 && VR && !A && R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STFMINNM(ctx, dec); // -> STFMINNML_32 - if(size==3 && !VR && !A && !R && Rs==0x1f && o3 && opc==1 && HasLS64()) return ST64B(ctx, dec); // -> ST64B_64L_memop - if(size==3 && !VR && !A && !R && Rs==0x1f && o3 && opc==5 && HasLS64()) return LD64B(ctx, dec); // -> LD64B_64L_memop - if(size==3 && VR && !A && !R && o3 && !opc && Rt==0x1f && HasLSFE()) return STFADD(ctx, dec); // -> STFADD_64 - if(size==3 && VR && !A && !R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STFMAX(ctx, dec); // -> STFMAX_64 - if(size==3 && VR && !A && !R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STFMIN(ctx, dec); // -> STFMIN_64 - if(size==3 && VR && !A && !R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STFMAXNM(ctx, dec); // -> STFMAXNM_64 - if(size==3 && VR && !A && !R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STFMINNM(ctx, dec); // -> STFMINNM_64 - if(size==3 && VR && !A && R && o3 && !opc && Rt==0x1f && HasLSFE()) return STFADD(ctx, dec); // -> STFADDL_64 - if(size==3 && VR && !A && R && o3 && opc==4 && Rt==0x1f && HasLSFE()) return STFMAX(ctx, dec); // -> STFMAXL_64 - if(size==3 && VR && !A && R && o3 && opc==5 && Rt==0x1f && HasLSFE()) return STFMIN(ctx, dec); // -> STFMINL_64 - if(size==3 && VR && !A && R && o3 && opc==6 && Rt==0x1f && HasLSFE()) return STFMAXNM(ctx, dec); // -> STFMAXNML_64 - if(size==3 && VR && !A && R && o3 && opc==7 && Rt==0x1f && HasLSFE()) return STFMINNM(ctx, dec); // -> STFMINNML_64 - if(size==3 && !VR && !A && !R && Rs!=0x1f && o3 && (opc&3)==1) UNALLOCATED(ENC_UNALLOCATED_912_MEMOP); - if(VR && !A && o3 && opc==1 && Rt==0x1f) UNALLOCATED(ENC_UNALLOCATED_916_MEMOP); - if(VR && !A && o3 && (opc&6)==2 && Rt==0x1f) UNALLOCATED(ENC_UNALLOCATED_915_MEMOP); - if(!size && !VR && !A && !R && !o3 && !opc && HasLSE()) return LDADDB(ctx, dec); // -> LDADDB_32_memop - if(!size && !VR && !A && !R && !o3 && opc==1 && HasLSE()) return LDCLRB(ctx, dec); // -> LDCLRB_32_memop - if(!size && !VR && !A && !R && !o3 && opc==2 && HasLSE()) return LDEORB(ctx, dec); // -> LDEORB_32_memop - if(!size && !VR && !A && !R && !o3 && opc==3 && HasLSE()) return LDSETB(ctx, dec); // -> LDSETB_32_memop - if(!size && !VR && !A && !R && !o3 && opc==4 && HasLSE()) return LDSMAXB(ctx, dec); // -> LDSMAXB_32_memop - if(!size && !VR && !A && !R && !o3 && opc==5 && HasLSE()) return LDSMINB(ctx, dec); // -> LDSMINB_32_memop - if(!size && !VR && !A && !R && !o3 && opc==6 && HasLSE()) return LDUMAXB(ctx, dec); // -> LDUMAXB_32_memop - if(!size && !VR && !A && !R && !o3 && opc==7 && HasLSE()) return LDUMINB(ctx, dec); // -> LDUMINB_32_memop - if(!size && !VR && !A && !R && o3 && !opc && HasLSE()) return SWPB(ctx, dec); // -> SWPB_32_memop - if(!size && !VR && !A && !R && o3 && opc==1 && HasTHE()) return RCWCLR(ctx, dec); // -> RCWCLR_64_memop - if(!size && !VR && !A && !R && o3 && opc==2 && HasTHE()) return RCWSWP(ctx, dec); // -> RCWSWP_64_memop - if(!size && !VR && !A && !R && o3 && opc==3 && HasTHE()) return RCWSET(ctx, dec); // -> RCWSET_64_memop - if(!size && !VR && !A && R && !o3 && !opc && HasLSE()) return LDADDB(ctx, dec); // -> LDADDLB_32_memop - if(!size && !VR && !A && R && !o3 && opc==1 && HasLSE()) return LDCLRB(ctx, dec); // -> LDCLRLB_32_memop - if(!size && !VR && !A && R && !o3 && opc==2 && HasLSE()) return LDEORB(ctx, dec); // -> LDEORLB_32_memop - if(!size && !VR && !A && R && !o3 && opc==3 && HasLSE()) return LDSETB(ctx, dec); // -> LDSETLB_32_memop - if(!size && !VR && !A && R && !o3 && opc==4 && HasLSE()) return LDSMAXB(ctx, dec); // -> LDSMAXLB_32_memop - if(!size && !VR && !A && R && !o3 && opc==5 && HasLSE()) return LDSMINB(ctx, dec); // -> LDSMINLB_32_memop - if(!size && !VR && !A && R && !o3 && opc==6 && HasLSE()) return LDUMAXB(ctx, dec); // -> LDUMAXLB_32_memop - if(!size && !VR && !A && R && !o3 && opc==7 && HasLSE()) return LDUMINB(ctx, dec); // -> LDUMINLB_32_memop - if(!size && !VR && !A && R && o3 && !opc && HasLSE()) return SWPB(ctx, dec); // -> SWPLB_32_memop - if(!size && !VR && !A && R && o3 && opc==1 && HasTHE()) return RCWCLR(ctx, dec); // -> RCWCLRL_64_memop - if(!size && !VR && !A && R && o3 && opc==2 && HasTHE()) return RCWSWP(ctx, dec); // -> RCWSWPL_64_memop - if(!size && !VR && !A && R && o3 && opc==3 && HasTHE()) return RCWSET(ctx, dec); // -> RCWSETL_64_memop - if(!size && !VR && A && !R && !o3 && !opc && HasLSE()) return LDADDB(ctx, dec); // -> LDADDAB_32_memop - if(!size && !VR && A && !R && !o3 && opc==1 && HasLSE()) return LDCLRB(ctx, dec); // -> LDCLRAB_32_memop - if(!size && !VR && A && !R && !o3 && opc==2 && HasLSE()) return LDEORB(ctx, dec); // -> LDEORAB_32_memop - if(!size && !VR && A && !R && !o3 && opc==3 && HasLSE()) return LDSETB(ctx, dec); // -> LDSETAB_32_memop - if(!size && !VR && A && !R && !o3 && opc==4 && HasLSE()) return LDSMAXB(ctx, dec); // -> LDSMAXAB_32_memop - if(!size && !VR && A && !R && !o3 && opc==5 && HasLSE()) return LDSMINB(ctx, dec); // -> LDSMINAB_32_memop - if(!size && !VR && A && !R && !o3 && opc==6 && HasLSE()) return LDUMAXB(ctx, dec); // -> LDUMAXAB_32_memop - if(!size && !VR && A && !R && !o3 && opc==7 && HasLSE()) return LDUMINB(ctx, dec); // -> LDUMINAB_32_memop - if(!size && !VR && A && !R && o3 && !opc && HasLSE()) return SWPB(ctx, dec); // -> SWPAB_32_memop - if(!size && !VR && A && !R && o3 && opc==1 && HasTHE()) return RCWCLR(ctx, dec); // -> RCWCLRA_64_memop - if(!size && !VR && A && !R && o3 && opc==2 && HasTHE()) return RCWSWP(ctx, dec); // -> RCWSWPA_64_memop - if(!size && !VR && A && !R && o3 && opc==3 && HasTHE()) return RCWSET(ctx, dec); // -> RCWSETA_64_memop - if(!size && !VR && A && !R && o3 && opc==4 && HasLRCPC()) return LDAPRB(ctx, dec); // -> LDAPRB_32L_memop - if(!size && !VR && A && R && !o3 && !opc && HasLSE()) return LDADDB(ctx, dec); // -> LDADDALB_32_memop - if(!size && !VR && A && R && !o3 && opc==1 && HasLSE()) return LDCLRB(ctx, dec); // -> LDCLRALB_32_memop - if(!size && !VR && A && R && !o3 && opc==2 && HasLSE()) return LDEORB(ctx, dec); // -> LDEORALB_32_memop - if(!size && !VR && A && R && !o3 && opc==3 && HasLSE()) return LDSETB(ctx, dec); // -> LDSETALB_32_memop - if(!size && !VR && A && R && !o3 && opc==4 && HasLSE()) return LDSMAXB(ctx, dec); // -> LDSMAXALB_32_memop - if(!size && !VR && A && R && !o3 && opc==5 && HasLSE()) return LDSMINB(ctx, dec); // -> LDSMINALB_32_memop - if(!size && !VR && A && R && !o3 && opc==6 && HasLSE()) return LDUMAXB(ctx, dec); // -> LDUMAXALB_32_memop - if(!size && !VR && A && R && !o3 && opc==7 && HasLSE()) return LDUMINB(ctx, dec); // -> LDUMINALB_32_memop - if(!size && !VR && A && R && o3 && !opc && HasLSE()) return SWPB(ctx, dec); // -> SWPALB_32_memop - if(!size && !VR && A && R && o3 && opc==1 && HasTHE()) return RCWCLR(ctx, dec); // -> RCWCLRAL_64_memop - if(!size && !VR && A && R && o3 && opc==2 && HasTHE()) return RCWSWP(ctx, dec); // -> RCWSWPAL_64_memop - if(!size && !VR && A && R && o3 && opc==3 && HasTHE()) return RCWSET(ctx, dec); // -> RCWSETAL_64_memop - if(!size && VR && !A && !R && !o3 && !opc && HasLSFE()) return LDBFADD(ctx, dec); // -> LDBFADD_16 - if(!size && VR && !A && !R && !o3 && opc==4 && HasLSFE()) return LDBFMAX(ctx, dec); // -> LDBFMAX_16 - if(!size && VR && !A && !R && !o3 && opc==5 && HasLSFE()) return LDBFMIN(ctx, dec); // -> LDBFMIN_16 - if(!size && VR && !A && !R && !o3 && opc==6 && HasLSFE()) return LDBFMAXNM(ctx, dec); // -> LDBFMAXNM_16 - if(!size && VR && !A && !R && !o3 && opc==7 && HasLSFE()) return LDBFMINNM(ctx, dec); // -> LDBFMINNM_16 - if(!size && VR && !A && R && !o3 && !opc && HasLSFE()) return LDBFADD(ctx, dec); // -> LDBFADDL_16 - if(!size && VR && !A && R && !o3 && opc==4 && HasLSFE()) return LDBFMAX(ctx, dec); // -> LDBFMAXL_16 - if(!size && VR && !A && R && !o3 && opc==5 && HasLSFE()) return LDBFMIN(ctx, dec); // -> LDBFMINL_16 - if(!size && VR && !A && R && !o3 && opc==6 && HasLSFE()) return LDBFMAXNM(ctx, dec); // -> LDBFMAXNML_16 - if(!size && VR && !A && R && !o3 && opc==7 && HasLSFE()) return LDBFMINNM(ctx, dec); // -> LDBFMINNML_16 - if(!size && VR && A && !R && !o3 && !opc && HasLSFE()) return LDBFADD(ctx, dec); // -> LDBFADDA_16 - if(!size && VR && A && !R && !o3 && opc==4 && HasLSFE()) return LDBFMAX(ctx, dec); // -> LDBFMAXA_16 - if(!size && VR && A && !R && !o3 && opc==5 && HasLSFE()) return LDBFMIN(ctx, dec); // -> LDBFMINA_16 - if(!size && VR && A && !R && !o3 && opc==6 && HasLSFE()) return LDBFMAXNM(ctx, dec); // -> LDBFMAXNMA_16 - if(!size && VR && A && !R && !o3 && opc==7 && HasLSFE()) return LDBFMINNM(ctx, dec); // -> LDBFMINNMA_16 - if(!size && VR && A && R && !o3 && !opc && HasLSFE()) return LDBFADD(ctx, dec); // -> LDBFADDAL_16 - if(!size && VR && A && R && !o3 && opc==4 && HasLSFE()) return LDBFMAX(ctx, dec); // -> LDBFMAXAL_16 - if(!size && VR && A && R && !o3 && opc==5 && HasLSFE()) return LDBFMIN(ctx, dec); // -> LDBFMINAL_16 - if(!size && VR && A && R && !o3 && opc==6 && HasLSFE()) return LDBFMAXNM(ctx, dec); // -> LDBFMAXNMAL_16 - if(!size && VR && A && R && !o3 && opc==7 && HasLSFE()) return LDBFMINNM(ctx, dec); // -> LDBFMINNMAL_16 - if(size==1 && !VR && !A && !R && !o3 && !opc && HasLSE()) return LDADDH(ctx, dec); // -> LDADDH_32_memop - if(size==1 && !VR && !A && !R && !o3 && opc==1 && HasLSE()) return LDCLRH(ctx, dec); // -> LDCLRH_32_memop - if(size==1 && !VR && !A && !R && !o3 && opc==2 && HasLSE()) return LDEORH(ctx, dec); // -> LDEORH_32_memop - if(size==1 && !VR && !A && !R && !o3 && opc==3 && HasLSE()) return LDSETH(ctx, dec); // -> LDSETH_32_memop - if(size==1 && !VR && !A && !R && !o3 && opc==4 && HasLSE()) return LDSMAXH(ctx, dec); // -> LDSMAXH_32_memop - if(size==1 && !VR && !A && !R && !o3 && opc==5 && HasLSE()) return LDSMINH(ctx, dec); // -> LDSMINH_32_memop - if(size==1 && !VR && !A && !R && !o3 && opc==6 && HasLSE()) return LDUMAXH(ctx, dec); // -> LDUMAXH_32_memop - if(size==1 && !VR && !A && !R && !o3 && opc==7 && HasLSE()) return LDUMINH(ctx, dec); // -> LDUMINH_32_memop - if(size==1 && !VR && !A && !R && o3 && !opc && HasLSE()) return SWPH(ctx, dec); // -> SWPH_32_memop - if(size==1 && !VR && !A && !R && o3 && opc==1 && HasTHE()) return RCWSCLR(ctx, dec); // -> RCWSCLR_64_memop - if(size==1 && !VR && !A && !R && o3 && opc==2 && HasTHE()) return RCWSSWP(ctx, dec); // -> RCWSSWP_64_memop - if(size==1 && !VR && !A && !R && o3 && opc==3 && HasTHE()) return RCWSSET(ctx, dec); // -> RCWSSET_64_memop - if(size==1 && !VR && !A && R && !o3 && !opc && HasLSE()) return LDADDH(ctx, dec); // -> LDADDLH_32_memop - if(size==1 && !VR && !A && R && !o3 && opc==1 && HasLSE()) return LDCLRH(ctx, dec); // -> LDCLRLH_32_memop - if(size==1 && !VR && !A && R && !o3 && opc==2 && HasLSE()) return LDEORH(ctx, dec); // -> LDEORLH_32_memop - if(size==1 && !VR && !A && R && !o3 && opc==3 && HasLSE()) return LDSETH(ctx, dec); // -> LDSETLH_32_memop - if(size==1 && !VR && !A && R && !o3 && opc==4 && HasLSE()) return LDSMAXH(ctx, dec); // -> LDSMAXLH_32_memop - if(size==1 && !VR && !A && R && !o3 && opc==5 && HasLSE()) return LDSMINH(ctx, dec); // -> LDSMINLH_32_memop - if(size==1 && !VR && !A && R && !o3 && opc==6 && HasLSE()) return LDUMAXH(ctx, dec); // -> LDUMAXLH_32_memop - if(size==1 && !VR && !A && R && !o3 && opc==7 && HasLSE()) return LDUMINH(ctx, dec); // -> LDUMINLH_32_memop - if(size==1 && !VR && !A && R && o3 && !opc && HasLSE()) return SWPH(ctx, dec); // -> SWPLH_32_memop - if(size==1 && !VR && !A && R && o3 && opc==1 && HasTHE()) return RCWSCLR(ctx, dec); // -> RCWSCLRL_64_memop - if(size==1 && !VR && !A && R && o3 && opc==2 && HasTHE()) return RCWSSWP(ctx, dec); // -> RCWSSWPL_64_memop - if(size==1 && !VR && !A && R && o3 && opc==3 && HasTHE()) return RCWSSET(ctx, dec); // -> RCWSSETL_64_memop - if(size==1 && !VR && A && !R && !o3 && !opc && HasLSE()) return LDADDH(ctx, dec); // -> LDADDAH_32_memop - if(size==1 && !VR && A && !R && !o3 && opc==1 && HasLSE()) return LDCLRH(ctx, dec); // -> LDCLRAH_32_memop - if(size==1 && !VR && A && !R && !o3 && opc==2 && HasLSE()) return LDEORH(ctx, dec); // -> LDEORAH_32_memop - if(size==1 && !VR && A && !R && !o3 && opc==3 && HasLSE()) return LDSETH(ctx, dec); // -> LDSETAH_32_memop - if(size==1 && !VR && A && !R && !o3 && opc==4 && HasLSE()) return LDSMAXH(ctx, dec); // -> LDSMAXAH_32_memop - if(size==1 && !VR && A && !R && !o3 && opc==5 && HasLSE()) return LDSMINH(ctx, dec); // -> LDSMINAH_32_memop - if(size==1 && !VR && A && !R && !o3 && opc==6 && HasLSE()) return LDUMAXH(ctx, dec); // -> LDUMAXAH_32_memop - if(size==1 && !VR && A && !R && !o3 && opc==7 && HasLSE()) return LDUMINH(ctx, dec); // -> LDUMINAH_32_memop - if(size==1 && !VR && A && !R && o3 && !opc && HasLSE()) return SWPH(ctx, dec); // -> SWPAH_32_memop - if(size==1 && !VR && A && !R && o3 && opc==1 && HasTHE()) return RCWSCLR(ctx, dec); // -> RCWSCLRA_64_memop - if(size==1 && !VR && A && !R && o3 && opc==2 && HasTHE()) return RCWSSWP(ctx, dec); // -> RCWSSWPA_64_memop - if(size==1 && !VR && A && !R && o3 && opc==3 && HasTHE()) return RCWSSET(ctx, dec); // -> RCWSSETA_64_memop - if(size==1 && !VR && A && !R && o3 && opc==4 && HasLRCPC()) return LDAPRH(ctx, dec); // -> LDAPRH_32L_memop - if(size==1 && !VR && A && R && !o3 && !opc && HasLSE()) return LDADDH(ctx, dec); // -> LDADDALH_32_memop - if(size==1 && !VR && A && R && !o3 && opc==1 && HasLSE()) return LDCLRH(ctx, dec); // -> LDCLRALH_32_memop - if(size==1 && !VR && A && R && !o3 && opc==2 && HasLSE()) return LDEORH(ctx, dec); // -> LDEORALH_32_memop - if(size==1 && !VR && A && R && !o3 && opc==3 && HasLSE()) return LDSETH(ctx, dec); // -> LDSETALH_32_memop - if(size==1 && !VR && A && R && !o3 && opc==4 && HasLSE()) return LDSMAXH(ctx, dec); // -> LDSMAXALH_32_memop - if(size==1 && !VR && A && R && !o3 && opc==5 && HasLSE()) return LDSMINH(ctx, dec); // -> LDSMINALH_32_memop - if(size==1 && !VR && A && R && !o3 && opc==6 && HasLSE()) return LDUMAXH(ctx, dec); // -> LDUMAXALH_32_memop - if(size==1 && !VR && A && R && !o3 && opc==7 && HasLSE()) return LDUMINH(ctx, dec); // -> LDUMINALH_32_memop - if(size==1 && !VR && A && R && o3 && !opc && HasLSE()) return SWPH(ctx, dec); // -> SWPALH_32_memop - if(size==1 && !VR && A && R && o3 && opc==1 && HasTHE()) return RCWSCLR(ctx, dec); // -> RCWSCLRAL_64_memop - if(size==1 && !VR && A && R && o3 && opc==2 && HasTHE()) return RCWSSWP(ctx, dec); // -> RCWSSWPAL_64_memop - if(size==1 && !VR && A && R && o3 && opc==3 && HasTHE()) return RCWSSET(ctx, dec); // -> RCWSSETAL_64_memop - if(size==1 && VR && !A && !R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADD_16 - if(size==1 && VR && !A && !R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAX_16 - if(size==1 && VR && !A && !R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMIN_16 - if(size==1 && VR && !A && !R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNM_16 - if(size==1 && VR && !A && !R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNM_16 - if(size==1 && VR && !A && R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDL_16 - if(size==1 && VR && !A && R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXL_16 - if(size==1 && VR && !A && R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINL_16 - if(size==1 && VR && !A && R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNML_16 - if(size==1 && VR && !A && R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNML_16 - if(size==1 && VR && A && !R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDA_16 - if(size==1 && VR && A && !R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXA_16 - if(size==1 && VR && A && !R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINA_16 - if(size==1 && VR && A && !R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNMA_16 - if(size==1 && VR && A && !R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNMA_16 - if(size==1 && VR && A && R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDAL_16 - if(size==1 && VR && A && R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXAL_16 - if(size==1 && VR && A && R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINAL_16 - if(size==1 && VR && A && R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNMAL_16 - if(size==1 && VR && A && R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNMAL_16 - if(size==2 && !VR && !A && !R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADD_32_memop - if(size==2 && !VR && !A && !R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLR_32_memop - if(size==2 && !VR && !A && !R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEOR_32_memop - if(size==2 && !VR && !A && !R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSET_32_memop - if(size==2 && !VR && !A && !R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAX_32_memop - if(size==2 && !VR && !A && !R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMIN_32_memop - if(size==2 && !VR && !A && !R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAX_32_memop - if(size==2 && !VR && !A && !R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMIN_32_memop - if(size==2 && !VR && !A && !R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWP_32_memop - if(size==2 && !VR && !A && R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADDL_32_memop - if(size==2 && !VR && !A && R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLRL_32_memop - if(size==2 && !VR && !A && R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEORL_32_memop - if(size==2 && !VR && !A && R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSETL_32_memop - if(size==2 && !VR && !A && R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAXL_32_memop - if(size==2 && !VR && !A && R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMINL_32_memop - if(size==2 && !VR && !A && R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAXL_32_memop - if(size==2 && !VR && !A && R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMINL_32_memop - if(size==2 && !VR && !A && R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWPL_32_memop - if(size==2 && !VR && A && !R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADDA_32_memop - if(size==2 && !VR && A && !R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLRA_32_memop - if(size==2 && !VR && A && !R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEORA_32_memop - if(size==2 && !VR && A && !R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSETA_32_memop - if(size==2 && !VR && A && !R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAXA_32_memop - if(size==2 && !VR && A && !R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMINA_32_memop - if(size==2 && !VR && A && !R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAXA_32_memop - if(size==2 && !VR && A && !R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMINA_32_memop - if(size==2 && !VR && A && !R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWPA_32_memop - if(size==2 && !VR && A && !R && o3 && opc==4 && HasLRCPC()) return LDAPR(ctx, dec); // -> LDAPR_32L_memop - if(size==2 && !VR && A && R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADDAL_32_memop - if(size==2 && !VR && A && R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLRAL_32_memop - if(size==2 && !VR && A && R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEORAL_32_memop - if(size==2 && !VR && A && R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSETAL_32_memop - if(size==2 && !VR && A && R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAXAL_32_memop - if(size==2 && !VR && A && R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMINAL_32_memop - if(size==2 && !VR && A && R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAXAL_32_memop - if(size==2 && !VR && A && R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMINAL_32_memop - if(size==2 && !VR && A && R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWPAL_32_memop - if(size==2 && VR && !A && !R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADD_32 - if(size==2 && VR && !A && !R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAX_32 - if(size==2 && VR && !A && !R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMIN_32 - if(size==2 && VR && !A && !R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNM_32 - if(size==2 && VR && !A && !R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNM_32 - if(size==2 && VR && !A && R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDL_32 - if(size==2 && VR && !A && R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXL_32 - if(size==2 && VR && !A && R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINL_32 - if(size==2 && VR && !A && R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNML_32 - if(size==2 && VR && !A && R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNML_32 - if(size==2 && VR && A && !R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDA_32 - if(size==2 && VR && A && !R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXA_32 - if(size==2 && VR && A && !R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINA_32 - if(size==2 && VR && A && !R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNMA_32 - if(size==2 && VR && A && !R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNMA_32 - if(size==2 && VR && A && R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDAL_32 - if(size==2 && VR && A && R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXAL_32 - if(size==2 && VR && A && R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINAL_32 - if(size==2 && VR && A && R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNMAL_32 - if(size==2 && VR && A && R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNMAL_32 - if(size==3 && !VR && !A && !R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADD_64_memop - if(size==3 && !VR && !A && !R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLR_64_memop - if(size==3 && !VR && !A && !R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEOR_64_memop - if(size==3 && !VR && !A && !R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSET_64_memop - if(size==3 && !VR && !A && !R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAX_64_memop - if(size==3 && !VR && !A && !R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMIN_64_memop - if(size==3 && !VR && !A && !R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAX_64_memop - if(size==3 && !VR && !A && !R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMIN_64_memop - if(size==3 && !VR && !A && !R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWP_64_memop - if(size==3 && !VR && !A && !R && o3 && opc==2 && HasLS64_ACCDATA()) return ST64BV0(ctx, dec); // -> ST64BV0_64_memop - if(size==3 && !VR && !A && !R && o3 && opc==3 && HasLS64_V()) return ST64BV(ctx, dec); // -> ST64BV_64_memop - if(size==3 && !VR && !A && R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADDL_64_memop - if(size==3 && !VR && !A && R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLRL_64_memop - if(size==3 && !VR && !A && R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEORL_64_memop - if(size==3 && !VR && !A && R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSETL_64_memop - if(size==3 && !VR && !A && R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAXL_64_memop - if(size==3 && !VR && !A && R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMINL_64_memop - if(size==3 && !VR && !A && R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAXL_64_memop - if(size==3 && !VR && !A && R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMINL_64_memop - if(size==3 && !VR && !A && R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWPL_64_memop - if(size==3 && !VR && !A && R && o3 && opc==2) UNALLOCATED(ENC_UNALLOCATED_913_MEMOP); - if(size==3 && !VR && !A && R && o3 && opc==3) UNALLOCATED(ENC_UNALLOCATED_914_MEMOP); - if(size==3 && !VR && A && !R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADDA_64_memop - if(size==3 && !VR && A && !R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLRA_64_memop - if(size==3 && !VR && A && !R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEORA_64_memop - if(size==3 && !VR && A && !R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSETA_64_memop - if(size==3 && !VR && A && !R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAXA_64_memop - if(size==3 && !VR && A && !R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMINA_64_memop - if(size==3 && !VR && A && !R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAXA_64_memop - if(size==3 && !VR && A && !R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMINA_64_memop - if(size==3 && !VR && A && !R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWPA_64_memop - if(size==3 && !VR && A && !R && o3 && opc==4 && HasLRCPC()) return LDAPR(ctx, dec); // -> LDAPR_64L_memop - if(size==3 && !VR && A && R && !o3 && !opc && HasLSE()) return LDADD(ctx, dec); // -> LDADDAL_64_memop - if(size==3 && !VR && A && R && !o3 && opc==1 && HasLSE()) return LDCLR(ctx, dec); // -> LDCLRAL_64_memop - if(size==3 && !VR && A && R && !o3 && opc==2 && HasLSE()) return LDEOR(ctx, dec); // -> LDEORAL_64_memop - if(size==3 && !VR && A && R && !o3 && opc==3 && HasLSE()) return LDSET(ctx, dec); // -> LDSETAL_64_memop - if(size==3 && !VR && A && R && !o3 && opc==4 && HasLSE()) return LDSMAX(ctx, dec); // -> LDSMAXAL_64_memop - if(size==3 && !VR && A && R && !o3 && opc==5 && HasLSE()) return LDSMIN(ctx, dec); // -> LDSMINAL_64_memop - if(size==3 && !VR && A && R && !o3 && opc==6 && HasLSE()) return LDUMAX(ctx, dec); // -> LDUMAXAL_64_memop - if(size==3 && !VR && A && R && !o3 && opc==7 && HasLSE()) return LDUMIN(ctx, dec); // -> LDUMINAL_64_memop - if(size==3 && !VR && A && R && o3 && !opc && HasLSE()) return SWP(ctx, dec); // -> SWPAL_64_memop - if(size==3 && VR && !A && !R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADD_64 - if(size==3 && VR && !A && !R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAX_64 - if(size==3 && VR && !A && !R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMIN_64 - if(size==3 && VR && !A && !R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNM_64 - if(size==3 && VR && !A && !R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNM_64 - if(size==3 && VR && !A && R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDL_64 - if(size==3 && VR && !A && R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXL_64 - if(size==3 && VR && !A && R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINL_64 - if(size==3 && VR && !A && R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNML_64 - if(size==3 && VR && !A && R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNML_64 - if(size==3 && VR && A && !R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDA_64 - if(size==3 && VR && A && !R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXA_64 - if(size==3 && VR && A && !R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINA_64 - if(size==3 && VR && A && !R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNMA_64 - if(size==3 && VR && A && !R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNMA_64 - if(size==3 && VR && A && R && !o3 && !opc && HasLSFE()) return LDFADD(ctx, dec); // -> LDFADDAL_64 - if(size==3 && VR && A && R && !o3 && opc==4 && HasLSFE()) return LDFMAX(ctx, dec); // -> LDFMAXAL_64 - if(size==3 && VR && A && R && !o3 && opc==5 && HasLSFE()) return LDFMIN(ctx, dec); // -> LDFMINAL_64 - if(size==3 && VR && A && R && !o3 && opc==6 && HasLSFE()) return LDFMAXNM(ctx, dec); // -> LDFMAXNMAL_64 - if(size==3 && VR && A && R && !o3 && opc==7 && HasLSFE()) return LDFMINNM(ctx, dec); // -> LDFMINNMAL_64 - if(VR && !A && o3 && Rt!=0x1f) UNALLOCATED(ENC_UNALLOCATED_896_MEMOP); - if(!(size&2) && !VR && !A && R && o3 && opc==5) UNALLOCATED(ENC_UNALLOCATED_907_MEMOP); - if(!(size&2) && !VR && A && R && o3 && opc==5) UNALLOCATED(ENC_UNALLOCATED_908_MEMOP); - if(size==2 && !VR && !A && o3 && opc==2) UNALLOCATED(ENC_UNALLOCATED_909_MEMOP); - if(size==2 && !VR && !A && o3 && opc==3) UNALLOCATED(ENC_UNALLOCATED_910_MEMOP); - if(size==3 && !VR && !A && R && o3 && (opc&3)==1) UNALLOCATED(ENC_UNALLOCATED_911_MEMOP); - if(!VR && A && R && o3 && opc==4) UNALLOCATED(ENC_UNALLOCATED_906_MEMOP); - if(!(size&2) && !VR && !R && o3 && opc==5) UNALLOCATED(ENC_UNALLOCATED_904_MEMOP); - if(size==2 && !VR && !A && o3 && (opc&3)==1) UNALLOCATED(ENC_UNALLOCATED_905_MEMOP); - if(!VR && !A && o3 && opc==4) UNALLOCATED(ENC_UNALLOCATED_903_MEMOP); - if(!(size&2) && !VR && A && o3 && (opc&6)==6) UNALLOCATED(ENC_UNALLOCATED_901_MEMOP); - if((size&2)==2 && !VR && A && o3 && (opc&3)==1) UNALLOCATED(ENC_UNALLOCATED_902_MEMOP); - if(!VR && !A && o3 && (opc&6)==6) UNALLOCATED(ENC_UNALLOCATED_899_MEMOP); - if(VR && !o3 && opc==1) UNALLOCATED(ENC_UNALLOCATED_900_MEMOP); - if((size&2)==2 && !VR && A && o3 && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_898_MEMOP); - if(VR && !o3 && (opc&6)==2) UNALLOCATED(ENC_UNALLOCATED_897_MEMOP); - if(VR && A && o3) UNALLOCATED(ENC_UNALLOCATED_895_MEMOP); - UNMATCHED; -} - -int decode_iclass_memop_unpriv(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>30)&1, A=(INSWORD>>23)&1, R=(INSWORD>>22)&1, o3=(INSWORD>>15)&1, opc=(INSWORD>>12)&7; - if(!sz && !A && !R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADD_32_memop_unpriv - if(!sz && !A && !R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLR_32_memop_unpriv - if(!sz && !A && !R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSET_32_memop_unpriv - if(!sz && !A && !R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPT_32_memop_unpriv - if(!sz && !A && R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADDL_32_memop_unpriv - if(!sz && !A && R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLRL_32_memop_unpriv - if(!sz && !A && R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSETL_32_memop_unpriv - if(!sz && !A && R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPTL_32_memop_unpriv - if(!sz && A && !R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADDA_32_memop_unpriv - if(!sz && A && !R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLRA_32_memop_unpriv - if(!sz && A && !R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSETA_32_memop_unpriv - if(!sz && A && !R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPTA_32_memop_unpriv - if(!sz && A && R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADDAL_32_memop_unpriv - if(!sz && A && R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLRAL_32_memop_unpriv - if(!sz && A && R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSETAL_32_memop_unpriv - if(!sz && A && R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPTAL_32_memop_unpriv - if(sz && !A && !R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADD_64_memop_unpriv - if(sz && !A && !R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLR_64_memop_unpriv - if(sz && !A && !R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSET_64_memop_unpriv - if(sz && !A && !R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPT_64_memop_unpriv - if(sz && !A && R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADDL_64_memop_unpriv - if(sz && !A && R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLRL_64_memop_unpriv - if(sz && !A && R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSETL_64_memop_unpriv - if(sz && !A && R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPTL_64_memop_unpriv - if(sz && A && !R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADDA_64_memop_unpriv - if(sz && A && !R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLRA_64_memop_unpriv - if(sz && A && !R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSETA_64_memop_unpriv - if(sz && A && !R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPTA_64_memop_unpriv - if(sz && A && R && !o3 && !opc && HasLSUI()) return LDTADD(ctx, dec); // -> LDTADDAL_64_memop_unpriv - if(sz && A && R && !o3 && opc==1 && HasLSUI()) return LDTCLR(ctx, dec); // -> LDTCLRAL_64_memop_unpriv - if(sz && A && R && !o3 && opc==3 && HasLSUI()) return LDTSET(ctx, dec); // -> LDTSETAL_64_memop_unpriv - if(sz && A && R && o3 && !opc && HasLSUI()) return SWPT(ctx, dec); // -> SWPTAL_64_memop_unpriv - if(opc==2) UNALLOCATED(ENC_UNALLOCATED_919_MEMOP_UNPRIV); - if(o3 && (opc&5)==1) UNALLOCATED(ENC_UNALLOCATED_918_MEMOP_UNPRIV); - if((opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_917_MEMOP_UNPRIV); - UNMATCHED; -} - -int decode_iclass_comswap(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1, Rt2=(INSWORD>>10)&0x1f; - if(!size && !L && !o0 && Rt2==0x1f && HasLSE()) return CASB(ctx, dec); // -> CASB_C32_comswap - if(!size && !L && o0 && Rt2==0x1f && HasLSE()) return CASB(ctx, dec); // -> CASLB_C32_comswap - if(!size && L && !o0 && Rt2==0x1f && HasLSE()) return CASB(ctx, dec); // -> CASAB_C32_comswap - if(!size && L && o0 && Rt2==0x1f && HasLSE()) return CASB(ctx, dec); // -> CASALB_C32_comswap - if(size==1 && !L && !o0 && Rt2==0x1f && HasLSE()) return CASH(ctx, dec); // -> CASH_C32_comswap - if(size==1 && !L && o0 && Rt2==0x1f && HasLSE()) return CASH(ctx, dec); // -> CASLH_C32_comswap - if(size==1 && L && !o0 && Rt2==0x1f && HasLSE()) return CASH(ctx, dec); // -> CASAH_C32_comswap - if(size==1 && L && o0 && Rt2==0x1f && HasLSE()) return CASH(ctx, dec); // -> CASALH_C32_comswap - if(size==2 && !L && !o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CAS_C32_comswap - if(size==2 && !L && o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CASL_C32_comswap - if(size==2 && L && !o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CASA_C32_comswap - if(size==2 && L && o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CASAL_C32_comswap - if(size==3 && !L && !o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CAS_C64_comswap - if(size==3 && !L && o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CASL_C64_comswap - if(size==3 && L && !o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CASA_C64_comswap - if(size==3 && L && o0 && Rt2==0x1f && HasLSE()) return CAS(ctx, dec); // -> CASAL_C64_comswap - if(Rt2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_920_COMSWAP); - UNMATCHED; -} - -int decode_iclass_comswap_unpriv(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>30)&1, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1, Rt2=(INSWORD>>10)&0x1f; - if(sz && !L && !o0 && Rt2==0x1f && HasLSUI()) return CAST(ctx, dec); // -> CAST_C64_comswap_unpriv - if(sz && !L && o0 && Rt2==0x1f && HasLSUI()) return CAST(ctx, dec); // -> CASLT_C64_comswap_unpriv - if(sz && L && !o0 && Rt2==0x1f && HasLSUI()) return CAST(ctx, dec); // -> CASAT_C64_comswap_unpriv - if(sz && L && o0 && Rt2==0x1f && HasLSUI()) return CAST(ctx, dec); // -> CASALT_C64_comswap_unpriv - if(sz && Rt2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_922_COMSWAP_UNPRIV); - if(!sz) UNALLOCATED(ENC_UNALLOCATED_921_COMSWAP_UNPRIV); - UNMATCHED; -} - -int decode_iclass_comswappr(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>30)&1, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1, Rt2=(INSWORD>>10)&0x1f; - if(!sz && !L && !o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASP_CP32_comswappr - if(!sz && !L && o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASPL_CP32_comswappr - if(!sz && L && !o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASPA_CP32_comswappr - if(!sz && L && o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASPAL_CP32_comswappr - if(sz && !L && !o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASP_CP64_comswappr - if(sz && !L && o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASPL_CP64_comswappr - if(sz && L && !o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASPA_CP64_comswappr - if(sz && L && o0 && Rt2==0x1f && HasLSE()) return CASP(ctx, dec); // -> CASPAL_CP64_comswappr - if(Rt2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_923_COMSWAPPR); - UNMATCHED; -} - -int decode_iclass_comswappr_unpriv(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>30)&1, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1, Rt2=(INSWORD>>10)&0x1f; - if(sz && !L && !o0 && Rt2==0x1f && HasLSUI()) return CASPT(ctx, dec); // -> CASPT_CP64_comswappr_unpriv - if(sz && !L && o0 && Rt2==0x1f && HasLSUI()) return CASPT(ctx, dec); // -> CASPLT_CP64_comswappr_unpriv - if(sz && L && !o0 && Rt2==0x1f && HasLSUI()) return CASPT(ctx, dec); // -> CASPAT_CP64_comswappr_unpriv - if(sz && L && o0 && Rt2==0x1f && HasLSUI()) return CASPT(ctx, dec); // -> CASPALT_CP64_comswappr_unpriv - if(sz && Rt2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_925_COMSWAPPR_UNPRIV); - if(!sz) UNALLOCATED(ENC_UNALLOCATED_924_COMSWAPPR_UNPRIV); - UNMATCHED; -} - -int decode_iclass_ldst_gcs(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>12)&7; - if(!opc && HasGCS()) return GCSSTR(ctx, dec); // -> GCSSTR_64_ldst_gcs - if(opc==1 && HasGCS()) return GCSSTTR(ctx, dec); // -> GCSSTTR_64_ldst_gcs - if((opc&6)==2) UNALLOCATED(ENC_UNALLOCATED_927_LDST_GCS); - if((opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_926_LDST_GCS); - UNMATCHED; -} - -int decode_iclass_loadlit(context *ctx, Instruction *dec) -{ - uint32_t opc=INSWORD>>30, VR=(INSWORD>>26)&1; - if(!opc && !VR) return LDR_lit_gen(ctx, dec); // -> LDR_32_loadlit - if(!opc && VR && HasFP()) return LDR_lit_fpsimd(ctx, dec); // -> LDR_S_loadlit - if(opc==1 && !VR) return LDR_lit_gen(ctx, dec); // -> LDR_64_loadlit - if(opc==1 && VR && HasFP()) return LDR_lit_fpsimd(ctx, dec); // -> LDR_D_loadlit - if(opc==2 && !VR) return LDRSW_lit(ctx, dec); // -> LDRSW_64_loadlit - if(opc==2 && VR && HasFP()) return LDR_lit_fpsimd(ctx, dec); // -> LDR_Q_loadlit - if(opc==3 && !VR) return PRFM_lit(ctx, dec); // -> PRFM_P_loadlit - if(opc==3 && VR) UNALLOCATED(ENC_UNALLOCATED_928_LOADLIT); - UNMATCHED; -} - -int decode_iclass_ldstexclp(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>30)&1, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1; - if(!sz && !L && !o0) return STXP(ctx, dec); // -> STXP_SP32_ldstexclp - if(!sz && !L && o0) return STLXP(ctx, dec); // -> STLXP_SP32_ldstexclp - if(!sz && L && !o0) return LDXP(ctx, dec); // -> LDXP_LP32_ldstexclp - if(!sz && L && o0) return LDAXP(ctx, dec); // -> LDAXP_LP32_ldstexclp - if(sz && !L && !o0) return STXP(ctx, dec); // -> STXP_SP64_ldstexclp - if(sz && !L && o0) return STLXP(ctx, dec); // -> STLXP_SP64_ldstexclp - if(sz && L && !o0) return LDXP(ctx, dec); // -> LDXP_LP64_ldstexclp - if(sz && L && o0) return LDAXP(ctx, dec); // -> LDAXP_LP64_ldstexclp - UNMATCHED; -} - -int decode_iclass_ldstexclr(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1; - if(!size && !L && !o0) return STXRB(ctx, dec); // -> STXRB_SR32_ldstexclr - if(!size && !L && o0) return STLXRB(ctx, dec); // -> STLXRB_SR32_ldstexclr - if(!size && L && !o0) return LDXRB(ctx, dec); // -> LDXRB_LR32_ldstexclr - if(!size && L && o0) return LDAXRB(ctx, dec); // -> LDAXRB_LR32_ldstexclr - if(size==1 && !L && !o0) return STXRH(ctx, dec); // -> STXRH_SR32_ldstexclr - if(size==1 && !L && o0) return STLXRH(ctx, dec); // -> STLXRH_SR32_ldstexclr - if(size==1 && L && !o0) return LDXRH(ctx, dec); // -> LDXRH_LR32_ldstexclr - if(size==1 && L && o0) return LDAXRH(ctx, dec); // -> LDAXRH_LR32_ldstexclr - if(size==2 && !L && !o0) return STXR(ctx, dec); // -> STXR_SR32_ldstexclr - if(size==2 && !L && o0) return STLXR(ctx, dec); // -> STLXR_SR32_ldstexclr - if(size==2 && L && !o0) return LDXR(ctx, dec); // -> LDXR_LR32_ldstexclr - if(size==2 && L && o0) return LDAXR(ctx, dec); // -> LDAXR_LR32_ldstexclr - if(size==3 && !L && !o0) return STXR(ctx, dec); // -> STXR_SR64_ldstexclr - if(size==3 && !L && o0) return STLXR(ctx, dec); // -> STLXR_SR64_ldstexclr - if(size==3 && L && !o0) return LDXR(ctx, dec); // -> LDXR_LR64_ldstexclr - if(size==3 && L && o0) return LDAXR(ctx, dec); // -> LDAXR_LR64_ldstexclr - UNMATCHED; -} - -int decode_iclass_ldstexclr_unpriv(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>30)&1, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1; - if(!sz && !L && !o0 && HasLSUI()) return STTXR(ctx, dec); // -> STTXR_SR32_ldstexclr_unpriv - if(!sz && !L && o0 && HasLSUI()) return STLTXR(ctx, dec); // -> STLTXR_SR32_ldstexclr_unpriv - if(!sz && L && !o0 && HasLSUI()) return LDTXR(ctx, dec); // -> LDTXR_LR32_ldstexclr_unpriv - if(!sz && L && o0 && HasLSUI()) return LDATXR(ctx, dec); // -> LDATXR_LR32_ldstexclr_unpriv - if(sz && !L && !o0 && HasLSUI()) return STTXR(ctx, dec); // -> STTXR_SR64_ldstexclr_unpriv - if(sz && !L && o0 && HasLSUI()) return STLTXR(ctx, dec); // -> STLTXR_SR64_ldstexclr_unpriv - if(sz && L && !o0 && HasLSUI()) return LDTXR(ctx, dec); // -> LDTXR_LR64_ldstexclr_unpriv - if(sz && L && o0 && HasLSUI()) return LDATXR(ctx, dec); // -> LDATXR_LR64_ldstexclr_unpriv - UNMATCHED; -} - -int decode_iclass_ldsttags(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, imm9=(INSWORD>>12)&0x1ff, op2=(INSWORD>>10)&3; - if(!opc && !imm9 && !op2 && HasMTE2()) return STZGM(ctx, dec); // -> STZGM_64bulk_ldsttags - if(opc==2 && !imm9 && !op2 && HasMTE2()) return STGM(ctx, dec); // -> STGM_64bulk_ldsttags - if(opc==3 && !imm9 && !op2 && HasMTE2()) return LDGM(ctx, dec); // -> LDGM_64bulk_ldsttags - if(opc!=1 && imm9 && !op2) UNALLOCATED(ENC_UNALLOCATED_929_LDSTTAGS); - if(!opc && op2==1 && HasMTE()) return STG(ctx, dec); // -> STG_64Spost_ldsttags - if(!opc && op2==2 && HasMTE()) return STG(ctx, dec); // -> STG_64Soffset_ldsttags - if(!opc && op2==3 && HasMTE()) return STG(ctx, dec); // -> STG_64Spre_ldsttags - if(opc==1 && !op2 && HasMTE()) return LDG(ctx, dec); // -> LDG_64Loffset_ldsttags - if(opc==1 && op2==1 && HasMTE()) return STZG(ctx, dec); // -> STZG_64Spost_ldsttags - if(opc==1 && op2==2 && HasMTE()) return STZG(ctx, dec); // -> STZG_64Soffset_ldsttags - if(opc==1 && op2==3 && HasMTE()) return STZG(ctx, dec); // -> STZG_64Spre_ldsttags - if(opc==2 && op2==1 && HasMTE()) return ST2G(ctx, dec); // -> ST2G_64Spost_ldsttags - if(opc==2 && op2==2 && HasMTE()) return ST2G(ctx, dec); // -> ST2G_64Soffset_ldsttags - if(opc==2 && op2==3 && HasMTE()) return ST2G(ctx, dec); // -> ST2G_64Spre_ldsttags - if(opc==3 && op2==1 && HasMTE()) return STZ2G(ctx, dec); // -> STZ2G_64Spost_ldsttags - if(opc==3 && op2==2 && HasMTE()) return STZ2G(ctx, dec); // -> STZ2G_64Soffset_ldsttags - if(opc==3 && op2==3 && HasMTE()) return STZ2G(ctx, dec); // -> STZ2G_64Spre_ldsttags - UNMATCHED; -} - -int decode_iclass_ldstnapair_offs(context *ctx, Instruction *dec) -{ - uint32_t opc=INSWORD>>30, VR=(INSWORD>>26)&1, L=(INSWORD>>22)&1; - if(!opc && !VR && !L) return STNP_gen(ctx, dec); // -> STNP_32_ldstnapair_offs - if(!opc && !VR && L) return LDNP_gen(ctx, dec); // -> LDNP_32_ldstnapair_offs - if(!opc && VR && !L && HasFP()) return STNP_fpsimd(ctx, dec); // -> STNP_S_ldstnapair_offs - if(!opc && VR && L && HasFP()) return LDNP_fpsimd(ctx, dec); // -> LDNP_S_ldstnapair_offs - if(opc==1 && VR && !L && HasFP()) return STNP_fpsimd(ctx, dec); // -> STNP_D_ldstnapair_offs - if(opc==1 && VR && L && HasFP()) return LDNP_fpsimd(ctx, dec); // -> LDNP_D_ldstnapair_offs - if(opc==2 && !VR && !L) return STNP_gen(ctx, dec); // -> STNP_64_ldstnapair_offs - if(opc==2 && !VR && L) return LDNP_gen(ctx, dec); // -> LDNP_64_ldstnapair_offs - if(opc==2 && VR && !L && HasFP()) return STNP_fpsimd(ctx, dec); // -> STNP_Q_ldstnapair_offs - if(opc==2 && VR && L && HasFP()) return LDNP_fpsimd(ctx, dec); // -> LDNP_Q_ldstnapair_offs - if(opc==3 && !VR && !L && HasLSUI()) return STTNP_gen(ctx, dec); // -> STTNP_64_ldstnapair_offs - if(opc==3 && !VR && L && HasLSUI()) return LDTNP_gen(ctx, dec); // -> LDTNP_64_ldstnapair_offs - if(opc==3 && VR && !L && HasFP() && HasLSUI()) return STTNP_fpsimd(ctx, dec); // -> STTNP_Q_ldstnapair_offs - if(opc==3 && VR && L && HasFP() && HasLSUI()) return LDTNP_fpsimd(ctx, dec); // -> LDTNP_Q_ldstnapair_offs - if(opc==1 && !VR) UNALLOCATED(ENC_UNALLOCATED_930_LDSTNAPAIR_OFFS); - UNMATCHED; -} - -int decode_iclass_ldstord(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, L=(INSWORD>>22)&1, o0=(INSWORD>>15)&1; - if(!size && !L && !o0 && HasLOR()) return STLLRB(ctx, dec); // -> STLLRB_SL32_ldstord - if(!size && !L && o0) return STLRB(ctx, dec); // -> STLRB_SL32_ldstord - if(!size && L && !o0 && HasLOR()) return LDLARB(ctx, dec); // -> LDLARB_LR32_ldstord - if(!size && L && o0) return LDARB(ctx, dec); // -> LDARB_LR32_ldstord - if(size==1 && !L && !o0 && HasLOR()) return STLLRH(ctx, dec); // -> STLLRH_SL32_ldstord - if(size==1 && !L && o0) return STLRH(ctx, dec); // -> STLRH_SL32_ldstord - if(size==1 && L && !o0 && HasLOR()) return LDLARH(ctx, dec); // -> LDLARH_LR32_ldstord - if(size==1 && L && o0) return LDARH(ctx, dec); // -> LDARH_LR32_ldstord - if(size==2 && !L && !o0 && HasLOR()) return STLLR(ctx, dec); // -> STLLR_SL32_ldstord - if(size==2 && !L && o0) return STLR(ctx, dec); // -> STLR_SL32_ldstord - if(size==2 && L && !o0 && HasLOR()) return LDLAR(ctx, dec); // -> LDLAR_LR32_ldstord - if(size==2 && L && o0) return LDAR(ctx, dec); // -> LDAR_LR32_ldstord - if(size==3 && !L && !o0 && HasLOR()) return STLLR(ctx, dec); // -> STLLR_SL64_ldstord - if(size==3 && !L && o0) return STLR(ctx, dec); // -> STLR_SL64_ldstord - if(size==3 && L && !o0 && HasLOR()) return LDLAR(ctx, dec); // -> LDLAR_LR64_ldstord - if(size==3 && L && o0) return LDAR(ctx, dec); // -> LDAR_LR64_ldstord - UNMATCHED; -} - -int decode_iclass_ldapstl_simd(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, opc=(INSWORD>>22)&3; - if(!size && !opc && HasFP() && HasLRCPC3()) return STLUR_fpsimd(ctx, dec); // -> STLUR_B_ldapstl_simd - if(!size && opc==1 && HasFP() && HasLRCPC3()) return LDAPUR_fpsimd(ctx, dec); // -> LDAPUR_B_ldapstl_simd - if(!size && opc==2 && HasFP() && HasLRCPC3()) return STLUR_fpsimd(ctx, dec); // -> STLUR_Q_ldapstl_simd - if(!size && opc==3 && HasFP() && HasLRCPC3()) return LDAPUR_fpsimd(ctx, dec); // -> LDAPUR_Q_ldapstl_simd - if(size==1 && !opc && HasFP() && HasLRCPC3()) return STLUR_fpsimd(ctx, dec); // -> STLUR_H_ldapstl_simd - if(size==1 && opc==1 && HasFP() && HasLRCPC3()) return LDAPUR_fpsimd(ctx, dec); // -> LDAPUR_H_ldapstl_simd - if(size==2 && !opc && HasFP() && HasLRCPC3()) return STLUR_fpsimd(ctx, dec); // -> STLUR_S_ldapstl_simd - if(size==2 && opc==1 && HasFP() && HasLRCPC3()) return LDAPUR_fpsimd(ctx, dec); // -> LDAPUR_S_ldapstl_simd - if(size==3 && !opc && HasFP() && HasLRCPC3()) return STLUR_fpsimd(ctx, dec); // -> STLUR_D_ldapstl_simd - if(size==3 && opc==1 && HasFP() && HasLRCPC3()) return LDAPUR_fpsimd(ctx, dec); // -> LDAPUR_D_ldapstl_simd - if(size && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_931_LDAPSTL_SIMD); - UNMATCHED; -} - -int decode_iclass_ldapstl_unscaled(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, opc=(INSWORD>>22)&3; - if(!size && !opc && HasLRCPC2()) return STLURB(ctx, dec); // -> STLURB_32_ldapstl_unscaled - if(!size && opc==1 && HasLRCPC2()) return LDAPURB(ctx, dec); // -> LDAPURB_32_ldapstl_unscaled - if(!size && opc==2 && HasLRCPC2()) return LDAPURSB(ctx, dec); // -> LDAPURSB_64_ldapstl_unscaled - if(!size && opc==3 && HasLRCPC2()) return LDAPURSB(ctx, dec); // -> LDAPURSB_32_ldapstl_unscaled - if(size==1 && !opc && HasLRCPC2()) return STLURH(ctx, dec); // -> STLURH_32_ldapstl_unscaled - if(size==1 && opc==1 && HasLRCPC2()) return LDAPURH(ctx, dec); // -> LDAPURH_32_ldapstl_unscaled - if(size==1 && opc==2 && HasLRCPC2()) return LDAPURSH(ctx, dec); // -> LDAPURSH_64_ldapstl_unscaled - if(size==1 && opc==3 && HasLRCPC2()) return LDAPURSH(ctx, dec); // -> LDAPURSH_32_ldapstl_unscaled - if(size==2 && !opc && HasLRCPC2()) return STLUR_gen(ctx, dec); // -> STLUR_32_ldapstl_unscaled - if(size==2 && opc==1 && HasLRCPC2()) return LDAPUR_gen(ctx, dec); // -> LDAPUR_32_ldapstl_unscaled - if(size==2 && opc==2 && HasLRCPC2()) return LDAPURSW(ctx, dec); // -> LDAPURSW_64_ldapstl_unscaled - if(size==2 && opc==3) UNALLOCATED(ENC_UNALLOCATED_933_LDAPSTL_UNSCALED); - if(size==3 && !opc && HasLRCPC2()) return STLUR_gen(ctx, dec); // -> STLUR_64_ldapstl_unscaled - if(size==3 && opc==1 && HasLRCPC2()) return LDAPUR_gen(ctx, dec); // -> LDAPUR_64_ldapstl_unscaled - if(size==3 && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_932_LDAPSTL_UNSCALED); - UNMATCHED; -} - -int decode_iclass_ldapstl_writeback(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, L=(INSWORD>>22)&1; - if(size==2 && !L && HasLRCPC3()) return STLR(ctx, dec); // -> STLR_32S_ldapstl_writeback - if(size==2 && L && HasLRCPC3()) return LDAPR(ctx, dec); // -> LDAPR_32L_ldapstl_writeback - if(size==3 && !L && HasLRCPC3()) return STLR(ctx, dec); // -> STLR_64S_ldapstl_writeback - if(size==3 && L && HasLRCPC3()) return LDAPR(ctx, dec); // -> LDAPR_64L_ldapstl_writeback - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_934_LDAPSTL_WRITEBACK); - UNMATCHED; -} - -int decode_iclass_ldiappstilp(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, L=(INSWORD>>22)&1, opc2=(INSWORD>>12)&15; - if(size==2 && !L && !opc2 && HasLRCPC3()) return STILP(ctx, dec); // -> STILP_32SE_ldiappstilp - if(size==2 && !L && opc2==1 && HasLRCPC3()) return STILP(ctx, dec); // -> STILP_32S_ldiappstilp - if(size==2 && L && !opc2 && HasLRCPC3()) return LDIAPP(ctx, dec); // -> LDIAPP_32LE_ldiappstilp - if(size==2 && L && opc2==1 && HasLRCPC3()) return LDIAPP(ctx, dec); // -> LDIAPP_32L_ldiappstilp - if(size==3 && !L && !opc2 && HasLRCPC3()) return STILP(ctx, dec); // -> STILP_64SS_ldiappstilp - if(size==3 && !L && opc2==1 && HasLRCPC3()) return STILP(ctx, dec); // -> STILP_64S_ldiappstilp - if(size==3 && !L && opc2==5 && HasLSCP()) return STLP_gen(ctx, dec); // -> STLP_64_ldiappstilp - if(size==3 && L && !opc2 && HasLRCPC3()) return LDIAPP(ctx, dec); // -> LDIAPP_64LS_ldiappstilp - if(size==3 && L && opc2==1 && HasLRCPC3()) return LDIAPP(ctx, dec); // -> LDIAPP_64L_ldiappstilp - if(size==3 && L && opc2==5 && HasLSCP()) return LDAP_gen(ctx, dec); // -> LDAP_64_ldiappstilp - if(size==3 && L && opc2==6) UNALLOCATED(ENC_UNALLOCATED_942_LDIAPPSTILP); - if(size==3 && L && opc2==7 && HasLSCP()) return LDAPP_gen(ctx, dec); // -> LDAPP_64_ldiappstilp - if(size==3 && opc2==4) UNALLOCATED(ENC_UNALLOCATED_941_LDIAPPSTILP); - if(size==3 && !L && (opc2&14)==6) UNALLOCATED(ENC_UNALLOCATED_940_LDIAPPSTILP); - if((size&2)==2 && !L && (opc2&14)==2) UNALLOCATED(ENC_UNALLOCATED_938_LDIAPPSTILP); - if((size&2)==2 && L && (opc2&14)==2) UNALLOCATED(ENC_UNALLOCATED_939_LDIAPPSTILP); - if(size==2 && (opc2&12)==4) UNALLOCATED(ENC_UNALLOCATED_937_LDIAPPSTILP); - if((size&2)==2 && (opc2&8)==8) UNALLOCATED(ENC_UNALLOCATED_936_LDIAPPSTILP); - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_935_LDIAPPSTILP); - UNMATCHED; -} - -int decode_iclass_ldst_immpost(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, opc=(INSWORD>>22)&3; - if(!size && !VR && !opc) return STRB_imm(ctx, dec); // -> STRB_32_ldst_immpost - if(!size && !VR && opc==1) return LDRB_imm(ctx, dec); // -> LDRB_32_ldst_immpost - if(!size && !VR && opc==2) return LDRSB_imm(ctx, dec); // -> LDRSB_64_ldst_immpost - if(!size && !VR && opc==3) return LDRSB_imm(ctx, dec); // -> LDRSB_32_ldst_immpost - if(!size && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_B_ldst_immpost - if(!size && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_B_ldst_immpost - if(!size && VR && opc==2 && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_Q_ldst_immpost - if(!size && VR && opc==3 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_Q_ldst_immpost - if(size==1 && !VR && !opc) return STRH_imm(ctx, dec); // -> STRH_32_ldst_immpost - if(size==1 && !VR && opc==1) return LDRH_imm(ctx, dec); // -> LDRH_32_ldst_immpost - if(size==1 && !VR && opc==2) return LDRSH_imm(ctx, dec); // -> LDRSH_64_ldst_immpost - if(size==1 && !VR && opc==3) return LDRSH_imm(ctx, dec); // -> LDRSH_32_ldst_immpost - if(size==1 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_H_ldst_immpost - if(size==1 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_H_ldst_immpost - if(size==2 && !VR && !opc) return STR_imm_gen(ctx, dec); // -> STR_32_ldst_immpost - if(size==2 && !VR && opc==1) return LDR_imm_gen(ctx, dec); // -> LDR_32_ldst_immpost - if(size==2 && !VR && opc==2) return LDRSW_imm(ctx, dec); // -> LDRSW_64_ldst_immpost - if(size==2 && !VR && opc==3) UNALLOCATED(ENC_UNALLOCATED_946_LDST_IMMPOST); - if(size==2 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_S_ldst_immpost - if(size==2 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_S_ldst_immpost - if(size==3 && !VR && !opc) return STR_imm_gen(ctx, dec); // -> STR_64_ldst_immpost - if(size==3 && !VR && opc==1) return LDR_imm_gen(ctx, dec); // -> LDR_64_ldst_immpost - if(size==3 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_D_ldst_immpost - if(size==3 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_D_ldst_immpost - if(size==1 && VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_944_LDST_IMMPOST); - if(size==2 && VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_945_LDST_IMMPOST); - if(size==3 && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_943_LDST_IMMPOST); - UNMATCHED; -} - -int decode_iclass_ldst_immpre(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, opc=(INSWORD>>22)&3; - if(!size && !VR && !opc) return STRB_imm(ctx, dec); // -> STRB_32_ldst_immpre - if(!size && !VR && opc==1) return LDRB_imm(ctx, dec); // -> LDRB_32_ldst_immpre - if(!size && !VR && opc==2) return LDRSB_imm(ctx, dec); // -> LDRSB_64_ldst_immpre - if(!size && !VR && opc==3) return LDRSB_imm(ctx, dec); // -> LDRSB_32_ldst_immpre - if(!size && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_B_ldst_immpre - if(!size && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_B_ldst_immpre - if(!size && VR && opc==2 && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_Q_ldst_immpre - if(!size && VR && opc==3 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_Q_ldst_immpre - if(size==1 && !VR && !opc) return STRH_imm(ctx, dec); // -> STRH_32_ldst_immpre - if(size==1 && !VR && opc==1) return LDRH_imm(ctx, dec); // -> LDRH_32_ldst_immpre - if(size==1 && !VR && opc==2) return LDRSH_imm(ctx, dec); // -> LDRSH_64_ldst_immpre - if(size==1 && !VR && opc==3) return LDRSH_imm(ctx, dec); // -> LDRSH_32_ldst_immpre - if(size==1 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_H_ldst_immpre - if(size==1 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_H_ldst_immpre - if(size==2 && !VR && !opc) return STR_imm_gen(ctx, dec); // -> STR_32_ldst_immpre - if(size==2 && !VR && opc==1) return LDR_imm_gen(ctx, dec); // -> LDR_32_ldst_immpre - if(size==2 && !VR && opc==2) return LDRSW_imm(ctx, dec); // -> LDRSW_64_ldst_immpre - if(size==2 && !VR && opc==3) UNALLOCATED(ENC_UNALLOCATED_950_LDST_IMMPRE); - if(size==2 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_S_ldst_immpre - if(size==2 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_S_ldst_immpre - if(size==3 && !VR && !opc) return STR_imm_gen(ctx, dec); // -> STR_64_ldst_immpre - if(size==3 && !VR && opc==1) return LDR_imm_gen(ctx, dec); // -> LDR_64_ldst_immpre - if(size==3 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_D_ldst_immpre - if(size==3 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_D_ldst_immpre - if(size==1 && VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_948_LDST_IMMPRE); - if(size==2 && VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_949_LDST_IMMPRE); - if(size==3 && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_947_LDST_IMMPRE); - UNMATCHED; -} - -int decode_iclass_ldst_pac(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, M=(INSWORD>>23)&1, W=(INSWORD>>11)&1; - if(size==3 && !VR && !M && !W && HasPAuth()) return LDRA(ctx, dec); // -> LDRAA_64_ldst_pac - if(size==3 && !VR && !M && W && HasPAuth()) return LDRA(ctx, dec); // -> LDRAA_64W_ldst_pac - if(size==3 && !VR && M && !W && HasPAuth()) return LDRA(ctx, dec); // -> LDRAB_64_ldst_pac - if(size==3 && !VR && M && W && HasPAuth()) return LDRA(ctx, dec); // -> LDRAB_64W_ldst_pac - if(size==3 && VR) UNALLOCATED(ENC_UNALLOCATED_952_LDST_PAC); - if(size!=3) UNALLOCATED(ENC_UNALLOCATED_951_LDST_PAC); - UNMATCHED; -} - -int decode_iclass_ldst_regoff(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, opc=(INSWORD>>22)&3, option=(INSWORD>>13)&7, Rt=INSWORD&0x1f; - if(!size && !VR && !opc && option==3) return STRB_reg(ctx, dec); // -> STRB_32BL_ldst_regoff - if(!size && !VR && !opc && option!=3) return STRB_reg(ctx, dec); // -> STRB_32B_ldst_regoff - if(!size && !VR && opc==1 && option==3) return LDRB_reg(ctx, dec); // -> LDRB_32BL_ldst_regoff - if(!size && !VR && opc==1 && option!=3) return LDRB_reg(ctx, dec); // -> LDRB_32B_ldst_regoff - if(!size && !VR && opc==2 && option==3) return LDRSB_reg(ctx, dec); // -> LDRSB_64BL_ldst_regoff - if(!size && !VR && opc==2 && option!=3) return LDRSB_reg(ctx, dec); // -> LDRSB_64B_ldst_regoff - if(!size && !VR && opc==3 && option==3) return LDRSB_reg(ctx, dec); // -> LDRSB_32BL_ldst_regoff - if(!size && !VR && opc==3 && option!=3) return LDRSB_reg(ctx, dec); // -> LDRSB_32B_ldst_regoff - if(!size && VR && !opc && option==3 && HasFP()) return STR_reg_fpsimd(ctx, dec); // -> STR_BL_ldst_regoff - if(!size && VR && !opc && option!=3 && HasFP()) return STR_reg_fpsimd(ctx, dec); // -> STR_B_ldst_regoff - if(!size && VR && opc==1 && option==3 && HasFP()) return LDR_reg_fpsimd(ctx, dec); // -> LDR_BL_ldst_regoff - if(!size && VR && opc==1 && option!=3 && HasFP()) return LDR_reg_fpsimd(ctx, dec); // -> LDR_B_ldst_regoff - if(size==3 && !VR && opc==2 && (option&2)==2 && (Rt&0x18)==0x18 && HasRPRFM()) return RPRFM_reg(ctx, dec); // -> RPRFM_R_ldst_regoff - if(size==3 && !VR && opc==2 && (option&2)==2 && (Rt&0x18)!=0x18) return PRFM_reg(ctx, dec); // -> PRFM_P_ldst_regoff - if(size==3 && !VR && opc==2 && !(option&2)) UNALLOCATED(ENC_UNALLOCATED_955_LDST_REGOFF); - if(!size && VR && opc==2 && HasFP()) return STR_reg_fpsimd(ctx, dec); // -> STR_Q_ldst_regoff - if(!size && VR && opc==3 && HasFP()) return LDR_reg_fpsimd(ctx, dec); // -> LDR_Q_ldst_regoff - if(size==1 && !VR && !opc) return STRH_reg(ctx, dec); // -> STRH_32_ldst_regoff - if(size==1 && !VR && opc==1) return LDRH_reg(ctx, dec); // -> LDRH_32_ldst_regoff - if(size==1 && !VR && opc==2) return LDRSH_reg(ctx, dec); // -> LDRSH_64_ldst_regoff - if(size==1 && !VR && opc==3) return LDRSH_reg(ctx, dec); // -> LDRSH_32_ldst_regoff - if(size==1 && VR && !opc && HasFP()) return STR_reg_fpsimd(ctx, dec); // -> STR_H_ldst_regoff - if(size==1 && VR && opc==1 && HasFP()) return LDR_reg_fpsimd(ctx, dec); // -> LDR_H_ldst_regoff - if(size==2 && !VR && !opc) return STR_reg_gen(ctx, dec); // -> STR_32_ldst_regoff - if(size==2 && !VR && opc==1) return LDR_reg_gen(ctx, dec); // -> LDR_32_ldst_regoff - if(size==2 && !VR && opc==2) return LDRSW_reg(ctx, dec); // -> LDRSW_64_ldst_regoff - if(size==2 && VR && !opc && HasFP()) return STR_reg_fpsimd(ctx, dec); // -> STR_S_ldst_regoff - if(size==2 && VR && opc==1 && HasFP()) return LDR_reg_fpsimd(ctx, dec); // -> LDR_S_ldst_regoff - if(size==3 && !VR && !opc) return STR_reg_gen(ctx, dec); // -> STR_64_ldst_regoff - if(size==3 && !VR && opc==1) return LDR_reg_gen(ctx, dec); // -> LDR_64_ldst_regoff - if(size==3 && VR && !opc && HasFP()) return STR_reg_fpsimd(ctx, dec); // -> STR_D_ldst_regoff - if(size==3 && VR && opc==1 && HasFP()) return LDR_reg_fpsimd(ctx, dec); // -> LDR_D_ldst_regoff - if((size&2)==2 && !VR && opc==3) UNALLOCATED(ENC_UNALLOCATED_954_LDST_REGOFF); - if(size && VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_953_LDST_REGOFF); - UNMATCHED; -} - -int decode_iclass_ldst_unpriv(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, opc=(INSWORD>>22)&3; - if(!size && !VR && !opc) return STTRB(ctx, dec); // -> STTRB_32_ldst_unpriv - if(!size && !VR && opc==1) return LDTRB(ctx, dec); // -> LDTRB_32_ldst_unpriv - if(!size && !VR && opc==2) return LDTRSB(ctx, dec); // -> LDTRSB_64_ldst_unpriv - if(!size && !VR && opc==3) return LDTRSB(ctx, dec); // -> LDTRSB_32_ldst_unpriv - if(size==1 && !VR && !opc) return STTRH(ctx, dec); // -> STTRH_32_ldst_unpriv - if(size==1 && !VR && opc==1) return LDTRH(ctx, dec); // -> LDTRH_32_ldst_unpriv - if(size==1 && !VR && opc==2) return LDTRSH(ctx, dec); // -> LDTRSH_64_ldst_unpriv - if(size==1 && !VR && opc==3) return LDTRSH(ctx, dec); // -> LDTRSH_32_ldst_unpriv - if(size==2 && !VR && !opc) return STTR(ctx, dec); // -> STTR_32_ldst_unpriv - if(size==2 && !VR && opc==1) return LDTR(ctx, dec); // -> LDTR_32_ldst_unpriv - if(size==2 && !VR && opc==2) return LDTRSW(ctx, dec); // -> LDTRSW_64_ldst_unpriv - if(size==2 && !VR && opc==3) UNALLOCATED(ENC_UNALLOCATED_958_LDST_UNPRIV); - if(size==3 && !VR && !opc) return STTR(ctx, dec); // -> STTR_64_ldst_unpriv - if(size==3 && !VR && opc==1) return LDTR(ctx, dec); // -> LDTR_64_ldst_unpriv - if(size==3 && !VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_957_LDST_UNPRIV); - if(VR) UNALLOCATED(ENC_UNALLOCATED_956_LDST_UNPRIV); - UNMATCHED; -} - -int decode_iclass_ldst_unscaled(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, opc=(INSWORD>>22)&3; - if(!size && !VR && !opc) return STURB(ctx, dec); // -> STURB_32_ldst_unscaled - if(!size && !VR && opc==1) return LDURB(ctx, dec); // -> LDURB_32_ldst_unscaled - if(!size && !VR && opc==2) return LDURSB(ctx, dec); // -> LDURSB_64_ldst_unscaled - if(!size && !VR && opc==3) return LDURSB(ctx, dec); // -> LDURSB_32_ldst_unscaled - if(!size && VR && !opc && HasFP()) return STUR_fpsimd(ctx, dec); // -> STUR_B_ldst_unscaled - if(!size && VR && opc==1 && HasFP()) return LDUR_fpsimd(ctx, dec); // -> LDUR_B_ldst_unscaled - if(!size && VR && opc==2 && HasFP()) return STUR_fpsimd(ctx, dec); // -> STUR_Q_ldst_unscaled - if(!size && VR && opc==3 && HasFP()) return LDUR_fpsimd(ctx, dec); // -> LDUR_Q_ldst_unscaled - if(size==1 && !VR && !opc) return STURH(ctx, dec); // -> STURH_32_ldst_unscaled - if(size==1 && !VR && opc==1) return LDURH(ctx, dec); // -> LDURH_32_ldst_unscaled - if(size==1 && !VR && opc==2) return LDURSH(ctx, dec); // -> LDURSH_64_ldst_unscaled - if(size==1 && !VR && opc==3) return LDURSH(ctx, dec); // -> LDURSH_32_ldst_unscaled - if(size==1 && VR && !opc && HasFP()) return STUR_fpsimd(ctx, dec); // -> STUR_H_ldst_unscaled - if(size==1 && VR && opc==1 && HasFP()) return LDUR_fpsimd(ctx, dec); // -> LDUR_H_ldst_unscaled - if(size==2 && !VR && !opc) return STUR_gen(ctx, dec); // -> STUR_32_ldst_unscaled - if(size==2 && !VR && opc==1) return LDUR_gen(ctx, dec); // -> LDUR_32_ldst_unscaled - if(size==2 && !VR && opc==2) return LDURSW(ctx, dec); // -> LDURSW_64_ldst_unscaled - if(size==2 && VR && !opc && HasFP()) return STUR_fpsimd(ctx, dec); // -> STUR_S_ldst_unscaled - if(size==2 && VR && opc==1 && HasFP()) return LDUR_fpsimd(ctx, dec); // -> LDUR_S_ldst_unscaled - if(size==3 && !VR && !opc) return STUR_gen(ctx, dec); // -> STUR_64_ldst_unscaled - if(size==3 && !VR && opc==1) return LDUR_gen(ctx, dec); // -> LDUR_64_ldst_unscaled - if(size==3 && !VR && opc==2) return PRFUM(ctx, dec); // -> PRFUM_P_ldst_unscaled - if(size==3 && VR && !opc && HasFP()) return STUR_fpsimd(ctx, dec); // -> STUR_D_ldst_unscaled - if(size==3 && VR && opc==1 && HasFP()) return LDUR_fpsimd(ctx, dec); // -> LDUR_D_ldst_unscaled - if((size&2)==2 && !VR && opc==3) UNALLOCATED(ENC_UNALLOCATED_960_LDST_UNSCALED); - if(size && VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_959_LDST_UNSCALED); - UNMATCHED; -} - -int decode_iclass_ldst_pos(context *ctx, Instruction *dec) -{ - uint32_t size=INSWORD>>30, VR=(INSWORD>>26)&1, opc=(INSWORD>>22)&3; - if(!size && !VR && !opc) return STRB_imm(ctx, dec); // -> STRB_32_ldst_pos - if(!size && !VR && opc==1) return LDRB_imm(ctx, dec); // -> LDRB_32_ldst_pos - if(!size && !VR && opc==2) return LDRSB_imm(ctx, dec); // -> LDRSB_64_ldst_pos - if(!size && !VR && opc==3) return LDRSB_imm(ctx, dec); // -> LDRSB_32_ldst_pos - if(!size && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_B_ldst_pos - if(!size && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_B_ldst_pos - if(!size && VR && opc==2 && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_Q_ldst_pos - if(!size && VR && opc==3 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_Q_ldst_pos - if(size==1 && !VR && !opc) return STRH_imm(ctx, dec); // -> STRH_32_ldst_pos - if(size==1 && !VR && opc==1) return LDRH_imm(ctx, dec); // -> LDRH_32_ldst_pos - if(size==1 && !VR && opc==2) return LDRSH_imm(ctx, dec); // -> LDRSH_64_ldst_pos - if(size==1 && !VR && opc==3) return LDRSH_imm(ctx, dec); // -> LDRSH_32_ldst_pos - if(size==1 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_H_ldst_pos - if(size==1 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_H_ldst_pos - if(size==2 && !VR && !opc) return STR_imm_gen(ctx, dec); // -> STR_32_ldst_pos - if(size==2 && !VR && opc==1) return LDR_imm_gen(ctx, dec); // -> LDR_32_ldst_pos - if(size==2 && !VR && opc==2) return LDRSW_imm(ctx, dec); // -> LDRSW_64_ldst_pos - if(size==2 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_S_ldst_pos - if(size==2 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_S_ldst_pos - if(size==3 && !VR && !opc) return STR_imm_gen(ctx, dec); // -> STR_64_ldst_pos - if(size==3 && !VR && opc==1) return LDR_imm_gen(ctx, dec); // -> LDR_64_ldst_pos - if(size==3 && !VR && opc==2) return PRFM_imm(ctx, dec); // -> PRFM_P_ldst_pos - if(size==3 && VR && !opc && HasFP()) return STR_imm_fpsimd(ctx, dec); // -> STR_D_ldst_pos - if(size==3 && VR && opc==1 && HasFP()) return LDR_imm_fpsimd(ctx, dec); // -> LDR_D_ldst_pos - if((size&2)==2 && !VR && opc==3) UNALLOCATED(ENC_UNALLOCATED_962_LDST_POS); - if(size && VR && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_961_LDST_POS); - UNMATCHED; -} - -int decode_iclass_ldstpair_off(context *ctx, Instruction *dec) -{ - uint32_t opc=INSWORD>>30, VR=(INSWORD>>26)&1, L=(INSWORD>>22)&1; - if(!opc && !VR && !L) return STP_gen(ctx, dec); // -> STP_32_ldstpair_off - if(!opc && !VR && L) return LDP_gen(ctx, dec); // -> LDP_32_ldstpair_off - if(!opc && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_S_ldstpair_off - if(!opc && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_S_ldstpair_off - if(opc==1 && !VR && !L && HasMTE()) return STGP(ctx, dec); // -> STGP_64_ldstpair_off - if(opc==1 && !VR && L) return LDPSW(ctx, dec); // -> LDPSW_64_ldstpair_off - if(opc==1 && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_D_ldstpair_off - if(opc==1 && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_D_ldstpair_off - if(opc==2 && !VR && !L) return STP_gen(ctx, dec); // -> STP_64_ldstpair_off - if(opc==2 && !VR && L) return LDP_gen(ctx, dec); // -> LDP_64_ldstpair_off - if(opc==2 && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_Q_ldstpair_off - if(opc==2 && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_Q_ldstpair_off - if(opc==3 && !VR && !L && HasLSUI()) return STTP_gen(ctx, dec); // -> STTP_64_ldstpair_off - if(opc==3 && !VR && L && HasLSUI()) return LDTP_gen(ctx, dec); // -> LDTP_64_ldstpair_off - if(opc==3 && VR && !L && HasFP() && HasLSUI()) return STTP_fpsimd(ctx, dec); // -> STTP_Q_ldstpair_off - if(opc==3 && VR && L && HasFP() && HasLSUI()) return LDTP_fpsimd(ctx, dec); // -> LDTP_Q_ldstpair_off - UNMATCHED; -} - -int decode_iclass_ldstpair_post(context *ctx, Instruction *dec) -{ - uint32_t opc=INSWORD>>30, VR=(INSWORD>>26)&1, L=(INSWORD>>22)&1; - if(!opc && !VR && !L) return STP_gen(ctx, dec); // -> STP_32_ldstpair_post - if(!opc && !VR && L) return LDP_gen(ctx, dec); // -> LDP_32_ldstpair_post - if(!opc && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_S_ldstpair_post - if(!opc && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_S_ldstpair_post - if(opc==1 && !VR && !L && HasMTE()) return STGP(ctx, dec); // -> STGP_64_ldstpair_post - if(opc==1 && !VR && L) return LDPSW(ctx, dec); // -> LDPSW_64_ldstpair_post - if(opc==1 && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_D_ldstpair_post - if(opc==1 && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_D_ldstpair_post - if(opc==2 && !VR && !L) return STP_gen(ctx, dec); // -> STP_64_ldstpair_post - if(opc==2 && !VR && L) return LDP_gen(ctx, dec); // -> LDP_64_ldstpair_post - if(opc==2 && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_Q_ldstpair_post - if(opc==2 && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_Q_ldstpair_post - if(opc==3 && !VR && !L && HasLSUI()) return STTP_gen(ctx, dec); // -> STTP_64_ldstpair_post - if(opc==3 && !VR && L && HasLSUI()) return LDTP_gen(ctx, dec); // -> LDTP_64_ldstpair_post - if(opc==3 && VR && !L && HasFP() && HasLSUI()) return STTP_fpsimd(ctx, dec); // -> STTP_Q_ldstpair_post - if(opc==3 && VR && L && HasFP() && HasLSUI()) return LDTP_fpsimd(ctx, dec); // -> LDTP_Q_ldstpair_post - UNMATCHED; -} - -int decode_iclass_ldstpair_pre(context *ctx, Instruction *dec) -{ - uint32_t opc=INSWORD>>30, VR=(INSWORD>>26)&1, L=(INSWORD>>22)&1; - if(!opc && !VR && !L) return STP_gen(ctx, dec); // -> STP_32_ldstpair_pre - if(!opc && !VR && L) return LDP_gen(ctx, dec); // -> LDP_32_ldstpair_pre - if(!opc && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_S_ldstpair_pre - if(!opc && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_S_ldstpair_pre - if(opc==1 && !VR && !L && HasMTE()) return STGP(ctx, dec); // -> STGP_64_ldstpair_pre - if(opc==1 && !VR && L) return LDPSW(ctx, dec); // -> LDPSW_64_ldstpair_pre - if(opc==1 && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_D_ldstpair_pre - if(opc==1 && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_D_ldstpair_pre - if(opc==2 && !VR && !L) return STP_gen(ctx, dec); // -> STP_64_ldstpair_pre - if(opc==2 && !VR && L) return LDP_gen(ctx, dec); // -> LDP_64_ldstpair_pre - if(opc==2 && VR && !L && HasFP()) return STP_fpsimd(ctx, dec); // -> STP_Q_ldstpair_pre - if(opc==2 && VR && L && HasFP()) return LDP_fpsimd(ctx, dec); // -> LDP_Q_ldstpair_pre - if(opc==3 && !VR && !L && HasLSUI()) return STTP_gen(ctx, dec); // -> STTP_64_ldstpair_pre - if(opc==3 && !VR && L && HasLSUI()) return LDTP_gen(ctx, dec); // -> LDTP_64_ldstpair_pre - if(opc==3 && VR && !L && HasFP() && HasLSUI()) return STTP_fpsimd(ctx, dec); // -> STTP_Q_ldstpair_pre - if(opc==3 && VR && L && HasFP() && HasLSUI()) return LDTP_fpsimd(ctx, dec); // -> LDTP_Q_ldstpair_pre - UNMATCHED; -} - -int decode_iclass_memcms(context *ctx, Instruction *dec) -{ - uint32_t o0=(INSWORD>>26)&1, op1=(INSWORD>>22)&3, op2=(INSWORD>>12)&15; - if(!o0 && !op1 && !op2 && HasMOPS()) return CPYFP(ctx, dec); // -> CPYFP_CPY_memcms - if(!o0 && !op1 && op2==1 && HasMOPS()) return CPYFPWT(ctx, dec); // -> CPYFPWT_CPY_memcms - if(!o0 && !op1 && op2==2 && HasMOPS()) return CPYFPRT(ctx, dec); // -> CPYFPRT_CPY_memcms - if(!o0 && !op1 && op2==3 && HasMOPS()) return CPYFPT(ctx, dec); // -> CPYFPT_CPY_memcms - if(!o0 && !op1 && op2==4 && HasMOPS()) return CPYFPWN(ctx, dec); // -> CPYFPWN_CPY_memcms - if(!o0 && !op1 && op2==5 && HasMOPS()) return CPYFPWTWN(ctx, dec); // -> CPYFPWTWN_CPY_memcms - if(!o0 && !op1 && op2==6 && HasMOPS()) return CPYFPRTWN(ctx, dec); // -> CPYFPRTWN_CPY_memcms - if(!o0 && !op1 && op2==7 && HasMOPS()) return CPYFPTWN(ctx, dec); // -> CPYFPTWN_CPY_memcms - if(!o0 && !op1 && op2==8 && HasMOPS()) return CPYFPRN(ctx, dec); // -> CPYFPRN_CPY_memcms - if(!o0 && !op1 && op2==9 && HasMOPS()) return CPYFPWTRN(ctx, dec); // -> CPYFPWTRN_CPY_memcms - if(!o0 && !op1 && op2==10 && HasMOPS()) return CPYFPRTRN(ctx, dec); // -> CPYFPRTRN_CPY_memcms - if(!o0 && !op1 && op2==11 && HasMOPS()) return CPYFPTRN(ctx, dec); // -> CPYFPTRN_CPY_memcms - if(!o0 && !op1 && op2==12 && HasMOPS()) return CPYFPN(ctx, dec); // -> CPYFPN_CPY_memcms - if(!o0 && !op1 && op2==13 && HasMOPS()) return CPYFPWTN(ctx, dec); // -> CPYFPWTN_CPY_memcms - if(!o0 && !op1 && op2==14 && HasMOPS()) return CPYFPRTN(ctx, dec); // -> CPYFPRTN_CPY_memcms - if(!o0 && !op1 && op2==15 && HasMOPS()) return CPYFPTN(ctx, dec); // -> CPYFPTN_CPY_memcms - if(!o0 && op1==1 && !op2 && HasMOPS()) return CPYFP(ctx, dec); // -> CPYFM_CPY_memcms - if(!o0 && op1==1 && op2==1 && HasMOPS()) return CPYFPWT(ctx, dec); // -> CPYFMWT_CPY_memcms - if(!o0 && op1==1 && op2==2 && HasMOPS()) return CPYFPRT(ctx, dec); // -> CPYFMRT_CPY_memcms - if(!o0 && op1==1 && op2==3 && HasMOPS()) return CPYFPT(ctx, dec); // -> CPYFMT_CPY_memcms - if(!o0 && op1==1 && op2==4 && HasMOPS()) return CPYFPWN(ctx, dec); // -> CPYFMWN_CPY_memcms - if(!o0 && op1==1 && op2==5 && HasMOPS()) return CPYFPWTWN(ctx, dec); // -> CPYFMWTWN_CPY_memcms - if(!o0 && op1==1 && op2==6 && HasMOPS()) return CPYFPRTWN(ctx, dec); // -> CPYFMRTWN_CPY_memcms - if(!o0 && op1==1 && op2==7 && HasMOPS()) return CPYFPTWN(ctx, dec); // -> CPYFMTWN_CPY_memcms - if(!o0 && op1==1 && op2==8 && HasMOPS()) return CPYFPRN(ctx, dec); // -> CPYFMRN_CPY_memcms - if(!o0 && op1==1 && op2==9 && HasMOPS()) return CPYFPWTRN(ctx, dec); // -> CPYFMWTRN_CPY_memcms - if(!o0 && op1==1 && op2==10 && HasMOPS()) return CPYFPRTRN(ctx, dec); // -> CPYFMRTRN_CPY_memcms - if(!o0 && op1==1 && op2==11 && HasMOPS()) return CPYFPTRN(ctx, dec); // -> CPYFMTRN_CPY_memcms - if(!o0 && op1==1 && op2==12 && HasMOPS()) return CPYFPN(ctx, dec); // -> CPYFMN_CPY_memcms - if(!o0 && op1==1 && op2==13 && HasMOPS()) return CPYFPWTN(ctx, dec); // -> CPYFMWTN_CPY_memcms - if(!o0 && op1==1 && op2==14 && HasMOPS()) return CPYFPRTN(ctx, dec); // -> CPYFMRTN_CPY_memcms - if(!o0 && op1==1 && op2==15 && HasMOPS()) return CPYFPTN(ctx, dec); // -> CPYFMTN_CPY_memcms - if(!o0 && op1==2 && !op2 && HasMOPS()) return CPYFP(ctx, dec); // -> CPYFE_CPY_memcms - if(!o0 && op1==2 && op2==1 && HasMOPS()) return CPYFPWT(ctx, dec); // -> CPYFEWT_CPY_memcms - if(!o0 && op1==2 && op2==2 && HasMOPS()) return CPYFPRT(ctx, dec); // -> CPYFERT_CPY_memcms - if(!o0 && op1==2 && op2==3 && HasMOPS()) return CPYFPT(ctx, dec); // -> CPYFET_CPY_memcms - if(!o0 && op1==2 && op2==4 && HasMOPS()) return CPYFPWN(ctx, dec); // -> CPYFEWN_CPY_memcms - if(!o0 && op1==2 && op2==5 && HasMOPS()) return CPYFPWTWN(ctx, dec); // -> CPYFEWTWN_CPY_memcms - if(!o0 && op1==2 && op2==6 && HasMOPS()) return CPYFPRTWN(ctx, dec); // -> CPYFERTWN_CPY_memcms - if(!o0 && op1==2 && op2==7 && HasMOPS()) return CPYFPTWN(ctx, dec); // -> CPYFETWN_CPY_memcms - if(!o0 && op1==2 && op2==8 && HasMOPS()) return CPYFPRN(ctx, dec); // -> CPYFERN_CPY_memcms - if(!o0 && op1==2 && op2==9 && HasMOPS()) return CPYFPWTRN(ctx, dec); // -> CPYFEWTRN_CPY_memcms - if(!o0 && op1==2 && op2==10 && HasMOPS()) return CPYFPRTRN(ctx, dec); // -> CPYFERTRN_CPY_memcms - if(!o0 && op1==2 && op2==11 && HasMOPS()) return CPYFPTRN(ctx, dec); // -> CPYFETRN_CPY_memcms - if(!o0 && op1==2 && op2==12 && HasMOPS()) return CPYFPN(ctx, dec); // -> CPYFEN_CPY_memcms - if(!o0 && op1==2 && op2==13 && HasMOPS()) return CPYFPWTN(ctx, dec); // -> CPYFEWTN_CPY_memcms - if(!o0 && op1==2 && op2==14 && HasMOPS()) return CPYFPRTN(ctx, dec); // -> CPYFERTN_CPY_memcms - if(!o0 && op1==2 && op2==15 && HasMOPS()) return CPYFPTN(ctx, dec); // -> CPYFETN_CPY_memcms - if(!o0 && op1==3 && !op2 && HasMOPS()) return SETP(ctx, dec); // -> SETP_SET_memcms - if(!o0 && op1==3 && op2==1 && HasMOPS()) return SETPT(ctx, dec); // -> SETPT_SET_memcms - if(!o0 && op1==3 && op2==2 && HasMOPS()) return SETPN(ctx, dec); // -> SETPN_SET_memcms - if(!o0 && op1==3 && op2==3 && HasMOPS()) return SETPTN(ctx, dec); // -> SETPTN_SET_memcms - if(!o0 && op1==3 && op2==4 && HasMOPS()) return SETP(ctx, dec); // -> SETM_SET_memcms - if(!o0 && op1==3 && op2==5 && HasMOPS()) return SETPT(ctx, dec); // -> SETMT_SET_memcms - if(!o0 && op1==3 && op2==6 && HasMOPS()) return SETPN(ctx, dec); // -> SETMN_SET_memcms - if(!o0 && op1==3 && op2==7 && HasMOPS()) return SETPTN(ctx, dec); // -> SETMTN_SET_memcms - if(!o0 && op1==3 && op2==8 && HasMOPS()) return SETP(ctx, dec); // -> SETE_SET_memcms - if(!o0 && op1==3 && op2==9 && HasMOPS()) return SETPT(ctx, dec); // -> SETET_SET_memcms - if(!o0 && op1==3 && op2==10 && HasMOPS()) return SETPN(ctx, dec); // -> SETEN_SET_memcms - if(!o0 && op1==3 && op2==11 && HasMOPS()) return SETPTN(ctx, dec); // -> SETETN_SET_memcms - if(o0 && !op1 && !op2 && HasMOPS()) return CPYP(ctx, dec); // -> CPYP_CPY_memcms - if(o0 && !op1 && op2==1 && HasMOPS()) return CPYPWT(ctx, dec); // -> CPYPWT_CPY_memcms - if(o0 && !op1 && op2==2 && HasMOPS()) return CPYPRT(ctx, dec); // -> CPYPRT_CPY_memcms - if(o0 && !op1 && op2==3 && HasMOPS()) return CPYPT(ctx, dec); // -> CPYPT_CPY_memcms - if(o0 && !op1 && op2==4 && HasMOPS()) return CPYPWN(ctx, dec); // -> CPYPWN_CPY_memcms - if(o0 && !op1 && op2==5 && HasMOPS()) return CPYPWTWN(ctx, dec); // -> CPYPWTWN_CPY_memcms - if(o0 && !op1 && op2==6 && HasMOPS()) return CPYPRTWN(ctx, dec); // -> CPYPRTWN_CPY_memcms - if(o0 && !op1 && op2==7 && HasMOPS()) return CPYPTWN(ctx, dec); // -> CPYPTWN_CPY_memcms - if(o0 && !op1 && op2==8 && HasMOPS()) return CPYPRN(ctx, dec); // -> CPYPRN_CPY_memcms - if(o0 && !op1 && op2==9 && HasMOPS()) return CPYPWTRN(ctx, dec); // -> CPYPWTRN_CPY_memcms - if(o0 && !op1 && op2==10 && HasMOPS()) return CPYPRTRN(ctx, dec); // -> CPYPRTRN_CPY_memcms - if(o0 && !op1 && op2==11 && HasMOPS()) return CPYPTRN(ctx, dec); // -> CPYPTRN_CPY_memcms - if(o0 && !op1 && op2==12 && HasMOPS()) return CPYPN(ctx, dec); // -> CPYPN_CPY_memcms - if(o0 && !op1 && op2==13 && HasMOPS()) return CPYPWTN(ctx, dec); // -> CPYPWTN_CPY_memcms - if(o0 && !op1 && op2==14 && HasMOPS()) return CPYPRTN(ctx, dec); // -> CPYPRTN_CPY_memcms - if(o0 && !op1 && op2==15 && HasMOPS()) return CPYPTN(ctx, dec); // -> CPYPTN_CPY_memcms - if(o0 && op1==1 && !op2 && HasMOPS()) return CPYP(ctx, dec); // -> CPYM_CPY_memcms - if(o0 && op1==1 && op2==1 && HasMOPS()) return CPYPWT(ctx, dec); // -> CPYMWT_CPY_memcms - if(o0 && op1==1 && op2==2 && HasMOPS()) return CPYPRT(ctx, dec); // -> CPYMRT_CPY_memcms - if(o0 && op1==1 && op2==3 && HasMOPS()) return CPYPT(ctx, dec); // -> CPYMT_CPY_memcms - if(o0 && op1==1 && op2==4 && HasMOPS()) return CPYPWN(ctx, dec); // -> CPYMWN_CPY_memcms - if(o0 && op1==1 && op2==5 && HasMOPS()) return CPYPWTWN(ctx, dec); // -> CPYMWTWN_CPY_memcms - if(o0 && op1==1 && op2==6 && HasMOPS()) return CPYPRTWN(ctx, dec); // -> CPYMRTWN_CPY_memcms - if(o0 && op1==1 && op2==7 && HasMOPS()) return CPYPTWN(ctx, dec); // -> CPYMTWN_CPY_memcms - if(o0 && op1==1 && op2==8 && HasMOPS()) return CPYPRN(ctx, dec); // -> CPYMRN_CPY_memcms - if(o0 && op1==1 && op2==9 && HasMOPS()) return CPYPWTRN(ctx, dec); // -> CPYMWTRN_CPY_memcms - if(o0 && op1==1 && op2==10 && HasMOPS()) return CPYPRTRN(ctx, dec); // -> CPYMRTRN_CPY_memcms - if(o0 && op1==1 && op2==11 && HasMOPS()) return CPYPTRN(ctx, dec); // -> CPYMTRN_CPY_memcms - if(o0 && op1==1 && op2==12 && HasMOPS()) return CPYPN(ctx, dec); // -> CPYMN_CPY_memcms - if(o0 && op1==1 && op2==13 && HasMOPS()) return CPYPWTN(ctx, dec); // -> CPYMWTN_CPY_memcms - if(o0 && op1==1 && op2==14 && HasMOPS()) return CPYPRTN(ctx, dec); // -> CPYMRTN_CPY_memcms - if(o0 && op1==1 && op2==15 && HasMOPS()) return CPYPTN(ctx, dec); // -> CPYMTN_CPY_memcms - if(o0 && op1==2 && !op2 && HasMOPS()) return CPYP(ctx, dec); // -> CPYE_CPY_memcms - if(o0 && op1==2 && op2==1 && HasMOPS()) return CPYPWT(ctx, dec); // -> CPYEWT_CPY_memcms - if(o0 && op1==2 && op2==2 && HasMOPS()) return CPYPRT(ctx, dec); // -> CPYERT_CPY_memcms - if(o0 && op1==2 && op2==3 && HasMOPS()) return CPYPT(ctx, dec); // -> CPYET_CPY_memcms - if(o0 && op1==2 && op2==4 && HasMOPS()) return CPYPWN(ctx, dec); // -> CPYEWN_CPY_memcms - if(o0 && op1==2 && op2==5 && HasMOPS()) return CPYPWTWN(ctx, dec); // -> CPYEWTWN_CPY_memcms - if(o0 && op1==2 && op2==6 && HasMOPS()) return CPYPRTWN(ctx, dec); // -> CPYERTWN_CPY_memcms - if(o0 && op1==2 && op2==7 && HasMOPS()) return CPYPTWN(ctx, dec); // -> CPYETWN_CPY_memcms - if(o0 && op1==2 && op2==8 && HasMOPS()) return CPYPRN(ctx, dec); // -> CPYERN_CPY_memcms - if(o0 && op1==2 && op2==9 && HasMOPS()) return CPYPWTRN(ctx, dec); // -> CPYEWTRN_CPY_memcms - if(o0 && op1==2 && op2==10 && HasMOPS()) return CPYPRTRN(ctx, dec); // -> CPYERTRN_CPY_memcms - if(o0 && op1==2 && op2==11 && HasMOPS()) return CPYPTRN(ctx, dec); // -> CPYETRN_CPY_memcms - if(o0 && op1==2 && op2==12 && HasMOPS()) return CPYPN(ctx, dec); // -> CPYEN_CPY_memcms - if(o0 && op1==2 && op2==13 && HasMOPS()) return CPYPWTN(ctx, dec); // -> CPYEWTN_CPY_memcms - if(o0 && op1==2 && op2==14 && HasMOPS()) return CPYPRTN(ctx, dec); // -> CPYERTN_CPY_memcms - if(o0 && op1==2 && op2==15 && HasMOPS()) return CPYPTN(ctx, dec); // -> CPYETN_CPY_memcms - if(o0 && op1==3 && !op2 && HasMOPS() && HasMTE()) return SETGP(ctx, dec); // -> SETGP_SET_memcms - if(o0 && op1==3 && op2==1 && HasMOPS() && HasMTE()) return SETGPT(ctx, dec); // -> SETGPT_SET_memcms - if(o0 && op1==3 && op2==2 && HasMOPS() && HasMTE()) return SETGPN(ctx, dec); // -> SETGPN_SET_memcms - if(o0 && op1==3 && op2==3 && HasMOPS() && HasMTE()) return SETGPTN(ctx, dec); // -> SETGPTN_SET_memcms - if(o0 && op1==3 && op2==4 && HasMOPS() && HasMTE()) return SETGP(ctx, dec); // -> SETGM_SET_memcms - if(o0 && op1==3 && op2==5 && HasMOPS() && HasMTE()) return SETGPT(ctx, dec); // -> SETGMT_SET_memcms - if(o0 && op1==3 && op2==6 && HasMOPS() && HasMTE()) return SETGPN(ctx, dec); // -> SETGMN_SET_memcms - if(o0 && op1==3 && op2==7 && HasMOPS() && HasMTE()) return SETGPTN(ctx, dec); // -> SETGMTN_SET_memcms - if(o0 && op1==3 && op2==8 && HasMOPS() && HasMTE()) return SETGP(ctx, dec); // -> SETGE_SET_memcms - if(o0 && op1==3 && op2==9 && HasMOPS() && HasMTE()) return SETGPT(ctx, dec); // -> SETGET_SET_memcms - if(o0 && op1==3 && op2==10 && HasMOPS() && HasMTE()) return SETGPN(ctx, dec); // -> SETGEN_SET_memcms - if(o0 && op1==3 && op2==11 && HasMOPS() && HasMTE()) return SETGPTN(ctx, dec); // -> SETGETN_SET_memcms - if(op1==3 && (op2&12)==12) UNALLOCATED(ENC_UNALLOCATED_963_MEMCMS); - UNMATCHED; -} - -int decode_iclass_rcwcomswap(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>30)&1, A=(INSWORD>>23)&1, R=(INSWORD>>22)&1; - if(!S && !A && !R && HasTHE()) return RCWCAS(ctx, dec); // -> RCWCAS_C64_rcwcomswap - if(!S && !A && R && HasTHE()) return RCWCAS(ctx, dec); // -> RCWCASL_C64_rcwcomswap - if(!S && A && !R && HasTHE()) return RCWCAS(ctx, dec); // -> RCWCASA_C64_rcwcomswap - if(!S && A && R && HasTHE()) return RCWCAS(ctx, dec); // -> RCWCASAL_C64_rcwcomswap - if(S && !A && !R && HasTHE()) return RCWSCAS(ctx, dec); // -> RCWSCAS_C64_rcwcomswap - if(S && !A && R && HasTHE()) return RCWSCAS(ctx, dec); // -> RCWSCASL_C64_rcwcomswap - if(S && A && !R && HasTHE()) return RCWSCAS(ctx, dec); // -> RCWSCASA_C64_rcwcomswap - if(S && A && R && HasTHE()) return RCWSCAS(ctx, dec); // -> RCWSCASAL_C64_rcwcomswap - UNMATCHED; -} - -int decode_iclass_rcwcomswappr(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>30)&1, A=(INSWORD>>23)&1, R=(INSWORD>>22)&1; - if(!S && !A && !R && HasD128() && HasTHE()) return RCWCASP(ctx, dec); // -> RCWCASP_C64_rcwcomswappr - if(!S && !A && R && HasD128() && HasTHE()) return RCWCASP(ctx, dec); // -> RCWCASPL_C64_rcwcomswappr - if(!S && A && !R && HasD128() && HasTHE()) return RCWCASP(ctx, dec); // -> RCWCASPA_C64_rcwcomswappr - if(!S && A && R && HasD128() && HasTHE()) return RCWCASP(ctx, dec); // -> RCWCASPAL_C64_rcwcomswappr - if(S && !A && !R && HasD128() && HasTHE()) return RCWSCASP(ctx, dec); // -> RCWSCASP_C64_rcwcomswappr - if(S && !A && R && HasD128() && HasTHE()) return RCWSCASP(ctx, dec); // -> RCWSCASPL_C64_rcwcomswappr - if(S && A && !R && HasD128() && HasTHE()) return RCWSCASP(ctx, dec); // -> RCWSCASPA_C64_rcwcomswappr - if(S && A && R && HasD128() && HasTHE()) return RCWSCASP(ctx, dec); // -> RCWSCASPAL_C64_rcwcomswappr - UNMATCHED; -} - -int decode_iclass_addsub_imm(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1; - if(!sf && !op && !S) return ADD_addsub_imm(ctx, dec); // -> ADD_32_addsub_imm - if(!sf && !op && S) return ADDS_addsub_imm(ctx, dec); // -> ADDS_32S_addsub_imm - if(!sf && op && !S) return SUB_addsub_imm(ctx, dec); // -> SUB_32_addsub_imm - if(!sf && op && S) return SUBS_addsub_imm(ctx, dec); // -> SUBS_32S_addsub_imm - if(sf && !op && !S) return ADD_addsub_imm(ctx, dec); // -> ADD_64_addsub_imm - if(sf && !op && S) return ADDS_addsub_imm(ctx, dec); // -> ADDS_64S_addsub_imm - if(sf && op && !S) return SUB_addsub_imm(ctx, dec); // -> SUB_64_addsub_imm - if(sf && op && S) return SUBS_addsub_imm(ctx, dec); // -> SUBS_64S_addsub_imm - UNMATCHED; -} - -int decode_iclass_addsub_immtags(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1; - if(sf && !op && !S && HasMTE()) return ADDG(ctx, dec); // -> ADDG_64_addsub_immtags - if(sf && op && !S && HasMTE()) return SUBG(ctx, dec); // -> SUBG_64_addsub_immtags - if(sf && S) UNALLOCATED(ENC_UNALLOCATED_797_ADDSUB_IMMTAGS); - if(!sf) UNALLOCATED(ENC_UNALLOCATED_796_ADDSUB_IMMTAGS); - UNMATCHED; -} - -int decode_iclass_bitfield(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, opc=(INSWORD>>29)&3, N=(INSWORD>>22)&1; - if(!sf && !opc && !N) return SBFM(ctx, dec); // -> SBFM_32M_bitfield - if(!sf && opc==1 && !N) return BFM(ctx, dec); // -> BFM_32M_bitfield - if(!sf && opc==2 && !N) return UBFM(ctx, dec); // -> UBFM_32M_bitfield - if(!sf && opc==3 && !N) UNALLOCATED(ENC_UNALLOCATED_800_BITFIELD); - if(sf && !opc && N) return SBFM(ctx, dec); // -> SBFM_64M_bitfield - if(sf && opc==1 && N) return BFM(ctx, dec); // -> BFM_64M_bitfield - if(sf && opc==2 && N) return UBFM(ctx, dec); // -> UBFM_64M_bitfield - if(sf && opc==3 && N) UNALLOCATED(ENC_UNALLOCATED_801_BITFIELD); - if(!sf && N) UNALLOCATED(ENC_UNALLOCATED_798_BITFIELD); - if(sf && !N) UNALLOCATED(ENC_UNALLOCATED_799_BITFIELD); - UNMATCHED; -} - -int decode_iclass_dp_1src_imm(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, opc=(INSWORD>>21)&3, Rd=INSWORD&0x1f; - if(sf && !opc && Rd==0x1f && HasPAuth_LR()) return AUTIASPPC_imm(ctx, dec); // -> AUTIASPPC_only_dp_1src_imm - if(sf && opc==1 && Rd==0x1f && HasPAuth_LR()) return AUTIBSPPC_imm(ctx, dec); // -> AUTIBSPPC_only_dp_1src_imm - if(sf && !(opc&2) && Rd!=0x1f) UNALLOCATED(ENC_UNALLOCATED_804_DP_1SRC_IMM); - if(sf && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_803_DP_1SRC_IMM); - if(!sf) UNALLOCATED(ENC_UNALLOCATED_802_DP_1SRC_IMM); - UNMATCHED; -} - -int decode_iclass_extract(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op21=(INSWORD>>29)&3, N=(INSWORD>>22)&1, o0=(INSWORD>>21)&1, imms=(INSWORD>>10)&0x3f; - if(!sf && !op21 && !N && !o0 && !(imms&0x20)) return EXTR(ctx, dec); // -> EXTR_32_extract - if(!sf && !op21 && !N && !o0 && (imms&0x20)==0x20) UNALLOCATED(ENC_UNALLOCATED_810_EXTRACT); - if(!sf && !op21 && N && !o0) UNALLOCATED(ENC_UNALLOCATED_808_EXTRACT); - if(sf && !op21 && !N && !o0) UNALLOCATED(ENC_UNALLOCATED_809_EXTRACT); - if(sf && !op21 && N && !o0) return EXTR(ctx, dec); // -> EXTR_64_extract - if(!op21 && o0) UNALLOCATED(ENC_UNALLOCATED_807_EXTRACT); - if(op21==1) UNALLOCATED(ENC_UNALLOCATED_805_EXTRACT); - if(op21==2) UNALLOCATED(ENC_UNALLOCATED_806_EXTRACT); - UNMATCHED; -} - -int decode_iclass_log_imm(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, opc=(INSWORD>>29)&3, N=(INSWORD>>22)&1; - if(!sf && !opc && !N) return AND_log_imm(ctx, dec); // -> AND_32_log_imm - if(!sf && opc==1 && !N) return ORR_log_imm(ctx, dec); // -> ORR_32_log_imm - if(!sf && opc==2 && !N) return EOR_log_imm(ctx, dec); // -> EOR_32_log_imm - if(!sf && opc==3 && !N) return ANDS_log_imm(ctx, dec); // -> ANDS_32S_log_imm - if(sf && !opc) return AND_log_imm(ctx, dec); // -> AND_64_log_imm - if(sf && opc==1) return ORR_log_imm(ctx, dec); // -> ORR_64_log_imm - if(sf && opc==2) return EOR_log_imm(ctx, dec); // -> EOR_64_log_imm - if(sf && opc==3) return ANDS_log_imm(ctx, dec); // -> ANDS_64S_log_imm - if(!sf && N) UNALLOCATED(ENC_UNALLOCATED_811_LOG_IMM); - UNMATCHED; -} - -int decode_iclass_minmax_imm(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1, opc=(INSWORD>>18)&15; - if(!sf && !op && !S && !opc && HasCSSC()) return SMAX_imm(ctx, dec); // -> SMAX_32_minmax_imm - if(!sf && !op && !S && opc==1 && HasCSSC()) return UMAX_imm(ctx, dec); // -> UMAX_32U_minmax_imm - if(!sf && !op && !S && opc==2 && HasCSSC()) return SMIN_imm(ctx, dec); // -> SMIN_32_minmax_imm - if(!sf && !op && !S && opc==3 && HasCSSC()) return UMIN_imm(ctx, dec); // -> UMIN_32U_minmax_imm - if(sf && !op && !S && !opc && HasCSSC()) return SMAX_imm(ctx, dec); // -> SMAX_64_minmax_imm - if(sf && !op && !S && opc==1 && HasCSSC()) return UMAX_imm(ctx, dec); // -> UMAX_64U_minmax_imm - if(sf && !op && !S && opc==2 && HasCSSC()) return SMIN_imm(ctx, dec); // -> SMIN_64_minmax_imm - if(sf && !op && !S && opc==3 && HasCSSC()) return UMIN_imm(ctx, dec); // -> UMIN_64U_minmax_imm - if(!op && !S && (opc&12)==4) UNALLOCATED(ENC_UNALLOCATED_815_MINMAX_IMM); - if(!op && !S && (opc&8)==8) UNALLOCATED(ENC_UNALLOCATED_814_MINMAX_IMM); - if(!op && S) UNALLOCATED(ENC_UNALLOCATED_813_MINMAX_IMM); - if(op) UNALLOCATED(ENC_UNALLOCATED_812_MINMAX_IMM); - UNMATCHED; -} - -int decode_iclass_movewide(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, opc=(INSWORD>>29)&3, hw=(INSWORD>>21)&3; - if(!sf && !opc && !(hw&2)) return MOVN(ctx, dec); // -> MOVN_32_movewide - if(!sf && opc==2 && !(hw&2)) return MOVZ(ctx, dec); // -> MOVZ_32_movewide - if(!sf && opc==3 && !(hw&2)) return MOVK(ctx, dec); // -> MOVK_32_movewide - if(sf && opc==1 && (hw&2)==2) UNALLOCATED(ENC_UNALLOCATED_818_MOVEWIDE); - if(opc==1 && !(hw&2)) UNALLOCATED(ENC_UNALLOCATED_817_MOVEWIDE); - if(sf && !opc) return MOVN(ctx, dec); // -> MOVN_64_movewide - if(sf && opc==2) return MOVZ(ctx, dec); // -> MOVZ_64_movewide - if(sf && opc==3) return MOVK(ctx, dec); // -> MOVK_64_movewide - if(!sf && (hw&2)==2) UNALLOCATED(ENC_UNALLOCATED_816_MOVEWIDE); - UNMATCHED; -} - -int decode_iclass_pcreladdr(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD>>31; - if(!op) return ADR(ctx, dec); // -> ADR_only_pcreladdr - if(op) return ADRP(ctx, dec); // -> ADRP_only_pcreladdr - UNMATCHED; -} - -int decode_iclass_addsub_pt(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1; - if(sf && !op && !S && HasCPA()) return ADDPT(ctx, dec); // -> ADDPT_64_addsub_pt - if(sf && op && !S && HasCPA()) return SUBPT(ctx, dec); // -> SUBPT_64_addsub_pt - if(sf && S) UNALLOCATED(ENC_UNALLOCATED_965_ADDSUB_PT); - if(!sf) UNALLOCATED(ENC_UNALLOCATED_964_ADDSUB_PT); - UNMATCHED; -} - -int decode_iclass_addsub_ext(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1, opt=(INSWORD>>22)&3; - if(!sf && !op && !S && !opt) return ADD_addsub_ext(ctx, dec); // -> ADD_32_addsub_ext - if(!sf && !op && S && !opt) return ADDS_addsub_ext(ctx, dec); // -> ADDS_32S_addsub_ext - if(!sf && op && !S && !opt) return SUB_addsub_ext(ctx, dec); // -> SUB_32_addsub_ext - if(!sf && op && S && !opt) return SUBS_addsub_ext(ctx, dec); // -> SUBS_32S_addsub_ext - if(sf && !op && !S && !opt) return ADD_addsub_ext(ctx, dec); // -> ADD_64_addsub_ext - if(sf && !op && S && !opt) return ADDS_addsub_ext(ctx, dec); // -> ADDS_64S_addsub_ext - if(sf && op && !S && !opt) return SUB_addsub_ext(ctx, dec); // -> SUB_64_addsub_ext - if(sf && op && S && !opt) return SUBS_addsub_ext(ctx, dec); // -> SUBS_64S_addsub_ext - if(opt) UNALLOCATED(ENC_UNALLOCATED_966_ADDSUB_EXT); - UNMATCHED; -} - -int decode_iclass_addsub_shift(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1; - if(!sf && !op && !S) return ADD_addsub_shift(ctx, dec); // -> ADD_32_addsub_shift - if(!sf && !op && S) return ADDS_addsub_shift(ctx, dec); // -> ADDS_32_addsub_shift - if(!sf && op && !S) return SUB_addsub_shift(ctx, dec); // -> SUB_32_addsub_shift - if(!sf && op && S) return SUBS_addsub_shift(ctx, dec); // -> SUBS_32_addsub_shift - if(sf && !op && !S) return ADD_addsub_shift(ctx, dec); // -> ADD_64_addsub_shift - if(sf && !op && S) return ADDS_addsub_shift(ctx, dec); // -> ADDS_64_addsub_shift - if(sf && op && !S) return SUB_addsub_shift(ctx, dec); // -> SUB_64_addsub_shift - if(sf && op && S) return SUBS_addsub_shift(ctx, dec); // -> SUBS_64_addsub_shift - UNMATCHED; -} - -int decode_iclass_addsub_carry(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1; - if(!sf && !op && !S) return ADC(ctx, dec); // -> ADC_32_addsub_carry - if(!sf && !op && S) return ADCS(ctx, dec); // -> ADCS_32_addsub_carry - if(!sf && op && !S) return SBC(ctx, dec); // -> SBC_32_addsub_carry - if(!sf && op && S) return SBCS(ctx, dec); // -> SBCS_32_addsub_carry - if(sf && !op && !S) return ADC(ctx, dec); // -> ADC_64_addsub_carry - if(sf && !op && S) return ADCS(ctx, dec); // -> ADCS_64_addsub_carry - if(sf && op && !S) return SBC(ctx, dec); // -> SBC_64_addsub_carry - if(sf && op && S) return SBCS(ctx, dec); // -> SBCS_64_addsub_carry - UNMATCHED; -} - -int decode_iclass_condcmp_imm(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1, o2=(INSWORD>>10)&1, o3=(INSWORD>>4)&1; - if(!sf && !op && S && !o2 && !o3) return CCMN_imm(ctx, dec); // -> CCMN_32_condcmp_imm - if(!sf && op && S && !o2 && !o3) return CCMP_imm(ctx, dec); // -> CCMP_32_condcmp_imm - if(sf && !op && S && !o2 && !o3) return CCMN_imm(ctx, dec); // -> CCMN_64_condcmp_imm - if(sf && op && S && !o2 && !o3) return CCMP_imm(ctx, dec); // -> CCMP_64_condcmp_imm - if(S && !o2 && o3) UNALLOCATED(ENC_UNALLOCATED_969_CONDCMP_IMM); - if(S && o2) UNALLOCATED(ENC_UNALLOCATED_968_CONDCMP_IMM); - if(!S) UNALLOCATED(ENC_UNALLOCATED_967_CONDCMP_IMM); - UNMATCHED; -} - -int decode_iclass_condcmp_reg(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1, o2=(INSWORD>>10)&1, o3=(INSWORD>>4)&1; - if(!sf && !op && S && !o2 && !o3) return CCMN_reg(ctx, dec); // -> CCMN_32_condcmp_reg - if(!sf && op && S && !o2 && !o3) return CCMP_reg(ctx, dec); // -> CCMP_32_condcmp_reg - if(sf && !op && S && !o2 && !o3) return CCMN_reg(ctx, dec); // -> CCMN_64_condcmp_reg - if(sf && op && S && !o2 && !o3) return CCMP_reg(ctx, dec); // -> CCMP_64_condcmp_reg - if(S && !o2 && o3) UNALLOCATED(ENC_UNALLOCATED_972_CONDCMP_REG); - if(S && o2) UNALLOCATED(ENC_UNALLOCATED_971_CONDCMP_REG); - if(!S) UNALLOCATED(ENC_UNALLOCATED_970_CONDCMP_REG); - UNMATCHED; -} - -int decode_iclass_condsel(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1, op2=(INSWORD>>10)&3; - if(!sf && !op && !S && !op2) return CSEL(ctx, dec); // -> CSEL_32_condsel - if(!sf && !op && !S && op2==1) return CSINC(ctx, dec); // -> CSINC_32_condsel - if(!sf && op && !S && !op2) return CSINV(ctx, dec); // -> CSINV_32_condsel - if(!sf && op && !S && op2==1) return CSNEG(ctx, dec); // -> CSNEG_32_condsel - if(sf && !op && !S && !op2) return CSEL(ctx, dec); // -> CSEL_64_condsel - if(sf && !op && !S && op2==1) return CSINC(ctx, dec); // -> CSINC_64_condsel - if(sf && op && !S && !op2) return CSINV(ctx, dec); // -> CSINV_64_condsel - if(sf && op && !S && op2==1) return CSNEG(ctx, dec); // -> CSNEG_64_condsel - if(!S && (op2&2)==2) UNALLOCATED(ENC_UNALLOCATED_974_CONDSEL); - if(S) UNALLOCATED(ENC_UNALLOCATED_973_CONDSEL); - UNMATCHED; -} - -int decode_iclass_dp_1src(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, S=(INSWORD>>29)&1, opcode2=(INSWORD>>16)&0x1f, opcode=(INSWORD>>10)&0x3f, Rn=(INSWORD>>5)&0x1f, Rd=INSWORD&0x1f; - if(sf && !S && opcode2==1 && opcode==0x20 && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return PACNBIASPPC(ctx, dec); // -> PACNBIASPPC_64LR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x21 && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return PACNBIBSPPC(ctx, dec); // -> PACNBIBSPPC_64LR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x22 && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return PACIA171615(ctx, dec); // -> PACIA171615_64LR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x23 && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return PACIB171615(ctx, dec); // -> PACIB171615_64LR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x28 && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return PACIASPPC(ctx, dec); // -> PACIASPPC_64LR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x29 && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return PACIBSPPC(ctx, dec); // -> PACIBSPPC_64LR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x2e && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return AUTIA171615(ctx, dec); // -> AUTIA171615_64LR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x2f && Rn==0x1f && Rd==0x1e && HasPAuth_LR()) return AUTIB171615(ctx, dec); // -> AUTIB171615_64LR_dp_1src - if(sf && !S && opcode2==1 && (opcode&0x3e)==0x2a && Rn==0x1f && Rd==0x1e) UNALLOCATED(ENC_UNALLOCATED_997_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x3e)==0x2c && Rn==0x1f && Rd==0x1e) UNALLOCATED(ENC_UNALLOCATED_998_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x3c)==0x20 && Rn!=0x1f && Rd==0x1e) UNALLOCATED(ENC_UNALLOCATED_995_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x38)==0x28 && Rn!=0x1f && Rd==0x1e) UNALLOCATED(ENC_UNALLOCATED_994_DP_1SRC); - if(sf && !S && opcode2==1 && opcode==8 && Rn==0x1f && HasPAuth()) return PACIA(ctx, dec); // -> PACIZA_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==9 && Rn==0x1f && HasPAuth()) return PACIB(ctx, dec); // -> PACIZB_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==10 && Rn==0x1f && HasPAuth()) return PACDA(ctx, dec); // -> PACDZA_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==11 && Rn==0x1f && HasPAuth()) return PACDB(ctx, dec); // -> PACDZB_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==12 && Rn==0x1f && HasPAuth()) return AUTIA(ctx, dec); // -> AUTIZA_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==13 && Rn==0x1f && HasPAuth()) return AUTIB(ctx, dec); // -> AUTIZB_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==14 && Rn==0x1f && HasPAuth()) return AUTDA(ctx, dec); // -> AUTDZA_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==15 && Rn==0x1f && HasPAuth()) return AUTDB(ctx, dec); // -> AUTDZB_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==0x10 && Rn==0x1f && HasPAuth()) return XPAC(ctx, dec); // -> XPACI_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==0x11 && Rn==0x1f && HasPAuth()) return XPAC(ctx, dec); // -> XPACD_64Z_dp_1src - if(sf && !S && opcode2==1 && opcode==0x24 && Rd==0x1e && HasPAuth_LR()) return AUTIASPPCR(ctx, dec); // -> AUTIASPPCR_64LRR_dp_1src - if(sf && !S && opcode2==1 && opcode==0x25 && Rd==0x1e && HasPAuth_LR()) return AUTIBSPPCR(ctx, dec); // -> AUTIBSPPCR_64LRR_dp_1src - if(sf && !S && opcode2==1 && (opcode&0x3e)==0x10 && Rn!=0x1f) UNALLOCATED(ENC_UNALLOCATED_993_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x3e)==0x26 && Rd==0x1e) UNALLOCATED(ENC_UNALLOCATED_996_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x38)==8 && Rn!=0x1f) UNALLOCATED(ENC_UNALLOCATED_987_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x30)==0x20 && Rd!=0x1e) UNALLOCATED(ENC_UNALLOCATED_985_DP_1SRC); - if(!sf && !S && !opcode2 && !opcode) return RBIT_int(ctx, dec); // -> RBIT_32_dp_1src - if(!sf && !S && !opcode2 && opcode==1) return REV16_int(ctx, dec); // -> REV16_32_dp_1src - if(!sf && !S && !opcode2 && opcode==2) return REV(ctx, dec); // -> REV_32_dp_1src - if(!sf && !S && !opcode2 && opcode==3) UNALLOCATED(ENC_UNALLOCATED_992_DP_1SRC); - if(!sf && !S && !opcode2 && opcode==4) return CLZ_int(ctx, dec); // -> CLZ_32_dp_1src - if(!sf && !S && !opcode2 && opcode==5) return CLS_int(ctx, dec); // -> CLS_32_dp_1src - if(!sf && !S && !opcode2 && opcode==6 && HasCSSC()) return CTZ(ctx, dec); // -> CTZ_32_dp_1src - if(!sf && !S && !opcode2 && opcode==7 && HasCSSC()) return CNT(ctx, dec); // -> CNT_32_dp_1src - if(!sf && !S && !opcode2 && opcode==8 && HasCSSC()) return ABS(ctx, dec); // -> ABS_32_dp_1src - if(sf && !S && !opcode2 && !opcode) return RBIT_int(ctx, dec); // -> RBIT_64_dp_1src - if(sf && !S && !opcode2 && opcode==1) return REV16_int(ctx, dec); // -> REV16_64_dp_1src - if(sf && !S && !opcode2 && opcode==2) return REV32_int(ctx, dec); // -> REV32_64_dp_1src - if(sf && !S && !opcode2 && opcode==3) return REV(ctx, dec); // -> REV_64_dp_1src - if(sf && !S && !opcode2 && opcode==4) return CLZ_int(ctx, dec); // -> CLZ_64_dp_1src - if(sf && !S && !opcode2 && opcode==5) return CLS_int(ctx, dec); // -> CLS_64_dp_1src - if(sf && !S && !opcode2 && opcode==6 && HasCSSC()) return CTZ(ctx, dec); // -> CTZ_64_dp_1src - if(sf && !S && !opcode2 && opcode==7 && HasCSSC()) return CNT(ctx, dec); // -> CNT_64_dp_1src - if(sf && !S && !opcode2 && opcode==8 && HasCSSC()) return ABS(ctx, dec); // -> ABS_64_dp_1src - if(sf && !S && opcode2==1 && !opcode && HasPAuth()) return PACIA(ctx, dec); // -> PACIA_64P_dp_1src - if(sf && !S && opcode2==1 && opcode==1 && HasPAuth()) return PACIB(ctx, dec); // -> PACIB_64P_dp_1src - if(sf && !S && opcode2==1 && opcode==2 && HasPAuth()) return PACDA(ctx, dec); // -> PACDA_64P_dp_1src - if(sf && !S && opcode2==1 && opcode==3 && HasPAuth()) return PACDB(ctx, dec); // -> PACDB_64P_dp_1src - if(sf && !S && opcode2==1 && opcode==4 && HasPAuth()) return AUTIA(ctx, dec); // -> AUTIA_64P_dp_1src - if(sf && !S && opcode2==1 && opcode==5 && HasPAuth()) return AUTIB(ctx, dec); // -> AUTIB_64P_dp_1src - if(sf && !S && opcode2==1 && opcode==6 && HasPAuth()) return AUTDA(ctx, dec); // -> AUTDA_64P_dp_1src - if(sf && !S && opcode2==1 && opcode==7 && HasPAuth()) return AUTDB(ctx, dec); // -> AUTDB_64P_dp_1src - if(!S && !opcode2 && opcode==9) UNALLOCATED(ENC_UNALLOCATED_991_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x3e)==0x12) UNALLOCATED(ENC_UNALLOCATED_990_DP_1SRC); - if(!S && !opcode2 && (opcode&0x3e)==10) UNALLOCATED(ENC_UNALLOCATED_989_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x3c)==0x14) UNALLOCATED(ENC_UNALLOCATED_988_DP_1SRC); - if(!S && !opcode2 && (opcode&0x3c)==12) UNALLOCATED(ENC_UNALLOCATED_986_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x38)==0x18) UNALLOCATED(ENC_UNALLOCATED_984_DP_1SRC); - if(sf && !S && opcode2==1 && (opcode&0x30)==0x30) UNALLOCATED(ENC_UNALLOCATED_983_DP_1SRC); - if(!S && !opcode2 && (opcode&0x30)==0x10) UNALLOCATED(ENC_UNALLOCATED_982_DP_1SRC); - if(!S && !opcode2 && (opcode&0x20)==0x20) UNALLOCATED(ENC_UNALLOCATED_981_DP_1SRC); - if(!sf && !S && opcode2==1) UNALLOCATED(ENC_UNALLOCATED_980_DP_1SRC); - if(!S && (opcode2&0x1e)==2) UNALLOCATED(ENC_UNALLOCATED_979_DP_1SRC); - if(!S && (opcode2&0x1c)==4) UNALLOCATED(ENC_UNALLOCATED_978_DP_1SRC); - if(!S && (opcode2&0x18)==8) UNALLOCATED(ENC_UNALLOCATED_977_DP_1SRC); - if(!S && (opcode2&0x10)==0x10) UNALLOCATED(ENC_UNALLOCATED_976_DP_1SRC); - if(S) UNALLOCATED(ENC_UNALLOCATED_975_DP_1SRC); - UNMATCHED; -} - -int decode_iclass_dp_2src(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, S=(INSWORD>>29)&1, opcode=(INSWORD>>10)&0x3f; - if(!sf && !S && opcode==2) return UDIV(ctx, dec); // -> UDIV_32_dp_2src - if(!sf && !S && opcode==3) return SDIV(ctx, dec); // -> SDIV_32_dp_2src - if(!sf && !S && opcode==8) return LSLV(ctx, dec); // -> LSLV_32_dp_2src - if(!sf && !S && opcode==9) return LSRV(ctx, dec); // -> LSRV_32_dp_2src - if(!sf && !S && opcode==10) return ASRV(ctx, dec); // -> ASRV_32_dp_2src - if(!sf && !S && opcode==11) return RORV(ctx, dec); // -> RORV_32_dp_2src - if(!sf && !S && opcode==0x10 && HasCRC32()) return CRC32(ctx, dec); // -> CRC32B_32C_dp_2src - if(!sf && !S && opcode==0x11 && HasCRC32()) return CRC32(ctx, dec); // -> CRC32H_32C_dp_2src - if(!sf && !S && opcode==0x12 && HasCRC32()) return CRC32(ctx, dec); // -> CRC32W_32C_dp_2src - if(!sf && !S && opcode==0x14 && HasCRC32()) return CRC32C(ctx, dec); // -> CRC32CB_32C_dp_2src - if(!sf && !S && opcode==0x15 && HasCRC32()) return CRC32C(ctx, dec); // -> CRC32CH_32C_dp_2src - if(!sf && !S && opcode==0x16 && HasCRC32()) return CRC32C(ctx, dec); // -> CRC32CW_32C_dp_2src - if(!sf && !S && opcode==0x18 && HasCSSC()) return SMAX_reg(ctx, dec); // -> SMAX_32_dp_2src - if(!sf && !S && opcode==0x19 && HasCSSC()) return UMAX_reg(ctx, dec); // -> UMAX_32_dp_2src - if(!sf && !S && opcode==0x1a && HasCSSC()) return SMIN_reg(ctx, dec); // -> SMIN_32_dp_2src - if(!sf && !S && opcode==0x1b && HasCSSC()) return UMIN_reg(ctx, dec); // -> UMIN_32_dp_2src - if(sf && !S && !opcode && HasMTE()) return SUBP(ctx, dec); // -> SUBP_64S_dp_2src - if(sf && !S && opcode==2) return UDIV(ctx, dec); // -> UDIV_64_dp_2src - if(sf && !S && opcode==3) return SDIV(ctx, dec); // -> SDIV_64_dp_2src - if(sf && !S && opcode==4 && HasMTE()) return IRG(ctx, dec); // -> IRG_64I_dp_2src - if(sf && !S && opcode==5 && HasMTE()) return GMI(ctx, dec); // -> GMI_64G_dp_2src - if(sf && !S && opcode==8) return LSLV(ctx, dec); // -> LSLV_64_dp_2src - if(sf && !S && opcode==9) return LSRV(ctx, dec); // -> LSRV_64_dp_2src - if(sf && !S && opcode==10) return ASRV(ctx, dec); // -> ASRV_64_dp_2src - if(sf && !S && opcode==11) return RORV(ctx, dec); // -> RORV_64_dp_2src - if(sf && !S && opcode==12 && HasPAuth()) return PACGA(ctx, dec); // -> PACGA_64P_dp_2src - if(sf && !S && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1013_DP_2SRC); - if(sf && !S && opcode==0x11) UNALLOCATED(ENC_UNALLOCATED_1014_DP_2SRC); - if(sf && !S && opcode==0x13 && HasCRC32()) return CRC32(ctx, dec); // -> CRC32X_64C_dp_2src - if(sf && !S && opcode==0x15) UNALLOCATED(ENC_UNALLOCATED_1015_DP_2SRC); - if(sf && !S && opcode==0x17 && HasCRC32()) return CRC32C(ctx, dec); // -> CRC32CX_64C_dp_2src - if(sf && !S && opcode==0x18 && HasCSSC()) return SMAX_reg(ctx, dec); // -> SMAX_64_dp_2src - if(sf && !S && opcode==0x19 && HasCSSC()) return UMAX_reg(ctx, dec); // -> UMAX_64_dp_2src - if(sf && !S && opcode==0x1a && HasCSSC()) return SMIN_reg(ctx, dec); // -> SMIN_64_dp_2src - if(sf && !S && opcode==0x1b && HasCSSC()) return UMIN_reg(ctx, dec); // -> UMIN_64_dp_2src - if(sf && S && !opcode && HasMTE()) return SUBPS(ctx, dec); // -> SUBPS_64S_dp_2src - if(!sf && !S && (opcode&0x3e)==4) UNALLOCATED(ENC_UNALLOCATED_1009_DP_2SRC); - if(!sf && !S && (opcode&0x3b)==0x13) UNALLOCATED(ENC_UNALLOCATED_1010_DP_2SRC); - if(sf && opcode==1) UNALLOCATED(ENC_UNALLOCATED_1012_DP_2SRC); - if(sf && !S && (opcode&0x3e)==14) UNALLOCATED(ENC_UNALLOCATED_1011_DP_2SRC); - if(!S && (opcode&0x3e)==6) UNALLOCATED(ENC_UNALLOCATED_1007_DP_2SRC); - if(S && (opcode&0x3e)==2) UNALLOCATED(ENC_UNALLOCATED_1008_DP_2SRC); - if(!sf && !(opcode&0x3e)) UNALLOCATED(ENC_UNALLOCATED_1004_DP_2SRC); - if(sf && !S && (opcode&0x39)==0x10) UNALLOCATED(ENC_UNALLOCATED_1005_DP_2SRC); - if(sf && !S && (opcode&0x3c)==0x1c) UNALLOCATED(ENC_UNALLOCATED_1006_DP_2SRC); - if(S && (opcode&0x3c)==4) UNALLOCATED(ENC_UNALLOCATED_1003_DP_2SRC); - if(!sf && !S && (opcode&0x2c)==12) UNALLOCATED(ENC_UNALLOCATED_1002_DP_2SRC); - if(S && (opcode&0x38)==8) UNALLOCATED(ENC_UNALLOCATED_1001_DP_2SRC); - if(S && (opcode&0x30)==0x10) UNALLOCATED(ENC_UNALLOCATED_1000_DP_2SRC); - if((opcode&0x20)==0x20) UNALLOCATED(ENC_UNALLOCATED_999_DP_2SRC); - UNMATCHED; -} - -int decode_iclass_dp_3src(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op54=(INSWORD>>29)&3, op31=(INSWORD>>21)&7, o0=(INSWORD>>15)&1; - if(!sf && !op54 && !op31 && !o0) return MADD(ctx, dec); // -> MADD_32A_dp_3src - if(!sf && !op54 && !op31 && o0) return MSUB(ctx, dec); // -> MSUB_32A_dp_3src - if(sf && !op54 && !op31 && !o0) return MADD(ctx, dec); // -> MADD_64A_dp_3src - if(sf && !op54 && !op31 && o0) return MSUB(ctx, dec); // -> MSUB_64A_dp_3src - if(sf && !op54 && op31==1 && !o0) return SMADDL(ctx, dec); // -> SMADDL_64WA_dp_3src - if(sf && !op54 && op31==1 && o0) return SMSUBL(ctx, dec); // -> SMSUBL_64WA_dp_3src - if(sf && !op54 && op31==2 && !o0) return SMULH(ctx, dec); // -> SMULH_64_dp_3src - if(sf && !op54 && op31==3 && !o0 && HasCPA()) return MADDPT(ctx, dec); // -> MADDPT_64A_dp_3src - if(sf && !op54 && op31==3 && o0 && HasCPA()) return MSUBPT(ctx, dec); // -> MSUBPT_64A_dp_3src - if(sf && !op54 && op31==5 && !o0) return UMADDL(ctx, dec); // -> UMADDL_64WA_dp_3src - if(sf && !op54 && op31==5 && o0) return UMSUBL(ctx, dec); // -> UMSUBL_64WA_dp_3src - if(sf && !op54 && op31==6 && !o0) return UMULH(ctx, dec); // -> UMULH_64_dp_3src - if(sf && !op54 && (op31&3)==2 && o0) UNALLOCATED(ENC_UNALLOCATED_1021_DP_3SRC); - if(sf && !op54 && op31==7) UNALLOCATED(ENC_UNALLOCATED_1020_DP_3SRC); - if(!op54 && op31==4) UNALLOCATED(ENC_UNALLOCATED_1019_DP_3SRC); - if(!sf && !op54 && (op31&3)==1) UNALLOCATED(ENC_UNALLOCATED_1018_DP_3SRC); - if(!sf && !op54 && (op31&2)==2) UNALLOCATED(ENC_UNALLOCATED_1017_DP_3SRC); - if(op54) UNALLOCATED(ENC_UNALLOCATED_1016_DP_3SRC); - UNMATCHED; -} - -int decode_iclass_setf(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1, opcode2=(INSWORD>>15)&0x3f, sz=(INSWORD>>14)&1, o3=(INSWORD>>4)&1, mask=INSWORD&15; - if(!sf && !op && S && !opcode2 && !sz && !o3 && mask==13 && HasFlagM()) return SETF(ctx, dec); // -> SETF8_only_setf - if(!sf && !op && S && !opcode2 && sz && !o3 && mask==13 && HasFlagM()) return SETF(ctx, dec); // -> SETF16_only_setf - if(!sf && !op && S && !opcode2 && !o3 && mask!=13) UNALLOCATED(ENC_UNALLOCATED_1027_SETF); - if(!sf && !op && S && !opcode2 && o3) UNALLOCATED(ENC_UNALLOCATED_1026_SETF); - if(!sf && !op && S && opcode2) UNALLOCATED(ENC_UNALLOCATED_1025_SETF); - if(!sf && !op && !S) UNALLOCATED(ENC_UNALLOCATED_1024_SETF); - if(!sf && op) UNALLOCATED(ENC_UNALLOCATED_1023_SETF); - if(sf) UNALLOCATED(ENC_UNALLOCATED_1022_SETF); - UNMATCHED; -} - -int decode_iclass_log_shift(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, opc=(INSWORD>>29)&3, N=(INSWORD>>21)&1; - if(!sf && !opc && !N) return AND_log_shift(ctx, dec); // -> AND_32_log_shift - if(!sf && !opc && N) return BIC_log_shift(ctx, dec); // -> BIC_32_log_shift - if(!sf && opc==1 && !N) return ORR_log_shift(ctx, dec); // -> ORR_32_log_shift - if(!sf && opc==1 && N) return ORN_log_shift(ctx, dec); // -> ORN_32_log_shift - if(!sf && opc==2 && !N) return EOR_log_shift(ctx, dec); // -> EOR_32_log_shift - if(!sf && opc==2 && N) return EON(ctx, dec); // -> EON_32_log_shift - if(!sf && opc==3 && !N) return ANDS_log_shift(ctx, dec); // -> ANDS_32_log_shift - if(!sf && opc==3 && N) return BICS(ctx, dec); // -> BICS_32_log_shift - if(sf && !opc && !N) return AND_log_shift(ctx, dec); // -> AND_64_log_shift - if(sf && !opc && N) return BIC_log_shift(ctx, dec); // -> BIC_64_log_shift - if(sf && opc==1 && !N) return ORR_log_shift(ctx, dec); // -> ORR_64_log_shift - if(sf && opc==1 && N) return ORN_log_shift(ctx, dec); // -> ORN_64_log_shift - if(sf && opc==2 && !N) return EOR_log_shift(ctx, dec); // -> EOR_64_log_shift - if(sf && opc==2 && N) return EON(ctx, dec); // -> EON_64_log_shift - if(sf && opc==3 && !N) return ANDS_log_shift(ctx, dec); // -> ANDS_64_log_shift - if(sf && opc==3 && N) return BICS(ctx, dec); // -> BICS_64_log_shift - UNMATCHED; -} - -int decode_iclass_rmif(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, op=(INSWORD>>30)&1, S=(INSWORD>>29)&1, o2=(INSWORD>>4)&1; - if(sf && !op && S && !o2 && HasFlagM()) return RMIF(ctx, dec); // -> RMIF_only_rmif - if(sf && !op && S && o2) UNALLOCATED(ENC_UNALLOCATED_1031_RMIF); - if(sf && !op && !S) UNALLOCATED(ENC_UNALLOCATED_1030_RMIF); - if(sf && op) UNALLOCATED(ENC_UNALLOCATED_1029_RMIF); - if(!sf) UNALLOCATED(ENC_UNALLOCATED_1028_RMIF); - UNMATCHED; -} - -int decode_iclass_asimdall(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>30)&1, U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&0x1f; - if(Q && U && !size && opcode==12 && HasAdvSIMD()) return FMAXNMV_advsimd(ctx, dec); // -> FMAXNMV_asimdall_only_SD - if(Q && U && !size && opcode==15 && HasAdvSIMD()) return FMAXV_advsimd(ctx, dec); // -> FMAXV_asimdall_only_SD - if(Q && U && size==2 && opcode==12 && HasAdvSIMD()) return FMINNMV_advsimd(ctx, dec); // -> FMINNMV_asimdall_only_SD - if(Q && U && size==2 && opcode==15 && HasAdvSIMD()) return FMINV_advsimd(ctx, dec); // -> FMINV_asimdall_only_SD - if(!U && !size && opcode==12 && HasAdvSIMD() && HasFP16()) return FMAXNMV_advsimd(ctx, dec); // -> FMAXNMV_asimdall_only_H - if(!U && !size && opcode==15 && HasAdvSIMD() && HasFP16()) return FMAXV_advsimd(ctx, dec); // -> FMAXV_asimdall_only_H - if(!U && size==2 && opcode==12 && HasAdvSIMD() && HasFP16()) return FMINNMV_advsimd(ctx, dec); // -> FMINNMV_asimdall_only_H - if(!U && size==2 && opcode==15 && HasAdvSIMD() && HasFP16()) return FMINV_advsimd(ctx, dec); // -> FMINV_asimdall_only_H - if(!Q && U && !(size&1) && opcode==15) UNALLOCATED(ENC_UNALLOCATED_1045_ASIMDALL); - if(Q && U && !(size&1) && opcode==14) UNALLOCATED(ENC_UNALLOCATED_1046_ASIMDALL); - if(!U && !(size&1) && opcode==14) UNALLOCATED(ENC_UNALLOCATED_1044_ASIMDALL); - if(!Q && U && !(size&1) && (opcode&0x1d)==12) UNALLOCATED(ENC_UNALLOCATED_1043_ASIMDALL); - if(!(size&1) && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1042_ASIMDALL); - if(!U && opcode==3 && HasAdvSIMD()) return SADDLV_advsimd(ctx, dec); // -> SADDLV_asimdall_only - if(!U && opcode==10 && HasAdvSIMD()) return SMAXV_advsimd(ctx, dec); // -> SMAXV_asimdall_only - if(!U && opcode==0x1a && HasAdvSIMD()) return SMINV_advsimd(ctx, dec); // -> SMINV_asimdall_only - if(!U && opcode==0x1b && HasAdvSIMD()) return ADDV_advsimd(ctx, dec); // -> ADDV_asimdall_only - if(U && opcode==3 && HasAdvSIMD()) return UADDLV_advsimd(ctx, dec); // -> UADDLV_asimdall_only - if(U && opcode==10 && HasAdvSIMD()) return UMAXV_advsimd(ctx, dec); // -> UMAXV_asimdall_only - if(U && opcode==0x1a && HasAdvSIMD()) return UMINV_advsimd(ctx, dec); // -> UMINV_asimdall_only - if(U && opcode==0x1b) UNALLOCATED(ENC_UNALLOCATED_1041_ASIMDALL); - if(opcode==1) UNALLOCATED(ENC_UNALLOCATED_1039_ASIMDALL); - if(opcode==11) UNALLOCATED(ENC_UNALLOCATED_1040_ASIMDALL); - if(!(opcode&0x1d)) UNALLOCATED(ENC_UNALLOCATED_1038_ASIMDALL); - if(!(size&1) && (opcode&0x1c)==4) UNALLOCATED(ENC_UNALLOCATED_1035_ASIMDALL); - if(!(size&1) && (opcode&0x1c)==0x14) UNALLOCATED(ENC_UNALLOCATED_1036_ASIMDALL); - if(!(size&1) && (opcode&0x1c)==0x1c) UNALLOCATED(ENC_UNALLOCATED_1037_ASIMDALL); - if((opcode&14)==8) UNALLOCATED(ENC_UNALLOCATED_1034_ASIMDALL); - if((opcode&0x1c)==0x10) UNALLOCATED(ENC_UNALLOCATED_1033_ASIMDALL); - if(size&1 && (opcode&4)==4) UNALLOCATED(ENC_UNALLOCATED_1032_ASIMDALL); - UNMATCHED; -} - -int decode_iclass_asimdins(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>30)&1, op=(INSWORD>>29)&1, imm5=(INSWORD>>16)&0x1f, imm4=(INSWORD>>11)&15; - if(Q && !op && (imm5&15)==8 && imm4==7 && HasAdvSIMD()) return UMOV_advsimd(ctx, dec); // -> UMOV_asimdins_X_x - if(Q && !op && (imm5&15)==9 && imm4==7) UNALLOCATED(ENC_UNALLOCATED_1055_ASIMDINS); - if(Q && !op && (imm5&14)==10 && imm4==7) UNALLOCATED(ENC_UNALLOCATED_1054_ASIMDINS); - if(Q && !op && (imm5&12)==12 && imm4==7) UNALLOCATED(ENC_UNALLOCATED_1053_ASIMDINS); - if(Q && !op && !(imm5&8) && imm4==7) UNALLOCATED(ENC_UNALLOCATED_1052_ASIMDINS); - if(!Q && !op && imm4==5 && HasAdvSIMD()) return SMOV_advsimd(ctx, dec); // -> SMOV_asimdins_W_w - if(!Q && !op && imm4==7 && HasAdvSIMD()) return UMOV_advsimd(ctx, dec); // -> UMOV_asimdins_W_w - if(Q && !op && imm4==2) UNALLOCATED(ENC_UNALLOCATED_1051_ASIMDINS); - if(Q && !op && imm4==3 && HasAdvSIMD()) return INS_advsimd_gen(ctx, dec); // -> INS_asimdins_IR_r - if(Q && !op && imm4==5 && HasAdvSIMD()) return SMOV_advsimd(ctx, dec); // -> SMOV_asimdins_X_x - if(!op && !imm4 && HasAdvSIMD()) return DUP_advsimd_elt(ctx, dec); // -> DUP_asimdins_DV_v - if(!op && imm4==1 && HasAdvSIMD()) return DUP_advsimd_gen(ctx, dec); // -> DUP_asimdins_DR_r - if(!Q && !op && (imm4&14)==2) UNALLOCATED(ENC_UNALLOCATED_1050_ASIMDINS); - if(!op && (imm4&13)==4) UNALLOCATED(ENC_UNALLOCATED_1049_ASIMDINS); - if(!op && (imm4&8)==8) UNALLOCATED(ENC_UNALLOCATED_1048_ASIMDINS); - if(!Q && op) UNALLOCATED(ENC_UNALLOCATED_1047_ASIMDINS); - if(Q && op && HasAdvSIMD()) return INS_advsimd_elt(ctx, dec); // -> INS_asimdins_IV_v - UNMATCHED; -} - -int decode_iclass_asimdext(context *ctx, Instruction *dec) -{ - uint32_t op2=(INSWORD>>22)&3; - if(!op2 && HasAdvSIMD()) return EXT_advsimd(ctx, dec); // -> EXT_asimdext_only - if(op2) UNALLOCATED(ENC_UNALLOCATED_1056_ASIMDEXT); - UNMATCHED; -} - -int decode_iclass_asimdimm(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>30)&1, op=(INSWORD>>29)&1, cmode=(INSWORD>>12)&15, o2=(INSWORD>>11)&1; - if(!Q && op && cmode==14 && !o2 && HasAdvSIMD()) return MOVI_advsimd(ctx, dec); // -> MOVI_asimdimm_D_ds - if(!Q && op && cmode==15 && !o2) UNALLOCATED(ENC_UNALLOCATED_1059_ASIMDIMM); - if(Q && op && cmode==14 && !o2 && HasAdvSIMD()) return MOVI_advsimd(ctx, dec); // -> MOVI_asimdimm_D2_d - if(Q && op && cmode==15 && !o2 && HasAdvSIMD()) return FMOV_advsimd(ctx, dec); // -> FMOV_asimdimm_D2_d - if(!op && cmode==14 && !o2 && HasAdvSIMD()) return MOVI_advsimd(ctx, dec); // -> MOVI_asimdimm_N_b - if(!op && cmode==15 && !o2 && HasAdvSIMD()) return FMOV_advsimd(ctx, dec); // -> FMOV_asimdimm_S_s - if(!op && cmode==15 && o2 && HasAdvSIMD() && HasFP16()) return FMOV_advsimd(ctx, dec); // -> FMOV_asimdimm_H_h - if(!op && cmode!=15 && o2) UNALLOCATED(ENC_UNALLOCATED_1058_ASIMDIMM); - if(!op && (cmode&13)==8 && !o2 && HasAdvSIMD()) return MOVI_advsimd(ctx, dec); // -> MOVI_asimdimm_L_hl - if(!op && (cmode&13)==9 && !o2 && HasAdvSIMD()) return ORR_advsimd_imm(ctx, dec); // -> ORR_asimdimm_L_hl - if(!op && (cmode&14)==12 && !o2 && HasAdvSIMD()) return MOVI_advsimd(ctx, dec); // -> MOVI_asimdimm_M_sm - if(op && (cmode&13)==8 && !o2 && HasAdvSIMD()) return MVNI_advsimd(ctx, dec); // -> MVNI_asimdimm_L_hl - if(op && (cmode&13)==9 && !o2 && HasAdvSIMD()) return BIC_advsimd_imm(ctx, dec); // -> BIC_asimdimm_L_hl - if(op && (cmode&14)==12 && !o2 && HasAdvSIMD()) return MVNI_advsimd(ctx, dec); // -> MVNI_asimdimm_M_sm - if(!op && !(cmode&9) && !o2 && HasAdvSIMD()) return MOVI_advsimd(ctx, dec); // -> MOVI_asimdimm_L_sl - if(!op && (cmode&9)==1 && !o2 && HasAdvSIMD()) return ORR_advsimd_imm(ctx, dec); // -> ORR_asimdimm_L_sl - if(op && !(cmode&9) && !o2 && HasAdvSIMD()) return MVNI_advsimd(ctx, dec); // -> MVNI_asimdimm_L_sl - if(op && (cmode&9)==1 && !o2 && HasAdvSIMD()) return BIC_advsimd_imm(ctx, dec); // -> BIC_asimdimm_L_sl - if(op && o2) UNALLOCATED(ENC_UNALLOCATED_1057_ASIMDIMM); - UNMATCHED; -} - -int decode_iclass_asimdperm(context *ctx, Instruction *dec) -{ - uint32_t opcode=(INSWORD>>12)&7; - if(opcode==1 && HasAdvSIMD()) return UZP1_advsimd(ctx, dec); // -> UZP1_asimdperm_only - if(opcode==2 && HasAdvSIMD()) return TRN1_advsimd(ctx, dec); // -> TRN1_asimdperm_only - if(opcode==3 && HasAdvSIMD()) return ZIP1_advsimd(ctx, dec); // -> ZIP1_asimdperm_only - if(opcode==5 && HasAdvSIMD()) return UZP2_advsimd(ctx, dec); // -> UZP2_asimdperm_only - if(opcode==6 && HasAdvSIMD()) return TRN2_advsimd(ctx, dec); // -> TRN2_asimdperm_only - if(opcode==7 && HasAdvSIMD()) return ZIP2_advsimd(ctx, dec); // -> ZIP2_asimdperm_only - if(!(opcode&3)) UNALLOCATED(ENC_UNALLOCATED_1060_ASIMDPERM); - UNMATCHED; -} - -int decode_iclass_asisdone(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>29)&1, imm4=(INSWORD>>11)&15; - if(!op && !imm4 && HasAdvSIMD()) return DUP_advsimd_elt(ctx, dec); // -> DUP_asisdone_only - if(!op && imm4) UNALLOCATED(ENC_UNALLOCATED_1062_ASISDONE); - if(op) UNALLOCATED(ENC_UNALLOCATED_1061_ASISDONE); - UNMATCHED; -} - -int decode_iclass_asisdpair(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&0x1f; - if(!U && !size && opcode==12 && HasAdvSIMD() && HasFP16()) return FMAXNMP_advsimd_pair(ctx, dec); // -> FMAXNMP_asisdpair_only_H - if(!U && !size && opcode==13 && HasAdvSIMD() && HasFP16()) return FADDP_advsimd_pair(ctx, dec); // -> FADDP_asisdpair_only_H - if(!U && !size && opcode==15 && HasAdvSIMD() && HasFP16()) return FMAXP_advsimd_pair(ctx, dec); // -> FMAXP_asisdpair_only_H - if(!U && size==2 && opcode==12 && HasAdvSIMD() && HasFP16()) return FMINNMP_advsimd_pair(ctx, dec); // -> FMINNMP_asisdpair_only_H - if(!U && size==2 && opcode==15 && HasAdvSIMD() && HasFP16()) return FMINP_advsimd_pair(ctx, dec); // -> FMINP_asisdpair_only_H - if(!U && size==3 && opcode==11) UNALLOCATED(ENC_UNALLOCATED_1073_ASISDPAIR); - if(!U && size==3 && opcode==0x1b && HasAdvSIMD()) return ADDP_advsimd_pair(ctx, dec); // -> ADDP_asisdpair_only - if(U && size==3 && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1074_ASISDPAIR); - if(size==2 && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1072_ASISDPAIR); - if(!U && size&1 && opcode==12) UNALLOCATED(ENC_UNALLOCATED_1071_ASISDPAIR); - if(!U && size==3 && (opcode&15)==10) UNALLOCATED(ENC_UNALLOCATED_1070_ASISDPAIR); - if(U && !(size&2) && opcode==12 && HasAdvSIMD()) return FMAXNMP_advsimd_pair(ctx, dec); // -> FMAXNMP_asisdpair_only_SD - if(U && !(size&2) && opcode==13 && HasAdvSIMD()) return FADDP_advsimd_pair(ctx, dec); // -> FADDP_asisdpair_only_SD - if(U && !(size&2) && opcode==15 && HasAdvSIMD()) return FMAXP_advsimd_pair(ctx, dec); // -> FMAXP_asisdpair_only_SD - if(U && (size&2)==2 && opcode==12 && HasAdvSIMD()) return FMINNMP_advsimd_pair(ctx, dec); // -> FMINNMP_asisdpair_only_SD - if(U && (size&2)==2 && opcode==15 && HasAdvSIMD()) return FMINP_advsimd_pair(ctx, dec); // -> FMINP_asisdpair_only_SD - if(!U && size&1 && (opcode&0x1d)==13) UNALLOCATED(ENC_UNALLOCATED_1069_ASISDPAIR); - if(!U && size==3 && (opcode&14)==8) UNALLOCATED(ENC_UNALLOCATED_1068_ASISDPAIR); - if(opcode==14) UNALLOCATED(ENC_UNALLOCATED_1067_ASISDPAIR); - if(!U && size!=3 && (opcode&12)==8) UNALLOCATED(ENC_UNALLOCATED_1066_ASISDPAIR); - if((opcode&0x1c)==0x1c) UNALLOCATED(ENC_UNALLOCATED_1065_ASISDPAIR); - if(U && (opcode&12)==8) UNALLOCATED(ENC_UNALLOCATED_1064_ASISDPAIR); - if(!(opcode&8)) UNALLOCATED(ENC_UNALLOCATED_1063_ASISDPAIR); - UNMATCHED; -} - -int decode_iclass_asisdshf(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, immh=(INSWORD>>19)&15, opcode=(INSWORD>>11)&0x1f; - if(!U && immh && opcode==14 && HasAdvSIMD()) return SQSHL_advsimd_imm(ctx, dec); // -> SQSHL_asisdshf_R - if(!U && immh && opcode==0x12 && HasAdvSIMD()) return SQSHRN_advsimd(ctx, dec); // -> SQSHRN_asisdshf_N - if(!U && immh && opcode==0x13 && HasAdvSIMD()) return SQRSHRN_advsimd(ctx, dec); // -> SQRSHRN_asisdshf_N - if(!U && immh && opcode==0x1c && HasAdvSIMD()) return SCVTF_advsimd_fix(ctx, dec); // -> SCVTF_asisdshf_C - if(!U && immh && opcode==0x1f && HasAdvSIMD()) return FCVTZS_advsimd_fix(ctx, dec); // -> FCVTZS_asisdshf_C - if(U && !immh && opcode==12) UNALLOCATED(ENC_UNALLOCATED_1091_ASISDSHF); - if(U && immh && opcode==12 && HasAdvSIMD()) return SQSHLU_advsimd(ctx, dec); // -> SQSHLU_asisdshf_R - if(U && immh && opcode==14 && HasAdvSIMD()) return UQSHL_advsimd_imm(ctx, dec); // -> UQSHL_asisdshf_R - if(U && immh && opcode==0x10 && HasAdvSIMD()) return SQSHRUN_advsimd(ctx, dec); // -> SQSHRUN_asisdshf_N - if(U && immh && opcode==0x11 && HasAdvSIMD()) return SQRSHRUN_advsimd(ctx, dec); // -> SQRSHRUN_asisdshf_N - if(U && immh && opcode==0x12 && HasAdvSIMD()) return UQSHRN_advsimd(ctx, dec); // -> UQSHRN_asisdshf_N - if(U && immh && opcode==0x13 && HasAdvSIMD()) return UQRSHRN_advsimd(ctx, dec); // -> UQRSHRN_asisdshf_N - if(U && immh && opcode==0x1c && HasAdvSIMD()) return UCVTF_advsimd_fix(ctx, dec); // -> UCVTF_asisdshf_C - if(U && immh && opcode==0x1f && HasAdvSIMD()) return FCVTZU_advsimd_fix(ctx, dec); // -> FCVTZU_asisdshf_C - if(!immh && opcode==0x1c) UNALLOCATED(ENC_UNALLOCATED_1089_ASISDSHF); - if(!immh && opcode==0x1f) UNALLOCATED(ENC_UNALLOCATED_1090_ASISDSHF); - if(immh && opcode==0x1e) UNALLOCATED(ENC_UNALLOCATED_1084_ASISDSHF); - if(U && !immh && (opcode&0x1e)==0x10) UNALLOCATED(ENC_UNALLOCATED_1088_ASISDSHF); - if(!immh && (opcode&15)==14) UNALLOCATED(ENC_UNALLOCATED_1087_ASISDSHF); - if(!immh && (opcode&0x1e)==0x12) UNALLOCATED(ENC_UNALLOCATED_1086_ASISDSHF); - if(!U && (immh&8)==8 && !opcode && HasAdvSIMD()) return SSHR_advsimd(ctx, dec); // -> SSHR_asisdshf_R - if(!U && (immh&8)==8 && opcode==2 && HasAdvSIMD()) return SSRA_advsimd(ctx, dec); // -> SSRA_asisdshf_R - if(!U && (immh&8)==8 && opcode==4 && HasAdvSIMD()) return SRSHR_advsimd(ctx, dec); // -> SRSHR_asisdshf_R - if(!U && (immh&8)==8 && opcode==6 && HasAdvSIMD()) return SRSRA_advsimd(ctx, dec); // -> SRSRA_asisdshf_R - if(!U && (immh&8)==8 && opcode==8) UNALLOCATED(ENC_UNALLOCATED_1085_ASISDSHF); - if(!U && (immh&8)==8 && opcode==10 && HasAdvSIMD()) return SHL_advsimd(ctx, dec); // -> SHL_asisdshf_R - if(U && (immh&8)==8 && !opcode && HasAdvSIMD()) return USHR_advsimd(ctx, dec); // -> USHR_asisdshf_R - if(U && (immh&8)==8 && opcode==2 && HasAdvSIMD()) return USRA_advsimd(ctx, dec); // -> USRA_asisdshf_R - if(U && (immh&8)==8 && opcode==4 && HasAdvSIMD()) return URSHR_advsimd(ctx, dec); // -> URSHR_asisdshf_R - if(U && (immh&8)==8 && opcode==6 && HasAdvSIMD()) return URSRA_advsimd(ctx, dec); // -> URSRA_asisdshf_R - if(U && (immh&8)==8 && opcode==8 && HasAdvSIMD()) return SRI_advsimd(ctx, dec); // -> SRI_asisdshf_R - if(U && (immh&8)==8 && opcode==10 && HasAdvSIMD()) return SLI_advsimd(ctx, dec); // -> SLI_asisdshf_R - if(!U && opcode==12) UNALLOCATED(ENC_UNALLOCATED_1083_ASISDSHF); - if(opcode==0x1d) UNALLOCATED(ENC_UNALLOCATED_1082_ASISDSHF); - if(!(immh&8) && (opcode&0x1d)==0x19) UNALLOCATED(ENC_UNALLOCATED_1081_ASISDSHF); - if(!U && (opcode&0x1e)==0x10) UNALLOCATED(ENC_UNALLOCATED_1080_ASISDSHF); - if(!(immh&8) && (opcode&13)==8) UNALLOCATED(ENC_UNALLOCATED_1078_ASISDSHF); - if(!(immh&8) && !(opcode&0x19)) UNALLOCATED(ENC_UNALLOCATED_1077_ASISDSHF); - if((immh&8)==8 && (opcode&0x1c)==0x18) UNALLOCATED(ENC_UNALLOCATED_1079_ASISDSHF); - if((opcode&0x1c)==0x14) UNALLOCATED(ENC_UNALLOCATED_1076_ASISDSHF); - if((opcode&0x11)==1) UNALLOCATED(ENC_UNALLOCATED_1075_ASISDSHF); - UNMATCHED; -} - -int decode_iclass_asisddiff(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, opcode=(INSWORD>>12)&15; - if(!U && opcode==9 && HasAdvSIMD()) return SQDMLAL_advsimd_vec(ctx, dec); // -> SQDMLAL_asisddiff_only - if(!U && opcode==11 && HasAdvSIMD()) return SQDMLSL_advsimd_vec(ctx, dec); // -> SQDMLSL_asisddiff_only - if(!U && opcode==13 && HasAdvSIMD()) return SQDMULL_advsimd_vec(ctx, dec); // -> SQDMULL_asisddiff_only - if(!U && opcode==15) UNALLOCATED(ENC_UNALLOCATED_1095_ASISDDIFF); - if(!U && (opcode&9)==8) UNALLOCATED(ENC_UNALLOCATED_1094_ASISDDIFF); - if(!U && !(opcode&8)) UNALLOCATED(ENC_UNALLOCATED_1093_ASISDDIFF); - if(U) UNALLOCATED(ENC_UNALLOCATED_1092_ASISDDIFF); - UNMATCHED; -} - -int decode_iclass_asisdsame(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>11)&0x1f; - if(!U && size==3 && opcode==6 && HasAdvSIMD()) return CMGT_advsimd_reg(ctx, dec); // -> CMGT_asisdsame_only - if(!U && size==3 && opcode==7 && HasAdvSIMD()) return CMGE_advsimd_reg(ctx, dec); // -> CMGE_asisdsame_only - if(!U && size==3 && opcode==8 && HasAdvSIMD()) return SSHL_advsimd(ctx, dec); // -> SSHL_asisdsame_only - if(!U && size==3 && opcode==10 && HasAdvSIMD()) return SRSHL_advsimd(ctx, dec); // -> SRSHL_asisdsame_only - if(!U && size==3 && opcode==0x10 && HasAdvSIMD()) return ADD_advsimd(ctx, dec); // -> ADD_asisdsame_only - if(!U && size==3 && opcode==0x11 && HasAdvSIMD()) return CMTST_advsimd(ctx, dec); // -> CMTST_asisdsame_only - if(U && size==3 && opcode==6 && HasAdvSIMD()) return CMHI_advsimd(ctx, dec); // -> CMHI_asisdsame_only - if(U && size==3 && opcode==7 && HasAdvSIMD()) return CMHS_advsimd(ctx, dec); // -> CMHS_asisdsame_only - if(U && size==3 && opcode==8 && HasAdvSIMD()) return USHL_advsimd(ctx, dec); // -> USHL_asisdsame_only - if(U && size==3 && opcode==10 && HasAdvSIMD()) return URSHL_advsimd(ctx, dec); // -> URSHL_asisdsame_only - if(U && size==3 && opcode==0x10 && HasAdvSIMD()) return SUB_advsimd(ctx, dec); // -> SUB_asisdsame_only - if(U && size==3 && opcode==0x11 && HasAdvSIMD()) return CMEQ_advsimd_reg(ctx, dec); // -> CMEQ_asisdsame_only - if(size==1 && opcode==6) UNALLOCATED(ENC_UNALLOCATED_1118_ASISDSAME); - if(size==3 && !opcode) UNALLOCATED(ENC_UNALLOCATED_1119_ASISDSAME); - if(size==3 && opcode==2) UNALLOCATED(ENC_UNALLOCATED_1120_ASISDSAME); - if(size==3 && opcode==0x15) UNALLOCATED(ENC_UNALLOCATED_1121_ASISDSAME); - if(size!=2 && opcode==0x14) UNALLOCATED(ENC_UNALLOCATED_1111_ASISDSAME); - if(size!=3 && opcode==7) UNALLOCATED(ENC_UNALLOCATED_1110_ASISDSAME); - if(!U && !(size&2) && opcode==0x1b && HasAdvSIMD()) return FMULX_advsimd_vec(ctx, dec); // -> FMULX_asisdsame_only - if(!U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCMEQ_advsimd_reg(ctx, dec); // -> FCMEQ_asisdsame_only - if(!U && !(size&2) && opcode==0x1f && HasAdvSIMD()) return FRECPS_advsimd(ctx, dec); // -> FRECPS_asisdsame_only - if(!U && (size&2)==2 && opcode==0x1a) UNALLOCATED(ENC_UNALLOCATED_1115_ASISDSAME); - if(!U && (size&2)==2 && opcode==0x1b) UNALLOCATED(ENC_UNALLOCATED_1116_ASISDSAME); - if(!U && (size&2)==2 && opcode==0x1c) UNALLOCATED(ENC_UNALLOCATED_1117_ASISDSAME); - if(!U && (size&2)==2 && opcode==0x1f && HasAdvSIMD()) return FRSQRTS_advsimd(ctx, dec); // -> FRSQRTS_asisdsame_only - if(U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCMGE_advsimd_reg(ctx, dec); // -> FCMGE_asisdsame_only - if(U && !(size&2) && opcode==0x1d && HasAdvSIMD()) return FACGE_advsimd(ctx, dec); // -> FACGE_asisdsame_only - if(U && (size&2)==2 && opcode==0x1a && HasAdvSIMD()) return FABD_advsimd(ctx, dec); // -> FABD_asisdsame_only - if(U && (size&2)==2 && opcode==0x1c && HasAdvSIMD()) return FCMGT_advsimd_reg(ctx, dec); // -> FCMGT_asisdsame_only - if(U && (size&2)==2 && opcode==0x1d && HasAdvSIMD()) return FACGT_advsimd(ctx, dec); // -> FACGT_asisdsame_only - if(size&1 && opcode==4) UNALLOCATED(ENC_UNALLOCATED_1114_ASISDSAME); - if((size&2)==2 && opcode==0x12) UNALLOCATED(ENC_UNALLOCATED_1112_ASISDSAME); - if((size&2)==2 && opcode==0x18) UNALLOCATED(ENC_UNALLOCATED_1113_ASISDSAME); - if(!U && opcode==1 && HasAdvSIMD()) return SQADD_advsimd(ctx, dec); // -> SQADD_asisdsame_only - if(!U && opcode==5 && HasAdvSIMD()) return SQSUB_advsimd(ctx, dec); // -> SQSUB_asisdsame_only - if(!U && opcode==9 && HasAdvSIMD()) return SQSHL_advsimd_reg(ctx, dec); // -> SQSHL_asisdsame_only - if(!U && opcode==11 && HasAdvSIMD()) return SQRSHL_advsimd(ctx, dec); // -> SQRSHL_asisdsame_only - if(!U && opcode==0x16 && HasAdvSIMD()) return SQDMULH_advsimd_vec(ctx, dec); // -> SQDMULH_asisdsame_only - if(!U && opcode==0x17) UNALLOCATED(ENC_UNALLOCATED_1107_ASISDSAME); - if(!U && opcode==0x1d) UNALLOCATED(ENC_UNALLOCATED_1108_ASISDSAME); - if(U && opcode==1 && HasAdvSIMD()) return UQADD_advsimd(ctx, dec); // -> UQADD_asisdsame_only - if(U && opcode==5 && HasAdvSIMD()) return UQSUB_advsimd(ctx, dec); // -> UQSUB_asisdsame_only - if(U && opcode==9 && HasAdvSIMD()) return UQSHL_advsimd_reg(ctx, dec); // -> UQSHL_asisdsame_only - if(U && opcode==11 && HasAdvSIMD()) return UQRSHL_advsimd(ctx, dec); // -> UQRSHL_asisdsame_only - if(U && opcode==0x16 && HasAdvSIMD()) return SQRDMULH_advsimd_vec(ctx, dec); // -> SQRDMULH_asisdsame_only - if(U && opcode==0x1b) UNALLOCATED(ENC_UNALLOCATED_1109_ASISDSAME); - if(opcode==0x19) UNALLOCATED(ENC_UNALLOCATED_1105_ASISDSAME); - if(opcode==0x1e) UNALLOCATED(ENC_UNALLOCATED_1106_ASISDSAME); - if(size&1 && (opcode&0x1d)==12) UNALLOCATED(ENC_UNALLOCATED_1104_ASISDSAME); - if(!(size&2) && (opcode&0x1b)==0x11) UNALLOCATED(ENC_UNALLOCATED_1101_ASISDSAME); - if(size==2 && !(opcode&0x15)) UNALLOCATED(ENC_UNALLOCATED_1102_ASISDSAME); - if(size==2 && (opcode&0x1a)==0x10) UNALLOCATED(ENC_UNALLOCATED_1103_ASISDSAME); - if(U && (opcode&0x17)==0x17) UNALLOCATED(ENC_UNALLOCATED_1100_ASISDSAME); - if((opcode&15)==3) UNALLOCATED(ENC_UNALLOCATED_1099_ASISDSAME); - if((opcode&0x1d)==13) UNALLOCATED(ENC_UNALLOCATED_1098_ASISDSAME); - if(!(size&1) && (opcode&0x15)==4) UNALLOCATED(ENC_UNALLOCATED_1097_ASISDSAME); - if(!(size&2) && !(opcode&5)) UNALLOCATED(ENC_UNALLOCATED_1096_ASISDSAME); - UNMATCHED; -} - -int decode_iclass_asisdsamefp16(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, a=(INSWORD>>23)&1, opcode=(INSWORD>>11)&7; - if(!U && !a && opcode==3 && HasAdvSIMD() && HasFP16()) return FMULX_advsimd_vec(ctx, dec); // -> FMULX_asisdsamefp16_only - if(!U && !a && opcode==4 && HasAdvSIMD() && HasFP16()) return FCMEQ_advsimd_reg(ctx, dec); // -> FCMEQ_asisdsamefp16_only - if(!U && !a && opcode==6) UNALLOCATED(ENC_UNALLOCATED_1128_ASISDSAMEFP16); - if(!U && !a && opcode==7 && HasAdvSIMD() && HasFP16()) return FRECPS_advsimd(ctx, dec); // -> FRECPS_asisdsamefp16_only - if(!U && a && opcode==3) UNALLOCATED(ENC_UNALLOCATED_1129_ASISDSAMEFP16); - if(!U && a && opcode==4) UNALLOCATED(ENC_UNALLOCATED_1130_ASISDSAMEFP16); - if(!U && a && opcode==7 && HasAdvSIMD() && HasFP16()) return FRSQRTS_advsimd(ctx, dec); // -> FRSQRTS_asisdsamefp16_only - if(U && !a && opcode==4 && HasAdvSIMD() && HasFP16()) return FCMGE_advsimd_reg(ctx, dec); // -> FCMGE_asisdsamefp16_only - if(U && !a && opcode==5 && HasAdvSIMD() && HasFP16()) return FACGE_advsimd(ctx, dec); // -> FACGE_asisdsamefp16_only - if(U && a && opcode==2 && HasAdvSIMD() && HasFP16()) return FABD_advsimd(ctx, dec); // -> FABD_asisdsamefp16_only - if(U && a && opcode==4 && HasAdvSIMD() && HasFP16()) return FCMGT_advsimd_reg(ctx, dec); // -> FCMGT_asisdsamefp16_only - if(U && a && opcode==5 && HasAdvSIMD() && HasFP16()) return FACGT_advsimd(ctx, dec); // -> FACGT_asisdsamefp16_only - if(!a && opcode==2) UNALLOCATED(ENC_UNALLOCATED_1127_ASISDSAMEFP16); - if(!U && opcode==5) UNALLOCATED(ENC_UNALLOCATED_1125_ASISDSAMEFP16); - if(!U && a && (opcode&3)==2) UNALLOCATED(ENC_UNALLOCATED_1124_ASISDSAMEFP16); - if(U && opcode==3) UNALLOCATED(ENC_UNALLOCATED_1126_ASISDSAMEFP16); - if(U && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_1123_ASISDSAMEFP16); - if(!(opcode&6)) UNALLOCATED(ENC_UNALLOCATED_1122_ASISDSAMEFP16); - UNMATCHED; -} - -int decode_iclass_asisdsame2(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, opcode=(INSWORD>>11)&15; - if(U && !opcode && HasRDM()) return SQRDMLAH_advsimd_vec(ctx, dec); // -> SQRDMLAH_asisdsame2_only - if(U && opcode==1 && HasRDM()) return SQRDMLSH_advsimd_vec(ctx, dec); // -> SQRDMLSH_asisdsame2_only - if(U && (opcode&14)==2) UNALLOCATED(ENC_UNALLOCATED_1134_ASISDSAME2); - if(U && (opcode&12)==4) UNALLOCATED(ENC_UNALLOCATED_1133_ASISDSAME2); - if(U && (opcode&8)==8) UNALLOCATED(ENC_UNALLOCATED_1132_ASISDSAME2); - if(!U) UNALLOCATED(ENC_UNALLOCATED_1131_ASISDSAME2); - UNMATCHED; -} - -int decode_iclass_asisdmisc(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&0x1f; - if(!U && size==2 && opcode==10) UNALLOCATED(ENC_UNALLOCATED_1152_ASISDMISC); - if(!U && size==3 && opcode==8 && HasAdvSIMD()) return CMGT_advsimd_zero(ctx, dec); // -> CMGT_asisdmisc_Z - if(!U && size==3 && opcode==9 && HasAdvSIMD()) return CMEQ_advsimd_zero(ctx, dec); // -> CMEQ_asisdmisc_Z - if(!U && size==3 && opcode==10 && HasAdvSIMD()) return CMLT_advsimd(ctx, dec); // -> CMLT_asisdmisc_Z - if(!U && size==3 && opcode==11 && HasAdvSIMD()) return ABS_advsimd(ctx, dec); // -> ABS_asisdmisc_R - if(U && !size && opcode==0x16) UNALLOCATED(ENC_UNALLOCATED_1153_ASISDMISC); - if(U && size==1 && opcode==0x16 && HasAdvSIMD()) return FCVTXN_advsimd(ctx, dec); // -> FCVTXN_asisdmisc_N - if(U && size==3 && opcode==8 && HasAdvSIMD()) return CMGE_advsimd_zero(ctx, dec); // -> CMGE_asisdmisc_Z - if(U && size==3 && opcode==9 && HasAdvSIMD()) return CMLE_advsimd(ctx, dec); // -> CMLE_asisdmisc_Z - if(U && size==3 && opcode==11 && HasAdvSIMD()) return NEG_advsimd(ctx, dec); // -> NEG_asisdmisc_R - if(size==2 && opcode==8) UNALLOCATED(ENC_UNALLOCATED_1151_ASISDMISC); - if(!U && !(size&2) && opcode==0x1a && HasAdvSIMD()) return FCVTNS_advsimd(ctx, dec); // -> FCVTNS_asisdmisc_R - if(!U && !(size&2) && opcode==0x1b && HasAdvSIMD()) return FCVTMS_advsimd(ctx, dec); // -> FCVTMS_asisdmisc_R - if(!U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCVTAS_advsimd(ctx, dec); // -> FCVTAS_asisdmisc_R - if(!U && !(size&2) && opcode==0x1d && HasAdvSIMD()) return SCVTF_advsimd_int(ctx, dec); // -> SCVTF_asisdmisc_R - if(!U && (size&2)==2 && opcode==12 && HasAdvSIMD()) return FCMGT_advsimd_zero(ctx, dec); // -> FCMGT_asisdmisc_FZ - if(!U && (size&2)==2 && opcode==13 && HasAdvSIMD()) return FCMEQ_advsimd_zero(ctx, dec); // -> FCMEQ_asisdmisc_FZ - if(!U && (size&2)==2 && opcode==14 && HasAdvSIMD()) return FCMLT_advsimd(ctx, dec); // -> FCMLT_asisdmisc_FZ - if(!U && (size&2)==2 && opcode==0x1a && HasAdvSIMD()) return FCVTPS_advsimd(ctx, dec); // -> FCVTPS_asisdmisc_R - if(!U && (size&2)==2 && opcode==0x1b && HasAdvSIMD()) return FCVTZS_advsimd_int(ctx, dec); // -> FCVTZS_asisdmisc_R - if(!U && (size&2)==2 && opcode==0x1d && HasAdvSIMD()) return FRECPE_advsimd(ctx, dec); // -> FRECPE_asisdmisc_R - if(!U && (size&2)==2 && opcode==0x1e) UNALLOCATED(ENC_UNALLOCATED_1149_ASISDMISC); - if(!U && (size&2)==2 && opcode==0x1f && HasAdvSIMD()) return FRECPX_advsimd(ctx, dec); // -> FRECPX_asisdmisc_R - if(U && !(size&2) && opcode==0x1a && HasAdvSIMD()) return FCVTNU_advsimd(ctx, dec); // -> FCVTNU_asisdmisc_R - if(U && !(size&2) && opcode==0x1b && HasAdvSIMD()) return FCVTMU_advsimd(ctx, dec); // -> FCVTMU_asisdmisc_R - if(U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCVTAU_advsimd(ctx, dec); // -> FCVTAU_asisdmisc_R - if(U && !(size&2) && opcode==0x1d && HasAdvSIMD()) return UCVTF_advsimd_int(ctx, dec); // -> UCVTF_asisdmisc_R - if(U && (size&2)==2 && opcode==12 && HasAdvSIMD()) return FCMGE_advsimd_zero(ctx, dec); // -> FCMGE_asisdmisc_FZ - if(U && (size&2)==2 && opcode==13 && HasAdvSIMD()) return FCMLE_advsimd(ctx, dec); // -> FCMLE_asisdmisc_FZ - if(U && (size&2)==2 && opcode==0x1a && HasAdvSIMD()) return FCVTPU_advsimd(ctx, dec); // -> FCVTPU_asisdmisc_R - if(U && (size&2)==2 && opcode==0x1b && HasAdvSIMD()) return FCVTZU_advsimd_int(ctx, dec); // -> FCVTZU_asisdmisc_R - if(U && (size&2)==2 && opcode==0x1d && HasAdvSIMD()) return FRSQRTE_advsimd(ctx, dec); // -> FRSQRTE_asisdmisc_R - if(U && (size&2)==2 && opcode==0x1f) UNALLOCATED(ENC_UNALLOCATED_1150_ASISDMISC); - if((size&2)==2 && opcode==15) UNALLOCATED(ENC_UNALLOCATED_1147_ASISDMISC); - if((size&2)==2 && opcode==0x1c) UNALLOCATED(ENC_UNALLOCATED_1148_ASISDMISC); - if(size==2 && (opcode&0x1d)==9) UNALLOCATED(ENC_UNALLOCATED_1146_ASISDMISC); - if(!U && opcode==3 && HasAdvSIMD()) return SUQADD_advsimd(ctx, dec); // -> SUQADD_asisdmisc_R - if(!U && opcode==7 && HasAdvSIMD()) return SQABS_advsimd(ctx, dec); // -> SQABS_asisdmisc_R - if(!U && opcode==0x12) UNALLOCATED(ENC_UNALLOCATED_1142_ASISDMISC); - if(!U && opcode==0x14 && HasAdvSIMD()) return SQXTN_advsimd(ctx, dec); // -> SQXTN_asisdmisc_N - if(!U && opcode==0x16) UNALLOCATED(ENC_UNALLOCATED_1143_ASISDMISC); - if(U && opcode==3 && HasAdvSIMD()) return USQADD_advsimd(ctx, dec); // -> USQADD_asisdmisc_R - if(U && opcode==7 && HasAdvSIMD()) return SQNEG_advsimd(ctx, dec); // -> SQNEG_asisdmisc_R - if(U && opcode==0x12 && HasAdvSIMD()) return SQXTUN_advsimd(ctx, dec); // -> SQXTUN_asisdmisc_N - if(U && opcode==0x14 && HasAdvSIMD()) return UQXTN_advsimd(ctx, dec); // -> UQXTN_asisdmisc_N - if(U && (size&2)==2 && (opcode&0x1b)==10) UNALLOCATED(ENC_UNALLOCATED_1144_ASISDMISC); - if(U && (size&2)==2 && (opcode&0x17)==0x16) UNALLOCATED(ENC_UNALLOCATED_1145_ASISDMISC); - if(opcode==0x19) UNALLOCATED(ENC_UNALLOCATED_1141_ASISDMISC); - if(!(size&2) && (opcode&0x1e)==0x1e) UNALLOCATED(ENC_UNALLOCATED_1140_ASISDMISC); - if((opcode&0x1b)==1) UNALLOCATED(ENC_UNALLOCATED_1138_ASISDMISC); - if((opcode&0x17)==0x10) UNALLOCATED(ENC_UNALLOCATED_1139_ASISDMISC); - if(!(opcode&0x19)) UNALLOCATED(ENC_UNALLOCATED_1136_ASISDMISC); - if((opcode&0x19)==0x11) UNALLOCATED(ENC_UNALLOCATED_1137_ASISDMISC); - if(!(size&2) && (opcode&0x18)==8) UNALLOCATED(ENC_UNALLOCATED_1135_ASISDMISC); - UNMATCHED; -} - -int decode_iclass_asisdmiscfp16(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, a=(INSWORD>>23)&1, opcode=(INSWORD>>12)&0x1f; - if(!U && !a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTNS_advsimd(ctx, dec); // -> FCVTNS_asisdmiscfp16_R - if(!U && !a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTMS_advsimd(ctx, dec); // -> FCVTMS_asisdmiscfp16_R - if(!U && !a && opcode==0x1c && HasAdvSIMD() && HasFP16()) return FCVTAS_advsimd(ctx, dec); // -> FCVTAS_asisdmiscfp16_R - if(!U && !a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return SCVTF_advsimd_int(ctx, dec); // -> SCVTF_asisdmiscfp16_R - if(!U && a && opcode==12 && HasAdvSIMD() && HasFP16()) return FCMGT_advsimd_zero(ctx, dec); // -> FCMGT_asisdmiscfp16_FZ - if(!U && a && opcode==13 && HasAdvSIMD() && HasFP16()) return FCMEQ_advsimd_zero(ctx, dec); // -> FCMEQ_asisdmiscfp16_FZ - if(!U && a && opcode==14 && HasAdvSIMD() && HasFP16()) return FCMLT_advsimd(ctx, dec); // -> FCMLT_asisdmiscfp16_FZ - if(!U && a && opcode==15) UNALLOCATED(ENC_UNALLOCATED_1162_ASISDMISCFP16); - if(!U && a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTPS_advsimd(ctx, dec); // -> FCVTPS_asisdmiscfp16_R - if(!U && a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTZS_advsimd_int(ctx, dec); // -> FCVTZS_asisdmiscfp16_R - if(!U && a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return FRECPE_advsimd(ctx, dec); // -> FRECPE_asisdmiscfp16_R - if(!U && a && opcode==0x1e) UNALLOCATED(ENC_UNALLOCATED_1163_ASISDMISCFP16); - if(!U && a && opcode==0x1f && HasAdvSIMD() && HasFP16()) return FRECPX_advsimd(ctx, dec); // -> FRECPX_asisdmiscfp16_R - if(U && !a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTNU_advsimd(ctx, dec); // -> FCVTNU_asisdmiscfp16_R - if(U && !a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTMU_advsimd(ctx, dec); // -> FCVTMU_asisdmiscfp16_R - if(U && !a && opcode==0x1c && HasAdvSIMD() && HasFP16()) return FCVTAU_advsimd(ctx, dec); // -> FCVTAU_asisdmiscfp16_R - if(U && !a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return UCVTF_advsimd_int(ctx, dec); // -> UCVTF_asisdmiscfp16_R - if(U && a && opcode==12 && HasAdvSIMD() && HasFP16()) return FCMGE_advsimd_zero(ctx, dec); // -> FCMGE_asisdmiscfp16_FZ - if(U && a && opcode==13 && HasAdvSIMD() && HasFP16()) return FCMLE_advsimd(ctx, dec); // -> FCMLE_asisdmiscfp16_FZ - if(U && a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTPU_advsimd(ctx, dec); // -> FCVTPU_asisdmiscfp16_R - if(U && a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTZU_advsimd_int(ctx, dec); // -> FCVTZU_asisdmiscfp16_R - if(U && a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return FRSQRTE_advsimd(ctx, dec); // -> FRSQRTE_asisdmiscfp16_R - if(a && opcode==0x1c) UNALLOCATED(ENC_UNALLOCATED_1161_ASISDMISCFP16); - if(!U && !a && (opcode&0x1e)==0x1e) UNALLOCATED(ENC_UNALLOCATED_1159_ASISDMISCFP16); - if(U && a && (opcode&0x1e)==14) UNALLOCATED(ENC_UNALLOCATED_1160_ASISDMISCFP16); - if(U && (opcode&0x1e)==0x1e) UNALLOCATED(ENC_UNALLOCATED_1158_ASISDMISCFP16); - if((opcode&0x1e)==0x18) UNALLOCATED(ENC_UNALLOCATED_1157_ASISDMISCFP16); - if(a && (opcode&0x1c)==8) UNALLOCATED(ENC_UNALLOCATED_1156_ASISDMISCFP16); - if(!a && (opcode&0x18)==8) UNALLOCATED(ENC_UNALLOCATED_1155_ASISDMISCFP16); - if(!(opcode&8)) UNALLOCATED(ENC_UNALLOCATED_1154_ASISDMISCFP16); - UNMATCHED; -} - -int decode_iclass_asisdelem(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&15; - if(!U && !size && opcode==1 && HasAdvSIMD() && HasFP16()) return FMLA_advsimd_elt(ctx, dec); // -> FMLA_asisdelem_RH_H - if(!U && !size && opcode==5 && HasAdvSIMD() && HasFP16()) return FMLS_advsimd_elt(ctx, dec); // -> FMLS_asisdelem_RH_H - if(!U && !size && opcode==9 && HasAdvSIMD() && HasFP16()) return FMUL_advsimd_elt(ctx, dec); // -> FMUL_asisdelem_RH_H - if(U && !size && opcode==9 && HasAdvSIMD() && HasFP16()) return FMULX_advsimd_elt(ctx, dec); // -> FMULX_asisdelem_RH_H - if(size==1 && opcode==9) UNALLOCATED(ENC_UNALLOCATED_1171_ASISDELEM); - if(!U && size==1 && (opcode&11)==1) UNALLOCATED(ENC_UNALLOCATED_1170_ASISDELEM); - if(!U && (size&2)==2 && opcode==1 && HasAdvSIMD()) return FMLA_advsimd_elt(ctx, dec); // -> FMLA_asisdelem_R_SD - if(!U && (size&2)==2 && opcode==5 && HasAdvSIMD()) return FMLS_advsimd_elt(ctx, dec); // -> FMLS_asisdelem_R_SD - if(!U && (size&2)==2 && opcode==9 && HasAdvSIMD()) return FMUL_advsimd_elt(ctx, dec); // -> FMUL_asisdelem_R_SD - if(U && (size&2)==2 && opcode==9 && HasAdvSIMD()) return FMULX_advsimd_elt(ctx, dec); // -> FMULX_asisdelem_R_SD - if(!U && opcode==3 && HasAdvSIMD()) return SQDMLAL_advsimd_elt(ctx, dec); // -> SQDMLAL_asisdelem_L - if(!U && opcode==7 && HasAdvSIMD()) return SQDMLSL_advsimd_elt(ctx, dec); // -> SQDMLSL_asisdelem_L - if(!U && opcode==11 && HasAdvSIMD()) return SQDMULL_advsimd_elt(ctx, dec); // -> SQDMULL_asisdelem_L - if(!U && opcode==12 && HasAdvSIMD()) return SQDMULH_advsimd_elt(ctx, dec); // -> SQDMULH_asisdelem_R - if(!U && opcode==13 && HasAdvSIMD()) return SQRDMULH_advsimd_elt(ctx, dec); // -> SQRDMULH_asisdelem_R - if(U && opcode==11) UNALLOCATED(ENC_UNALLOCATED_1169_ASISDELEM); - if(U && opcode==13 && HasRDM()) return SQRDMLAH_advsimd_elt(ctx, dec); // -> SQRDMLAH_asisdelem_R - if(U && opcode==15 && HasRDM()) return SQRDMLSH_advsimd_elt(ctx, dec); // -> SQRDMLSH_asisdelem_R - if(!U && (opcode&13)==8) UNALLOCATED(ENC_UNALLOCATED_1167_ASISDELEM); - if(!U && (opcode&14)==14) UNALLOCATED(ENC_UNALLOCATED_1168_ASISDELEM); - if(!U && !(opcode&9)) UNALLOCATED(ENC_UNALLOCATED_1165_ASISDELEM); - if(U && (opcode&9)==8) UNALLOCATED(ENC_UNALLOCATED_1166_ASISDELEM); - if(U && !(opcode&8)) UNALLOCATED(ENC_UNALLOCATED_1164_ASISDELEM); - UNMATCHED; -} - -int decode_iclass_asimdshf(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, immh=(INSWORD>>19)&15, opcode=(INSWORD>>11)&0x1f; - if(!U && immh && !opcode && HasAdvSIMD()) return SSHR_advsimd(ctx, dec); // -> SSHR_asimdshf_R - if(!U && immh && opcode==2 && HasAdvSIMD()) return SSRA_advsimd(ctx, dec); // -> SSRA_asimdshf_R - if(!U && immh && opcode==4 && HasAdvSIMD()) return SRSHR_advsimd(ctx, dec); // -> SRSHR_asimdshf_R - if(!U && immh && opcode==6 && HasAdvSIMD()) return SRSRA_advsimd(ctx, dec); // -> SRSRA_asimdshf_R - if(!U && immh && opcode==10 && HasAdvSIMD()) return SHL_advsimd(ctx, dec); // -> SHL_asimdshf_R - if(!U && immh && opcode==14 && HasAdvSIMD()) return SQSHL_advsimd_imm(ctx, dec); // -> SQSHL_asimdshf_R - if(!U && immh && opcode==0x10 && HasAdvSIMD()) return SHRN_advsimd(ctx, dec); // -> SHRN_asimdshf_N - if(!U && immh && opcode==0x11 && HasAdvSIMD()) return RSHRN_advsimd(ctx, dec); // -> RSHRN_asimdshf_N - if(!U && immh && opcode==0x12 && HasAdvSIMD()) return SQSHRN_advsimd(ctx, dec); // -> SQSHRN_asimdshf_N - if(!U && immh && opcode==0x13 && HasAdvSIMD()) return SQRSHRN_advsimd(ctx, dec); // -> SQRSHRN_asimdshf_N - if(!U && immh && opcode==0x14 && HasAdvSIMD()) return SSHLL_advsimd(ctx, dec); // -> SSHLL_asimdshf_L - if(!U && immh && opcode==0x1c && HasAdvSIMD()) return SCVTF_advsimd_fix(ctx, dec); // -> SCVTF_asimdshf_C - if(!U && immh && opcode==0x1f && HasAdvSIMD()) return FCVTZS_advsimd_fix(ctx, dec); // -> FCVTZS_asimdshf_C - if(U && immh && !opcode && HasAdvSIMD()) return USHR_advsimd(ctx, dec); // -> USHR_asimdshf_R - if(U && immh && opcode==2 && HasAdvSIMD()) return USRA_advsimd(ctx, dec); // -> USRA_asimdshf_R - if(U && immh && opcode==4 && HasAdvSIMD()) return URSHR_advsimd(ctx, dec); // -> URSHR_asimdshf_R - if(U && immh && opcode==6 && HasAdvSIMD()) return URSRA_advsimd(ctx, dec); // -> URSRA_asimdshf_R - if(U && immh && opcode==8 && HasAdvSIMD()) return SRI_advsimd(ctx, dec); // -> SRI_asimdshf_R - if(U && immh && opcode==10 && HasAdvSIMD()) return SLI_advsimd(ctx, dec); // -> SLI_asimdshf_R - if(U && immh && opcode==12 && HasAdvSIMD()) return SQSHLU_advsimd(ctx, dec); // -> SQSHLU_asimdshf_R - if(U && immh && opcode==14 && HasAdvSIMD()) return UQSHL_advsimd_imm(ctx, dec); // -> UQSHL_asimdshf_R - if(U && immh && opcode==0x10 && HasAdvSIMD()) return SQSHRUN_advsimd(ctx, dec); // -> SQSHRUN_asimdshf_N - if(U && immh && opcode==0x11 && HasAdvSIMD()) return SQRSHRUN_advsimd(ctx, dec); // -> SQRSHRUN_asimdshf_N - if(U && immh && opcode==0x12 && HasAdvSIMD()) return UQSHRN_advsimd(ctx, dec); // -> UQSHRN_asimdshf_N - if(U && immh && opcode==0x13 && HasAdvSIMD()) return UQRSHRN_advsimd(ctx, dec); // -> UQRSHRN_asimdshf_N - if(U && immh && opcode==0x14 && HasAdvSIMD()) return USHLL_advsimd(ctx, dec); // -> USHLL_asimdshf_L - if(U && immh && opcode==0x1c && HasAdvSIMD()) return UCVTF_advsimd_fix(ctx, dec); // -> UCVTF_asimdshf_C - if(U && immh && opcode==0x1f && HasAdvSIMD()) return FCVTZU_advsimd_fix(ctx, dec); // -> FCVTZU_asimdshf_C - if(immh && opcode==0x1d) UNALLOCATED(ENC_UNALLOCATED_1177_ASIMDSHF); - if(!U && immh && (opcode&0x1b)==8) UNALLOCATED(ENC_UNALLOCATED_1176_ASIMDSHF); - if(immh && (opcode&0x17)==0x16) UNALLOCATED(ENC_UNALLOCATED_1175_ASIMDSHF); - if(immh && (opcode&0x1d)==0x15) UNALLOCATED(ENC_UNALLOCATED_1174_ASIMDSHF); - if(immh && (opcode&0x1c)==0x18) UNALLOCATED(ENC_UNALLOCATED_1173_ASIMDSHF); - if(immh && (opcode&0x11)==1) UNALLOCATED(ENC_UNALLOCATED_1172_ASIMDSHF); - UNMATCHED; -} - -int decode_iclass_asimdtbl(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>30)&1, op2=(INSWORD>>22)&3, len=(INSWORD>>13)&3, op=(INSWORD>>12)&1; - if(!op2 && !len && !op && HasAdvSIMD()) return TBL_advsimd(ctx, dec); // -> TBL_asimdtbl_L1_1 - if(!op2 && !len && op && HasAdvSIMD()) return TBX_advsimd(ctx, dec); // -> TBX_asimdtbl_L1_1 - if(!op2 && len==1 && !op && HasAdvSIMD()) return TBL_advsimd(ctx, dec); // -> TBL_asimdtbl_L2_2 - if(!op2 && len==1 && op && HasAdvSIMD()) return TBX_advsimd(ctx, dec); // -> TBX_asimdtbl_L2_2 - if(!op2 && len==2 && !op && HasAdvSIMD()) return TBL_advsimd(ctx, dec); // -> TBL_asimdtbl_L3_3 - if(!op2 && len==2 && op && HasAdvSIMD()) return TBX_advsimd(ctx, dec); // -> TBX_asimdtbl_L3_3 - if(!op2 && len==3 && !op && HasAdvSIMD()) return TBL_advsimd(ctx, dec); // -> TBL_asimdtbl_L4_4 - if(!op2 && len==3 && op && HasAdvSIMD()) return TBX_advsimd(ctx, dec); // -> TBX_asimdtbl_L4_4 - if(Q && op2==1 && !(len&1) && !op) UNALLOCATED(ENC_UNALLOCATED_1180_ASIMDTBL); - if(Q && op2==1 && len&1 && !op && HasAdvSIMD() && HasLUT()) return LUTI4_advsimd(ctx, dec); // -> LUTI4_asimdtbl_L5 - if(Q && op2==1 && op && HasAdvSIMD() && HasLUT()) return LUTI4_advsimd(ctx, dec); // -> LUTI4_asimdtbl_L7 - if(Q && op2==2 && !op) UNALLOCATED(ENC_UNALLOCATED_1179_ASIMDTBL); - if(Q && op2==2 && op && HasAdvSIMD() && HasLUT()) return LUTI2_advsimd(ctx, dec); // -> LUTI2_asimdtbl_L5 - if(!Q && op2) UNALLOCATED(ENC_UNALLOCATED_1178_ASIMDTBL); - if(Q && op2==3 && HasAdvSIMD() && HasLUT()) return LUTI2_advsimd(ctx, dec); // -> LUTI2_asimdtbl_L6 - UNMATCHED; -} - -int decode_iclass_asimddiff(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, opcode=(INSWORD>>12)&15; - if(!U && !opcode && HasAdvSIMD()) return SADDL_advsimd(ctx, dec); // -> SADDL_asimddiff_L - if(!U && opcode==1 && HasAdvSIMD()) return SADDW_advsimd(ctx, dec); // -> SADDW_asimddiff_W - if(!U && opcode==2 && HasAdvSIMD()) return SSUBL_advsimd(ctx, dec); // -> SSUBL_asimddiff_L - if(!U && opcode==3 && HasAdvSIMD()) return SSUBW_advsimd(ctx, dec); // -> SSUBW_asimddiff_W - if(!U && opcode==4 && HasAdvSIMD()) return ADDHN_advsimd(ctx, dec); // -> ADDHN_asimddiff_N - if(!U && opcode==5 && HasAdvSIMD()) return SABAL_advsimd(ctx, dec); // -> SABAL_asimddiff_L - if(!U && opcode==6 && HasAdvSIMD()) return SUBHN_advsimd(ctx, dec); // -> SUBHN_asimddiff_N - if(!U && opcode==7 && HasAdvSIMD()) return SABDL_advsimd(ctx, dec); // -> SABDL_asimddiff_L - if(!U && opcode==8 && HasAdvSIMD()) return SMLAL_advsimd_vec(ctx, dec); // -> SMLAL_asimddiff_L - if(!U && opcode==9 && HasAdvSIMD()) return SQDMLAL_advsimd_vec(ctx, dec); // -> SQDMLAL_asimddiff_L - if(!U && opcode==10 && HasAdvSIMD()) return SMLSL_advsimd_vec(ctx, dec); // -> SMLSL_asimddiff_L - if(!U && opcode==11 && HasAdvSIMD()) return SQDMLSL_advsimd_vec(ctx, dec); // -> SQDMLSL_asimddiff_L - if(!U && opcode==12 && HasAdvSIMD()) return SMULL_advsimd_vec(ctx, dec); // -> SMULL_asimddiff_L - if(!U && opcode==13 && HasAdvSIMD()) return SQDMULL_advsimd_vec(ctx, dec); // -> SQDMULL_asimddiff_L - if(!U && opcode==14 && HasAdvSIMD()) return PMULL_advsimd(ctx, dec); // -> PMULL_asimddiff_L - if(!U && opcode==15) UNALLOCATED(ENC_UNALLOCATED_1182_ASIMDDIFF); - if(U && !opcode && HasAdvSIMD()) return UADDL_advsimd(ctx, dec); // -> UADDL_asimddiff_L - if(U && opcode==1 && HasAdvSIMD()) return UADDW_advsimd(ctx, dec); // -> UADDW_asimddiff_W - if(U && opcode==2 && HasAdvSIMD()) return USUBL_advsimd(ctx, dec); // -> USUBL_asimddiff_L - if(U && opcode==3 && HasAdvSIMD()) return USUBW_advsimd(ctx, dec); // -> USUBW_asimddiff_W - if(U && opcode==4 && HasAdvSIMD()) return RADDHN_advsimd(ctx, dec); // -> RADDHN_asimddiff_N - if(U && opcode==5 && HasAdvSIMD()) return UABAL_advsimd(ctx, dec); // -> UABAL_asimddiff_L - if(U && opcode==6 && HasAdvSIMD()) return RSUBHN_advsimd(ctx, dec); // -> RSUBHN_asimddiff_N - if(U && opcode==7 && HasAdvSIMD()) return UABDL_advsimd(ctx, dec); // -> UABDL_asimddiff_L - if(U && opcode==8 && HasAdvSIMD()) return UMLAL_advsimd_vec(ctx, dec); // -> UMLAL_asimddiff_L - if(U && opcode==10 && HasAdvSIMD()) return UMLSL_advsimd_vec(ctx, dec); // -> UMLSL_asimddiff_L - if(U && opcode==12 && HasAdvSIMD()) return UMULL_advsimd_vec(ctx, dec); // -> UMULL_asimddiff_L - if(U && opcode==14) UNALLOCATED(ENC_UNALLOCATED_1183_ASIMDDIFF); - if(U && (opcode&9)==9) UNALLOCATED(ENC_UNALLOCATED_1181_ASIMDDIFF); - UNMATCHED; -} - -int decode_iclass_asimdsame(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>11)&0x1f; - if(!U && !size && opcode==3 && HasAdvSIMD()) return AND_advsimd(ctx, dec); // -> AND_asimdsame_only - if(!U && !size && opcode==0x1d && HasFHM()) return FMLAL_advsimd_vec(ctx, dec); // -> FMLAL_asimdsame_F - if(!U && size==1 && opcode==3 && HasAdvSIMD()) return BIC_advsimd_reg(ctx, dec); // -> BIC_asimdsame_only - if(!U && size==2 && opcode==3 && HasAdvSIMD()) return ORR_advsimd_reg(ctx, dec); // -> ORR_asimdsame_only - if(!U && size==2 && opcode==0x1d && HasFHM()) return FMLSL_advsimd_vec(ctx, dec); // -> FMLSL_asimdsame_F - if(!U && size==3 && opcode==3 && HasAdvSIMD()) return ORN_advsimd(ctx, dec); // -> ORN_asimdsame_only - if(U && !size && opcode==3 && HasAdvSIMD()) return EOR_advsimd(ctx, dec); // -> EOR_asimdsame_only - if(U && !size && opcode==0x19 && HasFHM()) return FMLAL_advsimd_vec(ctx, dec); // -> FMLAL2_asimdsame_F - if(U && size==1 && opcode==3 && HasAdvSIMD()) return BSL_advsimd(ctx, dec); // -> BSL_asimdsame_only - if(U && size==2 && opcode==3 && HasAdvSIMD()) return BIT_advsimd(ctx, dec); // -> BIT_asimdsame_only - if(U && size==2 && opcode==0x19 && HasFHM()) return FMLSL_advsimd_vec(ctx, dec); // -> FMLSL2_asimdsame_F - if(U && size==3 && opcode==3 && HasAdvSIMD()) return BIF_advsimd(ctx, dec); // -> BIF_asimdsame_only - if(!U && size&1 && opcode==0x1d) UNALLOCATED(ENC_UNALLOCATED_1186_ASIMDSAME); - if(!U && !(size&2) && opcode==0x18 && HasAdvSIMD()) return FMAXNM_advsimd(ctx, dec); // -> FMAXNM_asimdsame_only - if(!U && !(size&2) && opcode==0x19 && HasAdvSIMD()) return FMLA_advsimd_vec(ctx, dec); // -> FMLA_asimdsame_only - if(!U && !(size&2) && opcode==0x1a && HasAdvSIMD()) return FADD_advsimd(ctx, dec); // -> FADD_asimdsame_only - if(!U && !(size&2) && opcode==0x1b && HasAdvSIMD()) return FMULX_advsimd_vec(ctx, dec); // -> FMULX_asimdsame_only - if(!U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCMEQ_advsimd_reg(ctx, dec); // -> FCMEQ_asimdsame_only - if(!U && !(size&2) && opcode==0x1e && HasAdvSIMD()) return FMAX_advsimd(ctx, dec); // -> FMAX_asimdsame_only - if(!U && !(size&2) && opcode==0x1f && HasAdvSIMD()) return FRECPS_advsimd(ctx, dec); // -> FRECPS_asimdsame_only - if(!U && (size&2)==2 && opcode==0x18 && HasAdvSIMD()) return FMINNM_advsimd(ctx, dec); // -> FMINNM_asimdsame_only - if(!U && (size&2)==2 && opcode==0x19 && HasAdvSIMD()) return FMLS_advsimd_vec(ctx, dec); // -> FMLS_asimdsame_only - if(!U && (size&2)==2 && opcode==0x1a && HasAdvSIMD()) return FSUB_advsimd(ctx, dec); // -> FSUB_asimdsame_only - if(!U && (size&2)==2 && opcode==0x1b && HasAdvSIMD() && HasFAMINMAX()) return FAMAX_advsimd(ctx, dec); // -> FAMAX_asimdsame_only - if(!U && (size&2)==2 && opcode==0x1c) UNALLOCATED(ENC_UNALLOCATED_1185_ASIMDSAME); - if(!U && (size&2)==2 && opcode==0x1e && HasAdvSIMD()) return FMIN_advsimd(ctx, dec); // -> FMIN_asimdsame_only - if(!U && (size&2)==2 && opcode==0x1f && HasAdvSIMD()) return FRSQRTS_advsimd(ctx, dec); // -> FRSQRTS_asimdsame_only - if(U && size&1 && opcode==0x19) UNALLOCATED(ENC_UNALLOCATED_1187_ASIMDSAME); - if(U && !(size&2) && opcode==0x18 && HasAdvSIMD()) return FMAXNMP_advsimd_vec(ctx, dec); // -> FMAXNMP_asimdsame_only - if(U && !(size&2) && opcode==0x1a && HasAdvSIMD()) return FADDP_advsimd_vec(ctx, dec); // -> FADDP_asimdsame_only - if(U && !(size&2) && opcode==0x1b && HasAdvSIMD()) return FMUL_advsimd_vec(ctx, dec); // -> FMUL_asimdsame_only - if(U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCMGE_advsimd_reg(ctx, dec); // -> FCMGE_asimdsame_only - if(U && !(size&2) && opcode==0x1d && HasAdvSIMD()) return FACGE_advsimd(ctx, dec); // -> FACGE_asimdsame_only - if(U && !(size&2) && opcode==0x1e && HasAdvSIMD()) return FMAXP_advsimd_vec(ctx, dec); // -> FMAXP_asimdsame_only - if(U && !(size&2) && opcode==0x1f && HasAdvSIMD()) return FDIV_advsimd(ctx, dec); // -> FDIV_asimdsame_only - if(U && (size&2)==2 && opcode==0x18 && HasAdvSIMD()) return FMINNMP_advsimd_vec(ctx, dec); // -> FMINNMP_asimdsame_only - if(U && (size&2)==2 && opcode==0x1a && HasAdvSIMD()) return FABD_advsimd(ctx, dec); // -> FABD_asimdsame_only - if(U && (size&2)==2 && opcode==0x1b && HasAdvSIMD() && HasFAMINMAX()) return FAMIN_advsimd(ctx, dec); // -> FAMIN_asimdsame_only - if(U && (size&2)==2 && opcode==0x1c && HasAdvSIMD()) return FCMGT_advsimd_reg(ctx, dec); // -> FCMGT_asimdsame_only - if(U && (size&2)==2 && opcode==0x1d && HasAdvSIMD()) return FACGT_advsimd(ctx, dec); // -> FACGT_asimdsame_only - if(U && (size&2)==2 && opcode==0x1e && HasAdvSIMD()) return FMINP_advsimd_vec(ctx, dec); // -> FMINP_asimdsame_only - if(U && (size&2)==2 && opcode==0x1f && HasFP8()) return FSCALE_advsimd(ctx, dec); // -> FSCALE_asimdsame_only - if(!U && !opcode && HasAdvSIMD()) return SHADD_advsimd(ctx, dec); // -> SHADD_asimdsame_only - if(!U && opcode==1 && HasAdvSIMD()) return SQADD_advsimd(ctx, dec); // -> SQADD_asimdsame_only - if(!U && opcode==2 && HasAdvSIMD()) return SRHADD_advsimd(ctx, dec); // -> SRHADD_asimdsame_only - if(!U && opcode==4 && HasAdvSIMD()) return SHSUB_advsimd(ctx, dec); // -> SHSUB_asimdsame_only - if(!U && opcode==5 && HasAdvSIMD()) return SQSUB_advsimd(ctx, dec); // -> SQSUB_asimdsame_only - if(!U && opcode==6 && HasAdvSIMD()) return CMGT_advsimd_reg(ctx, dec); // -> CMGT_asimdsame_only - if(!U && opcode==7 && HasAdvSIMD()) return CMGE_advsimd_reg(ctx, dec); // -> CMGE_asimdsame_only - if(!U && opcode==8 && HasAdvSIMD()) return SSHL_advsimd(ctx, dec); // -> SSHL_asimdsame_only - if(!U && opcode==9 && HasAdvSIMD()) return SQSHL_advsimd_reg(ctx, dec); // -> SQSHL_asimdsame_only - if(!U && opcode==10 && HasAdvSIMD()) return SRSHL_advsimd(ctx, dec); // -> SRSHL_asimdsame_only - if(!U && opcode==11 && HasAdvSIMD()) return SQRSHL_advsimd(ctx, dec); // -> SQRSHL_asimdsame_only - if(!U && opcode==12 && HasAdvSIMD()) return SMAX_advsimd(ctx, dec); // -> SMAX_asimdsame_only - if(!U && opcode==13 && HasAdvSIMD()) return SMIN_advsimd(ctx, dec); // -> SMIN_asimdsame_only - if(!U && opcode==14 && HasAdvSIMD()) return SABD_advsimd(ctx, dec); // -> SABD_asimdsame_only - if(!U && opcode==15 && HasAdvSIMD()) return SABA_advsimd(ctx, dec); // -> SABA_asimdsame_only - if(!U && opcode==0x10 && HasAdvSIMD()) return ADD_advsimd(ctx, dec); // -> ADD_asimdsame_only - if(!U && opcode==0x11 && HasAdvSIMD()) return CMTST_advsimd(ctx, dec); // -> CMTST_asimdsame_only - if(!U && opcode==0x12 && HasAdvSIMD()) return MLA_advsimd_vec(ctx, dec); // -> MLA_asimdsame_only - if(!U && opcode==0x13 && HasAdvSIMD()) return MUL_advsimd_vec(ctx, dec); // -> MUL_asimdsame_only - if(!U && opcode==0x14 && HasAdvSIMD()) return SMAXP_advsimd(ctx, dec); // -> SMAXP_asimdsame_only - if(!U && opcode==0x15 && HasAdvSIMD()) return SMINP_advsimd(ctx, dec); // -> SMINP_asimdsame_only - if(!U && opcode==0x16 && HasAdvSIMD()) return SQDMULH_advsimd_vec(ctx, dec); // -> SQDMULH_asimdsame_only - if(!U && opcode==0x17 && HasAdvSIMD()) return ADDP_advsimd_vec(ctx, dec); // -> ADDP_asimdsame_only - if(U && !opcode && HasAdvSIMD()) return UHADD_advsimd(ctx, dec); // -> UHADD_asimdsame_only - if(U && opcode==1 && HasAdvSIMD()) return UQADD_advsimd(ctx, dec); // -> UQADD_asimdsame_only - if(U && opcode==2 && HasAdvSIMD()) return URHADD_advsimd(ctx, dec); // -> URHADD_asimdsame_only - if(U && opcode==4 && HasAdvSIMD()) return UHSUB_advsimd(ctx, dec); // -> UHSUB_asimdsame_only - if(U && opcode==5 && HasAdvSIMD()) return UQSUB_advsimd(ctx, dec); // -> UQSUB_asimdsame_only - if(U && opcode==6 && HasAdvSIMD()) return CMHI_advsimd(ctx, dec); // -> CMHI_asimdsame_only - if(U && opcode==7 && HasAdvSIMD()) return CMHS_advsimd(ctx, dec); // -> CMHS_asimdsame_only - if(U && opcode==8 && HasAdvSIMD()) return USHL_advsimd(ctx, dec); // -> USHL_asimdsame_only - if(U && opcode==9 && HasAdvSIMD()) return UQSHL_advsimd_reg(ctx, dec); // -> UQSHL_asimdsame_only - if(U && opcode==10 && HasAdvSIMD()) return URSHL_advsimd(ctx, dec); // -> URSHL_asimdsame_only - if(U && opcode==11 && HasAdvSIMD()) return UQRSHL_advsimd(ctx, dec); // -> UQRSHL_asimdsame_only - if(U && opcode==12 && HasAdvSIMD()) return UMAX_advsimd(ctx, dec); // -> UMAX_asimdsame_only - if(U && opcode==13 && HasAdvSIMD()) return UMIN_advsimd(ctx, dec); // -> UMIN_asimdsame_only - if(U && opcode==14 && HasAdvSIMD()) return UABD_advsimd(ctx, dec); // -> UABD_asimdsame_only - if(U && opcode==15 && HasAdvSIMD()) return UABA_advsimd(ctx, dec); // -> UABA_asimdsame_only - if(U && opcode==0x10 && HasAdvSIMD()) return SUB_advsimd(ctx, dec); // -> SUB_asimdsame_only - if(U && opcode==0x11 && HasAdvSIMD()) return CMEQ_advsimd_reg(ctx, dec); // -> CMEQ_asimdsame_only - if(U && opcode==0x12 && HasAdvSIMD()) return MLS_advsimd_vec(ctx, dec); // -> MLS_asimdsame_only - if(U && opcode==0x13 && HasAdvSIMD()) return PMUL_advsimd(ctx, dec); // -> PMUL_asimdsame_only - if(U && opcode==0x14 && HasAdvSIMD()) return UMAXP_advsimd(ctx, dec); // -> UMAXP_asimdsame_only - if(U && opcode==0x15 && HasAdvSIMD()) return UMINP_advsimd(ctx, dec); // -> UMINP_asimdsame_only - if(U && opcode==0x16 && HasAdvSIMD()) return SQRDMULH_advsimd_vec(ctx, dec); // -> SQRDMULH_asimdsame_only - if(U && opcode==0x17) UNALLOCATED(ENC_UNALLOCATED_1184_ASIMDSAME); - UNMATCHED; -} - -int decode_iclass_asimdsamefp16(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, a=(INSWORD>>23)&1, opcode=(INSWORD>>11)&7; - if(!U && !a && !opcode && HasAdvSIMD() && HasFP16()) return FMAXNM_advsimd(ctx, dec); // -> FMAXNM_asimdsamefp16_only - if(!U && !a && opcode==1 && HasAdvSIMD() && HasFP16()) return FMLA_advsimd_vec(ctx, dec); // -> FMLA_asimdsamefp16_only - if(!U && !a && opcode==2 && HasAdvSIMD() && HasFP16()) return FADD_advsimd(ctx, dec); // -> FADD_asimdsamefp16_only - if(!U && !a && opcode==3 && HasAdvSIMD() && HasFP16()) return FMULX_advsimd_vec(ctx, dec); // -> FMULX_asimdsamefp16_only - if(!U && !a && opcode==4 && HasAdvSIMD() && HasFP16()) return FCMEQ_advsimd_reg(ctx, dec); // -> FCMEQ_asimdsamefp16_only - if(!U && !a && opcode==5) UNALLOCATED(ENC_UNALLOCATED_1190_ASIMDSAMEFP16); - if(!U && !a && opcode==6 && HasAdvSIMD() && HasFP16()) return FMAX_advsimd(ctx, dec); // -> FMAX_asimdsamefp16_only - if(!U && !a && opcode==7 && HasAdvSIMD() && HasFP16()) return FRECPS_advsimd(ctx, dec); // -> FRECPS_asimdsamefp16_only - if(!U && a && !opcode && HasAdvSIMD() && HasFP16()) return FMINNM_advsimd(ctx, dec); // -> FMINNM_asimdsamefp16_only - if(!U && a && opcode==1 && HasAdvSIMD() && HasFP16()) return FMLS_advsimd_vec(ctx, dec); // -> FMLS_asimdsamefp16_only - if(!U && a && opcode==2 && HasAdvSIMD() && HasFP16()) return FSUB_advsimd(ctx, dec); // -> FSUB_asimdsamefp16_only - if(!U && a && opcode==3 && HasAdvSIMD() && HasFAMINMAX()) return FAMAX_advsimd(ctx, dec); // -> FAMAX_asimdsamefp16_only - if(!U && a && opcode==6 && HasAdvSIMD() && HasFP16()) return FMIN_advsimd(ctx, dec); // -> FMIN_asimdsamefp16_only - if(!U && a && opcode==7 && HasAdvSIMD() && HasFP16()) return FRSQRTS_advsimd(ctx, dec); // -> FRSQRTS_asimdsamefp16_only - if(U && !a && !opcode && HasAdvSIMD() && HasFP16()) return FMAXNMP_advsimd_vec(ctx, dec); // -> FMAXNMP_asimdsamefp16_only - if(U && !a && opcode==2 && HasAdvSIMD() && HasFP16()) return FADDP_advsimd_vec(ctx, dec); // -> FADDP_asimdsamefp16_only - if(U && !a && opcode==3 && HasAdvSIMD() && HasFP16()) return FMUL_advsimd_vec(ctx, dec); // -> FMUL_asimdsamefp16_only - if(U && !a && opcode==4 && HasAdvSIMD() && HasFP16()) return FCMGE_advsimd_reg(ctx, dec); // -> FCMGE_asimdsamefp16_only - if(U && !a && opcode==5 && HasAdvSIMD() && HasFP16()) return FACGE_advsimd(ctx, dec); // -> FACGE_asimdsamefp16_only - if(U && !a && opcode==6 && HasAdvSIMD() && HasFP16()) return FMAXP_advsimd_vec(ctx, dec); // -> FMAXP_asimdsamefp16_only - if(U && !a && opcode==7 && HasAdvSIMD() && HasFP16()) return FDIV_advsimd(ctx, dec); // -> FDIV_asimdsamefp16_only - if(U && a && !opcode && HasAdvSIMD() && HasFP16()) return FMINNMP_advsimd_vec(ctx, dec); // -> FMINNMP_asimdsamefp16_only - if(U && a && opcode==2 && HasAdvSIMD() && HasFP16()) return FABD_advsimd(ctx, dec); // -> FABD_asimdsamefp16_only - if(U && a && opcode==3 && HasAdvSIMD() && HasFAMINMAX()) return FAMIN_advsimd(ctx, dec); // -> FAMIN_asimdsamefp16_only - if(U && a && opcode==4 && HasAdvSIMD() && HasFP16()) return FCMGT_advsimd_reg(ctx, dec); // -> FCMGT_asimdsamefp16_only - if(U && a && opcode==5 && HasAdvSIMD() && HasFP16()) return FACGT_advsimd(ctx, dec); // -> FACGT_asimdsamefp16_only - if(U && a && opcode==6 && HasAdvSIMD() && HasFP16()) return FMINP_advsimd_vec(ctx, dec); // -> FMINP_asimdsamefp16_only - if(U && a && opcode==7 && HasFP8()) return FSCALE_advsimd(ctx, dec); // -> FSCALE_asimdsamefp16_only - if(!U && a && (opcode&6)==4) UNALLOCATED(ENC_UNALLOCATED_1188_ASIMDSAMEFP16); - if(U && opcode==1) UNALLOCATED(ENC_UNALLOCATED_1189_ASIMDSAMEFP16); - UNMATCHED; -} - -int decode_iclass_asimdsame2(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>30)&1, U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>11)&15; - if(!Q && !U && !size && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_vec(ctx, dec); // -> FMLALLBB_asimdsame2_G - if(!Q && !U && size==1 && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_vec(ctx, dec); // -> FMLALLBT_asimdsame2_G - if(!Q && !U && size==3 && opcode==15 && HasFP8FMA()) return FMLALB_advsimd_vec(ctx, dec); // -> FMLALB_asimdsame2_J - if(Q && !U && !size && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_vec(ctx, dec); // -> FMLALLTB_asimdsame2_G - if(Q && !U && size==1 && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_vec(ctx, dec); // -> FMLALLTT_asimdsame2_G - if(Q && !U && size==1 && opcode==13 && HasF16F32MM()) return FMMLA_advsimd_fp16fp32(ctx, dec); // -> FMMLA_asimd_FP16FP32 - if(Q && !U && size==2 && opcode==4 && HasI8MM()) return SMMLA_advsimd_vec(ctx, dec); // -> SMMLA_asimdsame2_G - if(Q && !U && size==2 && opcode==5 && HasI8MM()) return USMMLA_advsimd_vec(ctx, dec); // -> USMMLA_asimdsame2_G - if(Q && !U && size==3 && opcode==13 && HasF16MM()) return FMMLA_advsimd_fp16fp16(ctx, dec); // -> FMMLA_asimd_FP16FP16 - if(Q && !U && size==3 && opcode==15 && HasFP8FMA()) return FMLALB_advsimd_vec(ctx, dec); // -> FMLALT_asimdsame2_J - if(Q && U && !size && opcode==13 && HasF8F16MM()) return FMMLA_FP8FP16(ctx, dec); // -> FMMLA_asimd_FP8FP16 - if(Q && U && size==1 && opcode==13 && HasBF16()) return BFMMLA_advsimd(ctx, dec); // -> BFMMLA_asimdsame2_E - if(Q && U && size==2 && opcode==4 && HasI8MM()) return UMMLA_advsimd_vec(ctx, dec); // -> UMMLA_asimdsame2_G - if(Q && U && size==2 && opcode==5) UNALLOCATED(ENC_UNALLOCATED_1207_ASIMDSAME2); - if(Q && U && size==2 && opcode==13 && HasF8F32MM()) return FMMLA_FP8FP32(ctx, dec); // -> FMMLA_asimd_FP8FP32 - if(Q && U && size==3 && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1208_ASIMDSAME2); - if(!U && !size && opcode==3) UNALLOCATED(ENC_UNALLOCATED_1206_ASIMDSAME2); - if(!U && !size && opcode==14 && HasFP8()) return FCVTN_advsimd_328(ctx, dec); // -> FCVTN_asimdsame2_H - if(!U && !size && opcode==15 && HasFP8DOT4()) return FDOT_advsimd_4wayvec(ctx, dec); // -> FDOT_asimdsame2_DD - if(!U && size==1 && opcode==14 && HasFP8()) return FCVTN_advsimd_168(ctx, dec); // -> FCVTN_asimdsame2_D - if(!U && size==1 && opcode==15 && HasFP8DOT2()) return FDOT_advsimd_2wayvec(ctx, dec); // -> FDOT_asimdsame2_D - if(!U && size==2 && opcode==3 && HasI8MM()) return USDOT_advsimd_vec(ctx, dec); // -> USDOT_asimdsame2_D - if(!U && size==2 && opcode==15 && HasF16F32DOT()) return FDOT_advsimd_fp16fp32(ctx, dec); // -> FDOT_asimdsame2_FP16FP32 - if(U && size==1 && opcode==15 && HasBF16()) return BFDOT_advsimd_vec(ctx, dec); // -> BFDOT_asimdsame2_D - if(U && size==3 && opcode==15 && HasBF16()) return BFMLAL_advsimd_vec(ctx, dec); // -> BFMLAL_asimdsame2_F_ - if(Q && !U && !(size&1) && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1205_ASIMDSAME2); - if(!U && !(size&1) && opcode==1) UNALLOCATED(ENC_UNALLOCATED_1201_ASIMDSAME2); - if(!U && !(size&1) && opcode==9) UNALLOCATED(ENC_UNALLOCATED_1202_ASIMDSAME2); - if(!U && !(size&1) && opcode==11) UNALLOCATED(ENC_UNALLOCATED_1203_ASIMDSAME2); - if(!U && !(size&2) && opcode==10) UNALLOCATED(ENC_UNALLOCATED_1199_ASIMDSAME2); - if(!U && !(size&2) && opcode==12) UNALLOCATED(ENC_UNALLOCATED_1200_ASIMDSAME2); - if(U && !(size&1) && opcode==15) UNALLOCATED(ENC_UNALLOCATED_1204_ASIMDSAME2); - if(Q && size==2 && (opcode&14)==6) UNALLOCATED(ENC_UNALLOCATED_1198_ASIMDSAME2); - if(!U && !opcode) UNALLOCATED(ENC_UNALLOCATED_1196_ASIMDSAME2); - if(!U && opcode==2 && HasDotProd()) return SDOT_advsimd_vec(ctx, dec); // -> SDOT_asimdsame2_D - if(U && !opcode && HasRDM()) return SQRDMLAH_advsimd_vec(ctx, dec); // -> SQRDMLAH_asimdsame2_only - if(U && opcode==1 && HasRDM()) return SQRDMLSH_advsimd_vec(ctx, dec); // -> SQRDMLSH_asimdsame2_only - if(U && opcode==2 && HasDotProd()) return UDOT_advsimd_vec(ctx, dec); // -> UDOT_asimdsame2_D - if(U && opcode==3) UNALLOCATED(ENC_UNALLOCATED_1197_ASIMDSAME2); - if(!Q && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1195_ASIMDSAME2); - if(Q && size!=2 && (opcode&12)==4) UNALLOCATED(ENC_UNALLOCATED_1192_ASIMDSAME2); - if(!U && size&1 && (opcode&5)==1) UNALLOCATED(ENC_UNALLOCATED_1194_ASIMDSAME2); - if(!U && (size&2)==2 && (opcode&9)==8) UNALLOCATED(ENC_UNALLOCATED_1193_ASIMDSAME2); - if(U && (opcode&13)==12 && HasFCMA()) return FCADD_advsimd_vec(ctx, dec); // -> FCADD_asimdsame2_C - if(U && (opcode&12)==8 && HasFCMA()) return FCMLA_advsimd_vec(ctx, dec); // -> FCMLA_asimdsame2_C - if(!Q && (opcode&12)==4) UNALLOCATED(ENC_UNALLOCATED_1191_ASIMDSAME2); - UNMATCHED; -} - -int decode_iclass_asimdmisc(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&0x1f; - if(!U && size==2 && opcode==0x16 && HasBF16()) return BFCVTN_advsimd(ctx, dec); // -> BFCVTN_asimdmisc_4S - if(U && !size && opcode==5 && HasAdvSIMD()) return NOT_advsimd(ctx, dec); // -> NOT_asimdmisc_R - if(U && !size && opcode==0x17 && HasFP8()) return F12CVTL_advsimd(ctx, dec); // -> F1CVTL_asimdmisc_V - if(U && size==1 && opcode==5 && HasAdvSIMD()) return RBIT_advsimd(ctx, dec); // -> RBIT_asimdmisc_R - if(U && size==1 && opcode==0x16 && HasAdvSIMD()) return FCVTXN_advsimd(ctx, dec); // -> FCVTXN_asimdmisc_N - if(U && size==1 && opcode==0x17 && HasFP8()) return F12CVTL_advsimd(ctx, dec); // -> F2CVTL_asimdmisc_V - if(U && size==2 && opcode==0x17 && HasFP8()) return BF12CVTL_advsimd(ctx, dec); // -> BF1CVTL_asimdmisc_V - if(U && size==3 && opcode==0x17 && HasFP8()) return BF12CVTL_advsimd(ctx, dec); // -> BF2CVTL_asimdmisc_V - if(size==2 && opcode==0x1e) UNALLOCATED(ENC_UNALLOCATED_1221_ASIMDMISC); - if(!U && !(size&2) && opcode==0x16 && HasAdvSIMD()) return FCVTN_advsimd(ctx, dec); // -> FCVTN_asimdmisc_N - if(!U && !(size&2) && opcode==0x17 && HasAdvSIMD()) return FCVTL_advsimd(ctx, dec); // -> FCVTL_asimdmisc_L - if(!U && !(size&2) && opcode==0x18 && HasAdvSIMD()) return FRINTN_advsimd(ctx, dec); // -> FRINTN_asimdmisc_R - if(!U && !(size&2) && opcode==0x19 && HasAdvSIMD()) return FRINTM_advsimd(ctx, dec); // -> FRINTM_asimdmisc_R - if(!U && !(size&2) && opcode==0x1a && HasAdvSIMD()) return FCVTNS_advsimd(ctx, dec); // -> FCVTNS_asimdmisc_R - if(!U && !(size&2) && opcode==0x1b && HasAdvSIMD()) return FCVTMS_advsimd(ctx, dec); // -> FCVTMS_asimdmisc_R - if(!U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCVTAS_advsimd(ctx, dec); // -> FCVTAS_asimdmisc_R - if(!U && !(size&2) && opcode==0x1d && HasAdvSIMD()) return SCVTF_advsimd_int(ctx, dec); // -> SCVTF_asimdmisc_R - if(!U && !(size&2) && opcode==0x1e && HasFRINTTS()) return FRINT32Z_advsimd(ctx, dec); // -> FRINT32Z_asimdmisc_R - if(!U && !(size&2) && opcode==0x1f && HasFRINTTS()) return FRINT64Z_advsimd(ctx, dec); // -> FRINT64Z_asimdmisc_R - if(!U && (size&2)==2 && opcode==12 && HasAdvSIMD()) return FCMGT_advsimd_zero(ctx, dec); // -> FCMGT_asimdmisc_FZ - if(!U && (size&2)==2 && opcode==13 && HasAdvSIMD()) return FCMEQ_advsimd_zero(ctx, dec); // -> FCMEQ_asimdmisc_FZ - if(!U && (size&2)==2 && opcode==14 && HasAdvSIMD()) return FCMLT_advsimd(ctx, dec); // -> FCMLT_asimdmisc_FZ - if(!U && (size&2)==2 && opcode==15 && HasAdvSIMD()) return FABS_advsimd(ctx, dec); // -> FABS_asimdmisc_R - if(!U && (size&2)==2 && opcode==0x18 && HasAdvSIMD()) return FRINTP_advsimd(ctx, dec); // -> FRINTP_asimdmisc_R - if(!U && (size&2)==2 && opcode==0x19 && HasAdvSIMD()) return FRINTZ_advsimd(ctx, dec); // -> FRINTZ_asimdmisc_R - if(!U && (size&2)==2 && opcode==0x1a && HasAdvSIMD()) return FCVTPS_advsimd(ctx, dec); // -> FCVTPS_asimdmisc_R - if(!U && (size&2)==2 && opcode==0x1b && HasAdvSIMD()) return FCVTZS_advsimd_int(ctx, dec); // -> FCVTZS_asimdmisc_R - if(!U && (size&2)==2 && opcode==0x1c && HasAdvSIMD()) return URECPE_advsimd(ctx, dec); // -> URECPE_asimdmisc_R - if(!U && (size&2)==2 && opcode==0x1d && HasAdvSIMD()) return FRECPE_advsimd(ctx, dec); // -> FRECPE_asimdmisc_R - if(U && !(size&1) && opcode==0x16) UNALLOCATED(ENC_UNALLOCATED_1220_ASIMDMISC); - if(U && !(size&2) && opcode==1) UNALLOCATED(ENC_UNALLOCATED_1217_ASIMDMISC); - if(U && !(size&2) && opcode==0x18 && HasAdvSIMD()) return FRINTA_advsimd(ctx, dec); // -> FRINTA_asimdmisc_R - if(U && !(size&2) && opcode==0x19 && HasAdvSIMD()) return FRINTX_advsimd(ctx, dec); // -> FRINTX_asimdmisc_R - if(U && !(size&2) && opcode==0x1a && HasAdvSIMD()) return FCVTNU_advsimd(ctx, dec); // -> FCVTNU_asimdmisc_R - if(U && !(size&2) && opcode==0x1b && HasAdvSIMD()) return FCVTMU_advsimd(ctx, dec); // -> FCVTMU_asimdmisc_R - if(U && !(size&2) && opcode==0x1c && HasAdvSIMD()) return FCVTAU_advsimd(ctx, dec); // -> FCVTAU_asimdmisc_R - if(U && !(size&2) && opcode==0x1d && HasAdvSIMD()) return UCVTF_advsimd_int(ctx, dec); // -> UCVTF_asimdmisc_R - if(U && !(size&2) && opcode==0x1e && HasFRINTTS()) return FRINT32X_advsimd(ctx, dec); // -> FRINT32X_asimdmisc_R - if(U && !(size&2) && opcode==0x1f && HasFRINTTS()) return FRINT64X_advsimd(ctx, dec); // -> FRINT64X_asimdmisc_R - if(U && (size&2)==2 && opcode==12 && HasAdvSIMD()) return FCMGE_advsimd_zero(ctx, dec); // -> FCMGE_asimdmisc_FZ - if(U && (size&2)==2 && opcode==13 && HasAdvSIMD()) return FCMLE_advsimd(ctx, dec); // -> FCMLE_asimdmisc_FZ - if(U && (size&2)==2 && opcode==14) UNALLOCATED(ENC_UNALLOCATED_1218_ASIMDMISC); - if(U && (size&2)==2 && opcode==15 && HasAdvSIMD()) return FNEG_advsimd(ctx, dec); // -> FNEG_asimdmisc_R - if(U && (size&2)==2 && opcode==0x18) UNALLOCATED(ENC_UNALLOCATED_1219_ASIMDMISC); - if(U && (size&2)==2 && opcode==0x19 && HasAdvSIMD()) return FRINTI_advsimd(ctx, dec); // -> FRINTI_asimdmisc_R - if(U && (size&2)==2 && opcode==0x1a && HasAdvSIMD()) return FCVTPU_advsimd(ctx, dec); // -> FCVTPU_asimdmisc_R - if(U && (size&2)==2 && opcode==0x1b && HasAdvSIMD()) return FCVTZU_advsimd_int(ctx, dec); // -> FCVTZU_asimdmisc_R - if(U && (size&2)==2 && opcode==0x1c && HasAdvSIMD()) return URSQRTE_advsimd(ctx, dec); // -> URSQRTE_asimdmisc_R - if(U && (size&2)==2 && opcode==0x1d && HasAdvSIMD()) return FRSQRTE_advsimd(ctx, dec); // -> FRSQRTE_asimdmisc_R - if(U && (size&2)==2 && opcode==0x1f && HasAdvSIMD()) return FSQRT_advsimd(ctx, dec); // -> FSQRT_asimdmisc_R - if(size==3 && (opcode&0x17)==0x16) UNALLOCATED(ENC_UNALLOCATED_1216_ASIMDMISC); - if(!U && !opcode && HasAdvSIMD()) return REV64_advsimd(ctx, dec); // -> REV64_asimdmisc_R - if(!U && opcode==1 && HasAdvSIMD()) return REV16_advsimd(ctx, dec); // -> REV16_asimdmisc_R - if(!U && opcode==2 && HasAdvSIMD()) return SADDLP_advsimd(ctx, dec); // -> SADDLP_asimdmisc_P - if(!U && opcode==3 && HasAdvSIMD()) return SUQADD_advsimd(ctx, dec); // -> SUQADD_asimdmisc_R - if(!U && opcode==4 && HasAdvSIMD()) return CLS_advsimd(ctx, dec); // -> CLS_asimdmisc_R - if(!U && opcode==5 && HasAdvSIMD()) return CNT_advsimd(ctx, dec); // -> CNT_asimdmisc_R - if(!U && opcode==6 && HasAdvSIMD()) return SADALP_advsimd(ctx, dec); // -> SADALP_asimdmisc_P - if(!U && opcode==7 && HasAdvSIMD()) return SQABS_advsimd(ctx, dec); // -> SQABS_asimdmisc_R - if(!U && opcode==8 && HasAdvSIMD()) return CMGT_advsimd_zero(ctx, dec); // -> CMGT_asimdmisc_Z - if(!U && opcode==9 && HasAdvSIMD()) return CMEQ_advsimd_zero(ctx, dec); // -> CMEQ_asimdmisc_Z - if(!U && opcode==10 && HasAdvSIMD()) return CMLT_advsimd(ctx, dec); // -> CMLT_asimdmisc_Z - if(!U && opcode==11 && HasAdvSIMD()) return ABS_advsimd(ctx, dec); // -> ABS_asimdmisc_R - if(!U && opcode==0x12 && HasAdvSIMD()) return XTN_advsimd(ctx, dec); // -> XTN_asimdmisc_N - if(!U && opcode==0x13) UNALLOCATED(ENC_UNALLOCATED_1213_ASIMDMISC); - if(!U && opcode==0x14 && HasAdvSIMD()) return SQXTN_advsimd(ctx, dec); // -> SQXTN_asimdmisc_N - if(!U && (size&2)==2 && (opcode&0x17)==0x17) UNALLOCATED(ENC_UNALLOCATED_1212_ASIMDMISC); - if(U && !opcode && HasAdvSIMD()) return REV32_advsimd(ctx, dec); // -> REV32_asimdmisc_R - if(U && opcode==2 && HasAdvSIMD()) return UADDLP_advsimd(ctx, dec); // -> UADDLP_asimdmisc_P - if(U && opcode==3 && HasAdvSIMD()) return USQADD_advsimd(ctx, dec); // -> USQADD_asimdmisc_R - if(U && opcode==4 && HasAdvSIMD()) return CLZ_advsimd(ctx, dec); // -> CLZ_asimdmisc_R - if(U && opcode==6 && HasAdvSIMD()) return UADALP_advsimd(ctx, dec); // -> UADALP_asimdmisc_P - if(U && opcode==7 && HasAdvSIMD()) return SQNEG_advsimd(ctx, dec); // -> SQNEG_asimdmisc_R - if(U && opcode==8 && HasAdvSIMD()) return CMGE_advsimd_zero(ctx, dec); // -> CMGE_asimdmisc_Z - if(U && opcode==9 && HasAdvSIMD()) return CMLE_advsimd(ctx, dec); // -> CMLE_asimdmisc_Z - if(U && opcode==10) UNALLOCATED(ENC_UNALLOCATED_1215_ASIMDMISC); - if(U && opcode==11 && HasAdvSIMD()) return NEG_advsimd(ctx, dec); // -> NEG_asimdmisc_R - if(U && opcode==0x12 && HasAdvSIMD()) return SQXTUN_advsimd(ctx, dec); // -> SQXTUN_asimdmisc_N - if(U && opcode==0x13 && HasAdvSIMD()) return SHLL_advsimd(ctx, dec); // -> SHLL_asimdmisc_S - if(U && opcode==0x14 && HasAdvSIMD()) return UQXTN_advsimd(ctx, dec); // -> UQXTN_asimdmisc_N - if(U && (size&2)==2 && (opcode&0x1b)==1) UNALLOCATED(ENC_UNALLOCATED_1214_ASIMDMISC); - if(opcode==0x15) UNALLOCATED(ENC_UNALLOCATED_1211_ASIMDMISC); - if((opcode&0x1e)==0x10) UNALLOCATED(ENC_UNALLOCATED_1210_ASIMDMISC); - if(!(size&2) && (opcode&0x1c)==12) UNALLOCATED(ENC_UNALLOCATED_1209_ASIMDMISC); - UNMATCHED; -} - -int decode_iclass_asimdmiscfp16(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>29)&1, a=(INSWORD>>23)&1, opcode=(INSWORD>>12)&0x1f; - if(!U && !a && opcode==0x18 && HasAdvSIMD() && HasFP16()) return FRINTN_advsimd(ctx, dec); // -> FRINTN_asimdmiscfp16_R - if(!U && !a && opcode==0x19 && HasAdvSIMD() && HasFP16()) return FRINTM_advsimd(ctx, dec); // -> FRINTM_asimdmiscfp16_R - if(!U && !a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTNS_advsimd(ctx, dec); // -> FCVTNS_asimdmiscfp16_R - if(!U && !a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTMS_advsimd(ctx, dec); // -> FCVTMS_asimdmiscfp16_R - if(!U && !a && opcode==0x1c && HasAdvSIMD() && HasFP16()) return FCVTAS_advsimd(ctx, dec); // -> FCVTAS_asimdmiscfp16_R - if(!U && !a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return SCVTF_advsimd_int(ctx, dec); // -> SCVTF_asimdmiscfp16_R - if(!U && a && opcode==12 && HasAdvSIMD() && HasFP16()) return FCMGT_advsimd_zero(ctx, dec); // -> FCMGT_asimdmiscfp16_FZ - if(!U && a && opcode==13 && HasAdvSIMD() && HasFP16()) return FCMEQ_advsimd_zero(ctx, dec); // -> FCMEQ_asimdmiscfp16_FZ - if(!U && a && opcode==14 && HasAdvSIMD() && HasFP16()) return FCMLT_advsimd(ctx, dec); // -> FCMLT_asimdmiscfp16_FZ - if(!U && a && opcode==15 && HasAdvSIMD() && HasFP16()) return FABS_advsimd(ctx, dec); // -> FABS_asimdmiscfp16_R - if(!U && a && opcode==0x18 && HasAdvSIMD() && HasFP16()) return FRINTP_advsimd(ctx, dec); // -> FRINTP_asimdmiscfp16_R - if(!U && a && opcode==0x19 && HasAdvSIMD() && HasFP16()) return FRINTZ_advsimd(ctx, dec); // -> FRINTZ_asimdmiscfp16_R - if(!U && a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTPS_advsimd(ctx, dec); // -> FCVTPS_asimdmiscfp16_R - if(!U && a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTZS_advsimd_int(ctx, dec); // -> FCVTZS_asimdmiscfp16_R - if(!U && a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return FRECPE_advsimd(ctx, dec); // -> FRECPE_asimdmiscfp16_R - if(U && !a && opcode==0x18 && HasAdvSIMD() && HasFP16()) return FRINTA_advsimd(ctx, dec); // -> FRINTA_asimdmiscfp16_R - if(U && !a && opcode==0x19 && HasAdvSIMD() && HasFP16()) return FRINTX_advsimd(ctx, dec); // -> FRINTX_asimdmiscfp16_R - if(U && !a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTNU_advsimd(ctx, dec); // -> FCVTNU_asimdmiscfp16_R - if(U && !a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTMU_advsimd(ctx, dec); // -> FCVTMU_asimdmiscfp16_R - if(U && !a && opcode==0x1c && HasAdvSIMD() && HasFP16()) return FCVTAU_advsimd(ctx, dec); // -> FCVTAU_asimdmiscfp16_R - if(U && !a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return UCVTF_advsimd_int(ctx, dec); // -> UCVTF_asimdmiscfp16_R - if(U && a && opcode==12 && HasAdvSIMD() && HasFP16()) return FCMGE_advsimd_zero(ctx, dec); // -> FCMGE_asimdmiscfp16_FZ - if(U && a && opcode==13 && HasAdvSIMD() && HasFP16()) return FCMLE_advsimd(ctx, dec); // -> FCMLE_asimdmiscfp16_FZ - if(U && a && opcode==15 && HasAdvSIMD() && HasFP16()) return FNEG_advsimd(ctx, dec); // -> FNEG_asimdmiscfp16_R - if(U && a && opcode==0x18) UNALLOCATED(ENC_UNALLOCATED_1229_ASIMDMISCFP16); - if(U && a && opcode==0x19 && HasAdvSIMD() && HasFP16()) return FRINTI_advsimd(ctx, dec); // -> FRINTI_asimdmiscfp16_R - if(U && a && opcode==0x1a && HasAdvSIMD() && HasFP16()) return FCVTPU_advsimd(ctx, dec); // -> FCVTPU_asimdmiscfp16_R - if(U && a && opcode==0x1b && HasAdvSIMD() && HasFP16()) return FCVTZU_advsimd_int(ctx, dec); // -> FCVTZU_asimdmiscfp16_R - if(U && a && opcode==0x1d && HasAdvSIMD() && HasFP16()) return FRSQRTE_advsimd(ctx, dec); // -> FRSQRTE_asimdmiscfp16_R - if(U && a && opcode==0x1f && HasAdvSIMD() && HasFP16()) return FSQRT_advsimd(ctx, dec); // -> FSQRT_asimdmiscfp16_R - if(a && opcode==0x1c) UNALLOCATED(ENC_UNALLOCATED_1228_ASIMDMISCFP16); - if(!U && a && (opcode&0x1e)==0x1e) UNALLOCATED(ENC_UNALLOCATED_1226_ASIMDMISCFP16); - if(U && a && (opcode&15)==14) UNALLOCATED(ENC_UNALLOCATED_1227_ASIMDMISCFP16); - if(!a && (opcode&0x1e)==0x1e) UNALLOCATED(ENC_UNALLOCATED_1225_ASIMDMISCFP16); - if(a && (opcode&0x1c)==8) UNALLOCATED(ENC_UNALLOCATED_1224_ASIMDMISCFP16); - if(!a && (opcode&0x18)==8) UNALLOCATED(ENC_UNALLOCATED_1223_ASIMDMISCFP16); - if(!(opcode&8)) UNALLOCATED(ENC_UNALLOCATED_1222_ASIMDMISCFP16); - UNMATCHED; -} - -int decode_iclass_asimdelem(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>30)&1, U=(INSWORD>>29)&1, size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&15; - if(!Q && !U && size==3 && !opcode && HasFP8FMA()) return FMLALB_advsimd_elem(ctx, dec); // -> FMLALB_asimdelem_H - if(!Q && U && !size && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_elem(ctx, dec); // -> FMLALLBB_asimdelem_J - if(!Q && U && size==1 && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_elem(ctx, dec); // -> FMLALLBT_asimdelem_J - if(Q && !U && size==3 && !opcode && HasFP8FMA()) return FMLALB_advsimd_elem(ctx, dec); // -> FMLALT_asimdelem_H - if(Q && U && !size && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_elem(ctx, dec); // -> FMLALLTB_asimdelem_J - if(Q && U && size==1 && opcode==8 && HasFP8FMA()) return FMLALLBB_advsimd_elem(ctx, dec); // -> FMLALLTT_asimdelem_J - if(!U && !size && !opcode && HasFP8DOT4()) return FDOT_advsimd_4wayelem(ctx, dec); // -> FDOT_asimdelem_D - if(!U && !size && opcode==1 && HasAdvSIMD() && HasFP16()) return FMLA_advsimd_elt(ctx, dec); // -> FMLA_asimdelem_RH_H - if(!U && !size && opcode==5 && HasAdvSIMD() && HasFP16()) return FMLS_advsimd_elt(ctx, dec); // -> FMLS_asimdelem_RH_H - if(!U && !size && opcode==9 && HasAdvSIMD() && HasFP16()) return FMUL_advsimd_elt(ctx, dec); // -> FMUL_asimdelem_RH_H - if(!U && !size && opcode==15 && HasI8MM()) return SUDOT_advsimd_elt(ctx, dec); // -> SUDOT_asimdelem_D - if(!U && size==1 && !opcode && HasFP8DOT2()) return FDOT_advsimd_2wayelem(ctx, dec); // -> FDOT_asimdelem_G - if(!U && size==1 && opcode==9 && HasF16F32DOT()) return FDOT_advsimd_elt_fp16fp32(ctx, dec); // -> FDOT_asimdelem_FP16FP32 - if(!U && size==1 && opcode==15 && HasBF16()) return BFDOT_advsimd_elt(ctx, dec); // -> BFDOT_asimdelem_E - if(!U && size==2 && !opcode && HasFHM()) return FMLAL_advsimd_elt(ctx, dec); // -> FMLAL_asimdelem_LH - if(!U && size==2 && opcode==4 && HasFHM()) return FMLSL_advsimd_elt(ctx, dec); // -> FMLSL_asimdelem_LH - if(!U && size==2 && opcode==15 && HasI8MM()) return USDOT_advsimd_elt(ctx, dec); // -> USDOT_asimdelem_D - if(!U && size==3 && opcode==15 && HasBF16()) return BFMLAL_advsimd_elt(ctx, dec); // -> BFMLAL_asimdelem_F - if(!U && size!=2 && opcode==4) UNALLOCATED(ENC_UNALLOCATED_1232_ASIMDELEM); - if(U && !size && opcode==9 && HasAdvSIMD() && HasFP16()) return FMULX_advsimd_elt(ctx, dec); // -> FMULX_asimdelem_RH_H - if(U && size==1 && opcode==9) UNALLOCATED(ENC_UNALLOCATED_1235_ASIMDELEM); - if(U && size==2 && opcode==8 && HasFHM()) return FMLAL_advsimd_elt(ctx, dec); // -> FMLAL2_asimdelem_LH - if(U && size==2 && opcode==12 && HasFHM()) return FMLSL_advsimd_elt(ctx, dec); // -> FMLSL2_asimdelem_LH - if(!U && size==1 && (opcode&11)==1) UNALLOCATED(ENC_UNALLOCATED_1231_ASIMDELEM); - if(!U && (size&2)==2 && opcode==1 && HasAdvSIMD()) return FMLA_advsimd_elt(ctx, dec); // -> FMLA_asimdelem_R_SD - if(!U && (size&2)==2 && opcode==5 && HasAdvSIMD()) return FMLS_advsimd_elt(ctx, dec); // -> FMLS_asimdelem_R_SD - if(!U && (size&2)==2 && opcode==9 && HasAdvSIMD()) return FMUL_advsimd_elt(ctx, dec); // -> FMUL_asimdelem_R_SD - if(U && !(size&2) && opcode==12) UNALLOCATED(ENC_UNALLOCATED_1233_ASIMDELEM); - if(U && (size&2)==2 && opcode==9 && HasAdvSIMD()) return FMULX_advsimd_elt(ctx, dec); // -> FMULX_asimdelem_R_SD - if(U && size==3 && (opcode&11)==8) UNALLOCATED(ENC_UNALLOCATED_1234_ASIMDELEM); - if(!U && opcode==2 && HasAdvSIMD()) return SMLAL_advsimd_elt(ctx, dec); // -> SMLAL_asimdelem_L - if(!U && opcode==3 && HasAdvSIMD()) return SQDMLAL_advsimd_elt(ctx, dec); // -> SQDMLAL_asimdelem_L - if(!U && opcode==6 && HasAdvSIMD()) return SMLSL_advsimd_elt(ctx, dec); // -> SMLSL_asimdelem_L - if(!U && opcode==7 && HasAdvSIMD()) return SQDMLSL_advsimd_elt(ctx, dec); // -> SQDMLSL_asimdelem_L - if(!U && opcode==8 && HasAdvSIMD()) return MUL_advsimd_elt(ctx, dec); // -> MUL_asimdelem_R - if(!U && opcode==10 && HasAdvSIMD()) return SMULL_advsimd_elt(ctx, dec); // -> SMULL_asimdelem_L - if(!U && opcode==11 && HasAdvSIMD()) return SQDMULL_advsimd_elt(ctx, dec); // -> SQDMULL_asimdelem_L - if(!U && opcode==12 && HasAdvSIMD()) return SQDMULH_advsimd_elt(ctx, dec); // -> SQDMULH_asimdelem_R - if(!U && opcode==13 && HasAdvSIMD()) return SQRDMULH_advsimd_elt(ctx, dec); // -> SQRDMULH_asimdelem_R - if(!U && opcode==14 && HasDotProd()) return SDOT_advsimd_elt(ctx, dec); // -> SDOT_asimdelem_D - if(U && !opcode && HasAdvSIMD()) return MLA_advsimd_elt(ctx, dec); // -> MLA_asimdelem_R - if(U && opcode==2 && HasAdvSIMD()) return UMLAL_advsimd_elt(ctx, dec); // -> UMLAL_asimdelem_L - if(U && opcode==4 && HasAdvSIMD()) return MLS_advsimd_elt(ctx, dec); // -> MLS_asimdelem_R - if(U && opcode==6 && HasAdvSIMD()) return UMLSL_advsimd_elt(ctx, dec); // -> UMLSL_asimdelem_L - if(U && opcode==10 && HasAdvSIMD()) return UMULL_advsimd_elt(ctx, dec); // -> UMULL_asimdelem_L - if(U && opcode==11) UNALLOCATED(ENC_UNALLOCATED_1230_ASIMDELEM); - if(U && opcode==13 && HasRDM()) return SQRDMLAH_advsimd_elt(ctx, dec); // -> SQRDMLAH_asimdelem_R - if(U && opcode==14 && HasDotProd()) return UDOT_advsimd_elt(ctx, dec); // -> UDOT_asimdelem_D - if(U && opcode==15 && HasRDM()) return SQRDMLSH_advsimd_elt(ctx, dec); // -> SQRDMLSH_asimdelem_R - if(U && (opcode&9)==1 && HasFCMA()) return FCMLA_advsimd_elt(ctx, dec); // -> FCMLA_advsimd_elt - UNMATCHED; -} - -int decode_iclass_float2fix(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, rmode=(INSWORD>>19)&3, opcode=(INSWORD>>16)&7; - if(!sf && !S && !ftype && !rmode && opcode==2 && HasFP()) return SCVTF_float_fix(ctx, dec); // -> SCVTF_S32_float2fix - if(!sf && !S && !ftype && !rmode && opcode==3 && HasFP()) return UCVTF_float_fix(ctx, dec); // -> UCVTF_S32_float2fix - if(!sf && !S && !ftype && rmode==3 && !opcode && HasFP()) return FCVTZS_float_fix(ctx, dec); // -> FCVTZS_32S_float2fix - if(!sf && !S && !ftype && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_fix(ctx, dec); // -> FCVTZU_32S_float2fix - if(!sf && !S && ftype==1 && !rmode && opcode==2 && HasFP()) return SCVTF_float_fix(ctx, dec); // -> SCVTF_D32_float2fix - if(!sf && !S && ftype==1 && !rmode && opcode==3 && HasFP()) return UCVTF_float_fix(ctx, dec); // -> UCVTF_D32_float2fix - if(!sf && !S && ftype==1 && rmode==3 && !opcode && HasFP()) return FCVTZS_float_fix(ctx, dec); // -> FCVTZS_32D_float2fix - if(!sf && !S && ftype==1 && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_fix(ctx, dec); // -> FCVTZU_32D_float2fix - if(!sf && !S && ftype==3 && !rmode && opcode==2 && HasFP16()) return SCVTF_float_fix(ctx, dec); // -> SCVTF_H32_float2fix - if(!sf && !S && ftype==3 && !rmode && opcode==3 && HasFP16()) return UCVTF_float_fix(ctx, dec); // -> UCVTF_H32_float2fix - if(!sf && !S && ftype==3 && rmode==3 && !opcode && HasFP16()) return FCVTZS_float_fix(ctx, dec); // -> FCVTZS_32H_float2fix - if(!sf && !S && ftype==3 && rmode==3 && opcode==1 && HasFP16()) return FCVTZU_float_fix(ctx, dec); // -> FCVTZU_32H_float2fix - if(sf && !S && !ftype && !rmode && opcode==2 && HasFP()) return SCVTF_float_fix(ctx, dec); // -> SCVTF_S64_float2fix - if(sf && !S && !ftype && !rmode && opcode==3 && HasFP()) return UCVTF_float_fix(ctx, dec); // -> UCVTF_S64_float2fix - if(sf && !S && !ftype && rmode==3 && !opcode && HasFP()) return FCVTZS_float_fix(ctx, dec); // -> FCVTZS_64S_float2fix - if(sf && !S && !ftype && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_fix(ctx, dec); // -> FCVTZU_64S_float2fix - if(sf && !S && ftype==1 && !rmode && opcode==2 && HasFP()) return SCVTF_float_fix(ctx, dec); // -> SCVTF_D64_float2fix - if(sf && !S && ftype==1 && !rmode && opcode==3 && HasFP()) return UCVTF_float_fix(ctx, dec); // -> UCVTF_D64_float2fix - if(sf && !S && ftype==1 && rmode==3 && !opcode && HasFP()) return FCVTZS_float_fix(ctx, dec); // -> FCVTZS_64D_float2fix - if(sf && !S && ftype==1 && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_fix(ctx, dec); // -> FCVTZU_64D_float2fix - if(sf && !S && ftype==3 && !rmode && opcode==2 && HasFP16()) return SCVTF_float_fix(ctx, dec); // -> SCVTF_H64_float2fix - if(sf && !S && ftype==3 && !rmode && opcode==3 && HasFP16()) return UCVTF_float_fix(ctx, dec); // -> UCVTF_H64_float2fix - if(sf && !S && ftype==3 && rmode==3 && !opcode && HasFP16()) return FCVTZS_float_fix(ctx, dec); // -> FCVTZS_64H_float2fix - if(sf && !S && ftype==3 && rmode==3 && opcode==1 && HasFP16()) return FCVTZU_float_fix(ctx, dec); // -> FCVTZU_64H_float2fix - if(!S && ftype!=2 && rmode&1 && (opcode&6)==2) UNALLOCATED(ENC_UNALLOCATED_1241_FLOAT2FIX); - if(!S && ftype!=2 && !(rmode&2) && !(opcode&6)) UNALLOCATED(ENC_UNALLOCATED_1239_FLOAT2FIX); - if(!S && ftype!=2 && rmode==2 && !(opcode&4)) UNALLOCATED(ENC_UNALLOCATED_1240_FLOAT2FIX); - if(!S && ftype==2 && !(opcode&4)) UNALLOCATED(ENC_UNALLOCATED_1238_FLOAT2FIX); - if(!S && (opcode&4)==4) UNALLOCATED(ENC_UNALLOCATED_1237_FLOAT2FIX); - if(S) UNALLOCATED(ENC_UNALLOCATED_1236_FLOAT2FIX); - UNMATCHED; -} - -int decode_iclass_float2int(context *ctx, Instruction *dec) -{ - uint32_t sf=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, rmode=(INSWORD>>19)&3, opcode=(INSWORD>>16)&7; - if(!sf && !S && !ftype && !rmode && !opcode && HasFP()) return FCVTNS_float(ctx, dec); // -> FCVTNS_32S_float2int - if(!sf && !S && !ftype && !rmode && opcode==1 && HasFP()) return FCVTNU_float(ctx, dec); // -> FCVTNU_32S_float2int - if(!sf && !S && !ftype && !rmode && opcode==2 && HasFP()) return SCVTF_float_int(ctx, dec); // -> SCVTF_S32_float2int - if(!sf && !S && !ftype && !rmode && opcode==3 && HasFP()) return UCVTF_float_int(ctx, dec); // -> UCVTF_S32_float2int - if(!sf && !S && !ftype && !rmode && opcode==4 && HasFP()) return FCVTAS_float(ctx, dec); // -> FCVTAS_32S_float2int - if(!sf && !S && !ftype && !rmode && opcode==5 && HasFP()) return FCVTAU_float(ctx, dec); // -> FCVTAU_32S_float2int - if(!sf && !S && !ftype && !rmode && opcode==6 && HasFP()) return FMOV_float_gen(ctx, dec); // -> FMOV_32S_float2int - if(!sf && !S && !ftype && !rmode && opcode==7 && HasFP()) return FMOV_float_gen(ctx, dec); // -> FMOV_S32_float2int - if(!sf && !S && !ftype && rmode==1 && !opcode && HasFP()) return FCVTPS_float(ctx, dec); // -> FCVTPS_32S_float2int - if(!sf && !S && !ftype && rmode==1 && opcode==1 && HasFP()) return FCVTPU_float(ctx, dec); // -> FCVTPU_32S_float2int - if(!sf && !S && !ftype && rmode==2 && !opcode && HasFP()) return FCVTMS_float(ctx, dec); // -> FCVTMS_32S_float2int - if(!sf && !S && !ftype && rmode==2 && opcode==1 && HasFP()) return FCVTMU_float(ctx, dec); // -> FCVTMU_32S_float2int - if(!sf && !S && !ftype && rmode==3 && !opcode && HasFP()) return FCVTZS_float_int(ctx, dec); // -> FCVTZS_32S_float2int - if(!sf && !S && !ftype && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_int(ctx, dec); // -> FCVTZU_32S_float2int - if(!sf && !S && ftype==1 && !rmode && !opcode && HasFP()) return FCVTNS_float(ctx, dec); // -> FCVTNS_32D_float2int - if(!sf && !S && ftype==1 && !rmode && opcode==1 && HasFP()) return FCVTNU_float(ctx, dec); // -> FCVTNU_32D_float2int - if(!sf && !S && ftype==1 && !rmode && opcode==2 && HasFP()) return SCVTF_float_int(ctx, dec); // -> SCVTF_D32_float2int - if(!sf && !S && ftype==1 && !rmode && opcode==3 && HasFP()) return UCVTF_float_int(ctx, dec); // -> UCVTF_D32_float2int - if(!sf && !S && ftype==1 && !rmode && opcode==4 && HasFP()) return FCVTAS_float(ctx, dec); // -> FCVTAS_32D_float2int - if(!sf && !S && ftype==1 && !rmode && opcode==5 && HasFP()) return FCVTAU_float(ctx, dec); // -> FCVTAU_32D_float2int - if(!sf && !S && ftype==1 && rmode==1 && !opcode && HasFP()) return FCVTPS_float(ctx, dec); // -> FCVTPS_32D_float2int - if(!sf && !S && ftype==1 && rmode==1 && opcode==1 && HasFP()) return FCVTPU_float(ctx, dec); // -> FCVTPU_32D_float2int - if(!sf && !S && ftype==1 && rmode==1 && opcode==2 && HasFPRCVT()) return FCVTNS_sisd(ctx, dec); // -> FCVTNS_sisd_32D - if(!sf && !S && ftype==1 && rmode==1 && opcode==3 && HasFPRCVT()) return FCVTNU_sisd(ctx, dec); // -> FCVTNU_sisd_32D - if(!sf && !S && ftype==1 && rmode==2 && !opcode && HasFP()) return FCVTMS_float(ctx, dec); // -> FCVTMS_32D_float2int - if(!sf && !S && ftype==1 && rmode==2 && opcode==1 && HasFP()) return FCVTMU_float(ctx, dec); // -> FCVTMU_32D_float2int - if(!sf && !S && ftype==1 && rmode==2 && opcode==2 && HasFPRCVT()) return FCVTPS_sisd(ctx, dec); // -> FCVTPS_sisd_32D - if(!sf && !S && ftype==1 && rmode==2 && opcode==3 && HasFPRCVT()) return FCVTPU_sisd(ctx, dec); // -> FCVTPU_sisd_32D - if(!sf && !S && ftype==1 && rmode==2 && opcode==4 && HasFPRCVT()) return FCVTMS_sisd(ctx, dec); // -> FCVTMS_sisd_32D - if(!sf && !S && ftype==1 && rmode==2 && opcode==5 && HasFPRCVT()) return FCVTMU_sisd(ctx, dec); // -> FCVTMU_sisd_32D - if(!sf && !S && ftype==1 && rmode==2 && opcode==6 && HasFPRCVT()) return FCVTZS_sisd(ctx, dec); // -> FCVTZS_sisd_32D - if(!sf && !S && ftype==1 && rmode==2 && opcode==7 && HasFPRCVT()) return FCVTZU_sisd(ctx, dec); // -> FCVTZU_sisd_32D - if(!sf && !S && ftype==1 && rmode==3 && !opcode && HasFP()) return FCVTZS_float_int(ctx, dec); // -> FCVTZS_32D_float2int - if(!sf && !S && ftype==1 && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_int(ctx, dec); // -> FCVTZU_32D_float2int - if(!sf && !S && ftype==1 && rmode==3 && opcode==2 && HasFPRCVT()) return FCVTAS_sisd(ctx, dec); // -> FCVTAS_sisd_32D - if(!sf && !S && ftype==1 && rmode==3 && opcode==3 && HasFPRCVT()) return FCVTAU_sisd(ctx, dec); // -> FCVTAU_sisd_32D - if(!sf && !S && ftype==1 && rmode==3 && opcode==4 && HasFPRCVT()) return SCVTF_sisd(ctx, dec); // -> SCVTF_sisd_32D - if(!sf && !S && ftype==1 && rmode==3 && opcode==5 && HasFPRCVT()) return UCVTF_sisd(ctx, dec); // -> UCVTF_sisd_32D - if(!sf && !S && ftype==1 && rmode==3 && opcode==6 && HasJSCVT()) return FJCVTZS(ctx, dec); // -> FJCVTZS_32D_float2int - if(!sf && !S && ftype==1 && rmode==3 && opcode==7) UNALLOCATED(ENC_UNALLOCATED_1258_FLOAT2INT); - if(!sf && !S && ftype==3 && !rmode && !opcode && HasFP16()) return FCVTNS_float(ctx, dec); // -> FCVTNS_32H_float2int - if(!sf && !S && ftype==3 && !rmode && opcode==1 && HasFP16()) return FCVTNU_float(ctx, dec); // -> FCVTNU_32H_float2int - if(!sf && !S && ftype==3 && !rmode && opcode==2 && HasFP16()) return SCVTF_float_int(ctx, dec); // -> SCVTF_H32_float2int - if(!sf && !S && ftype==3 && !rmode && opcode==3 && HasFP16()) return UCVTF_float_int(ctx, dec); // -> UCVTF_H32_float2int - if(!sf && !S && ftype==3 && !rmode && opcode==4 && HasFP16()) return FCVTAS_float(ctx, dec); // -> FCVTAS_32H_float2int - if(!sf && !S && ftype==3 && !rmode && opcode==5 && HasFP16()) return FCVTAU_float(ctx, dec); // -> FCVTAU_32H_float2int - if(!sf && !S && ftype==3 && !rmode && opcode==6 && HasFP16()) return FMOV_float_gen(ctx, dec); // -> FMOV_32H_float2int - if(!sf && !S && ftype==3 && !rmode && opcode==7 && HasFP16()) return FMOV_float_gen(ctx, dec); // -> FMOV_H32_float2int - if(!sf && !S && ftype==3 && rmode==1 && !opcode && HasFP16()) return FCVTPS_float(ctx, dec); // -> FCVTPS_32H_float2int - if(!sf && !S && ftype==3 && rmode==1 && opcode==1 && HasFP16()) return FCVTPU_float(ctx, dec); // -> FCVTPU_32H_float2int - if(!sf && !S && ftype==3 && rmode==1 && opcode==2 && HasFPRCVT()) return FCVTNS_sisd(ctx, dec); // -> FCVTNS_sisd_32H - if(!sf && !S && ftype==3 && rmode==1 && opcode==3 && HasFPRCVT()) return FCVTNU_sisd(ctx, dec); // -> FCVTNU_sisd_32H - if(!sf && !S && ftype==3 && rmode==2 && !opcode && HasFP16()) return FCVTMS_float(ctx, dec); // -> FCVTMS_32H_float2int - if(!sf && !S && ftype==3 && rmode==2 && opcode==1 && HasFP16()) return FCVTMU_float(ctx, dec); // -> FCVTMU_32H_float2int - if(!sf && !S && ftype==3 && rmode==2 && opcode==2 && HasFPRCVT()) return FCVTPS_sisd(ctx, dec); // -> FCVTPS_sisd_32H - if(!sf && !S && ftype==3 && rmode==2 && opcode==3 && HasFPRCVT()) return FCVTPU_sisd(ctx, dec); // -> FCVTPU_sisd_32H - if(!sf && !S && ftype==3 && rmode==2 && opcode==4 && HasFPRCVT()) return FCVTMS_sisd(ctx, dec); // -> FCVTMS_sisd_32H - if(!sf && !S && ftype==3 && rmode==2 && opcode==5 && HasFPRCVT()) return FCVTMU_sisd(ctx, dec); // -> FCVTMU_sisd_32H - if(!sf && !S && ftype==3 && rmode==2 && opcode==6 && HasFPRCVT()) return FCVTZS_sisd(ctx, dec); // -> FCVTZS_sisd_32H - if(!sf && !S && ftype==3 && rmode==2 && opcode==7 && HasFPRCVT()) return FCVTZU_sisd(ctx, dec); // -> FCVTZU_sisd_32H - if(!sf && !S && ftype==3 && rmode==3 && !opcode && HasFP16()) return FCVTZS_float_int(ctx, dec); // -> FCVTZS_32H_float2int - if(!sf && !S && ftype==3 && rmode==3 && opcode==1 && HasFP16()) return FCVTZU_float_int(ctx, dec); // -> FCVTZU_32H_float2int - if(!sf && !S && ftype==3 && rmode==3 && opcode==2 && HasFPRCVT()) return FCVTAS_sisd(ctx, dec); // -> FCVTAS_sisd_32H - if(!sf && !S && ftype==3 && rmode==3 && opcode==3 && HasFPRCVT()) return FCVTAU_sisd(ctx, dec); // -> FCVTAU_sisd_32H - if(!sf && !S && ftype==3 && rmode==3 && opcode==4 && HasFPRCVT()) return SCVTF_sisd(ctx, dec); // -> SCVTF_sisd_32H - if(!sf && !S && ftype==3 && rmode==3 && opcode==5 && HasFPRCVT()) return UCVTF_sisd(ctx, dec); // -> UCVTF_sisd_32H - if(sf && !S && !ftype && !rmode && !opcode && HasFP()) return FCVTNS_float(ctx, dec); // -> FCVTNS_64S_float2int - if(sf && !S && !ftype && !rmode && opcode==1 && HasFP()) return FCVTNU_float(ctx, dec); // -> FCVTNU_64S_float2int - if(sf && !S && !ftype && !rmode && opcode==2 && HasFP()) return SCVTF_float_int(ctx, dec); // -> SCVTF_S64_float2int - if(sf && !S && !ftype && !rmode && opcode==3 && HasFP()) return UCVTF_float_int(ctx, dec); // -> UCVTF_S64_float2int - if(sf && !S && !ftype && !rmode && opcode==4 && HasFP()) return FCVTAS_float(ctx, dec); // -> FCVTAS_64S_float2int - if(sf && !S && !ftype && !rmode && opcode==5 && HasFP()) return FCVTAU_float(ctx, dec); // -> FCVTAU_64S_float2int - if(sf && !S && !ftype && rmode==1 && !opcode && HasFP()) return FCVTPS_float(ctx, dec); // -> FCVTPS_64S_float2int - if(sf && !S && !ftype && rmode==1 && opcode==1 && HasFP()) return FCVTPU_float(ctx, dec); // -> FCVTPU_64S_float2int - if(sf && !S && !ftype && rmode==1 && opcode==2 && HasFPRCVT()) return FCVTNS_sisd(ctx, dec); // -> FCVTNS_sisd_64S - if(sf && !S && !ftype && rmode==1 && opcode==3 && HasFPRCVT()) return FCVTNU_sisd(ctx, dec); // -> FCVTNU_sisd_64S - if(sf && !S && !ftype && rmode==2 && !opcode && HasFP()) return FCVTMS_float(ctx, dec); // -> FCVTMS_64S_float2int - if(sf && !S && !ftype && rmode==2 && opcode==1 && HasFP()) return FCVTMU_float(ctx, dec); // -> FCVTMU_64S_float2int - if(sf && !S && !ftype && rmode==2 && opcode==2 && HasFPRCVT()) return FCVTPS_sisd(ctx, dec); // -> FCVTPS_sisd_64S - if(sf && !S && !ftype && rmode==2 && opcode==3 && HasFPRCVT()) return FCVTPU_sisd(ctx, dec); // -> FCVTPU_sisd_64S - if(sf && !S && !ftype && rmode==2 && opcode==4 && HasFPRCVT()) return FCVTMS_sisd(ctx, dec); // -> FCVTMS_sisd_64S - if(sf && !S && !ftype && rmode==2 && opcode==5 && HasFPRCVT()) return FCVTMU_sisd(ctx, dec); // -> FCVTMU_sisd_64S - if(sf && !S && !ftype && rmode==2 && opcode==6 && HasFPRCVT()) return FCVTZS_sisd(ctx, dec); // -> FCVTZS_sisd_64S - if(sf && !S && !ftype && rmode==2 && opcode==7 && HasFPRCVT()) return FCVTZU_sisd(ctx, dec); // -> FCVTZU_sisd_64S - if(sf && !S && !ftype && rmode==3 && !opcode && HasFP()) return FCVTZS_float_int(ctx, dec); // -> FCVTZS_64S_float2int - if(sf && !S && !ftype && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_int(ctx, dec); // -> FCVTZU_64S_float2int - if(sf && !S && !ftype && rmode==3 && opcode==2 && HasFPRCVT()) return FCVTAS_sisd(ctx, dec); // -> FCVTAS_sisd_64S - if(sf && !S && !ftype && rmode==3 && opcode==3 && HasFPRCVT()) return FCVTAU_sisd(ctx, dec); // -> FCVTAU_sisd_64S - if(sf && !S && !ftype && rmode==3 && opcode==4 && HasFPRCVT()) return SCVTF_sisd(ctx, dec); // -> SCVTF_sisd_64S - if(sf && !S && !ftype && rmode==3 && opcode==5 && HasFPRCVT()) return UCVTF_sisd(ctx, dec); // -> UCVTF_sisd_64S - if(sf && !S && ftype==1 && !rmode && !opcode && HasFP()) return FCVTNS_float(ctx, dec); // -> FCVTNS_64D_float2int - if(sf && !S && ftype==1 && !rmode && opcode==1 && HasFP()) return FCVTNU_float(ctx, dec); // -> FCVTNU_64D_float2int - if(sf && !S && ftype==1 && !rmode && opcode==2 && HasFP()) return SCVTF_float_int(ctx, dec); // -> SCVTF_D64_float2int - if(sf && !S && ftype==1 && !rmode && opcode==3 && HasFP()) return UCVTF_float_int(ctx, dec); // -> UCVTF_D64_float2int - if(sf && !S && ftype==1 && !rmode && opcode==4 && HasFP()) return FCVTAS_float(ctx, dec); // -> FCVTAS_64D_float2int - if(sf && !S && ftype==1 && !rmode && opcode==5 && HasFP()) return FCVTAU_float(ctx, dec); // -> FCVTAU_64D_float2int - if(sf && !S && ftype==1 && !rmode && opcode==6 && HasFP()) return FMOV_float_gen(ctx, dec); // -> FMOV_64D_float2int - if(sf && !S && ftype==1 && !rmode && opcode==7 && HasFP()) return FMOV_float_gen(ctx, dec); // -> FMOV_D64_float2int - if(sf && !S && ftype==1 && rmode==1 && !opcode && HasFP()) return FCVTPS_float(ctx, dec); // -> FCVTPS_64D_float2int - if(sf && !S && ftype==1 && rmode==1 && opcode==1 && HasFP()) return FCVTPU_float(ctx, dec); // -> FCVTPU_64D_float2int - if(sf && !S && ftype==1 && rmode==2 && !opcode && HasFP()) return FCVTMS_float(ctx, dec); // -> FCVTMS_64D_float2int - if(sf && !S && ftype==1 && rmode==2 && opcode==1 && HasFP()) return FCVTMU_float(ctx, dec); // -> FCVTMU_64D_float2int - if(sf && !S && ftype==1 && rmode==3 && !opcode && HasFP()) return FCVTZS_float_int(ctx, dec); // -> FCVTZS_64D_float2int - if(sf && !S && ftype==1 && rmode==3 && opcode==1 && HasFP()) return FCVTZU_float_int(ctx, dec); // -> FCVTZU_64D_float2int - if(sf && !S && ftype==2 && rmode==1 && opcode==6 && HasFP()) return FMOV_float_gen(ctx, dec); // -> FMOV_64VX_float2int - if(sf && !S && ftype==2 && rmode==1 && opcode==7 && HasFP()) return FMOV_float_gen(ctx, dec); // -> FMOV_V64I_float2int - if(sf && !S && ftype==3 && !rmode && !opcode && HasFP16()) return FCVTNS_float(ctx, dec); // -> FCVTNS_64H_float2int - if(sf && !S && ftype==3 && !rmode && opcode==1 && HasFP16()) return FCVTNU_float(ctx, dec); // -> FCVTNU_64H_float2int - if(sf && !S && ftype==3 && !rmode && opcode==2 && HasFP16()) return SCVTF_float_int(ctx, dec); // -> SCVTF_H64_float2int - if(sf && !S && ftype==3 && !rmode && opcode==3 && HasFP16()) return UCVTF_float_int(ctx, dec); // -> UCVTF_H64_float2int - if(sf && !S && ftype==3 && !rmode && opcode==4 && HasFP16()) return FCVTAS_float(ctx, dec); // -> FCVTAS_64H_float2int - if(sf && !S && ftype==3 && !rmode && opcode==5 && HasFP16()) return FCVTAU_float(ctx, dec); // -> FCVTAU_64H_float2int - if(sf && !S && ftype==3 && !rmode && opcode==6 && HasFP16()) return FMOV_float_gen(ctx, dec); // -> FMOV_64H_float2int - if(sf && !S && ftype==3 && !rmode && opcode==7 && HasFP16()) return FMOV_float_gen(ctx, dec); // -> FMOV_H64_float2int - if(sf && !S && ftype==3 && rmode==1 && !opcode && HasFP16()) return FCVTPS_float(ctx, dec); // -> FCVTPS_64H_float2int - if(sf && !S && ftype==3 && rmode==1 && opcode==1 && HasFP16()) return FCVTPU_float(ctx, dec); // -> FCVTPU_64H_float2int - if(sf && !S && ftype==3 && rmode==1 && opcode==2 && HasFPRCVT()) return FCVTNS_sisd(ctx, dec); // -> FCVTNS_sisd_64H - if(sf && !S && ftype==3 && rmode==1 && opcode==3 && HasFPRCVT()) return FCVTNU_sisd(ctx, dec); // -> FCVTNU_sisd_64H - if(sf && !S && ftype==3 && rmode==2 && !opcode && HasFP16()) return FCVTMS_float(ctx, dec); // -> FCVTMS_64H_float2int - if(sf && !S && ftype==3 && rmode==2 && opcode==1 && HasFP16()) return FCVTMU_float(ctx, dec); // -> FCVTMU_64H_float2int - if(sf && !S && ftype==3 && rmode==2 && opcode==2 && HasFPRCVT()) return FCVTPS_sisd(ctx, dec); // -> FCVTPS_sisd_64H - if(sf && !S && ftype==3 && rmode==2 && opcode==3 && HasFPRCVT()) return FCVTPU_sisd(ctx, dec); // -> FCVTPU_sisd_64H - if(sf && !S && ftype==3 && rmode==2 && opcode==4 && HasFPRCVT()) return FCVTMS_sisd(ctx, dec); // -> FCVTMS_sisd_64H - if(sf && !S && ftype==3 && rmode==2 && opcode==5 && HasFPRCVT()) return FCVTMU_sisd(ctx, dec); // -> FCVTMU_sisd_64H - if(sf && !S && ftype==3 && rmode==2 && opcode==6 && HasFPRCVT()) return FCVTZS_sisd(ctx, dec); // -> FCVTZS_sisd_64H - if(sf && !S && ftype==3 && rmode==2 && opcode==7 && HasFPRCVT()) return FCVTZU_sisd(ctx, dec); // -> FCVTZU_sisd_64H - if(sf && !S && ftype==3 && rmode==3 && !opcode && HasFP16()) return FCVTZS_float_int(ctx, dec); // -> FCVTZS_64H_float2int - if(sf && !S && ftype==3 && rmode==3 && opcode==1 && HasFP16()) return FCVTZU_float_int(ctx, dec); // -> FCVTZU_64H_float2int - if(sf && !S && ftype==3 && rmode==3 && opcode==2 && HasFPRCVT()) return FCVTAS_sisd(ctx, dec); // -> FCVTAS_sisd_64H - if(sf && !S && ftype==3 && rmode==3 && opcode==3 && HasFPRCVT()) return FCVTAU_sisd(ctx, dec); // -> FCVTAU_sisd_64H - if(sf && !S && ftype==3 && rmode==3 && opcode==4 && HasFPRCVT()) return SCVTF_sisd(ctx, dec); // -> SCVTF_sisd_64H - if(sf && !S && ftype==3 && rmode==3 && opcode==5 && HasFPRCVT()) return UCVTF_sisd(ctx, dec); // -> UCVTF_sisd_64H - if(!sf && !S && !ftype && rmode && (opcode&6)==2) UNALLOCATED(ENC_UNALLOCATED_1250_FLOAT2INT); - if(!sf && !S && ftype==2 && rmode==3 && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_1257_FLOAT2INT); - if(!S && ftype!=2 && rmode==1 && (opcode&6)==4) UNALLOCATED(ENC_UNALLOCATED_1249_FLOAT2INT); - if(!sf && !S && !(ftype&1) && rmode==1 && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_1252_FLOAT2INT); - if(!sf && !S && ftype==1 && !(rmode&2) && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_1251_FLOAT2INT); - if(sf && !S && !(ftype&1) && rmode==3 && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_1256_FLOAT2INT); - if(sf && !S && !ftype && !(rmode&2) && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_1253_FLOAT2INT); - if(sf && !S && ftype==1 && rmode==1 && (opcode&2)==2) UNALLOCATED(ENC_UNALLOCATED_1254_FLOAT2INT); - if(sf && !S && ftype==1 && (rmode&2)==2 && (opcode&6)==2) UNALLOCATED(ENC_UNALLOCATED_1255_FLOAT2INT); - if(!S && ftype==2 && rmode&1 && (opcode&6)==4) UNALLOCATED(ENC_UNALLOCATED_1247_FLOAT2INT); - if(!S && ftype==3 && rmode&1 && (opcode&6)==6) UNALLOCATED(ENC_UNALLOCATED_1248_FLOAT2INT); - if(!sf && !S && !ftype && (rmode&2)==2 && (opcode&4)==4) UNALLOCATED(ENC_UNALLOCATED_1245_FLOAT2INT); - if(sf && !S && ftype==1 && (rmode&2)==2 && (opcode&4)==4) UNALLOCATED(ENC_UNALLOCATED_1246_FLOAT2INT); - if(!S && ftype==2 && rmode&1 && !(opcode&4)) UNALLOCATED(ENC_UNALLOCATED_1244_FLOAT2INT); - if(!S && ftype==2 && !(rmode&1)) UNALLOCATED(ENC_UNALLOCATED_1243_FLOAT2INT); - if(S) UNALLOCATED(ENC_UNALLOCATED_1242_FLOAT2INT); - UNMATCHED; -} - -int decode_iclass_cryptoaes(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&0x1f; - if(!size && opcode==4 && HasAES()) return AESE_advsimd(ctx, dec); // -> AESE_B_cryptoaes - if(!size && opcode==5 && HasAES()) return AESD_advsimd(ctx, dec); // -> AESD_B_cryptoaes - if(!size && opcode==6 && HasAES()) return AESMC_advsimd(ctx, dec); // -> AESMC_B_cryptoaes - if(!size && opcode==7 && HasAES()) return AESIMC_advsimd(ctx, dec); // -> AESIMC_B_cryptoaes - if(!size && !(opcode&0x1c)) UNALLOCATED(ENC_UNALLOCATED_1262_CRYPTOAES); - if(!size && (opcode&0x18)==8) UNALLOCATED(ENC_UNALLOCATED_1261_CRYPTOAES); - if(!size && (opcode&0x10)==0x10) UNALLOCATED(ENC_UNALLOCATED_1260_CRYPTOAES); - if(size) UNALLOCATED(ENC_UNALLOCATED_1259_CRYPTOAES); - UNMATCHED; -} - -int decode_iclass_crypto4(context *ctx, Instruction *dec) -{ - uint32_t Op0=(INSWORD>>21)&3; - if(!Op0 && HasSHA3()) return EOR3_advsimd(ctx, dec); // -> EOR3_VVV16_crypto4 - if(Op0==1 && HasSHA3()) return BCAX_advsimd(ctx, dec); // -> BCAX_VVV16_crypto4 - if(Op0==2 && HasSM3()) return SM3SS1_advsimd(ctx, dec); // -> SM3SS1_VVV4_crypto4 - if(Op0==3) UNALLOCATED(ENC_UNALLOCATED_1263_CRYPTO4); - UNMATCHED; -} - -int decode_iclass_cryptosha3(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&7; - if(!size && !opcode && HasSHA1()) return SHA1C_advsimd(ctx, dec); // -> SHA1C_QSV_cryptosha3 - if(!size && opcode==1 && HasSHA1()) return SHA1P_advsimd(ctx, dec); // -> SHA1P_QSV_cryptosha3 - if(!size && opcode==2 && HasSHA1()) return SHA1M_advsimd(ctx, dec); // -> SHA1M_QSV_cryptosha3 - if(!size && opcode==3 && HasSHA1()) return SHA1SU0_advsimd(ctx, dec); // -> SHA1SU0_VVV_cryptosha3 - if(!size && opcode==4 && HasSHA256()) return SHA256H_advsimd(ctx, dec); // -> SHA256H_QQV_cryptosha3 - if(!size && opcode==5 && HasSHA256()) return SHA256H2_advsimd(ctx, dec); // -> SHA256H2_QQV_cryptosha3 - if(!size && opcode==6 && HasSHA256()) return SHA256SU1_advsimd(ctx, dec); // -> SHA256SU1_VVV_cryptosha3 - if(!size && opcode==7) UNALLOCATED(ENC_UNALLOCATED_1265_CRYPTOSHA3); - if(size) UNALLOCATED(ENC_UNALLOCATED_1264_CRYPTOSHA3); - UNMATCHED; -} - -int decode_iclass_cryptosha512_3(context *ctx, Instruction *dec) -{ - uint32_t O=(INSWORD>>14)&1, opcode=(INSWORD>>10)&3; - if(!O && !opcode && HasSHA512()) return SHA512H_advsimd(ctx, dec); // -> SHA512H_QQV_cryptosha512_3 - if(!O && opcode==1 && HasSHA512()) return SHA512H2_advsimd(ctx, dec); // -> SHA512H2_QQV_cryptosha512_3 - if(!O && opcode==2 && HasSHA512()) return SHA512SU1_advsimd(ctx, dec); // -> SHA512SU1_VVV2_cryptosha512_3 - if(!O && opcode==3 && HasSHA3()) return RAX1_advsimd(ctx, dec); // -> RAX1_VVV2_cryptosha512_3 - if(O && !opcode && HasSM3()) return SM3PARTW1_advsimd(ctx, dec); // -> SM3PARTW1_VVV4_cryptosha512_3 - if(O && opcode==1 && HasSM3()) return SM3PARTW2_advsimd(ctx, dec); // -> SM3PARTW2_VVV4_cryptosha512_3 - if(O && opcode==2 && HasSM4()) return SM4EKEY_advsimd(ctx, dec); // -> SM4EKEY_VVV4_cryptosha512_3 - if(O && opcode==3) UNALLOCATED(ENC_UNALLOCATED_1266_CRYPTOSHA512_3); - UNMATCHED; -} - -int decode_iclass_crypto3_imm2(context *ctx, Instruction *dec) -{ - uint32_t opcode=(INSWORD>>10)&3; - if(!opcode && HasSM3()) return SM3TT1A_advsimd(ctx, dec); // -> SM3TT1A_VVV4_crypto3_imm2 - if(opcode==1 && HasSM3()) return SM3TT1B_advsimd(ctx, dec); // -> SM3TT1B_VVV4_crypto3_imm2 - if(opcode==2 && HasSM3()) return SM3TT2A_advsimd(ctx, dec); // -> SM3TT2A_VVV4_crypto3_imm2 - if(opcode==3 && HasSM3()) return SM3TT2B_advsimd(ctx, dec); // -> SM3TT2B_VVV_crypto3_imm2 - UNMATCHED; -} - -int decode_iclass_crypto3_imm6(context *ctx, Instruction *dec) -{ - return XAR_advsimd(ctx, dec); -} - -int decode_iclass_cryptosha2(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opcode=(INSWORD>>12)&0x1f; - if(!size && !opcode && HasSHA1()) return SHA1H_advsimd(ctx, dec); // -> SHA1H_SS_cryptosha2 - if(!size && opcode==1 && HasSHA1()) return SHA1SU1_advsimd(ctx, dec); // -> SHA1SU1_VV_cryptosha2 - if(!size && opcode==2 && HasSHA256()) return SHA256SU0_advsimd(ctx, dec); // -> SHA256SU0_VV_cryptosha2 - if(!size && opcode==3) UNALLOCATED(ENC_UNALLOCATED_1271_CRYPTOSHA2); - if(!size && (opcode&0x1c)==4) UNALLOCATED(ENC_UNALLOCATED_1270_CRYPTOSHA2); - if(!size && (opcode&0x18)==8) UNALLOCATED(ENC_UNALLOCATED_1269_CRYPTOSHA2); - if(!size && (opcode&0x10)==0x10) UNALLOCATED(ENC_UNALLOCATED_1268_CRYPTOSHA2); - if(size) UNALLOCATED(ENC_UNALLOCATED_1267_CRYPTOSHA2); - UNMATCHED; -} - -int decode_iclass_cryptosha512_2(context *ctx, Instruction *dec) -{ - uint32_t opcode=(INSWORD>>10)&3; - if(!opcode && HasSHA512()) return SHA512SU0_advsimd(ctx, dec); // -> SHA512SU0_VV2_cryptosha512_2 - if(opcode==1 && HasSM4()) return SM4E_advsimd(ctx, dec); // -> SM4E_VV4_cryptosha512_2 - if((opcode&2)==2) UNALLOCATED(ENC_UNALLOCATED_1272_CRYPTOSHA512_2); - UNMATCHED; -} - -int decode_iclass_floatcmp(context *ctx, Instruction *dec) -{ - uint32_t M=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, op=(INSWORD>>14)&3, opcode2=INSWORD&0x1f; - if(!M && !S && !ftype && !op && !opcode2 && HasFP()) return FCMP_float(ctx, dec); // -> FCMP_S_floatcmp - if(!M && !S && !ftype && !op && opcode2==8 && HasFP()) return FCMP_float(ctx, dec); // -> FCMP_SZ_floatcmp - if(!M && !S && !ftype && !op && opcode2==0x10 && HasFP()) return FCMPE_float(ctx, dec); // -> FCMPE_S_floatcmp - if(!M && !S && !ftype && !op && opcode2==0x18 && HasFP()) return FCMPE_float(ctx, dec); // -> FCMPE_SZ_floatcmp - if(!M && !S && ftype==1 && !op && !opcode2 && HasFP()) return FCMP_float(ctx, dec); // -> FCMP_D_floatcmp - if(!M && !S && ftype==1 && !op && opcode2==8 && HasFP()) return FCMP_float(ctx, dec); // -> FCMP_DZ_floatcmp - if(!M && !S && ftype==1 && !op && opcode2==0x10 && HasFP()) return FCMPE_float(ctx, dec); // -> FCMPE_D_floatcmp - if(!M && !S && ftype==1 && !op && opcode2==0x18 && HasFP()) return FCMPE_float(ctx, dec); // -> FCMPE_DZ_floatcmp - if(!M && !S && ftype==3 && !op && !opcode2 && HasFP16()) return FCMP_float(ctx, dec); // -> FCMP_H_floatcmp - if(!M && !S && ftype==3 && !op && opcode2==8 && HasFP16()) return FCMP_float(ctx, dec); // -> FCMP_HZ_floatcmp - if(!M && !S && ftype==3 && !op && opcode2==0x10 && HasFP16()) return FCMPE_float(ctx, dec); // -> FCMPE_H_floatcmp - if(!M && !S && ftype==3 && !op && opcode2==0x18 && HasFP16()) return FCMPE_float(ctx, dec); // -> FCMPE_HZ_floatcmp - if(!M && !S && ftype==2 && !op && !(opcode2&7)) UNALLOCATED(ENC_UNALLOCATED_1279_FLOATCMP); - if(!M && !S && !op && (opcode2&7)==1) UNALLOCATED(ENC_UNALLOCATED_1278_FLOATCMP); - if(!M && !S && !op && (opcode2&6)==2) UNALLOCATED(ENC_UNALLOCATED_1277_FLOATCMP); - if(!M && !S && !op && (opcode2&4)==4) UNALLOCATED(ENC_UNALLOCATED_1276_FLOATCMP); - if(!M && !S && op) UNALLOCATED(ENC_UNALLOCATED_1275_FLOATCMP); - if(!M && S) UNALLOCATED(ENC_UNALLOCATED_1274_FLOATCMP); - if(M) UNALLOCATED(ENC_UNALLOCATED_1273_FLOATCMP); - UNMATCHED; -} - -int decode_iclass_floatccmp(context *ctx, Instruction *dec) -{ - uint32_t M=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, op=(INSWORD>>4)&1; - if(!M && !S && !ftype && !op && HasFP()) return FCCMP_float(ctx, dec); // -> FCCMP_S_floatccmp - if(!M && !S && !ftype && op && HasFP()) return FCCMPE_float(ctx, dec); // -> FCCMPE_S_floatccmp - if(!M && !S && ftype==1 && !op && HasFP()) return FCCMP_float(ctx, dec); // -> FCCMP_D_floatccmp - if(!M && !S && ftype==1 && op && HasFP()) return FCCMPE_float(ctx, dec); // -> FCCMPE_D_floatccmp - if(!M && !S && ftype==3 && !op && HasFP16()) return FCCMP_float(ctx, dec); // -> FCCMP_H_floatccmp - if(!M && !S && ftype==3 && op && HasFP16()) return FCCMPE_float(ctx, dec); // -> FCCMPE_H_floatccmp - if(!M && !S && ftype==2) UNALLOCATED(ENC_UNALLOCATED_1282_FLOATCCMP); - if(!M && S) UNALLOCATED(ENC_UNALLOCATED_1281_FLOATCCMP); - if(M) UNALLOCATED(ENC_UNALLOCATED_1280_FLOATCCMP); - UNMATCHED; -} - -int decode_iclass_floatsel(context *ctx, Instruction *dec) -{ - uint32_t M=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3; - if(!M && !S && !ftype && HasFP()) return FCSEL_float(ctx, dec); // -> FCSEL_S_floatsel - if(!M && !S && ftype==1 && HasFP()) return FCSEL_float(ctx, dec); // -> FCSEL_D_floatsel - if(!M && !S && ftype==2) UNALLOCATED(ENC_UNALLOCATED_1285_FLOATSEL); - if(!M && !S && ftype==3 && HasFP16()) return FCSEL_float(ctx, dec); // -> FCSEL_H_floatsel - if(!M && S) UNALLOCATED(ENC_UNALLOCATED_1284_FLOATSEL); - if(M) UNALLOCATED(ENC_UNALLOCATED_1283_FLOATSEL); - UNMATCHED; -} - -int decode_iclass_floatdp1(context *ctx, Instruction *dec) -{ - uint32_t M=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, opcode=(INSWORD>>15)&0x3f; - if(!M && !S && !ftype && !opcode && HasFP()) return FMOV_float(ctx, dec); // -> FMOV_S_floatdp1 - if(!M && !S && !ftype && opcode==1 && HasFP()) return FABS_float(ctx, dec); // -> FABS_S_floatdp1 - if(!M && !S && !ftype && opcode==2 && HasFP()) return FNEG_float(ctx, dec); // -> FNEG_S_floatdp1 - if(!M && !S && !ftype && opcode==3 && HasFP()) return FSQRT_float(ctx, dec); // -> FSQRT_S_floatdp1 - if(!M && !S && !ftype && opcode==5 && HasFP()) return FCVT_float(ctx, dec); // -> FCVT_DS_floatdp1 - if(!M && !S && !ftype && opcode==7 && HasFP()) return FCVT_float(ctx, dec); // -> FCVT_HS_floatdp1 - if(!M && !S && !ftype && opcode==8 && HasFP()) return FRINTN_float(ctx, dec); // -> FRINTN_S_floatdp1 - if(!M && !S && !ftype && opcode==9 && HasFP()) return FRINTP_float(ctx, dec); // -> FRINTP_S_floatdp1 - if(!M && !S && !ftype && opcode==10 && HasFP()) return FRINTM_float(ctx, dec); // -> FRINTM_S_floatdp1 - if(!M && !S && !ftype && opcode==11 && HasFP()) return FRINTZ_float(ctx, dec); // -> FRINTZ_S_floatdp1 - if(!M && !S && !ftype && opcode==12 && HasFP()) return FRINTA_float(ctx, dec); // -> FRINTA_S_floatdp1 - if(!M && !S && !ftype && opcode==14 && HasFP()) return FRINTX_float(ctx, dec); // -> FRINTX_S_floatdp1 - if(!M && !S && !ftype && opcode==15 && HasFP()) return FRINTI_float(ctx, dec); // -> FRINTI_S_floatdp1 - if(!M && !S && !ftype && opcode==0x10 && HasFRINTTS()) return FRINT32Z_float(ctx, dec); // -> FRINT32Z_S_floatdp1 - if(!M && !S && !ftype && opcode==0x11 && HasFRINTTS()) return FRINT32X_float(ctx, dec); // -> FRINT32X_S_floatdp1 - if(!M && !S && !ftype && opcode==0x12 && HasFRINTTS()) return FRINT64Z_float(ctx, dec); // -> FRINT64Z_S_floatdp1 - if(!M && !S && !ftype && opcode==0x13 && HasFRINTTS()) return FRINT64X_float(ctx, dec); // -> FRINT64X_S_floatdp1 - if(!M && !S && ftype==1 && !opcode && HasFP()) return FMOV_float(ctx, dec); // -> FMOV_D_floatdp1 - if(!M && !S && ftype==1 && opcode==1 && HasFP()) return FABS_float(ctx, dec); // -> FABS_D_floatdp1 - if(!M && !S && ftype==1 && opcode==2 && HasFP()) return FNEG_float(ctx, dec); // -> FNEG_D_floatdp1 - if(!M && !S && ftype==1 && opcode==3 && HasFP()) return FSQRT_float(ctx, dec); // -> FSQRT_D_floatdp1 - if(!M && !S && ftype==1 && opcode==4 && HasFP()) return FCVT_float(ctx, dec); // -> FCVT_SD_floatdp1 - if(!M && !S && ftype==1 && opcode==5) UNALLOCATED(ENC_UNALLOCATED_1296_FLOATDP1); - if(!M && !S && ftype==1 && opcode==6 && HasBF16()) return BFCVT_float(ctx, dec); // -> BFCVT_BS_floatdp1 - if(!M && !S && ftype==1 && opcode==7 && HasFP()) return FCVT_float(ctx, dec); // -> FCVT_HD_floatdp1 - if(!M && !S && ftype==1 && opcode==8 && HasFP()) return FRINTN_float(ctx, dec); // -> FRINTN_D_floatdp1 - if(!M && !S && ftype==1 && opcode==9 && HasFP()) return FRINTP_float(ctx, dec); // -> FRINTP_D_floatdp1 - if(!M && !S && ftype==1 && opcode==10 && HasFP()) return FRINTM_float(ctx, dec); // -> FRINTM_D_floatdp1 - if(!M && !S && ftype==1 && opcode==11 && HasFP()) return FRINTZ_float(ctx, dec); // -> FRINTZ_D_floatdp1 - if(!M && !S && ftype==1 && opcode==12 && HasFP()) return FRINTA_float(ctx, dec); // -> FRINTA_D_floatdp1 - if(!M && !S && ftype==1 && opcode==14 && HasFP()) return FRINTX_float(ctx, dec); // -> FRINTX_D_floatdp1 - if(!M && !S && ftype==1 && opcode==15 && HasFP()) return FRINTI_float(ctx, dec); // -> FRINTI_D_floatdp1 - if(!M && !S && ftype==1 && opcode==0x10 && HasFRINTTS()) return FRINT32Z_float(ctx, dec); // -> FRINT32Z_D_floatdp1 - if(!M && !S && ftype==1 && opcode==0x11 && HasFRINTTS()) return FRINT32X_float(ctx, dec); // -> FRINT32X_D_floatdp1 - if(!M && !S && ftype==1 && opcode==0x12 && HasFRINTTS()) return FRINT64Z_float(ctx, dec); // -> FRINT64Z_D_floatdp1 - if(!M && !S && ftype==1 && opcode==0x13 && HasFRINTTS()) return FRINT64X_float(ctx, dec); // -> FRINT64X_D_floatdp1 - if(!M && !S && ftype==3 && !opcode && HasFP16()) return FMOV_float(ctx, dec); // -> FMOV_H_floatdp1 - if(!M && !S && ftype==3 && opcode==1 && HasFP16()) return FABS_float(ctx, dec); // -> FABS_H_floatdp1 - if(!M && !S && ftype==3 && opcode==2 && HasFP16()) return FNEG_float(ctx, dec); // -> FNEG_H_floatdp1 - if(!M && !S && ftype==3 && opcode==3 && HasFP16()) return FSQRT_float(ctx, dec); // -> FSQRT_H_floatdp1 - if(!M && !S && ftype==3 && opcode==4 && HasFP()) return FCVT_float(ctx, dec); // -> FCVT_SH_floatdp1 - if(!M && !S && ftype==3 && opcode==5 && HasFP()) return FCVT_float(ctx, dec); // -> FCVT_DH_floatdp1 - if(!M && !S && ftype==3 && opcode==8 && HasFP16()) return FRINTN_float(ctx, dec); // -> FRINTN_H_floatdp1 - if(!M && !S && ftype==3 && opcode==9 && HasFP16()) return FRINTP_float(ctx, dec); // -> FRINTP_H_floatdp1 - if(!M && !S && ftype==3 && opcode==10 && HasFP16()) return FRINTM_float(ctx, dec); // -> FRINTM_H_floatdp1 - if(!M && !S && ftype==3 && opcode==11 && HasFP16()) return FRINTZ_float(ctx, dec); // -> FRINTZ_H_floatdp1 - if(!M && !S && ftype==3 && opcode==12 && HasFP16()) return FRINTA_float(ctx, dec); // -> FRINTA_H_floatdp1 - if(!M && !S && ftype==3 && opcode==14 && HasFP16()) return FRINTX_float(ctx, dec); // -> FRINTX_H_floatdp1 - if(!M && !S && ftype==3 && opcode==15 && HasFP16()) return FRINTI_float(ctx, dec); // -> FRINTI_H_floatdp1 - if(!M && !S && ftype!=2 && opcode==13) UNALLOCATED(ENC_UNALLOCATED_1295_FLOATDP1); - if(!M && !S && !ftype && (opcode&0x3d)==4) UNALLOCATED(ENC_UNALLOCATED_1293_FLOATDP1); - if(!M && !S && ftype==3 && (opcode&0x3e)==6) UNALLOCATED(ENC_UNALLOCATED_1294_FLOATDP1); - if(!M && !S && !(ftype&2) && (opcode&0x3c)==0x14) UNALLOCATED(ENC_UNALLOCATED_1292_FLOATDP1); - if(!M && !S && !(ftype&2) && (opcode&0x38)==0x18) UNALLOCATED(ENC_UNALLOCATED_1290_FLOATDP1); - if(!M && !S && ftype==3 && (opcode&0x30)==0x10) UNALLOCATED(ENC_UNALLOCATED_1291_FLOATDP1); - if(!M && !S && ftype==2 && !(opcode&0x20)) UNALLOCATED(ENC_UNALLOCATED_1289_FLOATDP1); - if(!M && !S && (opcode&0x20)==0x20) UNALLOCATED(ENC_UNALLOCATED_1288_FLOATDP1); - if(!M && S) UNALLOCATED(ENC_UNALLOCATED_1287_FLOATDP1); - if(M) UNALLOCATED(ENC_UNALLOCATED_1286_FLOATDP1); - UNMATCHED; -} - -int decode_iclass_floatdp2(context *ctx, Instruction *dec) -{ - uint32_t M=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, opcode=(INSWORD>>12)&15; - if(!M && !S && !ftype && !opcode && HasFP()) return FMUL_float(ctx, dec); // -> FMUL_S_floatdp2 - if(!M && !S && !ftype && opcode==1 && HasFP()) return FDIV_float(ctx, dec); // -> FDIV_S_floatdp2 - if(!M && !S && !ftype && opcode==2 && HasFP()) return FADD_float(ctx, dec); // -> FADD_S_floatdp2 - if(!M && !S && !ftype && opcode==3 && HasFP()) return FSUB_float(ctx, dec); // -> FSUB_S_floatdp2 - if(!M && !S && !ftype && opcode==4 && HasFP()) return FMAX_float(ctx, dec); // -> FMAX_S_floatdp2 - if(!M && !S && !ftype && opcode==5 && HasFP()) return FMIN_float(ctx, dec); // -> FMIN_S_floatdp2 - if(!M && !S && !ftype && opcode==6 && HasFP()) return FMAXNM_float(ctx, dec); // -> FMAXNM_S_floatdp2 - if(!M && !S && !ftype && opcode==7 && HasFP()) return FMINNM_float(ctx, dec); // -> FMINNM_S_floatdp2 - if(!M && !S && !ftype && opcode==8 && HasFP()) return FNMUL_float(ctx, dec); // -> FNMUL_S_floatdp2 - if(!M && !S && ftype==1 && !opcode && HasFP()) return FMUL_float(ctx, dec); // -> FMUL_D_floatdp2 - if(!M && !S && ftype==1 && opcode==1 && HasFP()) return FDIV_float(ctx, dec); // -> FDIV_D_floatdp2 - if(!M && !S && ftype==1 && opcode==2 && HasFP()) return FADD_float(ctx, dec); // -> FADD_D_floatdp2 - if(!M && !S && ftype==1 && opcode==3 && HasFP()) return FSUB_float(ctx, dec); // -> FSUB_D_floatdp2 - if(!M && !S && ftype==1 && opcode==4 && HasFP()) return FMAX_float(ctx, dec); // -> FMAX_D_floatdp2 - if(!M && !S && ftype==1 && opcode==5 && HasFP()) return FMIN_float(ctx, dec); // -> FMIN_D_floatdp2 - if(!M && !S && ftype==1 && opcode==6 && HasFP()) return FMAXNM_float(ctx, dec); // -> FMAXNM_D_floatdp2 - if(!M && !S && ftype==1 && opcode==7 && HasFP()) return FMINNM_float(ctx, dec); // -> FMINNM_D_floatdp2 - if(!M && !S && ftype==1 && opcode==8 && HasFP()) return FNMUL_float(ctx, dec); // -> FNMUL_D_floatdp2 - if(!M && !S && ftype==3 && !opcode && HasFP16()) return FMUL_float(ctx, dec); // -> FMUL_H_floatdp2 - if(!M && !S && ftype==3 && opcode==1 && HasFP16()) return FDIV_float(ctx, dec); // -> FDIV_H_floatdp2 - if(!M && !S && ftype==3 && opcode==2 && HasFP16()) return FADD_float(ctx, dec); // -> FADD_H_floatdp2 - if(!M && !S && ftype==3 && opcode==3 && HasFP16()) return FSUB_float(ctx, dec); // -> FSUB_H_floatdp2 - if(!M && !S && ftype==3 && opcode==4 && HasFP16()) return FMAX_float(ctx, dec); // -> FMAX_H_floatdp2 - if(!M && !S && ftype==3 && opcode==5 && HasFP16()) return FMIN_float(ctx, dec); // -> FMIN_H_floatdp2 - if(!M && !S && ftype==3 && opcode==6 && HasFP16()) return FMAXNM_float(ctx, dec); // -> FMAXNM_H_floatdp2 - if(!M && !S && ftype==3 && opcode==7 && HasFP16()) return FMINNM_float(ctx, dec); // -> FMINNM_H_floatdp2 - if(!M && !S && ftype==3 && opcode==8 && HasFP16()) return FNMUL_float(ctx, dec); // -> FNMUL_H_floatdp2 - if(!M && !S && ftype!=2 && opcode==9) UNALLOCATED(ENC_UNALLOCATED_1302_FLOATDP2); - if(!M && !S && ftype!=2 && (opcode&14)==10) UNALLOCATED(ENC_UNALLOCATED_1301_FLOATDP2); - if(!M && !S && ftype!=2 && (opcode&12)==12) UNALLOCATED(ENC_UNALLOCATED_1300_FLOATDP2); - if(!M && !S && ftype==2) UNALLOCATED(ENC_UNALLOCATED_1299_FLOATDP2); - if(!M && S) UNALLOCATED(ENC_UNALLOCATED_1298_FLOATDP2); - if(M) UNALLOCATED(ENC_UNALLOCATED_1297_FLOATDP2); - UNMATCHED; -} - -int decode_iclass_floatdp3(context *ctx, Instruction *dec) -{ - uint32_t M=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, o1=(INSWORD>>21)&1, o0=(INSWORD>>15)&1; - if(!M && !S && !ftype && !o1 && !o0 && HasFP()) return FMADD_float(ctx, dec); // -> FMADD_S_floatdp3 - if(!M && !S && !ftype && !o1 && o0 && HasFP()) return FMSUB_float(ctx, dec); // -> FMSUB_S_floatdp3 - if(!M && !S && !ftype && o1 && !o0 && HasFP()) return FNMADD_float(ctx, dec); // -> FNMADD_S_floatdp3 - if(!M && !S && !ftype && o1 && o0 && HasFP()) return FNMSUB_float(ctx, dec); // -> FNMSUB_S_floatdp3 - if(!M && !S && ftype==1 && !o1 && !o0 && HasFP()) return FMADD_float(ctx, dec); // -> FMADD_D_floatdp3 - if(!M && !S && ftype==1 && !o1 && o0 && HasFP()) return FMSUB_float(ctx, dec); // -> FMSUB_D_floatdp3 - if(!M && !S && ftype==1 && o1 && !o0 && HasFP()) return FNMADD_float(ctx, dec); // -> FNMADD_D_floatdp3 - if(!M && !S && ftype==1 && o1 && o0 && HasFP()) return FNMSUB_float(ctx, dec); // -> FNMSUB_D_floatdp3 - if(!M && !S && ftype==3 && !o1 && !o0 && HasFP16()) return FMADD_float(ctx, dec); // -> FMADD_H_floatdp3 - if(!M && !S && ftype==3 && !o1 && o0 && HasFP16()) return FMSUB_float(ctx, dec); // -> FMSUB_H_floatdp3 - if(!M && !S && ftype==3 && o1 && !o0 && HasFP16()) return FNMADD_float(ctx, dec); // -> FNMADD_H_floatdp3 - if(!M && !S && ftype==3 && o1 && o0 && HasFP16()) return FNMSUB_float(ctx, dec); // -> FNMSUB_H_floatdp3 - if(!M && !S && ftype==2) UNALLOCATED(ENC_UNALLOCATED_1305_FLOATDP3); - if(!M && S) UNALLOCATED(ENC_UNALLOCATED_1304_FLOATDP3); - if(M) UNALLOCATED(ENC_UNALLOCATED_1303_FLOATDP3); - UNMATCHED; -} - -int decode_iclass_floatimm(context *ctx, Instruction *dec) -{ - uint32_t M=INSWORD>>31, S=(INSWORD>>29)&1, ftype=(INSWORD>>22)&3, imm5=(INSWORD>>5)&0x1f; - if(!M && !S && !ftype && !imm5 && HasFP()) return FMOV_float_imm(ctx, dec); // -> FMOV_S_floatimm - if(!M && !S && ftype==1 && !imm5 && HasFP()) return FMOV_float_imm(ctx, dec); // -> FMOV_D_floatimm - if(!M && !S && ftype==2 && !imm5) UNALLOCATED(ENC_UNALLOCATED_1309_FLOATIMM); - if(!M && !S && ftype==3 && !imm5 && HasFP16()) return FMOV_float_imm(ctx, dec); // -> FMOV_H_floatimm - if(!M && !S && imm5) UNALLOCATED(ENC_UNALLOCATED_1308_FLOATIMM); - if(!M && S) UNALLOCATED(ENC_UNALLOCATED_1307_FLOATIMM); - if(M) UNALLOCATED(ENC_UNALLOCATED_1306_FLOATIMM); - UNMATCHED; -} - -int decode_iclass_perm_undef(context *ctx, Instruction *dec) -{ - return UDF_perm_undef(ctx, dec); -} - -int decode_iclass_mortlach_addhv(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, V=(INSWORD>>16)&1, opc2=INSWORD&7; - if(!op && !V && !(opc2&4) && HasSME()) return addha_za_pp_z(ctx, dec); // -> addha_za_pp_z_32 - if(!op && V && !(opc2&4) && HasSME()) return addva_za_pp_z(ctx, dec); // -> addva_za_pp_z_32 - if(!op && (opc2&4)==4) UNALLOCATED(ENC_UNALLOCATED_697_MORTLACH_ADDHV); - if(op && !V && HasSME_I16I64()) return addha_za_pp_z(ctx, dec); // -> addha_za_pp_z_64 - if(op && V && HasSME_I16I64()) return addva_za_pp_z(ctx, dec); // -> addva_za_pp_z_64 - UNMATCHED; -} - -int decode_iclass_mortlach_f32f32_prod(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>4)&1; - if(!S && HasSME()) return fmopa_za_pp_zz(ctx, dec); // -> fmopa_za_pp_zz_32 - if(S && HasSME()) return fmops_za_pp_zz(ctx, dec); // -> fmops_za_pp_zz_32 - UNMATCHED; -} - -int decode_iclass_mortlach_b16f32_prod(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>4)&1; - if(!S && HasSME()) return bfmopa_za32_pp_zz(ctx, dec); // -> bfmopa_za32_pp_zz_ - if(S && HasSME()) return bfmops_za32_pp_zz(ctx, dec); // -> bfmops_za32_pp_zz_ - UNMATCHED; -} - -int decode_iclass_mortlach_f16f32_prod(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>4)&1; - if(!S && HasSME()) return fmopa_za32_pp_zz(ctx, dec); // -> fmopa_za32_pp_zz_16 - if(S && HasSME()) return fmops_za32_pp_zz(ctx, dec); // -> fmops_za32_pp_zz_16 - UNMATCHED; -} - -int decode_iclass_mortlach_f8f32_prod(context *ctx, Instruction *dec) -{ - return fmopa_za32_pp_z8z8(ctx, dec); -} - -int decode_iclass_mortlach_i8i32_prod(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1, u1=(INSWORD>>21)&1, S=(INSWORD>>4)&1; - if(!u0 && !u1 && !S && HasSME()) return smopa_za_pp_zz(ctx, dec); // -> smopa_za_pp_zz_32 - if(!u0 && !u1 && S && HasSME()) return smops_za_pp_zz(ctx, dec); // -> smops_za_pp_zz_32 - if(!u0 && u1 && !S && HasSME()) return sumopa_za_pp_zz(ctx, dec); // -> sumopa_za_pp_zz_32 - if(!u0 && u1 && S && HasSME()) return sumops_za_pp_zz(ctx, dec); // -> sumops_za_pp_zz_32 - if(u0 && !u1 && !S && HasSME()) return usmopa_za_pp_zz(ctx, dec); // -> usmopa_za_pp_zz_32 - if(u0 && !u1 && S && HasSME()) return usmops_za_pp_zz(ctx, dec); // -> usmops_za_pp_zz_32 - if(u0 && u1 && !S && HasSME()) return umopa_za_pp_zz(ctx, dec); // -> umopa_za_pp_zz_32 - if(u0 && u1 && S && HasSME()) return umops_za_pp_zz(ctx, dec); // -> umops_za_pp_zz_32 - UNMATCHED; -} - -int decode_iclass_mortlach_i16i32_prod(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1, S=(INSWORD>>4)&1; - if(!u0 && !S && HasSME2()) return smopa_za32_pp_zz(ctx, dec); // -> smopa_za32_pp_zz_16 - if(!u0 && S && HasSME2()) return smops_za32_pp_zz(ctx, dec); // -> smops_za32_pp_zz_16 - if(u0 && !S && HasSME2()) return umopa_za32_pp_zz(ctx, dec); // -> umopa_za32_pp_zz_16 - if(u0 && S && HasSME2()) return umops_za32_pp_zz(ctx, dec); // -> umops_za32_pp_zz_16 - UNMATCHED; -} - -int decode_iclass_mortlach_contig_load(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>22)&3; - if(!msz && HasSME()) return ld1b_za_p_rrr(ctx, dec); // -> ld1b_za_p_rrr_ - if(msz==1 && HasSME()) return ld1h_za_p_rrr(ctx, dec); // -> ld1h_za_p_rrr_ - if(msz==2 && HasSME()) return ld1w_za_p_rrr(ctx, dec); // -> ld1w_za_p_rrr_ - if(msz==3 && HasSME()) return ld1d_za_p_rrr(ctx, dec); // -> ld1d_za_p_rrr_ - UNMATCHED; -} - -int decode_iclass_mortlach_contig_store(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>22)&3; - if(!msz && HasSME()) return st1b_za_p_rrr(ctx, dec); // -> st1b_za_p_rrr_ - if(msz==1 && HasSME()) return st1h_za_p_rrr(ctx, dec); // -> st1h_za_p_rrr_ - if(msz==2 && HasSME()) return st1w_za_p_rrr(ctx, dec); // -> st1w_za_p_rrr_ - if(msz==3 && HasSME()) return st1d_za_p_rrr(ctx, dec); // -> st1d_za_p_rrr_ - UNMATCHED; -} - -int decode_iclass_mortlach_ctxt_ldst(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>21)&1; - if(!op && HasSME()) return ldr_za_ri(ctx, dec); // -> ldr_za_ri_ - if(op && HasSME()) return str_za_ri(ctx, dec); // -> str_za_ri_ - UNMATCHED; -} - -int decode_iclass_mortlach_zt_ldst(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&0x3f, opc2=INSWORD&3; - if(opc==0x1f && !opc2 && HasSME2()) return ldr_zt_br(ctx, dec); // -> ldr_zt_br_ - if(opc==0x3f && !opc2 && HasSME2()) return str_zt_br(ctx, dec); // -> str_zt_br_ - if((opc&0x1f)==0x1f && opc2) UNALLOCATED(ENC_UNALLOCATED_703_MORTLACH_ZT_LDST); - if((opc&0x1f)==0x1e) UNALLOCATED(ENC_UNALLOCATED_702_MORTLACH_ZT_LDST); - if((opc&0x1e)==0x1c) UNALLOCATED(ENC_UNALLOCATED_701_MORTLACH_ZT_LDST); - if((opc&0x1c)==0x18) UNALLOCATED(ENC_UNALLOCATED_700_MORTLACH_ZT_LDST); - if((opc&0x18)==0x10) UNALLOCATED(ENC_UNALLOCATED_699_MORTLACH_ZT_LDST); - if(!(opc&0x10)) UNALLOCATED(ENC_UNALLOCATED_698_MORTLACH_ZT_LDST); - UNMATCHED; -} - -int decode_iclass_mortlach_contig_qload(context *ctx, Instruction *dec) -{ - return ld1q_za_p_rrr(ctx, dec); -} - -int decode_iclass_mortlach_contig_qstore(context *ctx, Instruction *dec) -{ - return st1q_za_p_rrr(ctx, dec); -} - -int decode_iclass_mortlach_extract_pred(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, Q=(INSWORD>>16)&1; - if(!size && !Q && HasSME()) return mova_z_p_rza(ctx, dec); // -> mova_z_p_rza_b - if(size==1 && !Q && HasSME()) return mova_z_p_rza(ctx, dec); // -> mova_z_p_rza_h - if(size==2 && !Q && HasSME()) return mova_z_p_rza(ctx, dec); // -> mova_z_p_rza_w - if(size==3 && !Q && HasSME()) return mova_z_p_rza(ctx, dec); // -> mova_z_p_rza_d - if(size==3 && Q && HasSME()) return mova_z_p_rza(ctx, dec); // -> mova_z_p_rza_q - if(size!=3 && Q) UNALLOCATED(ENC_UNALLOCATED_704_MORTLACH_EXTRACT_PRED); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_extract_ctg(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSME2()) return mova_mz2_za(ctx, dec); // -> mova_mz2_za_b1 - if(size==1 && HasSME2()) return mova_mz2_za(ctx, dec); // -> mova_mz2_za_h1 - if(size==2 && HasSME2()) return mova_mz2_za(ctx, dec); // -> mova_mz2_za_w1 - if(size==3 && HasSME2()) return mova_mz2_za(ctx, dec); // -> mova_mz2_za_d1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_extract_ctg(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>5)&7; - if(!size && !(opc&4) && HasSME2()) return mova_mz4_za(ctx, dec); // -> mova_mz4_za_b1 - if(size==1 && !(opc&4) && HasSME2()) return mova_mz4_za(ctx, dec); // -> mova_mz4_za_h1 - if(size==2 && !(opc&4) && HasSME2()) return mova_mz4_za(ctx, dec); // -> mova_mz4_za_w1 - if(size!=3 && (opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_705_MORTLACH_MULTI4_EXTRACT_CTG); - if(size==3 && HasSME2()) return mova_mz4_za(ctx, dec); // -> mova_mz4_za_d1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_za_extract_ctg(context *ctx, Instruction *dec) -{ - return mova_mz_za2(ctx, dec); -} - -int decode_iclass_mortlach_multi4_za_extract_ctg(context *ctx, Instruction *dec) -{ - return mova_mz_za4(ctx, dec); -} - -int decode_iclass_mortlach_extract_zero(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, Q=(INSWORD>>16)&1; - if(!size && !Q && HasSME2p1()) return movaz_z_rza(ctx, dec); // -> movaz_z_rza_b - if(size==1 && !Q && HasSME2p1()) return movaz_z_rza(ctx, dec); // -> movaz_z_rza_h - if(size==2 && !Q && HasSME2p1()) return movaz_z_rza(ctx, dec); // -> movaz_z_rza_w - if(size==3 && !Q && HasSME2p1()) return movaz_z_rza(ctx, dec); // -> movaz_z_rza_d - if(size==3 && Q && HasSME2p1()) return movaz_z_rza(ctx, dec); // -> movaz_z_rza_q - if(size!=3 && Q) UNALLOCATED(ENC_UNALLOCATED_706_MORTLACH_EXTRACT_ZERO); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_extract_zero(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSME2p1()) return movaz_mz2_za(ctx, dec); // -> movaz_mz2_za_b1 - if(size==1 && HasSME2p1()) return movaz_mz2_za(ctx, dec); // -> movaz_mz2_za_h1 - if(size==2 && HasSME2p1()) return movaz_mz2_za(ctx, dec); // -> movaz_mz2_za_w1 - if(size==3 && HasSME2p1()) return movaz_mz2_za(ctx, dec); // -> movaz_mz2_za_d1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_extract_zero(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>5)&7; - if(!size && !(opc&4) && HasSME2p1()) return movaz_mz4_za(ctx, dec); // -> movaz_mz4_za_b1 - if(size==1 && !(opc&4) && HasSME2p1()) return movaz_mz4_za(ctx, dec); // -> movaz_mz4_za_h1 - if(size==2 && !(opc&4) && HasSME2p1()) return movaz_mz4_za(ctx, dec); // -> movaz_mz4_za_w1 - if(size!=3 && (opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_707_MORTLACH_MULTI4_EXTRACT_ZERO); - if(size==3 && HasSME2p1()) return movaz_mz4_za(ctx, dec); // -> movaz_mz4_za_d1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_za_extract_zero(context *ctx, Instruction *dec) -{ - return movaz_mz_za2(ctx, dec); -} - -int decode_iclass_mortlach_multi4_za_extract_zero(context *ctx, Instruction *dec) -{ - return movaz_mz_za4(ctx, dec); -} - -int decode_iclass_mortlach_insert_pred(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, Q=(INSWORD>>16)&1; - if(!size && !Q && HasSME()) return mova_za_p_rz(ctx, dec); // -> mova_za_p_rz_b - if(size==1 && !Q && HasSME()) return mova_za_p_rz(ctx, dec); // -> mova_za_p_rz_h - if(size==2 && !Q && HasSME()) return mova_za_p_rz(ctx, dec); // -> mova_za_p_rz_w - if(size==3 && !Q && HasSME()) return mova_za_p_rz(ctx, dec); // -> mova_za_p_rz_d - if(size==3 && Q && HasSME()) return mova_za_p_rz(ctx, dec); // -> mova_za_p_rz_q - if(size!=3 && Q) UNALLOCATED(ENC_UNALLOCATED_708_MORTLACH_INSERT_PRED); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_insert_ctg(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSME2()) return mova_za2_z(ctx, dec); // -> mova_za2_z_b1 - if(size==1 && HasSME2()) return mova_za2_z(ctx, dec); // -> mova_za2_z_h1 - if(size==2 && HasSME2()) return mova_za2_z(ctx, dec); // -> mova_za2_z_w1 - if(size==3 && HasSME2()) return mova_za2_z(ctx, dec); // -> mova_za2_z_d1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_insert_ctg(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=INSWORD&7; - if(!size && !(opc&4) && HasSME2()) return mova_za4_z(ctx, dec); // -> mova_za4_z_b1 - if(size==1 && !(opc&4) && HasSME2()) return mova_za4_z(ctx, dec); // -> mova_za4_z_h1 - if(size==2 && !(opc&4) && HasSME2()) return mova_za4_z(ctx, dec); // -> mova_za4_z_w1 - if(size!=3 && (opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_709_MORTLACH_MULTI4_INSERT_CTG); - if(size==3 && HasSME2()) return mova_za4_z(ctx, dec); // -> mova_za4_z_d1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_za_insert_ctg(context *ctx, Instruction *dec) -{ - return mova_za_mz2(ctx, dec); -} - -int decode_iclass_mortlach_multi4_za_insert_ctg(context *ctx, Instruction *dec) -{ - return mova_za_mz4(ctx, dec); -} - -int decode_iclass_mortlach_f64f64_prod(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>4)&1; - if(!S && HasSME_F64F64()) return fmopa_za_pp_zz(ctx, dec); // -> fmopa_za_pp_zz_64 - if(S && HasSME_F64F64()) return fmops_za_pp_zz(ctx, dec); // -> fmops_za_pp_zz_64 - UNMATCHED; -} - -int decode_iclass_mortlach_i16i64_prod(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1, u1=(INSWORD>>21)&1, S=(INSWORD>>4)&1; - if(!u0 && !u1 && !S && HasSME_I16I64()) return smopa_za_pp_zz(ctx, dec); // -> smopa_za_pp_zz_64 - if(!u0 && !u1 && S && HasSME_I16I64()) return smops_za_pp_zz(ctx, dec); // -> smops_za_pp_zz_64 - if(!u0 && u1 && !S && HasSME_I16I64()) return sumopa_za_pp_zz(ctx, dec); // -> sumopa_za_pp_zz_64 - if(!u0 && u1 && S && HasSME_I16I64()) return sumops_za_pp_zz(ctx, dec); // -> sumops_za_pp_zz_64 - if(u0 && !u1 && !S && HasSME_I16I64()) return usmopa_za_pp_zz(ctx, dec); // -> usmopa_za_pp_zz_64 - if(u0 && !u1 && S && HasSME_I16I64()) return usmops_za_pp_zz(ctx, dec); // -> usmops_za_pp_zz_64 - if(u0 && u1 && !S && HasSME_I16I64()) return umopa_za_pp_zz(ctx, dec); // -> umopa_za_pp_zz_64 - if(u0 && u1 && S && HasSME_I16I64()) return umops_za_pp_zz(ctx, dec); // -> umops_za_pp_zz_64 - UNMATCHED; -} - -int decode_iclass_mortlach_zero(context *ctx, Instruction *dec) -{ - return zero_za_i(ctx, dec); -} - -int decode_iclass_mortlach_expand_2dst_ctg(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>15)&15, opc2=(INSWORD>>10)&3; - if(!(opc&12) && !opc2) UNALLOCATED(ENC_UNALLOCATED_711_MORTLACH_EXPAND_2DST_CTG); - if((opc&12)==4 && !opc2 && HasSME2()) return luti4_mz2_ztz(ctx, dec); // -> luti4_mz2_ztz_1 - if((opc&8)==8 && !opc2 && HasSME2()) return luti2_mz2_ztz(ctx, dec); // -> luti2_mz2_ztz_1 - if(opc2) UNALLOCATED(ENC_UNALLOCATED_710_MORTLACH_EXPAND_2DST_CTG); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_4dst_ctg(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7, opc2=(INSWORD>>10)&3; - if(!(opc&6) && !opc2) UNALLOCATED(ENC_UNALLOCATED_713_MORTLACH_EXPAND_4DST_CTG); - if((opc&6)==2 && !opc2 && HasSME2()) return luti4_mz4_ztz(ctx, dec); // -> luti4_mz4_ztz_1 - if((opc&4)==4 && !opc2 && HasSME2()) return luti2_mz4_ztz(ctx, dec); // -> luti2_mz4_ztz_1 - if(opc2) UNALLOCATED(ENC_UNALLOCATED_712_MORTLACH_EXPAND_4DST_CTG); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_1dst(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>14)&0x1f, size=(INSWORD>>12)&3, opc2=(INSWORD>>10)&3; - if(opc==1 && !size && !opc2 && HasSME2p3()) return luti6_z_ztz(ctx, dec); // -> luti6_z_ztz_ - if(opc==1 && size && !opc2) UNALLOCATED(ENC_UNALLOCATED_718_MORTLACH_EXPAND_1DST); - if(!opc && !opc2) UNALLOCATED(ENC_UNALLOCATED_717_MORTLACH_EXPAND_1DST); - if((opc&0x1e)==2 && !opc2) UNALLOCATED(ENC_UNALLOCATED_716_MORTLACH_EXPAND_1DST); - if((opc&0x1c)==4 && !opc2) UNALLOCATED(ENC_UNALLOCATED_715_MORTLACH_EXPAND_1DST); - if((opc&0x18)==8 && !opc2 && HasSME2()) return luti4_z_ztz(ctx, dec); // -> luti4_z_ztz_ - if((opc&0x10)==0x10 && !opc2 && HasSME2()) return luti2_z_ztz(ctx, dec); // -> luti2_z_ztz_ - if(opc2) UNALLOCATED(ENC_UNALLOCATED_714_MORTLACH_EXPAND_1DST); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_4dst2src_ctg(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&3; - if(!opc && HasSME_LUTv2()) return luti4_mz4_ztmz2(ctx, dec); // -> luti4_mz4_ztmz2_1 - if(opc) UNALLOCATED(ENC_UNALLOCATED_719_MORTLACH_EXPAND_4DST2SRC_CTG); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_4dst3src_ctg(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>12)&3, opc=(INSWORD>>10)&3; - if(!size && !opc && HasSME2p3()) return luti6_mz4_ztz(ctx, dec); // -> luti6_mz4_ztmz3_1 - if(!size && opc) UNALLOCATED(ENC_UNALLOCATED_721_MORTLACH_EXPAND_4DST3SRC_CTG); - if(size) UNALLOCATED(ENC_UNALLOCATED_720_MORTLACH_EXPAND_4DST3SRC_CTG); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_2dst_nctg(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>15)&15, opc2=(INSWORD>>10)&3; - if(!(opc&12) && !opc2) UNALLOCATED(ENC_UNALLOCATED_723_MORTLACH_EXPAND_2DST_NCTG); - if((opc&12)==4 && !opc2 && HasSME2p1()) return luti4_mz2_ztz(ctx, dec); // -> luti4_mz2_ztz_8 - if((opc&8)==8 && !opc2 && HasSME2p1()) return luti2_mz2_ztz(ctx, dec); // -> luti2_mz2_ztz_8 - if(opc2) UNALLOCATED(ENC_UNALLOCATED_722_MORTLACH_EXPAND_2DST_NCTG); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_4dst_nctg(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7, opc2=(INSWORD>>10)&3; - if(!(opc&6) && !opc2) UNALLOCATED(ENC_UNALLOCATED_725_MORTLACH_EXPAND_4DST_NCTG); - if((opc&6)==2 && !opc2 && HasSME2p1()) return luti4_mz4_ztz(ctx, dec); // -> luti4_mz4_ztz_4 - if((opc&4)==4 && !opc2 && HasSME2p1()) return luti2_mz4_ztz(ctx, dec); // -> luti2_mz4_ztz_4 - if(opc2) UNALLOCATED(ENC_UNALLOCATED_724_MORTLACH_EXPAND_4DST_NCTG); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_4dst2src_nctg(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&3; - if(!opc && HasSME2p1() && HasSME_LUTv2()) return luti4_mz4_ztmz2(ctx, dec); // -> luti4_mz4_ztmz2_4 - if(opc) UNALLOCATED(ENC_UNALLOCATED_726_MORTLACH_EXPAND_4DST2SRC_NCTG); - UNMATCHED; -} - -int decode_iclass_mortlach_expand_4dst3src_nctg(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>12)&3, opc=(INSWORD>>10)&3; - if(!size && !opc && HasSME2p3()) return luti6_mz4_ztz(ctx, dec); // -> luti6_mz4_ztmz3_4 - if(!size && opc) UNALLOCATED(ENC_UNALLOCATED_728_MORTLACH_EXPAND_4DST3SRC_NCTG); - if(size) UNALLOCATED(ENC_UNALLOCATED_727_MORTLACH_EXPAND_4DST3SRC_NCTG); - UNMATCHED; -} - -int decode_iclass_mortlach_extract_zt(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&0x7f; - if(opc==0x1f && HasSME2()) return movt_r_zt(ctx, dec); // -> movt_r_zt_ - if(opc!=0x1f) UNALLOCATED(ENC_UNALLOCATED_729_MORTLACH_EXTRACT_ZT); - UNMATCHED; -} - -int decode_iclass_mortlach_insert_zt(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&0x7f; - if(opc==0x1f && HasSME2()) return movt_zt_r(ctx, dec); // -> movt_zt_r_ - if(opc!=0x1f) UNALLOCATED(ENC_UNALLOCATED_730_MORTLACH_INSERT_ZT); - UNMATCHED; -} - -int decode_iclass_mortlach_move_to_zt(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&0x7f; - if(opc==0x1f && HasSME_LUTv2()) return movt_zt_z(ctx, dec); // -> movt_zt_z_ - if(opc!=0x1f) UNALLOCATED(ENC_UNALLOCATED_731_MORTLACH_MOVE_TO_ZT); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_fmul_mm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSME2() && HasSVE_BFSCALE()) return bfmul_mz_zzw(ctx, dec); // -> bfmul_mz_zzw_2x2 - if(size && HasSME2p2()) return fmul_mz_zzw(ctx, dec); // -> fmul_mz_zzw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fmul_mm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSME2() && HasSVE_BFSCALE()) return bfmul_mz_zzw(ctx, dec); // -> bfmul_mz_zzw_4x4 - if(size && HasSME2p2()) return fmul_mz_zzw(ctx, dec); // -> fmul_mz_zzw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_mla_long_long_idx_s(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>5)&1, U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !U && !S && HasSME2()) return smlall_za_zzi(ctx, dec); // -> smlall_za_zzi_s4xi - if(!op && !U && S && HasSME2()) return smlsll_za_zzi(ctx, dec); // -> smlsll_za_zzi_s4xi - if(!op && U && !S && HasSME2()) return umlall_za_zzi(ctx, dec); // -> umlall_za_zzi_s4xi - if(!op && U && S && HasSME2()) return umlsll_za_zzi(ctx, dec); // -> umlsll_za_zzi_s4xi - if(op && !U && !S && HasSME2()) return usmlall_za_zzi(ctx, dec); // -> usmlall_za_zzi_s4xi - if(op && U && !S && HasSME2()) return sumlall_za_zzi(ctx, dec); // -> sumlall_za_zzi_s4xi - if(op && S) UNALLOCATED(ENC_UNALLOCATED_732_MORTLACH_MULTI4_MLA_LONG_LONG_IDX_S); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fp8_fma_long_long_idx(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8i(ctx, dec); -} - -int decode_iclass_mortlach_multi4_zza_idx_h(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>5)&1, S=(INSWORD>>4)&1; - if(!op && !S && HasSME_F16F16()) return fmla_za_zzi(ctx, dec); // -> fmla_za_zzi_h4xi - if(!op && S && HasSME_F16F16()) return fmls_za_zzi(ctx, dec); // -> fmls_za_zzi_h4xi - if(op && !S && HasSME_B16B16()) return bfmla_za_zzi(ctx, dec); // -> bfmla_za_zzi_h4xi - if(op && S && HasSME_B16B16()) return bfmls_za_zzi(ctx, dec); // -> bfmls_za_zzi_h4xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fp8_fdot_idx_h(context *ctx, Instruction *dec) -{ - return fdot_za_z8z8i(ctx, dec); -} - -int decode_iclass_mortlach_multi4_zza_idx_s(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>12)&1, opc2=(INSWORD>>3)&7; - if(!op && !opc2 && HasSME2()) return fmla_za_zzi(ctx, dec); // -> fmla_za_zzi_s4xi - if(!op && opc2==1 && HasSME_F8F32()) return fdot_za32_z8z8i(ctx, dec); // -> fdot_za32_z8z8i_4xi - if(!op && opc2==2 && HasSME2()) return fmls_za_zzi(ctx, dec); // -> fmls_za_zzi_s4xi - if(!op && opc2==3) UNALLOCATED(ENC_UNALLOCATED_733_MORTLACH_MULTI4_ZZA_IDX_S); - if(!op && opc2==4 && HasSME2()) return svdot_za_zzi(ctx, dec); // -> svdot_za_zzi_s4xi - if(!op && opc2==5 && HasSME2()) return usvdot_za_zzi(ctx, dec); // -> usvdot_za_zzi_s4xi - if(!op && opc2==6 && HasSME2()) return uvdot_za_zzi(ctx, dec); // -> uvdot_za_zzi_s4xi - if(!op && opc2==7 && HasSME2()) return suvdot_za_zzi(ctx, dec); // -> suvdot_za_zzi_s4xi - if(op && !opc2 && HasSME2()) return sdot_za32_zzi(ctx, dec); // -> sdot_za32_zzi_4xi - if(op && opc2==1 && HasSME2()) return fdot_za_zzi(ctx, dec); // -> fdot_za_zzi_4xi - if(op && opc2==2 && HasSME2()) return udot_za32_zzi(ctx, dec); // -> udot_za32_zzi_4xi - if(op && opc2==3 && HasSME2()) return bfdot_za_zzi(ctx, dec); // -> bfdot_za_zzi_4xi - if(op && opc2==4 && HasSME2()) return sdot_za_zzi(ctx, dec); // -> sdot_za_zzi_s4xi - if(op && opc2==5 && HasSME2()) return usdot_za_zzi(ctx, dec); // -> usdot_za_zzi_s4xi - if(op && opc2==6 && HasSME2()) return udot_za_zzi(ctx, dec); // -> udot_za_zzi_s4xi - if(op && opc2==7 && HasSME2()) return sudot_za_zzi(ctx, dec); // -> sudot_za_zzi_s4xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_mla_long_long_idx_d(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2() && HasSME_I16I64()) return smlall_za_zzi(ctx, dec); // -> smlall_za_zzi_d4xi - if(!U && S && HasSME2() && HasSME_I16I64()) return smlsll_za_zzi(ctx, dec); // -> smlsll_za_zzi_d4xi - if(U && !S && HasSME2() && HasSME_I16I64()) return umlall_za_zzi(ctx, dec); // -> umlall_za_zzi_d4xi - if(U && S && HasSME2() && HasSME_I16I64()) return umlsll_za_zzi(ctx, dec); // -> umlsll_za_zzi_d4xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fma_long_idx(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !S && HasSME2()) return fmlal_za_zzi(ctx, dec); // -> fmlal_za_zzi_4xi - if(!op && S && HasSME2()) return fmlsl_za_zzi(ctx, dec); // -> fmlsl_za_zzi_4xi - if(op && !S && HasSME2()) return bfmlal_za_zzi(ctx, dec); // -> bfmlal_za_zzi_4xi - if(op && S && HasSME2()) return bfmlsl_za_zzi(ctx, dec); // -> bfmlsl_za_zzi_4xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fp8_fma_long_idx(context *ctx, Instruction *dec) -{ - return fmlal_za_z8z8i(ctx, dec); -} - -int decode_iclass_mortlach_multi4_zza_idx_d(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>11)&1, opc2=(INSWORD>>3)&3; - if(!op && !opc2 && HasSME2() && HasSME_F64F64()) return fmla_za_zzi(ctx, dec); // -> fmla_za_zzi_d4xi - if(!op && opc2==1 && HasSME2() && HasSME_I16I64()) return sdot_za_zzi(ctx, dec); // -> sdot_za_zzi_d4xi - if(!op && opc2==2 && HasSME2() && HasSME_F64F64()) return fmls_za_zzi(ctx, dec); // -> fmls_za_zzi_d4xi - if(!op && opc2==3 && HasSME2() && HasSME_I16I64()) return udot_za_zzi(ctx, dec); // -> udot_za_zzi_d4xi - if(op && opc2==1 && HasSME2() && HasSME_I16I64()) return svdot_za_zzi(ctx, dec); // -> svdot_za_zzi_d4xi - if(op && opc2==3 && HasSME2() && HasSME_I16I64()) return uvdot_za_zzi(ctx, dec); // -> uvdot_za_zzi_d4xi - if(op && !(opc2&1)) UNALLOCATED(ENC_UNALLOCATED_734_MORTLACH_MULTI4_ZZA_IDX_D); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_mla_long_idx(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2()) return smlal_za_zzi(ctx, dec); // -> smlal_za_zzi_4xi - if(!U && S && HasSME2()) return smlsl_za_zzi(ctx, dec); // -> smlsl_za_zzi_4xi - if(U && !S && HasSME2()) return umlal_za_zzi(ctx, dec); // -> umlal_za_zzi_4xi - if(U && S && HasSME2()) return umlsl_za_zzi(ctx, dec); // -> umlsl_za_zzi_4xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi1_mla_long_long_idx_s(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!U && !S && !op && HasSME2()) return smlall_za_zzi(ctx, dec); // -> smlall_za_zzi_s - if(!U && !S && op && HasSME2()) return usmlall_za_zzi(ctx, dec); // -> usmlall_za_zzi_s - if(!U && S && !op && HasSME2()) return smlsll_za_zzi(ctx, dec); // -> smlsll_za_zzi_s - if(U && !S && !op && HasSME2()) return umlall_za_zzi(ctx, dec); // -> umlall_za_zzi_s - if(U && !S && op && HasSME2()) return sumlall_za_zzi(ctx, dec); // -> sumlall_za_zzi_s - if(U && S && !op && HasSME2()) return umlsll_za_zzi(ctx, dec); // -> umlsll_za_zzi_s - if(S && op) UNALLOCATED(ENC_UNALLOCATED_735_MORTLACH_MULTI1_MLA_LONG_LONG_IDX_S); - UNMATCHED; -} - -int decode_iclass_mortlach_multi1_fp8_fma_long_long_idx(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8i(ctx, dec); -} - -int decode_iclass_mortlach_multi1_mla_long_long_idx_d(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2() && HasSME_I16I64()) return smlall_za_zzi(ctx, dec); // -> smlall_za_zzi_d - if(!U && S && HasSME2() && HasSME_I16I64()) return smlsll_za_zzi(ctx, dec); // -> smlsll_za_zzi_d - if(U && !S && HasSME2() && HasSME_I16I64()) return umlall_za_zzi(ctx, dec); // -> umlall_za_zzi_d - if(U && S && HasSME2() && HasSME_I16I64()) return umlsll_za_zzi(ctx, dec); // -> umlsll_za_zzi_d - UNMATCHED; -} - -int decode_iclass_mortlach_multi1_fma_long_idx(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !S && HasSME2()) return fmlal_za_zzi(ctx, dec); // -> fmlal_za_zzi_1 - if(!op && S && HasSME2()) return fmlsl_za_zzi(ctx, dec); // -> fmlsl_za_zzi_1 - if(op && !S && HasSME2()) return bfmlal_za_zzi(ctx, dec); // -> bfmlal_za_zzi_1 - if(op && S && HasSME2()) return bfmlsl_za_zzi(ctx, dec); // -> bfmlsl_za_zzi_1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi1_fp8_fma_long_idx(context *ctx, Instruction *dec) -{ - return fmlal_za_z8z8i(ctx, dec); -} - -int decode_iclass_mortlach_multi1_mla_long_idx(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2()) return smlal_za_zzi(ctx, dec); // -> smlal_za_zzi_1 - if(!U && S && HasSME2()) return smlsl_za_zzi(ctx, dec); // -> smlsl_za_zzi_1 - if(U && !S && HasSME2()) return umlal_za_zzi(ctx, dec); // -> umlal_za_zzi_1 - if(U && S && HasSME2()) return umlsl_za_zzi(ctx, dec); // -> umlsl_za_zzi_1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_mla_long_long_idx_s(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>5)&1, U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !U && !S && HasSME2()) return smlall_za_zzi(ctx, dec); // -> smlall_za_zzi_s2xi - if(!op && !U && S && HasSME2()) return smlsll_za_zzi(ctx, dec); // -> smlsll_za_zzi_s2xi - if(!op && U && !S && HasSME2()) return umlall_za_zzi(ctx, dec); // -> umlall_za_zzi_s2xi - if(!op && U && S && HasSME2()) return umlsll_za_zzi(ctx, dec); // -> umlsll_za_zzi_s2xi - if(op && !U && !S && HasSME2()) return usmlall_za_zzi(ctx, dec); // -> usmlall_za_zzi_s2xi - if(op && U && !S && HasSME2()) return sumlall_za_zzi(ctx, dec); // -> sumlall_za_zzi_s2xi - if(op && S) UNALLOCATED(ENC_UNALLOCATED_736_MORTLACH_MULTI2_MLA_LONG_LONG_IDX_S); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zza_idx_h(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>5)&1, S=(INSWORD>>4)&1; - if(!op && !S && HasSME_F16F16()) return fmla_za_zzi(ctx, dec); // -> fmla_za_zzi_h2xi - if(!op && S && HasSME_F16F16()) return fmls_za_zzi(ctx, dec); // -> fmls_za_zzi_h2xi - if(op && !S && HasSME_B16B16()) return bfmla_za_zzi(ctx, dec); // -> bfmla_za_zzi_h2xi - if(op && S && HasSME_B16B16()) return bfmls_za_zzi(ctx, dec); // -> bfmls_za_zzi_h2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zza_idx_s(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>12)&1, opc2=(INSWORD>>3)&7; - if(!op && !opc2 && HasSME2()) return fmla_za_zzi(ctx, dec); // -> fmla_za_zzi_s2xi - if(!op && opc2==1 && HasSME2()) return fvdot_za_zzi(ctx, dec); // -> fvdot_za_zzi_2xi - if(!op && opc2==2 && HasSME2()) return fmls_za_zzi(ctx, dec); // -> fmls_za_zzi_s2xi - if(!op && opc2==3 && HasSME2()) return bfvdot_za_zzi(ctx, dec); // -> bfvdot_za_zzi_2xi - if(!op && opc2==4 && HasSME2()) return svdot_za32_zzi(ctx, dec); // -> svdot_za32_zzi_2xi - if(!op && opc2==5) UNALLOCATED(ENC_UNALLOCATED_737_MORTLACH_MULTI2_ZZA_IDX_S); - if(!op && opc2==6 && HasSME2()) return uvdot_za32_zzi(ctx, dec); // -> uvdot_za32_zzi_2xi - if(!op && opc2==7 && HasSME_F8F32()) return fdot_za32_z8z8i(ctx, dec); // -> fdot_za32_z8z8i_2xi - if(op && !opc2 && HasSME2()) return sdot_za32_zzi(ctx, dec); // -> sdot_za32_zzi_2xi - if(op && opc2==1 && HasSME2()) return fdot_za_zzi(ctx, dec); // -> fdot_za_zzi_2xi - if(op && opc2==2 && HasSME2()) return udot_za32_zzi(ctx, dec); // -> udot_za32_zzi_2xi - if(op && opc2==3 && HasSME2()) return bfdot_za_zzi(ctx, dec); // -> bfdot_za_zzi_2xi - if(op && opc2==4 && HasSME2()) return sdot_za_zzi(ctx, dec); // -> sdot_za_zzi_s2xi - if(op && opc2==5 && HasSME2()) return usdot_za_zzi(ctx, dec); // -> usdot_za_zzi_s2xi - if(op && opc2==6 && HasSME2()) return udot_za_zzi(ctx, dec); // -> udot_za_zzi_s2xi - if(op && opc2==7 && HasSME2()) return sudot_za_zzi(ctx, dec); // -> sudot_za_zzi_s2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_mla_long_long_idx_d(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2() && HasSME_I16I64()) return smlall_za_zzi(ctx, dec); // -> smlall_za_zzi_d2xi - if(!U && S && HasSME2() && HasSME_I16I64()) return smlsll_za_zzi(ctx, dec); // -> smlsll_za_zzi_d2xi - if(U && !S && HasSME2() && HasSME_I16I64()) return umlall_za_zzi(ctx, dec); // -> umlall_za_zzi_d2xi - if(U && S && HasSME2() && HasSME_I16I64()) return umlsll_za_zzi(ctx, dec); // -> umlsll_za_zzi_d2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_fp8_fma_long_long_idx(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8i(ctx, dec); -} - -int decode_iclass_mortlach_multi2_fma_long_idx(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !S && HasSME2()) return fmlal_za_zzi(ctx, dec); // -> fmlal_za_zzi_2xi - if(!op && S && HasSME2()) return fmlsl_za_zzi(ctx, dec); // -> fmlsl_za_zzi_2xi - if(op && !S && HasSME2()) return bfmlal_za_zzi(ctx, dec); // -> bfmlal_za_zzi_2xi - if(op && S && HasSME2()) return bfmlsl_za_zzi(ctx, dec); // -> bfmlsl_za_zzi_2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_fp8_fma_long_idx(context *ctx, Instruction *dec) -{ - return fmlal_za_z8z8i(ctx, dec); -} - -int decode_iclass_mortlach_multi2_fp8_fvdot_idx_s(context *ctx, Instruction *dec) -{ - uint32_t T=(INSWORD>>4)&1; - if(!T && HasSME_F8F32()) return fvdotb_za32_z8z8i(ctx, dec); // -> fvdotb_za32_z8z8i_2xi - if(T && HasSME_F8F32()) return fvdott_za32_z8z8i(ctx, dec); // -> fvdott_za32_z8z8i_2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zza_idx_d(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>3)&3; - if(!opc && HasSME2() && HasSME_F64F64()) return fmla_za_zzi(ctx, dec); // -> fmla_za_zzi_d2xi - if(opc==1 && HasSME2() && HasSME_I16I64()) return sdot_za_zzi(ctx, dec); // -> sdot_za_zzi_d2xi - if(opc==2 && HasSME2() && HasSME_F64F64()) return fmls_za_zzi(ctx, dec); // -> fmls_za_zzi_d2xi - if(opc==3 && HasSME2() && HasSME_I16I64()) return udot_za_zzi(ctx, dec); // -> udot_za_zzi_d2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_mla_long_idx(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2()) return smlal_za_zzi(ctx, dec); // -> smlal_za_zzi_2xi - if(!U && S && HasSME2()) return smlsl_za_zzi(ctx, dec); // -> smlsl_za_zzi_2xi - if(U && !S && HasSME2()) return umlal_za_zzi(ctx, dec); // -> umlal_za_zzi_2xi - if(U && S && HasSME2()) return umlsl_za_zzi(ctx, dec); // -> umlsl_za_zzi_2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_fp8_fdot_idx(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>12)&1; - if(!op && HasSME_F8F16()) return fdot_za_z8z8i(ctx, dec); // -> fdot_za_z8z8i_2xi - if(op && HasSME_F8F16()) return fvdot_za_z8z8i(ctx, dec); // -> fvdot_za_z8z8i_2xi - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_lut6_16_ctg(context *ctx, Instruction *dec) -{ - return luti6_mz4_zmz2(ctx, dec); -} - -int decode_iclass_mortlach_multi4_lut6_16_nctg(context *ctx, Instruction *dec) -{ - return luti6_mz4_zmz2(ctx, dec); -} - -int decode_iclass_mortlach_multi2_cld_cldnt_ss_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return ld1b_mz_p_br(ctx, dec); // -> ld1b_mz_p_br_2 - if(!msz && N && HasSME2() && HasSVE2p1()) return ldnt1b_mz_p_br(ctx, dec); // -> ldnt1b_mz_p_br_2 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return ld1h_mz_p_br(ctx, dec); // -> ld1h_mz_p_br_2 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return ldnt1h_mz_p_br(ctx, dec); // -> ldnt1h_mz_p_br_2 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return ld1w_mz_p_br(ctx, dec); // -> ld1w_mz_p_br_2 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return ldnt1w_mz_p_br(ctx, dec); // -> ldnt1w_mz_p_br_2 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return ld1d_mz_p_br(ctx, dec); // -> ld1d_mz_p_br_2 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return ldnt1d_mz_p_br(ctx, dec); // -> ldnt1d_mz_p_br_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cld_cldnt_ss_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return ld1b_mz_p_br(ctx, dec); // -> ld1b_mz_p_br_4 - if(!msz && N && HasSME2() && HasSVE2p1()) return ldnt1b_mz_p_br(ctx, dec); // -> ldnt1b_mz_p_br_4 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return ld1h_mz_p_br(ctx, dec); // -> ld1h_mz_p_br_4 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return ldnt1h_mz_p_br(ctx, dec); // -> ldnt1h_mz_p_br_4 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return ld1w_mz_p_br(ctx, dec); // -> ld1w_mz_p_br_4 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return ldnt1w_mz_p_br(ctx, dec); // -> ldnt1w_mz_p_br_4 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return ld1d_mz_p_br(ctx, dec); // -> ld1d_mz_p_br_4 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return ldnt1d_mz_p_br(ctx, dec); // -> ldnt1d_mz_p_br_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_cst_cstnt_ss_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return st1b_mz_p_br(ctx, dec); // -> st1b_mz_p_br_2 - if(!msz && N && HasSME2() && HasSVE2p1()) return stnt1b_mz_p_br(ctx, dec); // -> stnt1b_mz_p_br_2 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return st1h_mz_p_br(ctx, dec); // -> st1h_mz_p_br_2 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return stnt1h_mz_p_br(ctx, dec); // -> stnt1h_mz_p_br_2 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return st1w_mz_p_br(ctx, dec); // -> st1w_mz_p_br_2 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return stnt1w_mz_p_br(ctx, dec); // -> stnt1w_mz_p_br_2 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return st1d_mz_p_br(ctx, dec); // -> st1d_mz_p_br_2 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return stnt1d_mz_p_br(ctx, dec); // -> stnt1d_mz_p_br_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cst_cstnt_ss_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return st1b_mz_p_br(ctx, dec); // -> st1b_mz_p_br_4 - if(!msz && N && HasSME2() && HasSVE2p1()) return stnt1b_mz_p_br(ctx, dec); // -> stnt1b_mz_p_br_4 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return st1h_mz_p_br(ctx, dec); // -> st1h_mz_p_br_4 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return stnt1h_mz_p_br(ctx, dec); // -> stnt1h_mz_p_br_4 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return st1w_mz_p_br(ctx, dec); // -> st1w_mz_p_br_4 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return stnt1w_mz_p_br(ctx, dec); // -> stnt1w_mz_p_br_4 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return st1d_mz_p_br(ctx, dec); // -> st1d_mz_p_br_4 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return stnt1d_mz_p_br(ctx, dec); // -> stnt1d_mz_p_br_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_cld_cldnt_si_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return ld1b_mz_p_bi(ctx, dec); // -> ld1b_mz_p_bi_2 - if(!msz && N && HasSME2() && HasSVE2p1()) return ldnt1b_mz_p_bi(ctx, dec); // -> ldnt1b_mz_p_bi_2 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return ld1h_mz_p_bi(ctx, dec); // -> ld1h_mz_p_bi_2 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return ldnt1h_mz_p_bi(ctx, dec); // -> ldnt1h_mz_p_bi_2 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return ld1w_mz_p_bi(ctx, dec); // -> ld1w_mz_p_bi_2 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return ldnt1w_mz_p_bi(ctx, dec); // -> ldnt1w_mz_p_bi_2 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return ld1d_mz_p_bi(ctx, dec); // -> ld1d_mz_p_bi_2 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return ldnt1d_mz_p_bi(ctx, dec); // -> ldnt1d_mz_p_bi_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cld_cldnt_si_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return ld1b_mz_p_bi(ctx, dec); // -> ld1b_mz_p_bi_4 - if(!msz && N && HasSME2() && HasSVE2p1()) return ldnt1b_mz_p_bi(ctx, dec); // -> ldnt1b_mz_p_bi_4 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return ld1h_mz_p_bi(ctx, dec); // -> ld1h_mz_p_bi_4 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return ldnt1h_mz_p_bi(ctx, dec); // -> ldnt1h_mz_p_bi_4 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return ld1w_mz_p_bi(ctx, dec); // -> ld1w_mz_p_bi_4 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return ldnt1w_mz_p_bi(ctx, dec); // -> ldnt1w_mz_p_bi_4 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return ld1d_mz_p_bi(ctx, dec); // -> ld1d_mz_p_bi_4 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return ldnt1d_mz_p_bi(ctx, dec); // -> ldnt1d_mz_p_bi_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_cst_cstnt_si_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return st1b_mz_p_bi(ctx, dec); // -> st1b_mz_p_bi_2 - if(!msz && N && HasSME2() && HasSVE2p1()) return stnt1b_mz_p_bi(ctx, dec); // -> stnt1b_mz_p_bi_2 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return st1h_mz_p_bi(ctx, dec); // -> st1h_mz_p_bi_2 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return stnt1h_mz_p_bi(ctx, dec); // -> stnt1h_mz_p_bi_2 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return st1w_mz_p_bi(ctx, dec); // -> st1w_mz_p_bi_2 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return stnt1w_mz_p_bi(ctx, dec); // -> stnt1w_mz_p_bi_2 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return st1d_mz_p_bi(ctx, dec); // -> st1d_mz_p_bi_2 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return stnt1d_mz_p_bi(ctx, dec); // -> stnt1d_mz_p_bi_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cst_cstnt_si_ctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=INSWORD&1; - if(!msz && !N && HasSME2() && HasSVE2p1()) return st1b_mz_p_bi(ctx, dec); // -> st1b_mz_p_bi_4 - if(!msz && N && HasSME2() && HasSVE2p1()) return stnt1b_mz_p_bi(ctx, dec); // -> stnt1b_mz_p_bi_4 - if(msz==1 && !N && HasSME2() && HasSVE2p1()) return st1h_mz_p_bi(ctx, dec); // -> st1h_mz_p_bi_4 - if(msz==1 && N && HasSME2() && HasSVE2p1()) return stnt1h_mz_p_bi(ctx, dec); // -> stnt1h_mz_p_bi_4 - if(msz==2 && !N && HasSME2() && HasSVE2p1()) return st1w_mz_p_bi(ctx, dec); // -> st1w_mz_p_bi_4 - if(msz==2 && N && HasSME2() && HasSVE2p1()) return stnt1w_mz_p_bi(ctx, dec); // -> stnt1w_mz_p_bi_4 - if(msz==3 && !N && HasSME2() && HasSVE2p1()) return st1d_mz_p_bi(ctx, dec); // -> st1d_mz_p_bi_4 - if(msz==3 && N && HasSME2() && HasSVE2p1()) return stnt1d_mz_p_bi(ctx, dec); // -> stnt1d_mz_p_bi_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_cld_cldnt_ss_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return ld1b_mzx_p_br(ctx, dec); // -> ld1b_mzx_p_br_2x8 - if(!msz && N && HasSME2()) return ldnt1b_mzx_p_br(ctx, dec); // -> ldnt1b_mzx_p_br_2x8 - if(msz==1 && !N && HasSME2()) return ld1h_mzx_p_br(ctx, dec); // -> ld1h_mzx_p_br_2x8 - if(msz==1 && N && HasSME2()) return ldnt1h_mzx_p_br(ctx, dec); // -> ldnt1h_mzx_p_br_2x8 - if(msz==2 && !N && HasSME2()) return ld1w_mzx_p_br(ctx, dec); // -> ld1w_mzx_p_br_2x8 - if(msz==2 && N && HasSME2()) return ldnt1w_mzx_p_br(ctx, dec); // -> ldnt1w_mzx_p_br_2x8 - if(msz==3 && !N && HasSME2()) return ld1d_mzx_p_br(ctx, dec); // -> ld1d_mzx_p_br_2x8 - if(msz==3 && N && HasSME2()) return ldnt1d_mzx_p_br(ctx, dec); // -> ldnt1d_mzx_p_br_2x8 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cld_cldnt_ss_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return ld1b_mzx_p_br(ctx, dec); // -> ld1b_mzx_p_br_4x4 - if(!msz && N && HasSME2()) return ldnt1b_mzx_p_br(ctx, dec); // -> ldnt1b_mzx_p_br_4x4 - if(msz==1 && !N && HasSME2()) return ld1h_mzx_p_br(ctx, dec); // -> ld1h_mzx_p_br_4x4 - if(msz==1 && N && HasSME2()) return ldnt1h_mzx_p_br(ctx, dec); // -> ldnt1h_mzx_p_br_4x4 - if(msz==2 && !N && HasSME2()) return ld1w_mzx_p_br(ctx, dec); // -> ld1w_mzx_p_br_4x4 - if(msz==2 && N && HasSME2()) return ldnt1w_mzx_p_br(ctx, dec); // -> ldnt1w_mzx_p_br_4x4 - if(msz==3 && !N && HasSME2()) return ld1d_mzx_p_br(ctx, dec); // -> ld1d_mzx_p_br_4x4 - if(msz==3 && N && HasSME2()) return ldnt1d_mzx_p_br(ctx, dec); // -> ldnt1d_mzx_p_br_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_cst_cstnt_ss_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return st1b_mzx_p_br(ctx, dec); // -> st1b_mzx_p_br_2x8 - if(!msz && N && HasSME2()) return stnt1b_mzx_p_br(ctx, dec); // -> stnt1b_mzx_p_br_2x8 - if(msz==1 && !N && HasSME2()) return st1h_mzx_p_br(ctx, dec); // -> st1h_mzx_p_br_2x8 - if(msz==1 && N && HasSME2()) return stnt1h_mzx_p_br(ctx, dec); // -> stnt1h_mzx_p_br_2x8 - if(msz==2 && !N && HasSME2()) return st1w_mzx_p_br(ctx, dec); // -> st1w_mzx_p_br_2x8 - if(msz==2 && N && HasSME2()) return stnt1w_mzx_p_br(ctx, dec); // -> stnt1w_mzx_p_br_2x8 - if(msz==3 && !N && HasSME2()) return st1d_mzx_p_br(ctx, dec); // -> st1d_mzx_p_br_2x8 - if(msz==3 && N && HasSME2()) return stnt1d_mzx_p_br(ctx, dec); // -> stnt1d_mzx_p_br_2x8 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cst_cstnt_ss_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return st1b_mzx_p_br(ctx, dec); // -> st1b_mzx_p_br_4x4 - if(!msz && N && HasSME2()) return stnt1b_mzx_p_br(ctx, dec); // -> stnt1b_mzx_p_br_4x4 - if(msz==1 && !N && HasSME2()) return st1h_mzx_p_br(ctx, dec); // -> st1h_mzx_p_br_4x4 - if(msz==1 && N && HasSME2()) return stnt1h_mzx_p_br(ctx, dec); // -> stnt1h_mzx_p_br_4x4 - if(msz==2 && !N && HasSME2()) return st1w_mzx_p_br(ctx, dec); // -> st1w_mzx_p_br_4x4 - if(msz==2 && N && HasSME2()) return stnt1w_mzx_p_br(ctx, dec); // -> stnt1w_mzx_p_br_4x4 - if(msz==3 && !N && HasSME2()) return st1d_mzx_p_br(ctx, dec); // -> st1d_mzx_p_br_4x4 - if(msz==3 && N && HasSME2()) return stnt1d_mzx_p_br(ctx, dec); // -> stnt1d_mzx_p_br_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_cld_cldnt_si_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return ld1b_mzx_p_bi(ctx, dec); // -> ld1b_mzx_p_bi_2x8 - if(!msz && N && HasSME2()) return ldnt1b_mzx_p_bi(ctx, dec); // -> ldnt1b_mzx_p_bi_2x8 - if(msz==1 && !N && HasSME2()) return ld1h_mzx_p_bi(ctx, dec); // -> ld1h_mzx_p_bi_2x8 - if(msz==1 && N && HasSME2()) return ldnt1h_mzx_p_bi(ctx, dec); // -> ldnt1h_mzx_p_bi_2x8 - if(msz==2 && !N && HasSME2()) return ld1w_mzx_p_bi(ctx, dec); // -> ld1w_mzx_p_bi_2x8 - if(msz==2 && N && HasSME2()) return ldnt1w_mzx_p_bi(ctx, dec); // -> ldnt1w_mzx_p_bi_2x8 - if(msz==3 && !N && HasSME2()) return ld1d_mzx_p_bi(ctx, dec); // -> ld1d_mzx_p_bi_2x8 - if(msz==3 && N && HasSME2()) return ldnt1d_mzx_p_bi(ctx, dec); // -> ldnt1d_mzx_p_bi_2x8 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cld_cldnt_si_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return ld1b_mzx_p_bi(ctx, dec); // -> ld1b_mzx_p_bi_4x4 - if(!msz && N && HasSME2()) return ldnt1b_mzx_p_bi(ctx, dec); // -> ldnt1b_mzx_p_bi_4x4 - if(msz==1 && !N && HasSME2()) return ld1h_mzx_p_bi(ctx, dec); // -> ld1h_mzx_p_bi_4x4 - if(msz==1 && N && HasSME2()) return ldnt1h_mzx_p_bi(ctx, dec); // -> ldnt1h_mzx_p_bi_4x4 - if(msz==2 && !N && HasSME2()) return ld1w_mzx_p_bi(ctx, dec); // -> ld1w_mzx_p_bi_4x4 - if(msz==2 && N && HasSME2()) return ldnt1w_mzx_p_bi(ctx, dec); // -> ldnt1w_mzx_p_bi_4x4 - if(msz==3 && !N && HasSME2()) return ld1d_mzx_p_bi(ctx, dec); // -> ld1d_mzx_p_bi_4x4 - if(msz==3 && N && HasSME2()) return ldnt1d_mzx_p_bi(ctx, dec); // -> ldnt1d_mzx_p_bi_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_cst_cstnt_si_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return st1b_mzx_p_bi(ctx, dec); // -> st1b_mzx_p_bi_2x8 - if(!msz && N && HasSME2()) return stnt1b_mzx_p_bi(ctx, dec); // -> stnt1b_mzx_p_bi_2x8 - if(msz==1 && !N && HasSME2()) return st1h_mzx_p_bi(ctx, dec); // -> st1h_mzx_p_bi_2x8 - if(msz==1 && N && HasSME2()) return stnt1h_mzx_p_bi(ctx, dec); // -> stnt1h_mzx_p_bi_2x8 - if(msz==2 && !N && HasSME2()) return st1w_mzx_p_bi(ctx, dec); // -> st1w_mzx_p_bi_2x8 - if(msz==2 && N && HasSME2()) return stnt1w_mzx_p_bi(ctx, dec); // -> stnt1w_mzx_p_bi_2x8 - if(msz==3 && !N && HasSME2()) return st1d_mzx_p_bi(ctx, dec); // -> st1d_mzx_p_bi_2x8 - if(msz==3 && N && HasSME2()) return stnt1d_mzx_p_bi(ctx, dec); // -> stnt1d_mzx_p_bi_2x8 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_cst_cstnt_si_nctg(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3, N=(INSWORD>>3)&1; - if(!msz && !N && HasSME2()) return st1b_mzx_p_bi(ctx, dec); // -> st1b_mzx_p_bi_4x4 - if(!msz && N && HasSME2()) return stnt1b_mzx_p_bi(ctx, dec); // -> stnt1b_mzx_p_bi_4x4 - if(msz==1 && !N && HasSME2()) return st1h_mzx_p_bi(ctx, dec); // -> st1h_mzx_p_bi_4x4 - if(msz==1 && N && HasSME2()) return stnt1h_mzx_p_bi(ctx, dec); // -> stnt1h_mzx_p_bi_4x4 - if(msz==2 && !N && HasSME2()) return st1w_mzx_p_bi(ctx, dec); // -> st1w_mzx_p_bi_4x4 - if(msz==2 && N && HasSME2()) return stnt1w_mzx_p_bi(ctx, dec); // -> stnt1w_mzx_p_bi_4x4 - if(msz==3 && !N && HasSME2()) return st1d_mzx_p_bi(ctx, dec); // -> st1d_mzx_p_bi_4x4 - if(msz==3 && N && HasSME2()) return stnt1d_mzx_p_bi(ctx, dec); // -> stnt1d_mzx_p_bi_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_mla_long_long_mm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!sz && !U && !S && op && HasSME2()) return usmlall_za_zzw(ctx, dec); // -> usmlall_za_zzw_s4x4 - if(!sz && !U && S && op) UNALLOCATED(ENC_UNALLOCATED_740_MORTLACH_MULTI4_ZZ_ZA_MLA_LONG_LONG_MM); - if(!U && !S && !op && HasSME2()) return smlall_za_zzw(ctx, dec); // -> smlall_za_zzw_4x4 - if(!U && S && !op && HasSME2()) return smlsll_za_zzw(ctx, dec); // -> smlsll_za_zzw_4x4 - if(U && !S && !op && HasSME2()) return umlall_za_zzw(ctx, dec); // -> umlall_za_zzw_4x4 - if(U && S && !op && HasSME2()) return umlsll_za_zzw(ctx, dec); // -> umlsll_za_zzw_4x4 - if(!sz && U && op) UNALLOCATED(ENC_UNALLOCATED_739_MORTLACH_MULTI4_ZZ_ZA_MLA_LONG_LONG_MM); - if(sz && op) UNALLOCATED(ENC_UNALLOCATED_738_MORTLACH_MULTI4_ZZ_ZA_MLA_LONG_LONG_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_long_mm(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8w(ctx, dec); -} - -int decode_iclass_mortlach_multi4_zz_za_fma_long_mm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !S && HasSME2()) return fmlal_za_zzw(ctx, dec); // -> fmlal_za_zzw_4x4 - if(!op && S && HasSME2()) return fmlsl_za_zzw(ctx, dec); // -> fmlsl_za_zzw_4x4 - if(op && !S && HasSME2()) return bfmlal_za_zzw(ctx, dec); // -> bfmlal_za_zzw_4x4 - if(op && S && HasSME2()) return bfmlsl_za_zzw(ctx, dec); // -> bfmlsl_za_zzw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_mm(context *ctx, Instruction *dec) -{ - return fmlal_za_z8z8w(ctx, dec); -} - -int decode_iclass_mortlach_multi4_zz_za_mla_long_mm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2()) return smlal_za_zzw(ctx, dec); // -> smlal_za_zzw_4x4 - if(!U && S && HasSME2()) return smlsl_za_zzw(ctx, dec); // -> smlsl_za_zzw_4x4 - if(U && !S && HasSME2()) return umlal_za_zzw(ctx, dec); // -> umlal_za_zzw_4x4 - if(U && S && HasSME2()) return umlsl_za_zzw(ctx, dec); // -> umlsl_za_zzw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_fpdot_mm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>4)&3; - if(!opc && HasSME2()) return fdot_za_zzw(ctx, dec); // -> fdot_za_zzw_4x4 - if(opc==1 && HasSME2()) return bfdot_za_zzw(ctx, dec); // -> bfdot_za_zzw_4x4 - if(opc==2 && HasSME_F8F16()) return fdot_za_z8z8w(ctx, dec); // -> fdot_za_z8z8w_4x4 - if(opc==3 && HasSME_F8F32()) return fdot_za32_z8z8w(ctx, dec); // -> fdot_za32_z8z8w_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_f16_mm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, S=(INSWORD>>4)&1; - if(!sz && !S && HasSME_F16F16()) return fmla_za_zzw(ctx, dec); // -> fmla_za_zzw_4x4_16 - if(!sz && S && HasSME_F16F16()) return fmls_za_zzw(ctx, dec); // -> fmls_za_zzw_4x4_16 - if(sz && !S && HasSME_B16B16()) return bfmla_za_zzw(ctx, dec); // -> bfmla_za_zzw_4x4_16 - if(sz && S && HasSME_B16B16()) return bfmls_za_zzw(ctx, dec); // -> bfmls_za_zzw_4x4_16 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_4way_dot_mm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za_zzw(ctx, dec); // -> sdot_za_zzw_4x4 - if(U && HasSME2()) return udot_za_zzw(ctx, dec); // -> udot_za_zzw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_mixed_dot_mm(context *ctx, Instruction *dec) -{ - return usdot_za_zzw(ctx, dec); -} - -int decode_iclass_mortlach_multi4_z_za_2way_dot_mm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za32_zzw(ctx, dec); // -> sdot_za32_zzw_4x4 - if(U && HasSME2()) return udot_za32_zzw(ctx, dec); // -> udot_za32_zzw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_float_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return fmla_za_zzw(ctx, dec); // -> fmla_za_zzw_4x4 - if(S && HasSME2()) return fmls_za_zzw(ctx, dec); // -> fmls_za_zzw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_int_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return add_za_zzw(ctx, dec); // -> add_za_zzw_4x4 - if(S && HasSME2()) return sub_za_zzw(ctx, dec); // -> sub_za_zzw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_float_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return fadd_za_zw(ctx, dec); // -> fadd_za_zw_4x4 - if(S && HasSME2()) return fsub_za_zw(ctx, dec); // -> fsub_za_zw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_int_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return add_za_zw(ctx, dec); // -> add_za_zw_4x4 - if(S && HasSME2()) return sub_za_zw(ctx, dec); // -> sub_za_zw_4x4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_f16_mm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, S=(INSWORD>>3)&1; - if(!sz && !S && HasSME_F16F16() && HasSME_F8F16()) return fadd_za_zw(ctx, dec); // -> fadd_za_zw_4x4_16 - if(!sz && S && HasSME_F16F16() && HasSME_F8F16()) return fsub_za_zw(ctx, dec); // -> fsub_za_zw_4x4_16 - if(sz && !S && HasSME_B16B16()) return bfadd_za_zw(ctx, dec); // -> bfadd_za_zw_4x4_16 - if(sz && S && HasSME_B16B16()) return bfsub_za_zw(ctx, dec); // -> bfsub_za_zw_4x4_16 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_mla_long_long_mm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!sz && !U && !S && op && HasSME2()) return usmlall_za_zzw(ctx, dec); // -> usmlall_za_zzw_s2x2 - if(!sz && !U && S && op) UNALLOCATED(ENC_UNALLOCATED_743_MORTLACH_MULTI2_ZZ_ZA_MLA_LONG_LONG_MM); - if(!U && !S && !op && HasSME2()) return smlall_za_zzw(ctx, dec); // -> smlall_za_zzw_2x2 - if(!U && S && !op && HasSME2()) return smlsll_za_zzw(ctx, dec); // -> smlsll_za_zzw_2x2 - if(U && !S && !op && HasSME2()) return umlall_za_zzw(ctx, dec); // -> umlall_za_zzw_2x2 - if(U && S && !op && HasSME2()) return umlsll_za_zzw(ctx, dec); // -> umlsll_za_zzw_2x2 - if(!sz && U && op) UNALLOCATED(ENC_UNALLOCATED_742_MORTLACH_MULTI2_ZZ_ZA_MLA_LONG_LONG_MM); - if(sz && op) UNALLOCATED(ENC_UNALLOCATED_741_MORTLACH_MULTI2_ZZ_ZA_MLA_LONG_LONG_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_long_mm(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8w(ctx, dec); -} - -int decode_iclass_mortlach_multi2_zz_za_fma_long_mm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !S && HasSME2()) return fmlal_za_zzw(ctx, dec); // -> fmlal_za_zzw_2x2 - if(!op && S && HasSME2()) return fmlsl_za_zzw(ctx, dec); // -> fmlsl_za_zzw_2x2 - if(op && !S && HasSME2()) return bfmlal_za_zzw(ctx, dec); // -> bfmlal_za_zzw_2x2 - if(op && S && HasSME2()) return bfmlsl_za_zzw(ctx, dec); // -> bfmlsl_za_zzw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_mm(context *ctx, Instruction *dec) -{ - return fmlal_za_z8z8w(ctx, dec); -} - -int decode_iclass_mortlach_multi2_zz_za_mla_long_mm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2()) return smlal_za_zzw(ctx, dec); // -> smlal_za_zzw_2x2 - if(!U && S && HasSME2()) return smlsl_za_zzw(ctx, dec); // -> smlsl_za_zzw_2x2 - if(U && !S && HasSME2()) return umlal_za_zzw(ctx, dec); // -> umlal_za_zzw_2x2 - if(U && S && HasSME2()) return umlsl_za_zzw(ctx, dec); // -> umlsl_za_zzw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_fpdot_mm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>4)&3; - if(!opc && HasSME2()) return fdot_za_zzw(ctx, dec); // -> fdot_za_zzw_2x2 - if(opc==1 && HasSME2()) return bfdot_za_zzw(ctx, dec); // -> bfdot_za_zzw_2x2 - if(opc==2 && HasSME_F8F16()) return fdot_za_z8z8w(ctx, dec); // -> fdot_za_z8z8w_2x2 - if(opc==3 && HasSME_F8F32()) return fdot_za32_z8z8w(ctx, dec); // -> fdot_za32_z8z8w_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_f16_mm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, S=(INSWORD>>4)&1; - if(!sz && !S && HasSME_F16F16()) return fmla_za_zzw(ctx, dec); // -> fmla_za_zzw_2x2_16 - if(!sz && S && HasSME_F16F16()) return fmls_za_zzw(ctx, dec); // -> fmls_za_zzw_2x2_16 - if(sz && !S && HasSME_B16B16()) return bfmla_za_zzw(ctx, dec); // -> bfmla_za_zzw_2x2_16 - if(sz && S && HasSME_B16B16()) return bfmls_za_zzw(ctx, dec); // -> bfmls_za_zzw_2x2_16 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_4way_dot_mm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za_zzw(ctx, dec); // -> sdot_za_zzw_2x2 - if(U && HasSME2()) return udot_za_zzw(ctx, dec); // -> udot_za_zzw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_mixed_dot_mm(context *ctx, Instruction *dec) -{ - return usdot_za_zzw(ctx, dec); -} - -int decode_iclass_mortlach_multi2_z_za_2way_dot_mm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za32_zzw(ctx, dec); // -> sdot_za32_zzw_2x2 - if(U && HasSME2()) return udot_za32_zzw(ctx, dec); // -> udot_za32_zzw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_float_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return fmla_za_zzw(ctx, dec); // -> fmla_za_zzw_2x2 - if(S && HasSME2()) return fmls_za_zzw(ctx, dec); // -> fmls_za_zzw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_int_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return add_za_zzw(ctx, dec); // -> add_za_zzw_2x2 - if(S && HasSME2()) return sub_za_zzw(ctx, dec); // -> sub_za_zzw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_float_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return fadd_za_zw(ctx, dec); // -> fadd_za_zw_2x2 - if(S && HasSME2()) return fsub_za_zw(ctx, dec); // -> fsub_za_zw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_int_mm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return add_za_zw(ctx, dec); // -> add_za_zw_2x2 - if(S && HasSME2()) return sub_za_zw(ctx, dec); // -> sub_za_zw_2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_f16_mm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, S=(INSWORD>>3)&1; - if(!sz && !S && HasSME_F16F16() && HasSME_F8F16()) return fadd_za_zw(ctx, dec); // -> fadd_za_zw_2x2_16 - if(!sz && S && HasSME_F16F16() && HasSME_F8F16()) return fsub_za_zw(ctx, dec); // -> fsub_za_zw_2x2_16 - if(sz && !S && HasSME_B16B16()) return bfadd_za_zw(ctx, dec); // -> bfadd_za_zw_2x2_16 - if(sz && S && HasSME_B16B16()) return bfsub_za_zw(ctx, dec); // -> bfsub_za_zw_2x2_16 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_minmax_mm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&3, U=INSWORD&1; - if(!opc && !U && HasSME2()) return smax_mz_zzw(ctx, dec); // -> smax_mz_zzw_4x4 - if(!opc && U && HasSME2()) return umax_mz_zzw(ctx, dec); // -> umax_mz_zzw_4x4 - if(opc==1 && !U && HasSME2()) return smin_mz_zzw(ctx, dec); // -> smin_mz_zzw_4x4 - if(opc==1 && U && HasSME2()) return umin_mz_zzw(ctx, dec); // -> umin_mz_zzw_4x4 - if((opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_744_MORTLACH_MULTI4_Z_Z_MINMAX_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_fminmax_mm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>5)&3, o2=INSWORD&1; - if(!size && !opc && !o2 && HasSME2() && HasSVE_B16B16()) return bfmax_mz_zzw(ctx, dec); // -> bfmax_mz_zzw_4x4 - if(!size && !opc && o2 && HasSME2() && HasSVE_B16B16()) return bfmin_mz_zzw(ctx, dec); // -> bfmin_mz_zzw_4x4 - if(!size && opc==1 && !o2 && HasSME2() && HasSVE_B16B16()) return bfmaxnm_mz_zzw(ctx, dec); // -> bfmaxnm_mz_zzw_4x4 - if(!size && opc==1 && o2 && HasSME2() && HasSVE_B16B16()) return bfminnm_mz_zzw(ctx, dec); // -> bfminnm_mz_zzw_4x4 - if(size && !opc && !o2 && HasSME2()) return fmax_mz_zzw(ctx, dec); // -> fmax_mz_zzw_4x4 - if(size && !opc && o2 && HasSME2()) return fmin_mz_zzw(ctx, dec); // -> fmin_mz_zzw_4x4 - if(size && opc==1 && !o2 && HasSME2()) return fmaxnm_mz_zzw(ctx, dec); // -> fmaxnm_mz_zzw_4x4 - if(size && opc==1 && o2 && HasSME2()) return fminnm_mz_zzw(ctx, dec); // -> fminnm_mz_zzw_4x4 - if(opc==2 && !o2 && HasSME2() && HasFAMINMAX()) return famax_mz_zzw(ctx, dec); // -> famax_mz_zzw_4x4 - if(opc==2 && o2 && HasSME2() && HasFAMINMAX()) return famin_mz_zzw(ctx, dec); // -> famin_mz_zzw_4x4 - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_745_MORTLACH_MULTI4_Z_Z_FMINMAX_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_fscale_mm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>5)&3, o2=INSWORD&1; - if(!size && !opc && !o2 && HasSME2() && HasSVE_BFSCALE()) return bfscale_mz_zzw(ctx, dec); // -> bfscale_mz_zzw_4x4 - if(size && !opc && !o2 && HasSME2() && HasFP8()) return fscale_mz_zzw(ctx, dec); // -> fscale_mz_zzw_4x4 - if(!opc && o2) UNALLOCATED(ENC_UNALLOCATED_747_MORTLACH_MULTI4_Z_Z_FSCALE_MM); - if(opc) UNALLOCATED(ENC_UNALLOCATED_746_MORTLACH_MULTI4_Z_Z_FSCALE_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_shift_mm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&7, U=INSWORD&1; - if(opc==1 && !U && HasSME2()) return srshl_mz_zzw(ctx, dec); // -> srshl_mz_zzw_4x4 - if(opc==1 && U && HasSME2()) return urshl_mz_zzw(ctx, dec); // -> urshl_mz_zzw_4x4 - if(opc!=1) UNALLOCATED(ENC_UNALLOCATED_748_MORTLACH_MULTI4_Z_Z_SHIFT_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_minmax_mm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&3, U=INSWORD&1; - if(!opc && !U && HasSME2()) return smax_mz_zzw(ctx, dec); // -> smax_mz_zzw_2x2 - if(!opc && U && HasSME2()) return umax_mz_zzw(ctx, dec); // -> umax_mz_zzw_2x2 - if(opc==1 && !U && HasSME2()) return smin_mz_zzw(ctx, dec); // -> smin_mz_zzw_2x2 - if(opc==1 && U && HasSME2()) return umin_mz_zzw(ctx, dec); // -> umin_mz_zzw_2x2 - if((opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_749_MORTLACH_MULTI2_Z_Z_MINMAX_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_fminmax_mm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>5)&3, o2=INSWORD&1; - if(!size && !opc && !o2 && HasSME2() && HasSVE_B16B16()) return bfmax_mz_zzw(ctx, dec); // -> bfmax_mz_zzw_2x2 - if(!size && !opc && o2 && HasSME2() && HasSVE_B16B16()) return bfmin_mz_zzw(ctx, dec); // -> bfmin_mz_zzw_2x2 - if(!size && opc==1 && !o2 && HasSME2() && HasSVE_B16B16()) return bfmaxnm_mz_zzw(ctx, dec); // -> bfmaxnm_mz_zzw_2x2 - if(!size && opc==1 && o2 && HasSME2() && HasSVE_B16B16()) return bfminnm_mz_zzw(ctx, dec); // -> bfminnm_mz_zzw_2x2 - if(size && !opc && !o2 && HasSME2()) return fmax_mz_zzw(ctx, dec); // -> fmax_mz_zzw_2x2 - if(size && !opc && o2 && HasSME2()) return fmin_mz_zzw(ctx, dec); // -> fmin_mz_zzw_2x2 - if(size && opc==1 && !o2 && HasSME2()) return fmaxnm_mz_zzw(ctx, dec); // -> fmaxnm_mz_zzw_2x2 - if(size && opc==1 && o2 && HasSME2()) return fminnm_mz_zzw(ctx, dec); // -> fminnm_mz_zzw_2x2 - if(opc==2 && !o2 && HasSME2() && HasFAMINMAX()) return famax_mz_zzw(ctx, dec); // -> famax_mz_zzw_2x2 - if(opc==2 && o2 && HasSME2() && HasFAMINMAX()) return famin_mz_zzw(ctx, dec); // -> famin_mz_zzw_2x2 - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_750_MORTLACH_MULTI2_Z_Z_FMINMAX_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_fscale_mm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>5)&3, o2=INSWORD&1; - if(!size && !opc && !o2 && HasSME2() && HasSVE_BFSCALE()) return bfscale_mz_zzw(ctx, dec); // -> bfscale_mz_zzw_2x2 - if(size && !opc && !o2 && HasSME2() && HasFP8()) return fscale_mz_zzw(ctx, dec); // -> fscale_mz_zzw_2x2 - if(!opc && o2) UNALLOCATED(ENC_UNALLOCATED_752_MORTLACH_MULTI2_Z_Z_FSCALE_MM); - if(opc) UNALLOCATED(ENC_UNALLOCATED_751_MORTLACH_MULTI2_Z_Z_FSCALE_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_shift_mm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&7, U=INSWORD&1; - if(opc==1 && !U && HasSME2()) return srshl_mz_zzw(ctx, dec); // -> srshl_mz_zzw_2x2 - if(opc==1 && U && HasSME2()) return urshl_mz_zzw(ctx, dec); // -> urshl_mz_zzw_2x2 - if(opc!=1) UNALLOCATED(ENC_UNALLOCATED_753_MORTLACH_MULTI2_Z_Z_SHIFT_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_sqdmulh_mm(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return sqdmulh_mz_zzw(ctx, dec); // -> sqdmulh_mz_zzw_4x4 - if(op) UNALLOCATED(ENC_UNALLOCATED_754_MORTLACH_MULTI4_Z_Z_SQDMULH_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_sqdmulh_mm(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return sqdmulh_mz_zzw(ctx, dec); // -> sqdmulh_mz_zzw_2x2 - if(op) UNALLOCATED(ENC_UNALLOCATED_755_MORTLACH_MULTI2_Z_Z_SQDMULH_MM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_mla_long_long_sm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!sz && !U && !S && op && HasSME2()) return usmlall_za_zzv(ctx, dec); // -> usmlall_za_zzv_s4x1 - if(!sz && U && !S && op && HasSME2()) return sumlall_za_zzv(ctx, dec); // -> sumlall_za_zzv_s4x1 - if(!U && !S && !op && HasSME2()) return smlall_za_zzv(ctx, dec); // -> smlall_za_zzv_4x1 - if(!U && S && !op && HasSME2()) return smlsll_za_zzv(ctx, dec); // -> smlsll_za_zzv_4x1 - if(U && !S && !op && HasSME2()) return umlall_za_zzv(ctx, dec); // -> umlall_za_zzv_4x1 - if(U && S && !op && HasSME2()) return umlsll_za_zzv(ctx, dec); // -> umlsll_za_zzv_4x1 - if(!sz && S && op) UNALLOCATED(ENC_UNALLOCATED_757_MORTLACH_MULTI4_ZZ_ZA_MLA_LONG_LONG_SM); - if(sz && op) UNALLOCATED(ENC_UNALLOCATED_756_MORTLACH_MULTI4_ZZ_ZA_MLA_LONG_LONG_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_long_sm(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8v(ctx, dec); -} - -int decode_iclass_mortlach_multi1_zz_za_fp8_fma_long_long_sm(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8v(ctx, dec); -} - -int decode_iclass_mortlach_multi4_zz_za_fma_long_sm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1, o2=(INSWORD>>2)&1; - if(!op && !S && !o2 && HasSME2()) return fmlal_za_zzv(ctx, dec); // -> fmlal_za_zzv_4x1 - if(!op && !S && o2 && HasSME_F8F16()) return fmlal_za_z8z8v(ctx, dec); // -> fmlal_za_z8z8v_4x1 - if(!op && S && !o2 && HasSME2()) return fmlsl_za_zzv(ctx, dec); // -> fmlsl_za_zzv_4x1 - if(!op && S && o2) UNALLOCATED(ENC_UNALLOCATED_759_MORTLACH_MULTI4_ZZ_ZA_FMA_LONG_SM); - if(op && !S && !o2 && HasSME2()) return bfmlal_za_zzv(ctx, dec); // -> bfmlal_za_zzv_4x1 - if(op && S && !o2 && HasSME2()) return bfmlsl_za_zzv(ctx, dec); // -> bfmlsl_za_zzv_4x1 - if(op && o2) UNALLOCATED(ENC_UNALLOCATED_758_MORTLACH_MULTI4_ZZ_ZA_FMA_LONG_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_mla_long_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!U && !S && !op && HasSME2()) return smlal_za_zzv(ctx, dec); // -> smlal_za_zzv_4x1 - if(!U && S && !op && HasSME2()) return smlsl_za_zzv(ctx, dec); // -> smlsl_za_zzv_4x1 - if(U && !S && !op && HasSME2()) return umlal_za_zzv(ctx, dec); // -> umlal_za_zzv_4x1 - if(U && S && !op && HasSME2()) return umlsl_za_zzv(ctx, dec); // -> umlsl_za_zzv_4x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_760_MORTLACH_MULTI4_ZZ_ZA_MLA_LONG_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi1_zz_za_fp8_fma_long_sm(context *ctx, Instruction *dec) -{ - return fmlal_za_z8z8v(ctx, dec); -} - -int decode_iclass_mortlach_multi4_z_za_fpdot_sm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>3)&3; - if(!opc && HasSME2()) return fdot_za_zzv(ctx, dec); // -> fdot_za_zzv_4x1 - if(opc==1 && HasSME_F8F16()) return fdot_za_z8z8v(ctx, dec); // -> fdot_za_z8z8v_4x1 - if(opc==2 && HasSME2()) return bfdot_za_zzv(ctx, dec); // -> bfdot_za_zzv_4x1 - if(opc==3 && HasSME_F8F32()) return fdot_za32_z8z8v(ctx, dec); // -> fdot_za32_z8z8v_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_4way_dot_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za_zzv(ctx, dec); // -> sdot_za_zzv_4x1 - if(U && HasSME2()) return udot_za_zzv(ctx, dec); // -> udot_za_zzv_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_mixed_dot_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return usdot_za_zzv(ctx, dec); // -> usdot_za_zzv_s4x1 - if(U && HasSME2()) return sudot_za_zzv(ctx, dec); // -> sudot_za_zzv_s4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_za_2way_dot_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za32_zzv(ctx, dec); // -> sdot_za32_zzv_4x1 - if(U && HasSME2()) return udot_za32_zzv(ctx, dec); // -> udot_za32_zzv_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_float_sm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return fmla_za_zzv(ctx, dec); // -> fmla_za_zzv_4x1 - if(S && HasSME2()) return fmls_za_zzv(ctx, dec); // -> fmls_za_zzv_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_int_sm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return add_za_zzv(ctx, dec); // -> add_za_zzv_4x1 - if(S && HasSME2()) return sub_za_zzv(ctx, dec); // -> sub_za_zzv_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_zz_za_f16_sm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, S=(INSWORD>>3)&1; - if(!sz && !S && HasSME_F16F16()) return fmla_za_zzv(ctx, dec); // -> fmla_za_zzv_4x1_16 - if(!sz && S && HasSME_F16F16()) return fmls_za_zzv(ctx, dec); // -> fmls_za_zzv_4x1_16 - if(sz && !S && HasSME_B16B16()) return bfmla_za_zzv(ctx, dec); // -> bfmla_za_zzv_4x1_16 - if(sz && S && HasSME_B16B16()) return bfmls_za_zzv(ctx, dec); // -> bfmls_za_zzv_4x1_16 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_mla_long_long_sm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!sz && !U && !S && op && HasSME2()) return usmlall_za_zzv(ctx, dec); // -> usmlall_za_zzv_s2x1 - if(!sz && U && !S && op && HasSME2()) return sumlall_za_zzv(ctx, dec); // -> sumlall_za_zzv_s2x1 - if(!U && !S && !op && HasSME2()) return smlall_za_zzv(ctx, dec); // -> smlall_za_zzv_2x1 - if(!U && S && !op && HasSME2()) return smlsll_za_zzv(ctx, dec); // -> smlsll_za_zzv_2x1 - if(U && !S && !op && HasSME2()) return umlall_za_zzv(ctx, dec); // -> umlall_za_zzv_2x1 - if(U && S && !op && HasSME2()) return umlsll_za_zzv(ctx, dec); // -> umlsll_za_zzv_2x1 - if(!sz && S && op) UNALLOCATED(ENC_UNALLOCATED_762_MORTLACH_MULTI2_ZZ_ZA_MLA_LONG_LONG_SM); - if(sz && op) UNALLOCATED(ENC_UNALLOCATED_761_MORTLACH_MULTI2_ZZ_ZA_MLA_LONG_LONG_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_long_sm(context *ctx, Instruction *dec) -{ - return fmlall_za32_z8z8v(ctx, dec); -} - -int decode_iclass_mortlach_multi1_zz_za_mla_long_long_sm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!sz && !U && !S && op && HasSME2()) return usmlall_za_zzv(ctx, dec); // -> usmlall_za_zzv_s - if(!sz && !U && S && op) UNALLOCATED(ENC_UNALLOCATED_765_MORTLACH_MULTI1_ZZ_ZA_MLA_LONG_LONG_SM); - if(!U && !S && !op && HasSME2()) return smlall_za_zzv(ctx, dec); // -> smlall_za_zzv_1 - if(!U && S && !op && HasSME2()) return smlsll_za_zzv(ctx, dec); // -> smlsll_za_zzv_1 - if(U && !S && !op && HasSME2()) return umlall_za_zzv(ctx, dec); // -> umlall_za_zzv_1 - if(U && S && !op && HasSME2()) return umlsll_za_zzv(ctx, dec); // -> umlsll_za_zzv_1 - if(!sz && U && op) UNALLOCATED(ENC_UNALLOCATED_764_MORTLACH_MULTI1_ZZ_ZA_MLA_LONG_LONG_SM); - if(sz && op) UNALLOCATED(ENC_UNALLOCATED_763_MORTLACH_MULTI1_ZZ_ZA_MLA_LONG_LONG_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_fma_long_sm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1, o2=(INSWORD>>2)&1; - if(!op && !S && !o2 && HasSME2()) return fmlal_za_zzv(ctx, dec); // -> fmlal_za_zzv_2x1 - if(!op && !S && o2 && HasSME_F8F16()) return fmlal_za_z8z8v(ctx, dec); // -> fmlal_za_z8z8v_2x1 - if(!op && S && !o2 && HasSME2()) return fmlsl_za_zzv(ctx, dec); // -> fmlsl_za_zzv_2x1 - if(!op && S && o2) UNALLOCATED(ENC_UNALLOCATED_767_MORTLACH_MULTI2_ZZ_ZA_FMA_LONG_SM); - if(op && !S && !o2 && HasSME2()) return bfmlal_za_zzv(ctx, dec); // -> bfmlal_za_zzv_2x1 - if(op && S && !o2 && HasSME2()) return bfmlsl_za_zzv(ctx, dec); // -> bfmlsl_za_zzv_2x1 - if(op && o2) UNALLOCATED(ENC_UNALLOCATED_766_MORTLACH_MULTI2_ZZ_ZA_FMA_LONG_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_mla_long_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1, op=(INSWORD>>2)&1; - if(!U && !S && !op && HasSME2()) return smlal_za_zzv(ctx, dec); // -> smlal_za_zzv_2x1 - if(!U && S && !op && HasSME2()) return smlsl_za_zzv(ctx, dec); // -> smlsl_za_zzv_2x1 - if(U && !S && !op && HasSME2()) return umlal_za_zzv(ctx, dec); // -> umlal_za_zzv_2x1 - if(U && S && !op && HasSME2()) return umlsl_za_zzv(ctx, dec); // -> umlsl_za_zzv_2x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_768_MORTLACH_MULTI2_ZZ_ZA_MLA_LONG_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi1_zz_za_fma_long_sm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!op && !S && HasSME2()) return fmlal_za_zzv(ctx, dec); // -> fmlal_za_zzv_1 - if(!op && S && HasSME2()) return fmlsl_za_zzv(ctx, dec); // -> fmlsl_za_zzv_1 - if(op && !S && HasSME2()) return bfmlal_za_zzv(ctx, dec); // -> bfmlal_za_zzv_1 - if(op && S && HasSME2()) return bfmlsl_za_zzv(ctx, dec); // -> bfmlsl_za_zzv_1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi1_zz_za_mla_long_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1, S=(INSWORD>>3)&1; - if(!U && !S && HasSME2()) return smlal_za_zzv(ctx, dec); // -> smlal_za_zzv_1 - if(!U && S && HasSME2()) return smlsl_za_zzv(ctx, dec); // -> smlsl_za_zzv_1 - if(U && !S && HasSME2()) return umlal_za_zzv(ctx, dec); // -> umlal_za_zzv_1 - if(U && S && HasSME2()) return umlsl_za_zzv(ctx, dec); // -> umlsl_za_zzv_1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_fpdot_sm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>3)&3; - if(!opc && HasSME2()) return fdot_za_zzv(ctx, dec); // -> fdot_za_zzv_2x1 - if(opc==1 && HasSME_F8F16()) return fdot_za_z8z8v(ctx, dec); // -> fdot_za_z8z8v_2x1 - if(opc==2 && HasSME2()) return bfdot_za_zzv(ctx, dec); // -> bfdot_za_zzv_2x1 - if(opc==3 && HasSME_F8F32()) return fdot_za32_z8z8v(ctx, dec); // -> fdot_za32_z8z8v_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_4way_dot_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za_zzv(ctx, dec); // -> sdot_za_zzv_2x1 - if(U && HasSME2()) return udot_za_zzv(ctx, dec); // -> udot_za_zzv_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_mixed_dot_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return usdot_za_zzv(ctx, dec); // -> usdot_za_zzv_s2x1 - if(U && HasSME2()) return sudot_za_zzv(ctx, dec); // -> sudot_za_zzv_s2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_za_2way_dot_sm(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>4)&1; - if(!U && HasSME2()) return sdot_za32_zzv(ctx, dec); // -> sdot_za32_zzv_2x1 - if(U && HasSME2()) return udot_za32_zzv(ctx, dec); // -> udot_za32_zzv_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_float_sm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return fmla_za_zzv(ctx, dec); // -> fmla_za_zzv_2x1 - if(S && HasSME2()) return fmls_za_zzv(ctx, dec); // -> fmls_za_zzv_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_int_sm(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>3)&1; - if(!S && HasSME2()) return add_za_zzv(ctx, dec); // -> add_za_zzv_2x1 - if(S && HasSME2()) return sub_za_zzv(ctx, dec); // -> sub_za_zzv_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_zz_za_f16_sm(context *ctx, Instruction *dec) -{ - uint32_t sz=(INSWORD>>22)&1, S=(INSWORD>>3)&1; - if(!sz && !S && HasSME_F16F16()) return fmla_za_zzv(ctx, dec); // -> fmla_za_zzv_2x1_16 - if(!sz && S && HasSME_F16F16()) return fmls_za_zzv(ctx, dec); // -> fmls_za_zzv_2x1_16 - if(sz && !S && HasSME_B16B16()) return bfmla_za_zzv(ctx, dec); // -> bfmla_za_zzv_2x1_16 - if(sz && S && HasSME_B16B16()) return bfmls_za_zzv(ctx, dec); // -> bfmls_za_zzv_2x1_16 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_minmax_sm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>5)&1, U=INSWORD&1; - if(!op && !U && HasSME2()) return smax_mz_zzv(ctx, dec); // -> smax_mz_zzv_4x1 - if(!op && U && HasSME2()) return umax_mz_zzv(ctx, dec); // -> umax_mz_zzv_4x1 - if(op && !U && HasSME2()) return smin_mz_zzv(ctx, dec); // -> smin_mz_zzv_4x1 - if(op && U && HasSME2()) return umin_mz_zzv(ctx, dec); // -> umin_mz_zzv_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_fminmax_sm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>5)&1, o2=INSWORD&1; - if(!size && !op && !o2 && HasSME2() && HasSVE_B16B16()) return bfmax_mz_zzv(ctx, dec); // -> bfmax_mz_zzv_4x1 - if(!size && !op && o2 && HasSME2() && HasSVE_B16B16()) return bfmin_mz_zzv(ctx, dec); // -> bfmin_mz_zzv_4x1 - if(!size && op && !o2 && HasSME2() && HasSVE_B16B16()) return bfmaxnm_mz_zzv(ctx, dec); // -> bfmaxnm_mz_zzv_4x1 - if(!size && op && o2 && HasSME2() && HasSVE_B16B16()) return bfminnm_mz_zzv(ctx, dec); // -> bfminnm_mz_zzv_4x1 - if(size && !op && !o2 && HasSME2()) return fmax_mz_zzv(ctx, dec); // -> fmax_mz_zzv_4x1 - if(size && !op && o2 && HasSME2()) return fmin_mz_zzv(ctx, dec); // -> fmin_mz_zzv_4x1 - if(size && op && !o2 && HasSME2()) return fmaxnm_mz_zzv(ctx, dec); // -> fmaxnm_mz_zzv_4x1 - if(size && op && o2 && HasSME2()) return fminnm_mz_zzv(ctx, dec); // -> fminnm_mz_zzv_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_fscale_sm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=INSWORD&1; - if(!size && !op && HasSME2() && HasSVE_BFSCALE()) return bfscale_mz_zzv(ctx, dec); // -> bfscale_mz_zzv_4x1 - if(size && !op && HasSME2() && HasFP8()) return fscale_mz_zzv(ctx, dec); // -> fscale_mz_zzv_4x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_769_MORTLACH_MULTI4_Z_Z_FSCALE_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_shift_sm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&7, U=INSWORD&1; - if(opc==1 && !U && HasSME2()) return srshl_mz_zzv(ctx, dec); // -> srshl_mz_zzv_4x1 - if(opc==1 && U && HasSME2()) return urshl_mz_zzv(ctx, dec); // -> urshl_mz_zzv_4x1 - if(opc!=1) UNALLOCATED(ENC_UNALLOCATED_770_MORTLACH_MULTI4_Z_Z_SHIFT_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_add_sm(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return add_mz_zzv(ctx, dec); // -> add_mz_zzv_4x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_771_MORTLACH_MULTI4_Z_Z_ADD_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_sqdmulh_sm(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return sqdmulh_mz_zzv(ctx, dec); // -> sqdmulh_mz_zzv_4x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_772_MORTLACH_MULTI4_Z_Z_SQDMULH_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_minmax_sm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>5)&1, U=INSWORD&1; - if(!op && !U && HasSME2()) return smax_mz_zzv(ctx, dec); // -> smax_mz_zzv_2x1 - if(!op && U && HasSME2()) return umax_mz_zzv(ctx, dec); // -> umax_mz_zzv_2x1 - if(op && !U && HasSME2()) return smin_mz_zzv(ctx, dec); // -> smin_mz_zzv_2x1 - if(op && U && HasSME2()) return umin_mz_zzv(ctx, dec); // -> umin_mz_zzv_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_fminmax_sm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>5)&1, o2=INSWORD&1; - if(!size && !op && !o2 && HasSME2() && HasSVE_B16B16()) return bfmax_mz_zzv(ctx, dec); // -> bfmax_mz_zzv_2x1 - if(!size && !op && o2 && HasSME2() && HasSVE_B16B16()) return bfmin_mz_zzv(ctx, dec); // -> bfmin_mz_zzv_2x1 - if(!size && op && !o2 && HasSME2() && HasSVE_B16B16()) return bfmaxnm_mz_zzv(ctx, dec); // -> bfmaxnm_mz_zzv_2x1 - if(!size && op && o2 && HasSME2() && HasSVE_B16B16()) return bfminnm_mz_zzv(ctx, dec); // -> bfminnm_mz_zzv_2x1 - if(size && !op && !o2 && HasSME2()) return fmax_mz_zzv(ctx, dec); // -> fmax_mz_zzv_2x1 - if(size && !op && o2 && HasSME2()) return fmin_mz_zzv(ctx, dec); // -> fmin_mz_zzv_2x1 - if(size && op && !o2 && HasSME2()) return fmaxnm_mz_zzv(ctx, dec); // -> fmaxnm_mz_zzv_2x1 - if(size && op && o2 && HasSME2()) return fminnm_mz_zzv(ctx, dec); // -> fminnm_mz_zzv_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_fscale_sm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=INSWORD&1; - if(!size && !op && HasSME2() && HasSVE_BFSCALE()) return bfscale_mz_zzv(ctx, dec); // -> bfscale_mz_zzv_2x1 - if(size && !op && HasSME2() && HasFP8()) return fscale_mz_zzv(ctx, dec); // -> fscale_mz_zzv_2x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_773_MORTLACH_MULTI2_Z_Z_FSCALE_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_shift_sm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>5)&7, U=INSWORD&1; - if(opc==1 && !U && HasSME2()) return srshl_mz_zzv(ctx, dec); // -> srshl_mz_zzv_2x1 - if(opc==1 && U && HasSME2()) return urshl_mz_zzv(ctx, dec); // -> urshl_mz_zzv_2x1 - if(opc!=1) UNALLOCATED(ENC_UNALLOCATED_774_MORTLACH_MULTI2_Z_Z_SHIFT_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_add_sm(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return add_mz_zzv(ctx, dec); // -> add_mz_zzv_2x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_775_MORTLACH_MULTI2_Z_Z_ADD_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_sqdmulh_sm(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return sqdmulh_mz_zzv(ctx, dec); // -> sqdmulh_mz_zzv_2x1 - if(op) UNALLOCATED(ENC_UNALLOCATED_776_MORTLACH_MULTI2_Z_Z_SQDMULH_SM); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_fclamp(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=INSWORD&1; - if(!size && !op && HasSME2() && HasSVE_B16B16()) return bfclamp_mz_zz(ctx, dec); // -> bfclamp_mz_zz_2 - if(size && !op && HasSME2()) return fclamp_mz_zz(ctx, dec); // -> fclamp_mz_zz_2 - if(op) UNALLOCATED(ENC_UNALLOCATED_777_MORTLACH_MULTI2_FCLAMP); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_clamp_int(context *ctx, Instruction *dec) -{ - uint32_t U=INSWORD&1; - if(!U && HasSME2()) return sclamp_mz_zz(ctx, dec); // -> sclamp_mz_zz_2 - if(U && HasSME2()) return uclamp_mz_zz(ctx, dec); // -> uclamp_mz_zz_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fclamp(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=INSWORD&1; - if(!size && !op && HasSME2() && HasSVE_B16B16()) return bfclamp_mz_zz(ctx, dec); // -> bfclamp_mz_zz_4 - if(size && !op && HasSME2()) return fclamp_mz_zz(ctx, dec); // -> fclamp_mz_zz_4 - if(op) UNALLOCATED(ENC_UNALLOCATED_778_MORTLACH_MULTI4_FCLAMP); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_clamp_int(context *ctx, Instruction *dec) -{ - uint32_t U=INSWORD&1; - if(!U && HasSME2()) return sclamp_mz_zz(ctx, dec); // -> sclamp_mz_zz_4 - if(U && HasSME2()) return uclamp_mz_zz(ctx, dec); // -> uclamp_mz_zz_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_zip(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return zip_mz_zz(ctx, dec); // -> zip_mz_zz_2 - if(op && HasSME2()) return uzp_mz_zz(ctx, dec); // -> uzp_mz_zz_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_z_z_long_zip(context *ctx, Instruction *dec) -{ - uint32_t op=INSWORD&1; - if(!op && HasSME2()) return zip_mz_zz(ctx, dec); // -> zip_mz_zz_2q - if(op && HasSME2()) return uzp_mz_zz(ctx, dec); // -> uzp_mz_zz_2q - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_qrshr(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>20)&1, U=(INSWORD>>5)&1; - if(!op && !U && HasSME2()) return sqrshr_z_mz2(ctx, dec); // -> sqrshr_z_mz2_ - if(!op && U && HasSME2()) return uqrshr_z_mz2(ctx, dec); // -> uqrshr_z_mz2_ - if(op && !U && HasSME2()) return sqrshru_z_mz2(ctx, dec); // -> sqrshru_z_mz2_ - if(op && U) UNALLOCATED(ENC_UNALLOCATED_779_MORTLACH_MULTI2_QRSHR); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_qrshr(context *ctx, Instruction *dec) -{ - uint32_t N=(INSWORD>>10)&1, op=(INSWORD>>6)&1, U=(INSWORD>>5)&1; - if(!N && !op && !U && HasSME2()) return sqrshr_z_mz4(ctx, dec); // -> sqrshr_z_mz4_ - if(!N && !op && U && HasSME2()) return uqrshr_z_mz4(ctx, dec); // -> uqrshr_z_mz4_ - if(!N && op && !U && HasSME2()) return sqrshru_z_mz4(ctx, dec); // -> sqrshru_z_mz4_ - if(N && !op && !U && HasSME2()) return sqrshrn_z_mz4(ctx, dec); // -> sqrshrn_z_mz4_ - if(N && !op && U && HasSME2()) return uqrshrn_z_mz4(ctx, dec); // -> uqrshrn_z_mz4_ - if(N && op && !U && HasSME2()) return sqrshrun_z_mz4(ctx, dec); // -> sqrshrun_z_mz4_ - if(op && U) UNALLOCATED(ENC_UNALLOCATED_780_MORTLACH_MULTI4_QRSHR); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_narrow_fp_cvrt(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, N=(INSWORD>>5)&1; - if(!op && !N && HasSME2()) return fcvt_z_mz2(ctx, dec); // -> fcvt_z_mz2_ - if(!op && N && HasSME2()) return fcvtn_z_mz2(ctx, dec); // -> fcvtn_z_mz2_ - if(op && !N && HasSME2()) return bfcvt_z_mz2(ctx, dec); // -> bfcvt_z_mz2_ - if(op && N && HasSME2()) return bfcvtn_z_mz2(ctx, dec); // -> bfcvtn_z_mz2_ - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_fpint_cvrt(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>5)&1; - if(!U && HasSME2()) return fcvtzs_mz_z(ctx, dec); // -> fcvtzs_mz_z_2 - if(U && HasSME2()) return fcvtzu_mz_z(ctx, dec); // -> fcvtzu_mz_z_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_intfp_cvrt(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>5)&1; - if(!U && HasSME2()) return scvtf_mz_z(ctx, dec); // -> scvtf_mz_z_2 - if(U && HasSME2()) return ucvtf_mz_z(ctx, dec); // -> ucvtf_mz_z_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_narrow_int_cvrt(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, U=(INSWORD>>5)&1; - if(!op && !U && HasSME2()) return sqcvt_z_mz2(ctx, dec); // -> sqcvt_z_mz2_ - if(!op && U && HasSME2()) return uqcvt_z_mz2(ctx, dec); // -> uqcvt_z_mz2_ - if(op && !U && HasSME2()) return sqcvtu_z_mz2(ctx, dec); // -> sqcvtu_z_mz2_ - if(op && U) UNALLOCATED(ENC_UNALLOCATED_781_MORTLACH_MULTI2_NARROW_INT_CVRT); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_narrow_fp8_cvrt(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1; - if(!op && HasSME2() && HasFP8()) return fcvt_z8_mz2(ctx, dec); // -> fcvt_z8_mz2_ - if(op && HasSME2() && HasFP8()) return bfcvt_z8_mz2(ctx, dec); // -> bfcvt_z8_mz2_ - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_wide_int(context *ctx, Instruction *dec) -{ - uint32_t U=INSWORD&1; - if(!U && HasSME2()) return sunpk_mz_z(ctx, dec); // -> sunpk_mz_z_2 - if(U && HasSME2()) return uunpk_mz_z(ctx, dec); // -> uunpk_mz_z_2 - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_wide_fp8_cvrt(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, L=INSWORD&1; - if(!opc && !L && HasSME2() && HasFP8()) return f1cvt_mz2_z8(ctx, dec); // -> f1cvt_mz2_z8_ - if(!opc && L && HasSME2() && HasFP8()) return f1cvtl_mz2_z8(ctx, dec); // -> f1cvtl_mz2_z8_ - if(opc==1 && !L && HasSME2() && HasFP8()) return bf1cvt_mz2_z8(ctx, dec); // -> bf1cvt_mz2_z8_ - if(opc==1 && L && HasSME2() && HasFP8()) return bf1cvtl_mz2_z8(ctx, dec); // -> bf1cvtl_mz2_z8_ - if(opc==2 && !L && HasSME2() && HasFP8()) return f1cvt_mz2_z8(ctx, dec); // -> f2cvt_mz2_z8_ - if(opc==2 && L && HasSME2() && HasFP8()) return f1cvtl_mz2_z8(ctx, dec); // -> f2cvtl_mz2_z8_ - if(opc==3 && !L && HasSME2() && HasFP8()) return bf1cvt_mz2_z8(ctx, dec); // -> bf2cvt_mz2_z8_ - if(opc==3 && L && HasSME2() && HasFP8()) return bf1cvtl_mz2_z8(ctx, dec); // -> bf2cvtl_mz2_z8_ - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_frint(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>16)&7; - if(size==2 && !opc && HasSME2()) return frintn_mz_z(ctx, dec); // -> frintn_mz_z_2 - if(size==2 && opc==1 && HasSME2()) return frintp_mz_z(ctx, dec); // -> frintp_mz_z_2 - if(size==2 && opc==2 && HasSME2()) return frintm_mz_z(ctx, dec); // -> frintm_mz_z_2 - if(size==2 && opc==3) UNALLOCATED(ENC_UNALLOCATED_784_MORTLACH_MULTI2_FRINT); - if(size==2 && opc==4 && HasSME2()) return frinta_mz_z(ctx, dec); // -> frinta_mz_z_2 - if(size==2 && opc==5) UNALLOCATED(ENC_UNALLOCATED_785_MORTLACH_MULTI2_FRINT); - if(size==2 && (opc&6)==6) UNALLOCATED(ENC_UNALLOCATED_783_MORTLACH_MULTI2_FRINT); - if(size!=2) UNALLOCATED(ENC_UNALLOCATED_782_MORTLACH_MULTI2_FRINT); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_wide_fp_cvrt(context *ctx, Instruction *dec) -{ - uint32_t L=INSWORD&1; - if(!L && HasSME_F16F16()) return fcvt_mz2_z(ctx, dec); // -> fcvt_mz2_z_ - if(L && HasSME_F16F16()) return fcvtl_mz2_z(ctx, dec); // -> fcvtl_mz2_z_ - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fpint_cvrt(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>5)&1; - if(!U && HasSME2()) return fcvtzs_mz_z(ctx, dec); // -> fcvtzs_mz_z_4 - if(U && HasSME2()) return fcvtzu_mz_z(ctx, dec); // -> fcvtzu_mz_z_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_intfp_cvrt(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>5)&1; - if(!U && HasSME2()) return scvtf_mz_z(ctx, dec); // -> scvtf_mz_z_4 - if(U && HasSME2()) return ucvtf_mz_z(ctx, dec); // -> ucvtf_mz_z_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_narrow_int_cvrt(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, N=(INSWORD>>6)&1, U=(INSWORD>>5)&1; - if(!op && !N && !U && HasSME2()) return sqcvt_z_mz4(ctx, dec); // -> sqcvt_z_mz4_ - if(!op && !N && U && HasSME2()) return uqcvt_z_mz4(ctx, dec); // -> uqcvt_z_mz4_ - if(!op && N && !U && HasSME2()) return sqcvtn_z_mz4(ctx, dec); // -> sqcvtn_z_mz4_ - if(!op && N && U && HasSME2()) return uqcvtn_z_mz4(ctx, dec); // -> uqcvtn_z_mz4_ - if(op && !N && !U && HasSME2()) return sqcvtu_z_mz4(ctx, dec); // -> sqcvtu_z_mz4_ - if(op && N && !U && HasSME2()) return sqcvtun_z_mz4(ctx, dec); // -> sqcvtun_z_mz4_ - if(op && U) UNALLOCATED(ENC_UNALLOCATED_786_MORTLACH_MULTI4_NARROW_INT_CVRT); - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_narrow_fp8_cvrt(context *ctx, Instruction *dec) -{ - uint32_t N=(INSWORD>>5)&1; - if(!N && HasSME2() && HasFP8()) return fcvt_z8_mz4(ctx, dec); // -> fcvt_z8_mz4_ - if(N && HasSME2() && HasFP8()) return fcvtn_z8_mz4(ctx, dec); // -> fcvtn_z8_mz4_ - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_wide_int(context *ctx, Instruction *dec) -{ - uint32_t U=INSWORD&1; - if(!U && HasSME2()) return sunpk_mz_z(ctx, dec); // -> sunpk_mz_z_4 - if(U && HasSME2()) return uunpk_mz_z(ctx, dec); // -> uunpk_mz_z_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_zip(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>1)&1; - if(!op && HasSME2()) return zip_mz_z(ctx, dec); // -> zip_mz_z_4 - if(op && HasSME2()) return uzp_mz_z(ctx, dec); // -> uzp_mz_z_4 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_z_z_long_zip(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>1)&1; - if(!op && HasSME2()) return zip_mz_z(ctx, dec); // -> zip_mz_z_4q - if(op && HasSME2()) return uzp_mz_z(ctx, dec); // -> uzp_mz_z_4q - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_frint(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>16)&7; - if(size==2 && !opc && HasSME2()) return frintn_mz_z(ctx, dec); // -> frintn_mz_z_4 - if(size==2 && opc==1 && HasSME2()) return frintp_mz_z(ctx, dec); // -> frintp_mz_z_4 - if(size==2 && opc==2 && HasSME2()) return frintm_mz_z(ctx, dec); // -> frintm_mz_z_4 - if(size==2 && opc==3) UNALLOCATED(ENC_UNALLOCATED_789_MORTLACH_MULTI4_FRINT); - if(size==2 && opc==4 && HasSME2()) return frinta_mz_z(ctx, dec); // -> frinta_mz_z_4 - if(size==2 && opc==5) UNALLOCATED(ENC_UNALLOCATED_790_MORTLACH_MULTI4_FRINT); - if(size==2 && (opc&6)==6) UNALLOCATED(ENC_UNALLOCATED_788_MORTLACH_MULTI4_FRINT); - if(size!=2) UNALLOCATED(ENC_UNALLOCATED_787_MORTLACH_MULTI4_FRINT); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_select_int(context *ctx, Instruction *dec) -{ - return sel_mz_p_zz(ctx, dec); -} - -int decode_iclass_mortlach_multi4_select_int(context *ctx, Instruction *dec) -{ - return sel_mz_p_zz(ctx, dec); -} - -int decode_iclass_mortlach_multi_zero(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>15)&7, opc2=INSWORD&7; - if(opc==6 && !(opc2&6) && HasSME2p1()) return zero_za4_ri(ctx, dec); // -> zero_za4_ri_2 - if(opc==7 && !(opc2&6) && HasSME2p1()) return zero_za4_ri(ctx, dec); // -> zero_za4_ri_4 - if(opc==2 && !(opc2&4) && HasSME2p1()) return zero_za2_ri(ctx, dec); // -> zero_za2_ri_2 - if(opc==3 && !(opc2&4) && HasSME2p1()) return zero_za2_ri(ctx, dec); // -> zero_za2_ri_4 - if(opc==5 && !(opc2&4) && HasSME2p1()) return zero_za4_ri(ctx, dec); // -> zero_za4_ri_1 - if(opc==5 && (opc2&4)==4) UNALLOCATED(ENC_UNALLOCATED_792_MORTLACH_MULTI_ZERO); - if((opc&6)==6 && (opc2&6)==2) UNALLOCATED(ENC_UNALLOCATED_793_MORTLACH_MULTI_ZERO); - if(!opc && HasSME2p1()) return zero_za1_ri(ctx, dec); // -> zero_za1_ri_2 - if(opc==1 && HasSME2p1()) return zero_za2_ri(ctx, dec); // -> zero_za2_ri_1 - if(opc==4 && HasSME2p1()) return zero_za1_ri(ctx, dec); // -> zero_za1_ri_4 - if((opc&2)==2 && (opc2&4)==4) UNALLOCATED(ENC_UNALLOCATED_791_MORTLACH_MULTI_ZERO); - UNMATCHED; -} - -int decode_iclass_mortlach_multi2_fmul_sm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSME2() && HasSVE_BFSCALE()) return bfmul_mz_zzv(ctx, dec); // -> bfmul_mz_zzv_2x1 - if(size && HasSME2p2()) return fmul_mz_zzv(ctx, dec); // -> fmul_mz_zzv_2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_multi4_fmul_sm(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSME2() && HasSVE_BFSCALE()) return bfmul_mz_zzv(ctx, dec); // -> bfmul_mz_zzv_4x1 - if(size && HasSME2p2()) return fmul_mz_zzv(ctx, dec); // -> fmul_mz_zzv_4x1 - UNMATCHED; -} - -int decode_iclass_mortlach_bini32_prod(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>4)&1; - if(!S && HasSME2()) return bmopa_za_pp_zz(ctx, dec); // -> bmopa_za_pp_zz_32 - if(S && HasSME2()) return bmops_za_pp_zz(ctx, dec); // -> bmops_za_pp_zz_32 - UNMATCHED; -} - -int decode_iclass_mortlach_f8f16_prod(context *ctx, Instruction *dec) -{ - return fmopa_za16_pp_z8z8(ctx, dec); -} - -int decode_iclass_mortlach_f16f16_prod(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>4)&1; - if(!S && HasSME_F16F16()) return fmopa_za_pp_zz(ctx, dec); // -> fmopa_za_pp_zz_16 - if(S && HasSME_F16F16()) return fmops_za_pp_zz(ctx, dec); // -> fmops_za_pp_zz_16 - UNMATCHED; -} - -int decode_iclass_mortlach_b16b16_prod(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>4)&1; - if(!S && HasSME_B16B16()) return bfmopa_za_pp_zz(ctx, dec); // -> bfmopa_za_pp_zz_16 - if(S && HasSME_B16B16()) return bfmops_za_pp_zz(ctx, dec); // -> bfmops_za_pp_zz_16 - UNMATCHED; -} - -int decode_iclass_mortlach_f32f32_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!M && !N && !S && HasSME_MOP4()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_s1x1 - if(!M && !N && S && HasSME_MOP4()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_s1x1 - if(!M && N && !S && HasSME_MOP4()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_s2x1 - if(!M && N && S && HasSME_MOP4()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_s2x1 - if(M && !N && !S && HasSME_MOP4()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_s1x2 - if(M && !N && S && HasSME_MOP4()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_s1x2 - if(M && N && !S && HasSME_MOP4()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_s2x2 - if(M && N && S && HasSME_MOP4()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_s2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_f8f32_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1; - if(!M && !N && HasSME_MOP4() && HasSME_F8F32()) return fmop4a_za32_z8z8(ctx, dec); // -> fmop4a_za32_z8z8_b1x1 - if(!M && N && HasSME_MOP4() && HasSME_F8F32()) return fmop4a_za32_z8z8(ctx, dec); // -> fmop4a_za32_z8z8_b2x1 - if(M && !N && HasSME_MOP4() && HasSME_F8F32()) return fmop4a_za32_z8z8(ctx, dec); // -> fmop4a_za32_z8z8_b1x2 - if(M && N && HasSME_MOP4() && HasSME_F8F32()) return fmop4a_za32_z8z8(ctx, dec); // -> fmop4a_za32_z8z8_b2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_b16f32_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!M && !N && !S && HasSME_MOP4()) return bfmop4a_za32_zz(ctx, dec); // -> bfmop4a_za32_zz_h1x1 - if(!M && !N && S && HasSME_MOP4()) return bfmop4s_za32_zz(ctx, dec); // -> bfmop4s_za32_zz_h1x1 - if(!M && N && !S && HasSME_MOP4()) return bfmop4a_za32_zz(ctx, dec); // -> bfmop4a_za32_zz_h2x1 - if(!M && N && S && HasSME_MOP4()) return bfmop4s_za32_zz(ctx, dec); // -> bfmop4s_za32_zz_h2x1 - if(M && !N && !S && HasSME_MOP4()) return bfmop4a_za32_zz(ctx, dec); // -> bfmop4a_za32_zz_h1x2 - if(M && !N && S && HasSME_MOP4()) return bfmop4s_za32_zz(ctx, dec); // -> bfmop4s_za32_zz_h1x2 - if(M && N && !S && HasSME_MOP4()) return bfmop4a_za32_zz(ctx, dec); // -> bfmop4a_za32_zz_h2x2 - if(M && N && S && HasSME_MOP4()) return bfmop4s_za32_zz(ctx, dec); // -> bfmop4s_za32_zz_h2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_f16f32_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!M && !N && !S && HasSME_MOP4()) return fmop4a_za32_zz(ctx, dec); // -> fmop4a_za32_zz_h1x1 - if(!M && !N && S && HasSME_MOP4()) return fmop4s_za32_zz(ctx, dec); // -> fmop4s_za32_zz_h1x1 - if(!M && N && !S && HasSME_MOP4()) return fmop4a_za32_zz(ctx, dec); // -> fmop4a_za32_zz_h2x1 - if(!M && N && S && HasSME_MOP4()) return fmop4s_za32_zz(ctx, dec); // -> fmop4s_za32_zz_h2x1 - if(M && !N && !S && HasSME_MOP4()) return fmop4a_za32_zz(ctx, dec); // -> fmop4a_za32_zz_h1x2 - if(M && !N && S && HasSME_MOP4()) return fmop4s_za32_zz(ctx, dec); // -> fmop4s_za32_zz_h1x2 - if(M && N && !S && HasSME_MOP4()) return fmop4a_za32_zz(ctx, dec); // -> fmop4a_za32_zz_h2x2 - if(M && N && S && HasSME_MOP4()) return fmop4s_za32_zz(ctx, dec); // -> fmop4s_za32_zz_h2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_i8i32_prod4(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1, u1=(INSWORD>>21)&1, M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!u0 && !u1 && !M && !N && !S && HasSME_MOP4()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_b1x1 - if(!u0 && !u1 && !M && !N && S && HasSME_MOP4()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_b1x1 - if(!u0 && !u1 && !M && N && !S && HasSME_MOP4()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_b2x1 - if(!u0 && !u1 && !M && N && S && HasSME_MOP4()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_b2x1 - if(!u0 && !u1 && M && !N && !S && HasSME_MOP4()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_b1x2 - if(!u0 && !u1 && M && !N && S && HasSME_MOP4()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_b1x2 - if(!u0 && !u1 && M && N && !S && HasSME_MOP4()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_b2x2 - if(!u0 && !u1 && M && N && S && HasSME_MOP4()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_b2x2 - if(!u0 && u1 && !M && !N && !S && HasSME_MOP4()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_b1x1 - if(!u0 && u1 && !M && !N && S && HasSME_MOP4()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_b1x1 - if(!u0 && u1 && !M && N && !S && HasSME_MOP4()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_b2x1 - if(!u0 && u1 && !M && N && S && HasSME_MOP4()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_b2x1 - if(!u0 && u1 && M && !N && !S && HasSME_MOP4()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_b1x2 - if(!u0 && u1 && M && !N && S && HasSME_MOP4()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_b1x2 - if(!u0 && u1 && M && N && !S && HasSME_MOP4()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_b2x2 - if(!u0 && u1 && M && N && S && HasSME_MOP4()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_b2x2 - if(u0 && !u1 && !M && !N && !S && HasSME_MOP4()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_b1x1 - if(u0 && !u1 && !M && !N && S && HasSME_MOP4()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_b1x1 - if(u0 && !u1 && !M && N && !S && HasSME_MOP4()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_b2x1 - if(u0 && !u1 && !M && N && S && HasSME_MOP4()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_b2x1 - if(u0 && !u1 && M && !N && !S && HasSME_MOP4()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_b1x2 - if(u0 && !u1 && M && !N && S && HasSME_MOP4()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_b1x2 - if(u0 && !u1 && M && N && !S && HasSME_MOP4()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_b2x2 - if(u0 && !u1 && M && N && S && HasSME_MOP4()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_b2x2 - if(u0 && u1 && !M && !N && !S && HasSME_MOP4()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_b1x1 - if(u0 && u1 && !M && !N && S && HasSME_MOP4()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_b1x1 - if(u0 && u1 && !M && N && !S && HasSME_MOP4()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_b2x1 - if(u0 && u1 && !M && N && S && HasSME_MOP4()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_b2x1 - if(u0 && u1 && M && !N && !S && HasSME_MOP4()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_b1x2 - if(u0 && u1 && M && !N && S && HasSME_MOP4()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_b1x2 - if(u0 && u1 && M && N && !S && HasSME_MOP4()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_b2x2 - if(u0 && u1 && M && N && S && HasSME_MOP4()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_b2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_f8f16_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1; - if(!M && !N && HasSME_MOP4() && HasSME_F8F16()) return fmop4a_za16_z8z8(ctx, dec); // -> fmop4a_za16_z8z8_b1x1 - if(!M && N && HasSME_MOP4() && HasSME_F8F16()) return fmop4a_za16_z8z8(ctx, dec); // -> fmop4a_za16_z8z8_b2x1 - if(M && !N && HasSME_MOP4() && HasSME_F8F16()) return fmop4a_za16_z8z8(ctx, dec); // -> fmop4a_za16_z8z8_b1x2 - if(M && N && HasSME_MOP4() && HasSME_F8F16()) return fmop4a_za16_z8z8(ctx, dec); // -> fmop4a_za16_z8z8_b2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_f16f16_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!M && !N && !S && HasSME_MOP4() && HasSME_F16F16()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_h1x1 - if(!M && !N && S && HasSME_MOP4() && HasSME_F16F16()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_h1x1 - if(!M && N && !S && HasSME_MOP4() && HasSME_F16F16()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_h2x1 - if(!M && N && S && HasSME_MOP4() && HasSME_F16F16()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_h2x1 - if(M && !N && !S && HasSME_MOP4() && HasSME_F16F16()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_h1x2 - if(M && !N && S && HasSME_MOP4() && HasSME_F16F16()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_h1x2 - if(M && N && !S && HasSME_MOP4() && HasSME_F16F16()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_h2x2 - if(M && N && S && HasSME_MOP4() && HasSME_F16F16()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_h2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_b16b16_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!M && !N && !S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4a_za_zz(ctx, dec); // -> bfmop4a_za_zz_h1x1 - if(!M && !N && S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4s_za_zz(ctx, dec); // -> bfmop4s_za_zz_h1x1 - if(!M && N && !S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4a_za_zz(ctx, dec); // -> bfmop4a_za_zz_h2x1 - if(!M && N && S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4s_za_zz(ctx, dec); // -> bfmop4s_za_zz_h2x1 - if(M && !N && !S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4a_za_zz(ctx, dec); // -> bfmop4a_za_zz_h1x2 - if(M && !N && S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4s_za_zz(ctx, dec); // -> bfmop4s_za_zz_h1x2 - if(M && N && !S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4a_za_zz(ctx, dec); // -> bfmop4a_za_zz_h2x2 - if(M && N && S && HasSME_MOP4() && HasSME_B16B16()) return bfmop4s_za_zz(ctx, dec); // -> bfmop4s_za_zz_h2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_i16i32_prod4(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1, M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!u0 && !M && !N && !S && HasSME_MOP4()) return smop4a_za32_zz(ctx, dec); // -> smop4a_za32_zz_h1x1 - if(!u0 && !M && !N && S && HasSME_MOP4()) return smop4s_za32_zz(ctx, dec); // -> smop4s_za32_zz_h1x1 - if(!u0 && !M && N && !S && HasSME_MOP4()) return smop4a_za32_zz(ctx, dec); // -> smop4a_za32_zz_h2x1 - if(!u0 && !M && N && S && HasSME_MOP4()) return smop4s_za32_zz(ctx, dec); // -> smop4s_za32_zz_h2x1 - if(!u0 && M && !N && !S && HasSME_MOP4()) return smop4a_za32_zz(ctx, dec); // -> smop4a_za32_zz_h1x2 - if(!u0 && M && !N && S && HasSME_MOP4()) return smop4s_za32_zz(ctx, dec); // -> smop4s_za32_zz_h1x2 - if(!u0 && M && N && !S && HasSME_MOP4()) return smop4a_za32_zz(ctx, dec); // -> smop4a_za32_zz_h2x2 - if(!u0 && M && N && S && HasSME_MOP4()) return smop4s_za32_zz(ctx, dec); // -> smop4s_za32_zz_h2x2 - if(u0 && !M && !N && !S && HasSME_MOP4()) return umop4a_za32_zz(ctx, dec); // -> umop4a_za32_zz_h1x1 - if(u0 && !M && !N && S && HasSME_MOP4()) return umop4s_za32_zz(ctx, dec); // -> umop4s_za32_zz_h1x1 - if(u0 && !M && N && !S && HasSME_MOP4()) return umop4a_za32_zz(ctx, dec); // -> umop4a_za32_zz_h2x1 - if(u0 && !M && N && S && HasSME_MOP4()) return umop4s_za32_zz(ctx, dec); // -> umop4s_za32_zz_h2x1 - if(u0 && M && !N && !S && HasSME_MOP4()) return umop4a_za32_zz(ctx, dec); // -> umop4a_za32_zz_h1x2 - if(u0 && M && !N && S && HasSME_MOP4()) return umop4s_za32_zz(ctx, dec); // -> umop4s_za32_zz_h1x2 - if(u0 && M && N && !S && HasSME_MOP4()) return umop4a_za32_zz(ctx, dec); // -> umop4a_za32_zz_h2x2 - if(u0 && M && N && S && HasSME_MOP4()) return umop4s_za32_zz(ctx, dec); // -> umop4s_za32_zz_h2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_f64f64_prod4(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!M && !N && !S && HasSME_MOP4() && HasSME_F64F64()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_d1x1 - if(!M && !N && S && HasSME_MOP4() && HasSME_F64F64()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_d1x1 - if(!M && N && !S && HasSME_MOP4() && HasSME_F64F64()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_d2x1 - if(!M && N && S && HasSME_MOP4() && HasSME_F64F64()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_d2x1 - if(M && !N && !S && HasSME_MOP4() && HasSME_F64F64()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_d1x2 - if(M && !N && S && HasSME_MOP4() && HasSME_F64F64()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_d1x2 - if(M && N && !S && HasSME_MOP4() && HasSME_F64F64()) return fmop4a_za_zz(ctx, dec); // -> fmop4a_za_zz_d2x2 - if(M && N && S && HasSME_MOP4() && HasSME_F64F64()) return fmop4s_za_zz(ctx, dec); // -> fmop4s_za_zz_d2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_i16i64_prod4(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1, u1=(INSWORD>>21)&1, M=(INSWORD>>20)&1, N=(INSWORD>>9)&1, S=(INSWORD>>4)&1; - if(!u0 && !u1 && !M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_h1x1 - if(!u0 && !u1 && !M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_h1x1 - if(!u0 && !u1 && !M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_h2x1 - if(!u0 && !u1 && !M && N && S && HasSME_MOP4() && HasSME_I16I64()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_h2x1 - if(!u0 && !u1 && M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_h1x2 - if(!u0 && !u1 && M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_h1x2 - if(!u0 && !u1 && M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return smop4a_za_zz(ctx, dec); // -> smop4a_za_zz_h2x2 - if(!u0 && !u1 && M && N && S && HasSME_MOP4() && HasSME_I16I64()) return smop4s_za_zz(ctx, dec); // -> smop4s_za_zz_h2x2 - if(!u0 && u1 && !M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_h1x1 - if(!u0 && u1 && !M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_h1x1 - if(!u0 && u1 && !M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_h2x1 - if(!u0 && u1 && !M && N && S && HasSME_MOP4() && HasSME_I16I64()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_h2x1 - if(!u0 && u1 && M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_h1x2 - if(!u0 && u1 && M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_h1x2 - if(!u0 && u1 && M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return sumop4a_za_zz(ctx, dec); // -> sumop4a_za_zz_h2x2 - if(!u0 && u1 && M && N && S && HasSME_MOP4() && HasSME_I16I64()) return sumop4s_za_zz(ctx, dec); // -> sumop4s_za_zz_h2x2 - if(u0 && !u1 && !M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_h1x1 - if(u0 && !u1 && !M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_h1x1 - if(u0 && !u1 && !M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_h2x1 - if(u0 && !u1 && !M && N && S && HasSME_MOP4() && HasSME_I16I64()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_h2x1 - if(u0 && !u1 && M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_h1x2 - if(u0 && !u1 && M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_h1x2 - if(u0 && !u1 && M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return usmop4a_za_zz(ctx, dec); // -> usmop4a_za_zz_h2x2 - if(u0 && !u1 && M && N && S && HasSME_MOP4() && HasSME_I16I64()) return usmop4s_za_zz(ctx, dec); // -> usmop4s_za_zz_h2x2 - if(u0 && u1 && !M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_h1x1 - if(u0 && u1 && !M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_h1x1 - if(u0 && u1 && !M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_h2x1 - if(u0 && u1 && !M && N && S && HasSME_MOP4() && HasSME_I16I64()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_h2x1 - if(u0 && u1 && M && !N && !S && HasSME_MOP4() && HasSME_I16I64()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_h1x2 - if(u0 && u1 && M && !N && S && HasSME_MOP4() && HasSME_I16I64()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_h1x2 - if(u0 && u1 && M && N && !S && HasSME_MOP4() && HasSME_I16I64()) return umop4a_za_zz(ctx, dec); // -> umop4a_za_zz_h2x2 - if(u0 && u1 && M && N && S && HasSME_MOP4() && HasSME_I16I64()) return umop4s_za_zz(ctx, dec); // -> umop4s_za_zz_h2x2 - UNMATCHED; -} - -int decode_iclass_mortlach_f32f32_1in2ss_prod(context *ctx, Instruction *dec) -{ - return ftmopa_za_zzzi(ctx, dec); -} - -int decode_iclass_mortlach_f8f32_2in4ss_prod(context *ctx, Instruction *dec) -{ - return ftmopa_za32_z8z8zi(ctx, dec); -} - -int decode_iclass_mortlach_b16f32_2in4ss_prod(context *ctx, Instruction *dec) -{ - return bftmopa_za32_zzzi(ctx, dec); -} - -int decode_iclass_mortlach_f16f32_2in4ss_prod(context *ctx, Instruction *dec) -{ - return ftmopa_za32_zzzi(ctx, dec); -} - -int decode_iclass_mortlach_i8i32_2in4ss_prod(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1, u1=(INSWORD>>21)&1; - if(!u0 && !u1 && HasSME_TMOP()) return stmopa_za_zzzi(ctx, dec); // -> stmopa_za_zzzi_b2x1 - if(!u0 && u1 && HasSME_TMOP()) return sutmopa_za_zzzi(ctx, dec); // -> sutmopa_za_zzzi_b2x1 - if(u0 && !u1 && HasSME_TMOP()) return ustmopa_za_zzzi(ctx, dec); // -> ustmopa_za_zzzi_b2x1 - if(u0 && u1 && HasSME_TMOP()) return utmopa_za_zzzi(ctx, dec); // -> utmopa_za_zzzi_b2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_f8f16_2in4ss_prod(context *ctx, Instruction *dec) -{ - return ftmopa_za16_z8z8zi(ctx, dec); -} - -int decode_iclass_mortlach_f16f16_1in2ss_prod(context *ctx, Instruction *dec) -{ - return ftmopa_za_zzzi(ctx, dec); -} - -int decode_iclass_mortlach_b16b16_1in2ss_prod(context *ctx, Instruction *dec) -{ - return bftmopa_za_zzzi(ctx, dec); -} - -int decode_iclass_mortlach_i16i32_2in4ss_prod(context *ctx, Instruction *dec) -{ - uint32_t u0=(INSWORD>>24)&1; - if(!u0 && HasSME_TMOP()) return stmopa_za32_zzzi(ctx, dec); // -> stmopa_za32_zzzi_h2x1 - if(u0 && HasSME_TMOP()) return utmopa_za32_zzzi(ctx, dec); // -> utmopa_za32_zzzi_h2x1 - UNMATCHED; -} - -int decode_iclass_mortlach_zero_zt(context *ctx, Instruction *dec) -{ - uint32_t op0=(INSWORD>>4)&0x3fff, opc=INSWORD&15; - if(!op0 && opc==1 && HasSME2()) return zero_zt_i(ctx, dec); // -> zero_zt_i_ - if(!op0 && opc!=1) UNALLOCATED(ENC_UNALLOCATED_795_MORTLACH_ZERO_ZT); - if(op0) UNALLOCATED(ENC_UNALLOCATED_794_MORTLACH_ZERO_ZT); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_cons_misc_0_a(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3; - if(!opc && HasSVE()) return adr_z_az(ctx, dec); // -> adr_z_az_d_s32_scaled - if(opc==1 && HasSVE()) return adr_z_az(ctx, dec); // -> adr_z_az_d_u32_scaled - if((opc&2)==2 && HasSVE()) return adr_z_az(ctx, dec); // -> adr_z_az_sd_same_scaled - UNMATCHED; -} - -int decode_iclass_sve_int_log_imm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3; - if(!opc && HasSVE() && HasSME()) return orr_z_zi(ctx, dec); // -> orr_z_zi_ - if(opc==1 && HasSVE() && HasSME()) return eor_z_zi(ctx, dec); // -> eor_z_zi_ - if(opc==2 && HasSVE() && HasSME()) return and_z_zi(ctx, dec); // -> and_z_zi_ - UNMATCHED; -} - -int decode_iclass_sve_int_dup_mask_imm(context *ctx, Instruction *dec) -{ - return dupm_z_i(ctx, dec); -} - -int decode_iclass_sve_int_bin_cons_log(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3; - if(!opc && HasSVE() && HasSME()) return and_z_zz(ctx, dec); // -> and_z_zz_ - if(opc==1 && HasSVE() && HasSME()) return orr_z_zz(ctx, dec); // -> orr_z_zz_ - if(opc==2 && HasSVE() && HasSME()) return eor_z_zz(ctx, dec); // -> eor_z_zz_ - if(opc==3 && HasSVE() && HasSME()) return bic_z_zz(ctx, dec); // -> bic_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_rotate_imm(context *ctx, Instruction *dec) -{ - return xar_z_zzi(ctx, dec); -} - -int decode_iclass_sve_int_tern_log(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, o2=(INSWORD>>10)&1; - if(!opc && !o2 && HasSVE2() && HasSME()) return eor3_z_zzz(ctx, dec); // -> eor3_z_zzz_ - if(!opc && o2 && HasSVE2() && HasSME()) return bsl_z_zzz(ctx, dec); // -> bsl_z_zzz_ - if(opc==1 && !o2 && HasSVE2() && HasSME()) return bcax_z_zzz(ctx, dec); // -> bcax_z_zzz_ - if(opc==1 && o2 && HasSVE2() && HasSME()) return bsl1n_z_zzz(ctx, dec); // -> bsl1n_z_zzz_ - if(opc==2 && o2 && HasSVE2() && HasSME()) return bsl2n_z_zzz(ctx, dec); // -> bsl2n_z_zzz_ - if(opc==3 && o2 && HasSVE2() && HasSME()) return nbsl_z_zzz(ctx, dec); // -> nbsl_z_zzz_ - if((opc&2)==2 && !o2) UNALLOCATED(ENC_UNALLOCATED_487_SVE_INT_TERN_LOG); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_shift_0(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>18)&3, L=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!opc && !L && !U && HasSVE() && HasSME()) return asr_z_p_zi(ctx, dec); // -> asr_z_p_zi_ - if(!opc && !L && U && HasSVE() && HasSME()) return lsr_z_p_zi(ctx, dec); // -> lsr_z_p_zi_ - if(!opc && L && !U) UNALLOCATED(ENC_UNALLOCATED_489_SVE_INT_BIN_PRED_SHIFT_0); - if(!opc && L && U && HasSVE() && HasSME()) return lsl_z_p_zi(ctx, dec); // -> lsl_z_p_zi_ - if(opc==1 && !L && !U && HasSVE() && HasSME()) return asrd_z_p_zi(ctx, dec); // -> asrd_z_p_zi_ - if(opc==1 && !L && U) UNALLOCATED(ENC_UNALLOCATED_490_SVE_INT_BIN_PRED_SHIFT_0); - if(opc==1 && L && !U && HasSVE2() && HasSME()) return sqshl_z_p_zi(ctx, dec); // -> sqshl_z_p_zi_ - if(opc==1 && L && U && HasSVE2() && HasSME()) return uqshl_z_p_zi(ctx, dec); // -> uqshl_z_p_zi_ - if(opc==3 && !L && !U && HasSVE2() && HasSME()) return srshr_z_p_zi(ctx, dec); // -> srshr_z_p_zi_ - if(opc==3 && !L && U && HasSVE2() && HasSME()) return urshr_z_p_zi(ctx, dec); // -> urshr_z_p_zi_ - if(opc==3 && L && !U) UNALLOCATED(ENC_UNALLOCATED_491_SVE_INT_BIN_PRED_SHIFT_0); - if(opc==3 && L && U && HasSVE2() && HasSME()) return sqshlu_z_p_zi(ctx, dec); // -> sqshlu_z_p_zi_ - if(opc==2) UNALLOCATED(ENC_UNALLOCATED_488_SVE_INT_BIN_PRED_SHIFT_0); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_shift_1(context *ctx, Instruction *dec) -{ - uint32_t R=(INSWORD>>18)&1, L=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!R && !L && !U && HasSVE() && HasSME()) return asr_z_p_zz(ctx, dec); // -> asr_z_p_zz_ - if(!R && !L && U && HasSVE() && HasSME()) return lsr_z_p_zz(ctx, dec); // -> lsr_z_p_zz_ - if(!R && L && U && HasSVE() && HasSME()) return lsl_z_p_zz(ctx, dec); // -> lsl_z_p_zz_ - if(R && !L && !U && HasSVE() && HasSME()) return asrr_z_p_zz(ctx, dec); // -> asrr_z_p_zz_ - if(R && !L && U && HasSVE() && HasSME()) return lsrr_z_p_zz(ctx, dec); // -> lsrr_z_p_zz_ - if(R && L && U && HasSVE() && HasSME()) return lslr_z_p_zz(ctx, dec); // -> lslr_z_p_zz_ - if(L && !U) UNALLOCATED(ENC_UNALLOCATED_492_SVE_INT_BIN_PRED_SHIFT_1); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_shift_2(context *ctx, Instruction *dec) -{ - uint32_t R=(INSWORD>>18)&1, L=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!R && !L && !U && HasSVE() && HasSME()) return asr_z_p_zw(ctx, dec); // -> asr_z_p_zw_ - if(!R && !L && U && HasSVE() && HasSME()) return lsr_z_p_zw(ctx, dec); // -> lsr_z_p_zw_ - if(!R && L && !U) UNALLOCATED(ENC_UNALLOCATED_494_SVE_INT_BIN_PRED_SHIFT_2); - if(!R && L && U && HasSVE() && HasSME()) return lsl_z_p_zw(ctx, dec); // -> lsl_z_p_zw_ - if(R) UNALLOCATED(ENC_UNALLOCATED_493_SVE_INT_BIN_PRED_SHIFT_2); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_cons_shift_a(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&3; - if(!opc && HasSVE() && HasSME()) return asr_z_zw(ctx, dec); // -> asr_z_zw_ - if(opc==1 && HasSVE() && HasSME()) return lsr_z_zw(ctx, dec); // -> lsr_z_zw_ - if(opc==2) UNALLOCATED(ENC_UNALLOCATED_495_SVE_INT_BIN_CONS_SHIFT_A); - if(opc==3 && HasSVE() && HasSME()) return lsl_z_zw(ctx, dec); // -> lsl_z_zw_ - UNMATCHED; -} - -int decode_iclass_sve_int_bin_cons_shift_b(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&3; - if(!opc && HasSVE() && HasSME()) return asr_z_zi(ctx, dec); // -> asr_z_zi_ - if(opc==1 && HasSVE() && HasSME()) return lsr_z_zi(ctx, dec); // -> lsr_z_zi_ - if(opc==2) UNALLOCATED(ENC_UNALLOCATED_496_SVE_INT_BIN_CONS_SHIFT_B); - if(opc==3 && HasSVE() && HasSME()) return lsl_z_zi(ctx, dec); // -> lsl_z_zi_ - UNMATCHED; -} - -int decode_iclass_sve_int_countvlv0(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, D=(INSWORD>>11)&1, U=(INSWORD>>10)&1; - if(size==1 && !D && !U && HasSVE() && HasSME()) return sqinch_z_zs(ctx, dec); // -> sqinch_z_zs_ - if(size==1 && !D && U && HasSVE() && HasSME()) return uqinch_z_zs(ctx, dec); // -> uqinch_z_zs_ - if(size==1 && D && !U && HasSVE() && HasSME()) return sqdech_z_zs(ctx, dec); // -> sqdech_z_zs_ - if(size==1 && D && U && HasSVE() && HasSME()) return uqdech_z_zs(ctx, dec); // -> uqdech_z_zs_ - if(size==2 && !D && !U && HasSVE() && HasSME()) return sqincw_z_zs(ctx, dec); // -> sqincw_z_zs_ - if(size==2 && !D && U && HasSVE() && HasSME()) return uqincw_z_zs(ctx, dec); // -> uqincw_z_zs_ - if(size==2 && D && !U && HasSVE() && HasSME()) return sqdecw_z_zs(ctx, dec); // -> sqdecw_z_zs_ - if(size==2 && D && U && HasSVE() && HasSME()) return uqdecw_z_zs(ctx, dec); // -> uqdecw_z_zs_ - if(size==3 && !D && !U && HasSVE() && HasSME()) return sqincd_z_zs(ctx, dec); // -> sqincd_z_zs_ - if(size==3 && !D && U && HasSVE() && HasSME()) return uqincd_z_zs(ctx, dec); // -> uqincd_z_zs_ - if(size==3 && D && !U && HasSVE() && HasSME()) return sqdecd_z_zs(ctx, dec); // -> sqdecd_z_zs_ - if(size==3 && D && U && HasSVE() && HasSME()) return uqdecd_z_zs(ctx, dec); // -> uqdecd_z_zs_ - if(!size) UNALLOCATED(ENC_UNALLOCATED_497_SVE_INT_COUNTVLV0); - UNMATCHED; -} - -int decode_iclass_sve_int_countvlv1(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, D=(INSWORD>>10)&1; - if(size==1 && !D && HasSVE() && HasSME()) return incd_z_zs(ctx, dec); // -> inch_z_zs_ - if(size==1 && D && HasSVE() && HasSME()) return decd_z_zs(ctx, dec); // -> dech_z_zs_ - if(size==2 && !D && HasSVE() && HasSME()) return incd_z_zs(ctx, dec); // -> incw_z_zs_ - if(size==2 && D && HasSVE() && HasSME()) return decd_z_zs(ctx, dec); // -> decw_z_zs_ - if(size==3 && !D && HasSVE() && HasSME()) return incd_z_zs(ctx, dec); // -> incd_z_zs_ - if(size==3 && D && HasSVE() && HasSME()) return decd_z_zs(ctx, dec); // -> decd_z_zs_ - if(!size) UNALLOCATED(ENC_UNALLOCATED_498_SVE_INT_COUNTVLV1); - UNMATCHED; -} - -int decode_iclass_sve_int_count(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>10)&1; - if(!size && !op && HasSVE() && HasSME()) return cntb_r_s(ctx, dec); // -> cntb_r_s_ - if(size==1 && !op && HasSVE() && HasSME()) return cntb_r_s(ctx, dec); // -> cnth_r_s_ - if(size==2 && !op && HasSVE() && HasSME()) return cntb_r_s(ctx, dec); // -> cntw_r_s_ - if(size==3 && !op && HasSVE() && HasSME()) return cntb_r_s(ctx, dec); // -> cntd_r_s_ - if(op) UNALLOCATED(ENC_UNALLOCATED_499_SVE_INT_COUNT); - UNMATCHED; -} - -int decode_iclass_sve_int_pred_pattern_a(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, D=(INSWORD>>10)&1; - if(!size && !D && HasSVE() && HasSME()) return incb_r_rs(ctx, dec); // -> incb_r_rs_ - if(!size && D && HasSVE() && HasSME()) return decb_r_rs(ctx, dec); // -> decb_r_rs_ - if(size==1 && !D && HasSVE() && HasSME()) return incb_r_rs(ctx, dec); // -> inch_r_rs_ - if(size==1 && D && HasSVE() && HasSME()) return decb_r_rs(ctx, dec); // -> dech_r_rs_ - if(size==2 && !D && HasSVE() && HasSME()) return incb_r_rs(ctx, dec); // -> incw_r_rs_ - if(size==2 && D && HasSVE() && HasSME()) return decb_r_rs(ctx, dec); // -> decw_r_rs_ - if(size==3 && !D && HasSVE() && HasSME()) return incb_r_rs(ctx, dec); // -> incd_r_rs_ - if(size==3 && D && HasSVE() && HasSME()) return decb_r_rs(ctx, dec); // -> decd_r_rs_ - UNMATCHED; -} - -int decode_iclass_sve_int_pred_pattern_b(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, sf=(INSWORD>>20)&1, D=(INSWORD>>11)&1, U=(INSWORD>>10)&1; - if(!size && !sf && !D && !U && HasSVE() && HasSME()) return sqincb_r_rs(ctx, dec); // -> sqincb_r_rs_sx - if(!size && !sf && !D && U && HasSVE() && HasSME()) return uqincb_r_rs(ctx, dec); // -> uqincb_r_rs_uw - if(!size && !sf && D && !U && HasSVE() && HasSME()) return sqdecb_r_rs(ctx, dec); // -> sqdecb_r_rs_sx - if(!size && !sf && D && U && HasSVE() && HasSME()) return uqdecb_r_rs(ctx, dec); // -> uqdecb_r_rs_uw - if(!size && sf && !D && !U && HasSVE() && HasSME()) return sqincb_r_rs(ctx, dec); // -> sqincb_r_rs_x - if(!size && sf && !D && U && HasSVE() && HasSME()) return uqincb_r_rs(ctx, dec); // -> uqincb_r_rs_x - if(!size && sf && D && !U && HasSVE() && HasSME()) return sqdecb_r_rs(ctx, dec); // -> sqdecb_r_rs_x - if(!size && sf && D && U && HasSVE() && HasSME()) return uqdecb_r_rs(ctx, dec); // -> uqdecb_r_rs_x - if(size==1 && !sf && !D && !U && HasSVE() && HasSME()) return sqinch_r_rs(ctx, dec); // -> sqinch_r_rs_sx - if(size==1 && !sf && !D && U && HasSVE() && HasSME()) return uqinch_r_rs(ctx, dec); // -> uqinch_r_rs_uw - if(size==1 && !sf && D && !U && HasSVE() && HasSME()) return sqdech_r_rs(ctx, dec); // -> sqdech_r_rs_sx - if(size==1 && !sf && D && U && HasSVE() && HasSME()) return uqdech_r_rs(ctx, dec); // -> uqdech_r_rs_uw - if(size==1 && sf && !D && !U && HasSVE() && HasSME()) return sqinch_r_rs(ctx, dec); // -> sqinch_r_rs_x - if(size==1 && sf && !D && U && HasSVE() && HasSME()) return uqinch_r_rs(ctx, dec); // -> uqinch_r_rs_x - if(size==1 && sf && D && !U && HasSVE() && HasSME()) return sqdech_r_rs(ctx, dec); // -> sqdech_r_rs_x - if(size==1 && sf && D && U && HasSVE() && HasSME()) return uqdech_r_rs(ctx, dec); // -> uqdech_r_rs_x - if(size==2 && !sf && !D && !U && HasSVE() && HasSME()) return sqincw_r_rs(ctx, dec); // -> sqincw_r_rs_sx - if(size==2 && !sf && !D && U && HasSVE() && HasSME()) return uqincw_r_rs(ctx, dec); // -> uqincw_r_rs_uw - if(size==2 && !sf && D && !U && HasSVE() && HasSME()) return sqdecw_r_rs(ctx, dec); // -> sqdecw_r_rs_sx - if(size==2 && !sf && D && U && HasSVE() && HasSME()) return uqdecw_r_rs(ctx, dec); // -> uqdecw_r_rs_uw - if(size==2 && sf && !D && !U && HasSVE() && HasSME()) return sqincw_r_rs(ctx, dec); // -> sqincw_r_rs_x - if(size==2 && sf && !D && U && HasSVE() && HasSME()) return uqincw_r_rs(ctx, dec); // -> uqincw_r_rs_x - if(size==2 && sf && D && !U && HasSVE() && HasSME()) return sqdecw_r_rs(ctx, dec); // -> sqdecw_r_rs_x - if(size==2 && sf && D && U && HasSVE() && HasSME()) return uqdecw_r_rs(ctx, dec); // -> uqdecw_r_rs_x - if(size==3 && !sf && !D && !U && HasSVE() && HasSME()) return sqincd_r_rs(ctx, dec); // -> sqincd_r_rs_sx - if(size==3 && !sf && !D && U && HasSVE() && HasSME()) return uqincd_r_rs(ctx, dec); // -> uqincd_r_rs_uw - if(size==3 && !sf && D && !U && HasSVE() && HasSME()) return sqdecd_r_rs(ctx, dec); // -> sqdecd_r_rs_sx - if(size==3 && !sf && D && U && HasSVE() && HasSME()) return uqdecd_r_rs(ctx, dec); // -> uqdecd_r_rs_uw - if(size==3 && sf && !D && !U && HasSVE() && HasSME()) return sqincd_r_rs(ctx, dec); // -> sqincd_r_rs_x - if(size==3 && sf && !D && U && HasSVE() && HasSME()) return uqincd_r_rs(ctx, dec); // -> uqincd_r_rs_x - if(size==3 && sf && D && !U && HasSVE() && HasSME()) return sqdecd_r_rs(ctx, dec); // -> sqdecd_r_rs_x - if(size==3 && sf && D && U && HasSVE() && HasSME()) return uqdecd_r_rs(ctx, dec); // -> uqdecd_r_rs_x - UNMATCHED; -} - -int decode_iclass_sve_fp_clamp(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSVE_B16B16()) return bfclamp_z_zz(ctx, dec); // -> bfclamp_z_zz_ - if(size && HasSME2() && HasSVE2p1()) return fclamp_z_zz(ctx, dec); // -> fclamp_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_count_v_sat(context *ctx, Instruction *dec) -{ - uint32_t D=(INSWORD>>17)&1, U=(INSWORD>>16)&1, opc=(INSWORD>>9)&3; - if(!D && !U && !opc && HasSVE() && HasSME()) return sqincp_z_p_z(ctx, dec); // -> sqincp_z_p_z_ - if(!D && U && !opc && HasSVE() && HasSME()) return uqincp_z_p_z(ctx, dec); // -> uqincp_z_p_z_ - if(D && !U && !opc && HasSVE() && HasSME()) return sqdecp_z_p_z(ctx, dec); // -> sqdecp_z_p_z_ - if(D && U && !opc && HasSVE() && HasSME()) return uqdecp_z_p_z(ctx, dec); // -> uqdecp_z_p_z_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_500_SVE_INT_COUNT_V_SAT); - UNMATCHED; -} - -int decode_iclass_sve_int_count_v(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>17)&1, D=(INSWORD>>16)&1, opc2=(INSWORD>>9)&3; - if(!op && !D && !opc2 && HasSVE() && HasSME()) return incp_z_p_z(ctx, dec); // -> incp_z_p_z_ - if(!op && D && !opc2 && HasSVE() && HasSME()) return decp_z_p_z(ctx, dec); // -> decp_z_p_z_ - if(!op && opc2) UNALLOCATED(ENC_UNALLOCATED_502_SVE_INT_COUNT_V); - if(op) UNALLOCATED(ENC_UNALLOCATED_501_SVE_INT_COUNT_V); - UNMATCHED; -} - -int decode_iclass_sve_int_count_r_sat(context *ctx, Instruction *dec) -{ - uint32_t D=(INSWORD>>17)&1, U=(INSWORD>>16)&1, sf=(INSWORD>>10)&1, op=(INSWORD>>9)&1; - if(!D && !U && !sf && !op && HasSVE() && HasSME()) return sqincp_r_p_r(ctx, dec); // -> sqincp_r_p_r_sx - if(!D && !U && sf && !op && HasSVE() && HasSME()) return sqincp_r_p_r(ctx, dec); // -> sqincp_r_p_r_x - if(!D && U && !sf && !op && HasSVE() && HasSME()) return uqincp_r_p_r(ctx, dec); // -> uqincp_r_p_r_uw - if(!D && U && sf && !op && HasSVE() && HasSME()) return uqincp_r_p_r(ctx, dec); // -> uqincp_r_p_r_x - if(D && !U && !sf && !op && HasSVE() && HasSME()) return sqdecp_r_p_r(ctx, dec); // -> sqdecp_r_p_r_sx - if(D && !U && sf && !op && HasSVE() && HasSME()) return sqdecp_r_p_r(ctx, dec); // -> sqdecp_r_p_r_x - if(D && U && !sf && !op && HasSVE() && HasSME()) return uqdecp_r_p_r(ctx, dec); // -> uqdecp_r_p_r_uw - if(D && U && sf && !op && HasSVE() && HasSME()) return uqdecp_r_p_r(ctx, dec); // -> uqdecp_r_p_r_x - if(op) UNALLOCATED(ENC_UNALLOCATED_503_SVE_INT_COUNT_R_SAT); - UNMATCHED; -} - -int decode_iclass_sve_int_count_r(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>17)&1, D=(INSWORD>>16)&1, opc2=(INSWORD>>9)&3; - if(!op && !D && !opc2 && HasSVE() && HasSME()) return incp_r_p_r(ctx, dec); // -> incp_r_p_r_ - if(!op && D && !opc2 && HasSVE() && HasSME()) return decp_r_p_r(ctx, dec); // -> decp_r_p_r_ - if(!op && opc2) UNALLOCATED(ENC_UNALLOCATED_505_SVE_INT_COUNT_R); - if(op) UNALLOCATED(ENC_UNALLOCATED_504_SVE_INT_COUNT_R); - UNMATCHED; -} - -int decode_iclass_sve_int_index_ii(context *ctx, Instruction *dec) -{ - return index_z_ii(ctx, dec); -} - -int decode_iclass_sve_int_index_ri(context *ctx, Instruction *dec) -{ - return index_z_ri(ctx, dec); -} - -int decode_iclass_sve_int_index_ir(context *ctx, Instruction *dec) -{ - return index_z_ir(ctx, dec); -} - -int decode_iclass_sve_int_index_rr(context *ctx, Instruction *dec) -{ - return index_z_rr(ctx, dec); -} - -int decode_iclass_sve_int_bin_cons_arit_0(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>10)&7; - if(size==3 && opc==2 && HasSVE() && HasCPA()) return addpt_z_zz(ctx, dec); // -> addpt_z_zz_ - if(size==3 && opc==3 && HasSVE() && HasCPA()) return subpt_z_zz(ctx, dec); // -> subpt_z_zz_ - if(size!=3 && (opc&6)==2) UNALLOCATED(ENC_UNALLOCATED_506_SVE_INT_BIN_CONS_ARIT_0); - if(!opc && HasSVE() && HasSME()) return add_z_zz(ctx, dec); // -> add_z_zz_ - if(opc==1 && HasSVE() && HasSME()) return sub_z_zz(ctx, dec); // -> sub_z_zz_ - if(opc==4 && HasSVE() && HasSME()) return sqadd_z_zz(ctx, dec); // -> sqadd_z_zz_ - if(opc==5 && HasSVE() && HasSME()) return uqadd_z_zz(ctx, dec); // -> uqadd_z_zz_ - if(opc==6 && HasSVE() && HasSME()) return sqsub_z_zz(ctx, dec); // -> sqsub_z_zz_ - if(opc==7 && HasSVE() && HasSME()) return uqsub_z_zz(ctx, dec); // -> uqsub_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_arit_0(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>16)&7; - if(size==3 && opc==4 && HasSVE() && HasCPA()) return addpt_z_p_zz(ctx, dec); // -> addpt_z_p_zz_ - if(size==3 && opc==5 && HasSVE() && HasCPA()) return subpt_z_p_zz(ctx, dec); // -> subpt_z_p_zz_ - if(size==3 && (opc&6)==6) UNALLOCATED(ENC_UNALLOCATED_509_SVE_INT_BIN_PRED_ARIT_0); - if(!opc && HasSVE() && HasSME()) return add_z_p_zz(ctx, dec); // -> add_z_p_zz_ - if(opc==1 && HasSVE() && HasSME()) return sub_z_p_zz(ctx, dec); // -> sub_z_p_zz_ - if(opc==2) UNALLOCATED(ENC_UNALLOCATED_508_SVE_INT_BIN_PRED_ARIT_0); - if(opc==3 && HasSVE() && HasSME()) return subr_z_p_zz(ctx, dec); // -> subr_z_p_zz_ - if(size!=3 && (opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_507_SVE_INT_BIN_PRED_ARIT_0); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_arit_1(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>17)&3, U=(INSWORD>>16)&1; - if(!opc && !U && HasSVE() && HasSME()) return smax_z_p_zz(ctx, dec); // -> smax_z_p_zz_ - if(!opc && U && HasSVE() && HasSME()) return umax_z_p_zz(ctx, dec); // -> umax_z_p_zz_ - if(opc==1 && !U && HasSVE() && HasSME()) return smin_z_p_zz(ctx, dec); // -> smin_z_p_zz_ - if(opc==1 && U && HasSVE() && HasSME()) return umin_z_p_zz(ctx, dec); // -> umin_z_p_zz_ - if(opc==2 && !U && HasSVE() && HasSME()) return sabd_z_p_zz(ctx, dec); // -> sabd_z_p_zz_ - if(opc==2 && U && HasSVE() && HasSME()) return uabd_z_p_zz(ctx, dec); // -> uabd_z_p_zz_ - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_510_SVE_INT_BIN_PRED_ARIT_1); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_arit_2(context *ctx, Instruction *dec) -{ - uint32_t H=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!H && !U && HasSVE() && HasSME()) return mul_z_p_zz(ctx, dec); // -> mul_z_p_zz_ - if(!H && U) UNALLOCATED(ENC_UNALLOCATED_511_SVE_INT_BIN_PRED_ARIT_2); - if(H && !U && HasSVE() && HasSME()) return smulh_z_p_zz(ctx, dec); // -> smulh_z_p_zz_ - if(H && U && HasSVE() && HasSME()) return umulh_z_p_zz(ctx, dec); // -> umulh_z_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_div(context *ctx, Instruction *dec) -{ - uint32_t R=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!R && !U && HasSVE() && HasSME()) return sdiv_z_p_zz(ctx, dec); // -> sdiv_z_p_zz_ - if(!R && U && HasSVE() && HasSME()) return udiv_z_p_zz(ctx, dec); // -> udiv_z_p_zz_ - if(R && !U && HasSVE() && HasSME()) return sdivr_z_p_zz(ctx, dec); // -> sdivr_z_p_zz_ - if(R && U && HasSVE() && HasSME()) return udivr_z_p_zz(ctx, dec); // -> udivr_z_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_bin_pred_log(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE() && HasSME()) return orr_z_p_zz(ctx, dec); // -> orr_z_p_zz_ - if(opc==1 && HasSVE() && HasSME()) return eor_z_p_zz(ctx, dec); // -> eor_z_p_zz_ - if(opc==2 && HasSVE() && HasSME()) return and_z_p_zz(ctx, dec); // -> and_z_p_zz_ - if(opc==3 && HasSVE() && HasSME()) return bic_z_p_zz(ctx, dec); // -> bic_z_p_zz_ - if((opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_512_SVE_INT_BIN_PRED_LOG); - UNMATCHED; -} - -int decode_iclass_sve_int_while_rr(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>11)&1, lt=(INSWORD>>10)&1, eq=(INSWORD>>4)&1; - if(!U && !lt && !eq && HasSVE2() && HasSME()) return whilege_p_p_rr(ctx, dec); // -> whilege_p_p_rr_ - if(!U && !lt && eq && HasSVE2() && HasSME()) return whilegt_p_p_rr(ctx, dec); // -> whilegt_p_p_rr_ - if(!U && lt && !eq && HasSVE() && HasSME()) return whilelt_p_p_rr(ctx, dec); // -> whilelt_p_p_rr_ - if(!U && lt && eq && HasSVE() && HasSME()) return whilele_p_p_rr(ctx, dec); // -> whilele_p_p_rr_ - if(U && !lt && !eq && HasSVE2() && HasSME()) return whilehs_p_p_rr(ctx, dec); // -> whilehs_p_p_rr_ - if(U && !lt && eq && HasSVE2() && HasSME()) return whilehi_p_p_rr(ctx, dec); // -> whilehi_p_p_rr_ - if(U && lt && !eq && HasSVE() && HasSME()) return whilelo_p_p_rr(ctx, dec); // -> whilelo_p_p_rr_ - if(U && lt && eq && HasSVE() && HasSME()) return whilels_p_p_rr(ctx, dec); // -> whilels_p_p_rr_ - UNMATCHED; -} - -int decode_iclass_sve_int_cterm(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, ne=(INSWORD>>4)&1; - if(op && !ne && HasSVE() && HasSME()) return ctermeq_rr(ctx, dec); // -> ctermeq_rr_ - if(op && ne && HasSVE() && HasSME()) return ctermeq_rr(ctx, dec); // -> ctermne_rr_ - if(!op) UNALLOCATED(ENC_UNALLOCATED_513_SVE_INT_CTERM); - UNMATCHED; -} - -int decode_iclass_sve_int_whilenc(context *ctx, Instruction *dec) -{ - uint32_t rw=(INSWORD>>4)&1; - if(!rw && HasSVE2() && HasSME()) return whilewr_p_rr(ctx, dec); // -> whilewr_p_rr_ - if(rw && HasSVE2() && HasSME()) return whilerw_p_rr(ctx, dec); // -> whilerw_p_rr_ - UNMATCHED; -} - -int decode_iclass_sve_int_scmp_vi(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>15)&1, o2=(INSWORD>>13)&1, ne=(INSWORD>>4)&1; - if(!op && !o2 && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmpge_p_p_zi_ - if(!op && !o2 && ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmpgt_p_p_zi_ - if(!op && o2 && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmplt_p_p_zi_ - if(!op && o2 && ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmple_p_p_zi_ - if(op && !o2 && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmpeq_p_p_zi_ - if(op && !o2 && ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmpne_p_p_zi_ - if(op && o2) UNALLOCATED(ENC_UNALLOCATED_514_SVE_INT_SCMP_VI); - UNMATCHED; -} - -int decode_iclass_sve_int_ucmp_vi(context *ctx, Instruction *dec) -{ - uint32_t lt=(INSWORD>>13)&1, ne=(INSWORD>>4)&1; - if(!lt && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmphs_p_p_zi_ - if(!lt && ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmphi_p_p_zi_ - if(lt && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmplo_p_p_zi_ - if(lt && ne && HasSVE() && HasSME()) return cmpeq_p_p_zi(ctx, dec); // -> cmpls_p_p_zi_ - UNMATCHED; -} - -int decode_iclass_sve_int_cmp_0(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>15)&1, o2=(INSWORD>>13)&1, ne=(INSWORD>>4)&1; - if(!op && !o2 && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zz(ctx, dec); // -> cmphs_p_p_zz_ - if(!op && !o2 && ne && HasSVE() && HasSME()) return cmpeq_p_p_zz(ctx, dec); // -> cmphi_p_p_zz_ - if(!op && o2 && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmpeq_p_p_zw_ - if(!op && o2 && ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmpne_p_p_zw_ - if(op && !o2 && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zz(ctx, dec); // -> cmpge_p_p_zz_ - if(op && !o2 && ne && HasSVE() && HasSME()) return cmpeq_p_p_zz(ctx, dec); // -> cmpgt_p_p_zz_ - if(op && o2 && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zz(ctx, dec); // -> cmpeq_p_p_zz_ - if(op && o2 && ne && HasSVE() && HasSME()) return cmpeq_p_p_zz(ctx, dec); // -> cmpne_p_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_cmp_1(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>15)&1, lt=(INSWORD>>13)&1, ne=(INSWORD>>4)&1; - if(!U && !lt && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmpge_p_p_zw_ - if(!U && !lt && ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmpgt_p_p_zw_ - if(!U && lt && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmplt_p_p_zw_ - if(!U && lt && ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmple_p_p_zw_ - if(U && !lt && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmphs_p_p_zw_ - if(U && !lt && ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmphi_p_p_zw_ - if(U && lt && !ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmplo_p_p_zw_ - if(U && lt && ne && HasSVE() && HasSME()) return cmpeq_p_p_zw(ctx, dec); // -> cmpls_p_p_zw_ - UNMATCHED; -} - -int decode_iclass_sve_int_bin_cons_misc_0_b(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>10)&1; - if(!op && HasSVE()) return ftssel_z_zz(ctx, dec); // -> ftssel_z_zz_ - if(op) UNALLOCATED(ENC_UNALLOCATED_515_SVE_INT_BIN_CONS_MISC_0_B); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_cons_misc_0_c(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&0x1f; - if(!opc && HasSVE() && HasSSVE_FEXPA()) return fexpa_z_z(ctx, dec); // -> fexpa_z_z_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_516_SVE_INT_BIN_CONS_MISC_0_C); - UNMATCHED; -} - -int decode_iclass_sve_int_bin_cons_misc_0_d(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>16)&0x1f; - if(!opc && !opc2 && HasSVE() && HasSME()) return movprfx_z_z(ctx, dec); // -> movprfx_z_z_ - if(!opc && opc2) UNALLOCATED(ENC_UNALLOCATED_518_SVE_INT_BIN_CONS_MISC_0_D); - if(opc) UNALLOCATED(ENC_UNALLOCATED_517_SVE_INT_BIN_CONS_MISC_0_D); - UNMATCHED; -} - -int decode_iclass_sve_int_mlas_vvv_pred(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>13)&1; - if(!op && HasSVE() && HasSME()) return mla_z_p_zzz(ctx, dec); // -> mla_z_p_zzz_ - if(op && HasSVE() && HasSME()) return mls_z_p_zzz(ctx, dec); // -> mls_z_p_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_int_mladdsub_vvv_pred(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>13)&1; - if(!op && HasSVE() && HasSME()) return mad_z_p_zzz(ctx, dec); // -> mad_z_p_zzz_ - if(op && HasSVE() && HasSME()) return msb_z_p_zzz(ctx, dec); // -> msb_z_p_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_dot(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, U=(INSWORD>>10)&1; - if(size==1 && !U && HasSVE2p3() && HasSME2p3()) return sdot_z32_zzz(ctx, dec); // -> sdot_z16_zzz_h - if(size==1 && U && HasSVE2p3() && HasSME2p3()) return udot_z32_zzz(ctx, dec); // -> udot_z16_zzz_h - if(!size) UNALLOCATED(ENC_UNALLOCATED_519_SVE_INTX_DOT); - if((size&2)==2 && !U && HasSVE() && HasSME()) return sdot_z_zzz(ctx, dec); // -> sdot_z_zzz_ - if((size&2)==2 && U && HasSVE() && HasSME()) return udot_z_zzz(ctx, dec); // -> udot_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_qdmlalbt(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>10)&1; - if(!S && HasSVE2() && HasSME()) return sqdmlalbt_z_zzz(ctx, dec); // -> sqdmlalbt_z_zzz_ - if(S && HasSVE2() && HasSME()) return sqdmlslbt_z_zzz(ctx, dec); // -> sqdmlslbt_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_cdot(context *ctx, Instruction *dec) -{ - return cdot_z_zzz(ctx, dec); -} - -int decode_iclass_sve_intx_cmla(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>12)&1; - if(!op && HasSVE2() && HasSME()) return cmla_z_zzz(ctx, dec); // -> cmla_z_zzz_ - if(op && HasSVE2() && HasSME()) return sqrdcmlah_z_zzz(ctx, dec); // -> sqrdcmlah_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_mlal_long(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>12)&1, U=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!S && !U && !T && HasSVE2() && HasSME()) return smlalb_z_zzz(ctx, dec); // -> smlalb_z_zzz_ - if(!S && !U && T && HasSVE2() && HasSME()) return smlalt_z_zzz(ctx, dec); // -> smlalt_z_zzz_ - if(!S && U && !T && HasSVE2() && HasSME()) return umlalb_z_zzz(ctx, dec); // -> umlalb_z_zzz_ - if(!S && U && T && HasSVE2() && HasSME()) return umlalt_z_zzz(ctx, dec); // -> umlalt_z_zzz_ - if(S && !U && !T && HasSVE2() && HasSME()) return smlslb_z_zzz(ctx, dec); // -> smlslb_z_zzz_ - if(S && !U && T && HasSVE2() && HasSME()) return smlslt_z_zzz(ctx, dec); // -> smlslt_z_zzz_ - if(S && U && !T && HasSVE2() && HasSME()) return umlslb_z_zzz(ctx, dec); // -> umlslb_z_zzz_ - if(S && U && T && HasSVE2() && HasSME()) return umlslt_z_zzz(ctx, dec); // -> umlslt_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_qdmlal_long(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!S && !T && HasSVE2() && HasSME()) return sqdmlalb_z_zzz(ctx, dec); // -> sqdmlalb_z_zzz_ - if(!S && T && HasSVE2() && HasSME()) return sqdmlalt_z_zzz(ctx, dec); // -> sqdmlalt_z_zzz_ - if(S && !T && HasSVE2() && HasSME()) return sqdmlslb_z_zzz(ctx, dec); // -> sqdmlslb_z_zzz_ - if(S && T && HasSVE2() && HasSME()) return sqdmlslt_z_zzz(ctx, dec); // -> sqdmlslt_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_qrdmlah(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>10)&1; - if(!S && HasSVE2() && HasSME()) return sqrdmlah_z_zzz(ctx, dec); // -> sqrdmlah_z_zzz_ - if(S && HasSVE2() && HasSME()) return sqrdmlsh_z_zzz(ctx, dec); // -> sqrdmlsh_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_mixed_dot(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(size==2 && HasSVE() && HasI8MM() && HasSME() && HasI8MM()) return usdot_z_zzz(ctx, dec); // -> usdot_z_zzz_s - if(size!=2) UNALLOCATED(ENC_UNALLOCATED_520_SVE_INTX_MIXED_DOT); - UNMATCHED; -} - -int decode_iclass_sve_int_reduce_0(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!op && !U && HasSVE() && HasSME()) return saddv_r_p_z(ctx, dec); // -> saddv_r_p_z_ - if(!op && U && HasSVE() && HasSME()) return uaddv_r_p_z(ctx, dec); // -> uaddv_r_p_z_ - if(op) UNALLOCATED(ENC_UNALLOCATED_521_SVE_INT_REDUCE_0); - UNMATCHED; -} - -int decode_iclass_sve_int_reduce_0q(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!op && !U) UNALLOCATED(ENC_UNALLOCATED_523_SVE_INT_REDUCE_0Q); - if(!op && U && HasSVE2p1() && HasSME2p1()) return addqv_z_p_z(ctx, dec); // -> addqv_z_p_z_ - if(op) UNALLOCATED(ENC_UNALLOCATED_522_SVE_INT_REDUCE_0Q); - UNMATCHED; -} - -int decode_iclass_sve_int_reduce_1(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!op && !U && HasSVE() && HasSME()) return smaxv_r_p_z(ctx, dec); // -> smaxv_r_p_z_ - if(!op && U && HasSVE() && HasSME()) return umaxv_r_p_z(ctx, dec); // -> umaxv_r_p_z_ - if(op && !U && HasSVE() && HasSME()) return sminv_r_p_z(ctx, dec); // -> sminv_r_p_z_ - if(op && U && HasSVE() && HasSME()) return uminv_r_p_z(ctx, dec); // -> uminv_r_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_reduce_1q(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!op && !U && HasSVE2p1() && HasSME2p1()) return smaxqv_z_p_z(ctx, dec); // -> smaxqv_z_p_z_ - if(!op && U && HasSVE2p1() && HasSME2p1()) return umaxqv_z_p_z(ctx, dec); // -> umaxqv_z_p_z_ - if(op && !U && HasSVE2p1() && HasSME2p1()) return sminqv_z_p_z(ctx, dec); // -> sminqv_z_p_z_ - if(op && U && HasSVE2p1() && HasSME2p1()) return uminqv_z_p_z(ctx, dec); // -> uminqv_z_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_movprfx_pred(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>17)&3; - if(!opc && HasSVE() && HasSME()) return movprfx_z_p_z(ctx, dec); // -> movprfx_z_p_z_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_524_SVE_INT_MOVPRFX_PRED); - UNMATCHED; -} - -int decode_iclass_sve_int_reduce_2(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&3; - if(!opc && HasSVE() && HasSME()) return orv_r_p_z(ctx, dec); // -> orv_r_p_z_ - if(opc==1 && HasSVE() && HasSME()) return eorv_r_p_z(ctx, dec); // -> eorv_r_p_z_ - if(opc==2 && HasSVE() && HasSME()) return andv_r_p_z(ctx, dec); // -> andv_r_p_z_ - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_525_SVE_INT_REDUCE_2); - UNMATCHED; -} - -int decode_iclass_sve_int_reduce_2q(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&3; - if(!opc && HasSVE2p1() && HasSME2p1()) return orqv_z_p_z(ctx, dec); // -> orqv_z_p_z_ - if(opc==1 && HasSVE2p1() && HasSME2p1()) return eorqv_z_p_z(ctx, dec); // -> eorqv_z_p_z_ - if(opc==2 && HasSVE2p1() && HasSME2p1()) return andqv_z_p_z(ctx, dec); // -> andqv_z_p_z_ - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_526_SVE_INT_REDUCE_2Q); - UNMATCHED; -} - -int decode_iclass_sve_int_un_pred_arit_0(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, opc=(INSWORD>>16)&7; - if(!M && !opc && HasSVE2p2() && HasSME2p2()) return sxtb_z_p_z(ctx, dec); // -> sxtb_z_p_z_z - if(!M && opc==1 && HasSVE2p2() && HasSME2p2()) return uxtb_z_p_z(ctx, dec); // -> uxtb_z_p_z_z - if(!M && opc==2 && HasSVE2p2() && HasSME2p2()) return sxtb_z_p_z(ctx, dec); // -> sxth_z_p_z_z - if(!M && opc==3 && HasSVE2p2() && HasSME2p2()) return uxtb_z_p_z(ctx, dec); // -> uxth_z_p_z_z - if(!M && opc==4 && HasSVE2p2() && HasSME2p2()) return sxtb_z_p_z(ctx, dec); // -> sxtw_z_p_z_z - if(!M && opc==5 && HasSVE2p2() && HasSME2p2()) return uxtb_z_p_z(ctx, dec); // -> uxtw_z_p_z_z - if(!M && opc==6 && HasSVE2p2() && HasSME2p2()) return abs_z_p_z(ctx, dec); // -> abs_z_p_z_z - if(!M && opc==7 && HasSVE2p2() && HasSME2p2()) return neg_z_p_z(ctx, dec); // -> neg_z_p_z_z - if(M && !opc && HasSVE() && HasSME()) return sxtb_z_p_z(ctx, dec); // -> sxtb_z_p_z_m - if(M && opc==1 && HasSVE() && HasSME()) return uxtb_z_p_z(ctx, dec); // -> uxtb_z_p_z_m - if(M && opc==2 && HasSVE() && HasSME()) return sxtb_z_p_z(ctx, dec); // -> sxth_z_p_z_m - if(M && opc==3 && HasSVE() && HasSME()) return uxtb_z_p_z(ctx, dec); // -> uxth_z_p_z_m - if(M && opc==4 && HasSVE() && HasSME()) return sxtb_z_p_z(ctx, dec); // -> sxtw_z_p_z_m - if(M && opc==5 && HasSVE() && HasSME()) return uxtb_z_p_z(ctx, dec); // -> uxtw_z_p_z_m - if(M && opc==6 && HasSVE() && HasSME()) return abs_z_p_z(ctx, dec); // -> abs_z_p_z_m - if(M && opc==7 && HasSVE() && HasSME()) return neg_z_p_z(ctx, dec); // -> neg_z_p_z_m - UNMATCHED; -} - -int decode_iclass_sve_int_un_pred_arit_1(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>20)&1, opc=(INSWORD>>16)&7; - if(!M && !opc && HasSVE2p2() && HasSME2p2()) return cls_z_p_z(ctx, dec); // -> cls_z_p_z_z - if(!M && opc==1 && HasSVE2p2() && HasSME2p2()) return clz_z_p_z(ctx, dec); // -> clz_z_p_z_z - if(!M && opc==2 && HasSVE2p2() && HasSME2p2()) return cnt_z_p_z(ctx, dec); // -> cnt_z_p_z_z - if(!M && opc==3 && HasSVE2p2() && HasSME2p2()) return cnot_z_p_z(ctx, dec); // -> cnot_z_p_z_z - if(!M && opc==4 && HasSVE2p2() && HasSME2p2()) return fabs_z_p_z(ctx, dec); // -> fabs_z_p_z_z - if(!M && opc==5 && HasSVE2p2() && HasSME2p2()) return fneg_z_p_z(ctx, dec); // -> fneg_z_p_z_z - if(!M && opc==6 && HasSVE2p2() && HasSME2p2()) return not_z_p_z(ctx, dec); // -> not_z_p_z_z - if(M && !opc && HasSVE() && HasSME()) return cls_z_p_z(ctx, dec); // -> cls_z_p_z_m - if(M && opc==1 && HasSVE() && HasSME()) return clz_z_p_z(ctx, dec); // -> clz_z_p_z_m - if(M && opc==2 && HasSVE() && HasSME()) return cnt_z_p_z(ctx, dec); // -> cnt_z_p_z_m - if(M && opc==3 && HasSVE() && HasSME()) return cnot_z_p_z(ctx, dec); // -> cnot_z_p_z_m - if(M && opc==4 && HasSVE() && HasSME()) return fabs_z_p_z(ctx, dec); // -> fabs_z_p_z_m - if(M && opc==5 && HasSVE() && HasSME()) return fneg_z_p_z(ctx, dec); // -> fneg_z_p_z_m - if(M && opc==6 && HasSVE() && HasSME()) return not_z_p_z(ctx, dec); // -> not_z_p_z_m - if(opc==7) UNALLOCATED(ENC_UNALLOCATED_527_SVE_INT_UN_PRED_ARIT_1); - UNMATCHED; -} - -int decode_iclass_sve_int_dup_imm_pred(context *ctx, Instruction *dec) -{ - uint32_t M=(INSWORD>>14)&1; - if(!M && HasSVE() && HasSME()) return cpy_z_o_i(ctx, dec); // -> cpy_z_o_i_ - if(M && HasSVE() && HasSME()) return cpy_z_p_i(ctx, dec); // -> cpy_z_p_i_ - UNMATCHED; -} - -int decode_iclass_sve_int_dup_fpimm_pred(context *ctx, Instruction *dec) -{ - return fcpy_z_p_i(ctx, dec); -} - -int decode_iclass_sve_int_arith_imm0(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE() && HasSME()) return add_z_zi(ctx, dec); // -> add_z_zi_ - if(opc==1 && HasSVE() && HasSME()) return sub_z_zi(ctx, dec); // -> sub_z_zi_ - if(opc==2) UNALLOCATED(ENC_UNALLOCATED_528_SVE_INT_ARITH_IMM0); - if(opc==3 && HasSVE() && HasSME()) return subr_z_zi(ctx, dec); // -> subr_z_zi_ - if(opc==4 && HasSVE() && HasSME()) return sqadd_z_zi(ctx, dec); // -> sqadd_z_zi_ - if(opc==5 && HasSVE() && HasSME()) return uqadd_z_zi(ctx, dec); // -> uqadd_z_zi_ - if(opc==6 && HasSVE() && HasSME()) return sqsub_z_zi(ctx, dec); // -> sqsub_z_zi_ - if(opc==7 && HasSVE() && HasSME()) return uqsub_z_zi(ctx, dec); // -> uqsub_z_zi_ - UNMATCHED; -} - -int decode_iclass_sve_int_arith_imm1(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7, o2=(INSWORD>>13)&1; - if(!opc && !o2 && HasSVE() && HasSME()) return smax_z_zi(ctx, dec); // -> smax_z_zi_ - if(opc==1 && !o2 && HasSVE() && HasSME()) return umax_z_zi(ctx, dec); // -> umax_z_zi_ - if(opc==2 && !o2 && HasSVE() && HasSME()) return smin_z_zi(ctx, dec); // -> smin_z_zi_ - if(opc==3 && !o2 && HasSVE() && HasSME()) return umin_z_zi(ctx, dec); // -> umin_z_zi_ - if(!(opc&4) && o2) UNALLOCATED(ENC_UNALLOCATED_530_SVE_INT_ARITH_IMM1); - if((opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_529_SVE_INT_ARITH_IMM1); - UNMATCHED; -} - -int decode_iclass_sve_int_arith_imm2(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7, o2=(INSWORD>>13)&1; - if(!opc && !o2 && HasSVE() && HasSME()) return mul_z_zi(ctx, dec); // -> mul_z_zi_ - if(!opc && o2) UNALLOCATED(ENC_UNALLOCATED_532_SVE_INT_ARITH_IMM2); - if(opc) UNALLOCATED(ENC_UNALLOCATED_531_SVE_INT_ARITH_IMM2); - UNMATCHED; -} - -int decode_iclass_sve_int_dup_imm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>17)&3; - if(!opc && HasSVE() && HasSME()) return dup_z_i(ctx, dec); // -> dup_z_i_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_533_SVE_INT_DUP_IMM); - UNMATCHED; -} - -int decode_iclass_sve_int_dup_fpimm(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>17)&3, o2=(INSWORD>>13)&1; - if(!opc && !o2 && HasSVE() && HasSME()) return fdup_z_i(ctx, dec); // -> fdup_z_i_ - if(!opc && o2) UNALLOCATED(ENC_UNALLOCATED_535_SVE_INT_DUP_FPIMM); - if(opc) UNALLOCATED(ENC_UNALLOCATED_534_SVE_INT_DUP_FPIMM); - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_gld_vs(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>23)&3, U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(!opc && !U && !ff && HasSVE()) return ld1sb_z_p_bz(ctx, dec); // -> ld1sb_z_p_bz_s_x32_unscaled - if(!opc && !U && ff && HasSVE()) return ldff1sb_z_p_bz(ctx, dec); // -> ldff1sb_z_p_bz_s_x32_unscaled - if(!opc && U && !ff && HasSVE()) return ld1b_z_p_bz(ctx, dec); // -> ld1b_z_p_bz_s_x32_unscaled - if(!opc && U && ff && HasSVE()) return ldff1b_z_p_bz(ctx, dec); // -> ldff1b_z_p_bz_s_x32_unscaled - if(opc==1 && !U && !ff && HasSVE()) return ld1sh_z_p_bz(ctx, dec); // -> ld1sh_z_p_bz_s_x32_unscaled - if(opc==1 && !U && ff && HasSVE()) return ldff1sh_z_p_bz(ctx, dec); // -> ldff1sh_z_p_bz_s_x32_unscaled - if(opc==1 && U && !ff && HasSVE()) return ld1h_z_p_bz(ctx, dec); // -> ld1h_z_p_bz_s_x32_unscaled - if(opc==1 && U && ff && HasSVE()) return ldff1h_z_p_bz(ctx, dec); // -> ldff1h_z_p_bz_s_x32_unscaled - if(opc==2 && U && !ff && HasSVE()) return ld1w_z_p_bz(ctx, dec); // -> ld1w_z_p_bz_s_x32_unscaled - if(opc==2 && U && ff && HasSVE()) return ldff1w_z_p_bz(ctx, dec); // -> ldff1w_z_p_bz_s_x32_unscaled - if(opc==2 && !U) UNALLOCATED(ENC_UNALLOCATED_536_SVE_MEM_32B_GLD_VS); - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_prfm_sv(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3; - if(!msz && HasSVE()) return prfb_i_p_bz(ctx, dec); // -> prfb_i_p_bz_s_x32_scaled - if(msz==1 && HasSVE()) return prfh_i_p_bz(ctx, dec); // -> prfh_i_p_bz_s_x32_scaled - if(msz==2 && HasSVE()) return prfw_i_p_bz(ctx, dec); // -> prfw_i_p_bz_s_x32_scaled - if(msz==3 && HasSVE()) return prfd_i_p_bz(ctx, dec); // -> prfd_i_p_bz_s_x32_scaled - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_gld_sv_a(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(!U && !ff && HasSVE()) return ld1sh_z_p_bz(ctx, dec); // -> ld1sh_z_p_bz_s_x32_scaled - if(!U && ff && HasSVE()) return ldff1sh_z_p_bz(ctx, dec); // -> ldff1sh_z_p_bz_s_x32_scaled - if(U && !ff && HasSVE()) return ld1h_z_p_bz(ctx, dec); // -> ld1h_z_p_bz_s_x32_scaled - if(U && ff && HasSVE()) return ldff1h_z_p_bz(ctx, dec); // -> ldff1h_z_p_bz_s_x32_scaled - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_gld_sv_b(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(U && !ff && HasSVE()) return ld1w_z_p_bz(ctx, dec); // -> ld1w_z_p_bz_s_x32_scaled - if(U && ff && HasSVE()) return ldff1w_z_p_bz(ctx, dec); // -> ldff1w_z_p_bz_s_x32_scaled - if(!U) UNALLOCATED(ENC_UNALLOCATED_537_SVE_MEM_32B_GLD_SV_B); - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_pfill(context *ctx, Instruction *dec) -{ - return ldr_p_bi(ctx, dec); -} - -int decode_iclass_sve_mem_32b_fill(context *ctx, Instruction *dec) -{ - return ldr_z_bi(ctx, dec); -} - -int decode_iclass_sve_mem_prfm_si(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3; - if(!msz && HasSVE() && HasSME()) return prfb_i_p_bi(ctx, dec); // -> prfb_i_p_bi_s - if(msz==1 && HasSVE() && HasSME()) return prfh_i_p_bi(ctx, dec); // -> prfh_i_p_bi_s - if(msz==2 && HasSVE() && HasSME()) return prfw_i_p_bi(ctx, dec); // -> prfw_i_p_bi_s - if(msz==3 && HasSVE() && HasSME()) return prfd_i_p_bi(ctx, dec); // -> prfd_i_p_bi_s - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_gldnt_vs(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, U=(INSWORD>>13)&1; - if(!msz && !U && HasSVE2()) return ldnt1sb_z_p_ar(ctx, dec); // -> ldnt1sb_z_p_ar_s_x32_unscaled - if(!msz && U && HasSVE2()) return ldnt1b_z_p_ar(ctx, dec); // -> ldnt1b_z_p_ar_s_x32_unscaled - if(msz==1 && !U && HasSVE2()) return ldnt1sh_z_p_ar(ctx, dec); // -> ldnt1sh_z_p_ar_s_x32_unscaled - if(msz==1 && U && HasSVE2()) return ldnt1h_z_p_ar(ctx, dec); // -> ldnt1h_z_p_ar_s_x32_unscaled - if(msz==2 && !U) UNALLOCATED(ENC_UNALLOCATED_539_SVE_MEM_32B_GLDNT_VS); - if(msz==2 && U && HasSVE2()) return ldnt1w_z_p_ar(ctx, dec); // -> ldnt1w_z_p_ar_s_x32_unscaled - if(msz==3) UNALLOCATED(ENC_UNALLOCATED_538_SVE_MEM_32B_GLDNT_VS); - UNMATCHED; -} - -int decode_iclass_sve_mem_prfm_ss(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, Rm=(INSWORD>>16)&0x1f; - if(!msz && Rm!=0x1f && HasSVE() && HasSME()) return prfb_i_p_br(ctx, dec); // -> prfb_i_p_br_s - if(msz==1 && Rm!=0x1f && HasSVE() && HasSME()) return prfh_i_p_br(ctx, dec); // -> prfh_i_p_br_s - if(msz==2 && Rm!=0x1f && HasSVE() && HasSME()) return prfw_i_p_br(ctx, dec); // -> prfw_i_p_br_s - if(msz==3 && Rm!=0x1f && HasSVE() && HasSME()) return prfd_i_p_br(ctx, dec); // -> prfd_i_p_br_s - if(Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_540_SVE_MEM_PRFM_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_prfm_vi(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE()) return prfb_i_p_ai(ctx, dec); // -> prfb_i_p_ai_s - if(msz==1 && HasSVE()) return prfh_i_p_ai(ctx, dec); // -> prfh_i_p_ai_s - if(msz==2 && HasSVE()) return prfw_i_p_ai(ctx, dec); // -> prfw_i_p_ai_s - if(msz==3 && HasSVE()) return prfd_i_p_ai(ctx, dec); // -> prfd_i_p_ai_s - UNMATCHED; -} - -int decode_iclass_sve_mem_32b_gld_vi(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(!msz && !U && !ff && HasSVE()) return ld1sb_z_p_ai(ctx, dec); // -> ld1sb_z_p_ai_s - if(!msz && !U && ff && HasSVE()) return ldff1sb_z_p_ai(ctx, dec); // -> ldff1sb_z_p_ai_s - if(!msz && U && !ff && HasSVE()) return ld1b_z_p_ai(ctx, dec); // -> ld1b_z_p_ai_s - if(!msz && U && ff && HasSVE()) return ldff1b_z_p_ai(ctx, dec); // -> ldff1b_z_p_ai_s - if(msz==1 && !U && !ff && HasSVE()) return ld1sh_z_p_ai(ctx, dec); // -> ld1sh_z_p_ai_s - if(msz==1 && !U && ff && HasSVE()) return ldff1sh_z_p_ai(ctx, dec); // -> ldff1sh_z_p_ai_s - if(msz==1 && U && !ff && HasSVE()) return ld1h_z_p_ai(ctx, dec); // -> ld1h_z_p_ai_s - if(msz==1 && U && ff && HasSVE()) return ldff1h_z_p_ai(ctx, dec); // -> ldff1h_z_p_ai_s - if(msz==2 && U && !ff && HasSVE()) return ld1w_z_p_ai(ctx, dec); // -> ld1w_z_p_ai_s - if(msz==2 && U && ff && HasSVE()) return ldff1w_z_p_ai(ctx, dec); // -> ldff1w_z_p_ai_s - if(msz==2 && !U) UNALLOCATED(ENC_UNALLOCATED_542_SVE_MEM_32B_GLD_VI); - if(msz==3) UNALLOCATED(ENC_UNALLOCATED_541_SVE_MEM_32B_GLD_VI); - UNMATCHED; -} - -int decode_iclass_sve_mem_ld_dup(context *ctx, Instruction *dec) -{ - uint32_t dtypeh=(INSWORD>>23)&3, dtypel=(INSWORD>>13)&3; - if(!dtypeh && !dtypel && HasSVE() && HasSME()) return ld1rb_z_p_bi(ctx, dec); // -> ld1rb_z_p_bi_u8 - if(!dtypeh && dtypel==1 && HasSVE() && HasSME()) return ld1rb_z_p_bi(ctx, dec); // -> ld1rb_z_p_bi_u16 - if(!dtypeh && dtypel==2 && HasSVE() && HasSME()) return ld1rb_z_p_bi(ctx, dec); // -> ld1rb_z_p_bi_u32 - if(!dtypeh && dtypel==3 && HasSVE() && HasSME()) return ld1rb_z_p_bi(ctx, dec); // -> ld1rb_z_p_bi_u64 - if(dtypeh==1 && !dtypel && HasSVE() && HasSME()) return ld1rsw_z_p_bi(ctx, dec); // -> ld1rsw_z_p_bi_s64 - if(dtypeh==1 && dtypel==1 && HasSVE() && HasSME()) return ld1rh_z_p_bi(ctx, dec); // -> ld1rh_z_p_bi_u16 - if(dtypeh==1 && dtypel==2 && HasSVE() && HasSME()) return ld1rh_z_p_bi(ctx, dec); // -> ld1rh_z_p_bi_u32 - if(dtypeh==1 && dtypel==3 && HasSVE() && HasSME()) return ld1rh_z_p_bi(ctx, dec); // -> ld1rh_z_p_bi_u64 - if(dtypeh==2 && !dtypel && HasSVE() && HasSME()) return ld1rsh_z_p_bi(ctx, dec); // -> ld1rsh_z_p_bi_s64 - if(dtypeh==2 && dtypel==1 && HasSVE() && HasSME()) return ld1rsh_z_p_bi(ctx, dec); // -> ld1rsh_z_p_bi_s32 - if(dtypeh==2 && dtypel==2 && HasSVE() && HasSME()) return ld1rw_z_p_bi(ctx, dec); // -> ld1rw_z_p_bi_u32 - if(dtypeh==2 && dtypel==3 && HasSVE() && HasSME()) return ld1rw_z_p_bi(ctx, dec); // -> ld1rw_z_p_bi_u64 - if(dtypeh==3 && !dtypel && HasSVE() && HasSME()) return ld1rsb_z_p_bi(ctx, dec); // -> ld1rsb_z_p_bi_s64 - if(dtypeh==3 && dtypel==1 && HasSVE() && HasSME()) return ld1rsb_z_p_bi(ctx, dec); // -> ld1rsb_z_p_bi_s32 - if(dtypeh==3 && dtypel==2 && HasSVE() && HasSME()) return ld1rsb_z_p_bi(ctx, dec); // -> ld1rsb_z_p_bi_s16 - if(dtypeh==3 && dtypel==3 && HasSVE() && HasSME()) return ld1rd_z_p_bi(ctx, dec); // -> ld1rd_z_p_bi_u64 - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_gld_vs(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(!msz && !U && !ff && HasSVE()) return ld1sb_z_p_bz(ctx, dec); // -> ld1sb_z_p_bz_d_x32_unscaled - if(!msz && !U && ff && HasSVE()) return ldff1sb_z_p_bz(ctx, dec); // -> ldff1sb_z_p_bz_d_x32_unscaled - if(!msz && U && !ff && HasSVE()) return ld1b_z_p_bz(ctx, dec); // -> ld1b_z_p_bz_d_x32_unscaled - if(!msz && U && ff && HasSVE()) return ldff1b_z_p_bz(ctx, dec); // -> ldff1b_z_p_bz_d_x32_unscaled - if(msz==1 && !U && !ff && HasSVE()) return ld1sh_z_p_bz(ctx, dec); // -> ld1sh_z_p_bz_d_x32_unscaled - if(msz==1 && !U && ff && HasSVE()) return ldff1sh_z_p_bz(ctx, dec); // -> ldff1sh_z_p_bz_d_x32_unscaled - if(msz==1 && U && !ff && HasSVE()) return ld1h_z_p_bz(ctx, dec); // -> ld1h_z_p_bz_d_x32_unscaled - if(msz==1 && U && ff && HasSVE()) return ldff1h_z_p_bz(ctx, dec); // -> ldff1h_z_p_bz_d_x32_unscaled - if(msz==2 && !U && !ff && HasSVE()) return ld1sw_z_p_bz(ctx, dec); // -> ld1sw_z_p_bz_d_x32_unscaled - if(msz==2 && !U && ff && HasSVE()) return ldff1sw_z_p_bz(ctx, dec); // -> ldff1sw_z_p_bz_d_x32_unscaled - if(msz==2 && U && !ff && HasSVE()) return ld1w_z_p_bz(ctx, dec); // -> ld1w_z_p_bz_d_x32_unscaled - if(msz==2 && U && ff && HasSVE()) return ldff1w_z_p_bz(ctx, dec); // -> ldff1w_z_p_bz_d_x32_unscaled - if(msz==3 && U && !ff && HasSVE()) return ld1d_z_p_bz(ctx, dec); // -> ld1d_z_p_bz_d_x32_unscaled - if(msz==3 && U && ff && HasSVE()) return ldff1d_z_p_bz(ctx, dec); // -> ldff1d_z_p_bz_d_x32_unscaled - if(msz==3 && !U) UNALLOCATED(ENC_UNALLOCATED_543_SVE_MEM_64B_GLD_VS); - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_prfm_sv(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3; - if(!msz && HasSVE()) return prfb_i_p_bz(ctx, dec); // -> prfb_i_p_bz_d_x32_scaled - if(msz==1 && HasSVE()) return prfh_i_p_bz(ctx, dec); // -> prfh_i_p_bz_d_x32_scaled - if(msz==2 && HasSVE()) return prfw_i_p_bz(ctx, dec); // -> prfw_i_p_bz_d_x32_scaled - if(msz==3 && HasSVE()) return prfd_i_p_bz(ctx, dec); // -> prfd_i_p_bz_d_x32_scaled - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_gld_sv(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>23)&3, U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(opc==1 && !U && !ff && HasSVE()) return ld1sh_z_p_bz(ctx, dec); // -> ld1sh_z_p_bz_d_x32_scaled - if(opc==1 && !U && ff && HasSVE()) return ldff1sh_z_p_bz(ctx, dec); // -> ldff1sh_z_p_bz_d_x32_scaled - if(opc==1 && U && !ff && HasSVE()) return ld1h_z_p_bz(ctx, dec); // -> ld1h_z_p_bz_d_x32_scaled - if(opc==1 && U && ff && HasSVE()) return ldff1h_z_p_bz(ctx, dec); // -> ldff1h_z_p_bz_d_x32_scaled - if(opc==2 && !U && !ff && HasSVE()) return ld1sw_z_p_bz(ctx, dec); // -> ld1sw_z_p_bz_d_x32_scaled - if(opc==2 && !U && ff && HasSVE()) return ldff1sw_z_p_bz(ctx, dec); // -> ldff1sw_z_p_bz_d_x32_scaled - if(opc==2 && U && !ff && HasSVE()) return ld1w_z_p_bz(ctx, dec); // -> ld1w_z_p_bz_d_x32_scaled - if(opc==2 && U && ff && HasSVE()) return ldff1w_z_p_bz(ctx, dec); // -> ldff1w_z_p_bz_d_x32_scaled - if(opc==3 && U && !ff && HasSVE()) return ld1d_z_p_bz(ctx, dec); // -> ld1d_z_p_bz_d_x32_scaled - if(opc==3 && U && ff && HasSVE()) return ldff1d_z_p_bz(ctx, dec); // -> ldff1d_z_p_bz_d_x32_scaled - if(opc==3 && !U) UNALLOCATED(ENC_UNALLOCATED_544_SVE_MEM_64B_GLD_SV); - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_gldnt_vs(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, U=(INSWORD>>14)&1; - if(!msz && !U && HasSVE2()) return ldnt1sb_z_p_ar(ctx, dec); // -> ldnt1sb_z_p_ar_d_64_unscaled - if(!msz && U && HasSVE2()) return ldnt1b_z_p_ar(ctx, dec); // -> ldnt1b_z_p_ar_d_64_unscaled - if(msz==1 && !U && HasSVE2()) return ldnt1sh_z_p_ar(ctx, dec); // -> ldnt1sh_z_p_ar_d_64_unscaled - if(msz==1 && U && HasSVE2()) return ldnt1h_z_p_ar(ctx, dec); // -> ldnt1h_z_p_ar_d_64_unscaled - if(msz==2 && !U && HasSVE2()) return ldnt1sw_z_p_ar(ctx, dec); // -> ldnt1sw_z_p_ar_d_64_unscaled - if(msz==2 && U && HasSVE2()) return ldnt1w_z_p_ar(ctx, dec); // -> ldnt1w_z_p_ar_d_64_unscaled - if(msz==3 && !U) UNALLOCATED(ENC_UNALLOCATED_545_SVE_MEM_64B_GLDNT_VS); - if(msz==3 && U && HasSVE2()) return ldnt1d_z_p_ar(ctx, dec); // -> ldnt1d_z_p_ar_d_64_unscaled - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_prfm_vi(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE()) return prfb_i_p_ai(ctx, dec); // -> prfb_i_p_ai_d - if(msz==1 && HasSVE()) return prfh_i_p_ai(ctx, dec); // -> prfh_i_p_ai_d - if(msz==2 && HasSVE()) return prfw_i_p_ai(ctx, dec); // -> prfw_i_p_ai_d - if(msz==3 && HasSVE()) return prfd_i_p_ai(ctx, dec); // -> prfd_i_p_ai_d - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_gldq_vs(context *ctx, Instruction *dec) -{ - return ld1q_z_p_ar(ctx, dec); -} - -int decode_iclass_sve_mem_64b_gld_vi(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(!msz && !U && !ff && HasSVE()) return ld1sb_z_p_ai(ctx, dec); // -> ld1sb_z_p_ai_d - if(!msz && !U && ff && HasSVE()) return ldff1sb_z_p_ai(ctx, dec); // -> ldff1sb_z_p_ai_d - if(!msz && U && !ff && HasSVE()) return ld1b_z_p_ai(ctx, dec); // -> ld1b_z_p_ai_d - if(!msz && U && ff && HasSVE()) return ldff1b_z_p_ai(ctx, dec); // -> ldff1b_z_p_ai_d - if(msz==1 && !U && !ff && HasSVE()) return ld1sh_z_p_ai(ctx, dec); // -> ld1sh_z_p_ai_d - if(msz==1 && !U && ff && HasSVE()) return ldff1sh_z_p_ai(ctx, dec); // -> ldff1sh_z_p_ai_d - if(msz==1 && U && !ff && HasSVE()) return ld1h_z_p_ai(ctx, dec); // -> ld1h_z_p_ai_d - if(msz==1 && U && ff && HasSVE()) return ldff1h_z_p_ai(ctx, dec); // -> ldff1h_z_p_ai_d - if(msz==2 && !U && !ff && HasSVE()) return ld1sw_z_p_ai(ctx, dec); // -> ld1sw_z_p_ai_d - if(msz==2 && !U && ff && HasSVE()) return ldff1sw_z_p_ai(ctx, dec); // -> ldff1sw_z_p_ai_d - if(msz==2 && U && !ff && HasSVE()) return ld1w_z_p_ai(ctx, dec); // -> ld1w_z_p_ai_d - if(msz==2 && U && ff && HasSVE()) return ldff1w_z_p_ai(ctx, dec); // -> ldff1w_z_p_ai_d - if(msz==3 && U && !ff && HasSVE()) return ld1d_z_p_ai(ctx, dec); // -> ld1d_z_p_ai_d - if(msz==3 && U && ff && HasSVE()) return ldff1d_z_p_ai(ctx, dec); // -> ldff1d_z_p_ai_d - if(msz==3 && !U) UNALLOCATED(ENC_UNALLOCATED_546_SVE_MEM_64B_GLD_VI); - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_gld_vs2(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(!msz && !U && !ff && HasSVE()) return ld1sb_z_p_bz(ctx, dec); // -> ld1sb_z_p_bz_d_64_unscaled - if(!msz && !U && ff && HasSVE()) return ldff1sb_z_p_bz(ctx, dec); // -> ldff1sb_z_p_bz_d_64_unscaled - if(!msz && U && !ff && HasSVE()) return ld1b_z_p_bz(ctx, dec); // -> ld1b_z_p_bz_d_64_unscaled - if(!msz && U && ff && HasSVE()) return ldff1b_z_p_bz(ctx, dec); // -> ldff1b_z_p_bz_d_64_unscaled - if(msz==1 && !U && !ff && HasSVE()) return ld1sh_z_p_bz(ctx, dec); // -> ld1sh_z_p_bz_d_64_unscaled - if(msz==1 && !U && ff && HasSVE()) return ldff1sh_z_p_bz(ctx, dec); // -> ldff1sh_z_p_bz_d_64_unscaled - if(msz==1 && U && !ff && HasSVE()) return ld1h_z_p_bz(ctx, dec); // -> ld1h_z_p_bz_d_64_unscaled - if(msz==1 && U && ff && HasSVE()) return ldff1h_z_p_bz(ctx, dec); // -> ldff1h_z_p_bz_d_64_unscaled - if(msz==2 && !U && !ff && HasSVE()) return ld1sw_z_p_bz(ctx, dec); // -> ld1sw_z_p_bz_d_64_unscaled - if(msz==2 && !U && ff && HasSVE()) return ldff1sw_z_p_bz(ctx, dec); // -> ldff1sw_z_p_bz_d_64_unscaled - if(msz==2 && U && !ff && HasSVE()) return ld1w_z_p_bz(ctx, dec); // -> ld1w_z_p_bz_d_64_unscaled - if(msz==2 && U && ff && HasSVE()) return ldff1w_z_p_bz(ctx, dec); // -> ldff1w_z_p_bz_d_64_unscaled - if(msz==3 && U && !ff && HasSVE()) return ld1d_z_p_bz(ctx, dec); // -> ld1d_z_p_bz_d_64_unscaled - if(msz==3 && U && ff && HasSVE()) return ldff1d_z_p_bz(ctx, dec); // -> ldff1d_z_p_bz_d_64_unscaled - if(msz==3 && !U) UNALLOCATED(ENC_UNALLOCATED_547_SVE_MEM_64B_GLD_VS2); - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_prfm_sv2(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>13)&3; - if(!msz && HasSVE()) return prfb_i_p_bz(ctx, dec); // -> prfb_i_p_bz_d_64_scaled - if(msz==1 && HasSVE()) return prfh_i_p_bz(ctx, dec); // -> prfh_i_p_bz_d_64_scaled - if(msz==2 && HasSVE()) return prfw_i_p_bz(ctx, dec); // -> prfw_i_p_bz_d_64_scaled - if(msz==3 && HasSVE()) return prfd_i_p_bz(ctx, dec); // -> prfd_i_p_bz_d_64_scaled - UNMATCHED; -} - -int decode_iclass_sve_mem_64b_gld_sv2(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>23)&3, U=(INSWORD>>14)&1, ff=(INSWORD>>13)&1; - if(opc==1 && !U && !ff && HasSVE()) return ld1sh_z_p_bz(ctx, dec); // -> ld1sh_z_p_bz_d_64_scaled - if(opc==1 && !U && ff && HasSVE()) return ldff1sh_z_p_bz(ctx, dec); // -> ldff1sh_z_p_bz_d_64_scaled - if(opc==1 && U && !ff && HasSVE()) return ld1h_z_p_bz(ctx, dec); // -> ld1h_z_p_bz_d_64_scaled - if(opc==1 && U && ff && HasSVE()) return ldff1h_z_p_bz(ctx, dec); // -> ldff1h_z_p_bz_d_64_scaled - if(opc==2 && !U && !ff && HasSVE()) return ld1sw_z_p_bz(ctx, dec); // -> ld1sw_z_p_bz_d_64_scaled - if(opc==2 && !U && ff && HasSVE()) return ldff1sw_z_p_bz(ctx, dec); // -> ldff1sw_z_p_bz_d_64_scaled - if(opc==2 && U && !ff && HasSVE()) return ld1w_z_p_bz(ctx, dec); // -> ld1w_z_p_bz_d_64_scaled - if(opc==2 && U && ff && HasSVE()) return ldff1w_z_p_bz(ctx, dec); // -> ldff1w_z_p_bz_d_64_scaled - if(opc==3 && U && !ff && HasSVE()) return ld1d_z_p_bz(ctx, dec); // -> ld1d_z_p_bz_d_64_scaled - if(opc==3 && U && ff && HasSVE()) return ldff1d_z_p_bz(ctx, dec); // -> ldff1d_z_p_bz_d_64_scaled - if(opc==3 && !U) UNALLOCATED(ENC_UNALLOCATED_548_SVE_MEM_64B_GLD_SV2); - UNMATCHED; -} - -int decode_iclass_sve_mem_ldqr_ss(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, ssz=(INSWORD>>21)&3, Rm=(INSWORD>>16)&0x1f; - if(!msz && !ssz && Rm!=0x1f && HasSVE() && HasSME()) return ld1rqb_z_p_br(ctx, dec); // -> ld1rqb_z_p_br_contiguous - if(!msz && ssz==1 && Rm!=0x1f && HasF64MM()) return ld1rob_z_p_br(ctx, dec); // -> ld1rob_z_p_br_contiguous - if(msz==1 && !ssz && Rm!=0x1f && HasSVE() && HasSME()) return ld1rqh_z_p_br(ctx, dec); // -> ld1rqh_z_p_br_contiguous - if(msz==1 && ssz==1 && Rm!=0x1f && HasF64MM()) return ld1roh_z_p_br(ctx, dec); // -> ld1roh_z_p_br_contiguous - if(msz==2 && !ssz && Rm!=0x1f && HasSVE() && HasSME()) return ld1rqw_z_p_br(ctx, dec); // -> ld1rqw_z_p_br_contiguous - if(msz==2 && ssz==1 && Rm!=0x1f && HasF64MM()) return ld1row_z_p_br(ctx, dec); // -> ld1row_z_p_br_contiguous - if(msz==3 && !ssz && Rm!=0x1f && HasSVE() && HasSME()) return ld1rqd_z_p_br(ctx, dec); // -> ld1rqd_z_p_br_contiguous - if(msz==3 && ssz==1 && Rm!=0x1f && HasF64MM()) return ld1rod_z_p_br(ctx, dec); // -> ld1rod_z_p_br_contiguous - if(!(ssz&2) && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_550_SVE_MEM_LDQR_SS); - if((ssz&2)==2) UNALLOCATED(ENC_UNALLOCATED_549_SVE_MEM_LDQR_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_ldqr_si(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, ssz=(INSWORD>>21)&3; - if(!msz && !ssz && HasSVE() && HasSME()) return ld1rqb_z_p_bi(ctx, dec); // -> ld1rqb_z_p_bi_u8 - if(!msz && ssz==1 && HasF64MM()) return ld1rob_z_p_bi(ctx, dec); // -> ld1rob_z_p_bi_u8 - if(msz==1 && !ssz && HasSVE() && HasSME()) return ld1rqh_z_p_bi(ctx, dec); // -> ld1rqh_z_p_bi_u16 - if(msz==1 && ssz==1 && HasF64MM()) return ld1roh_z_p_bi(ctx, dec); // -> ld1roh_z_p_bi_u16 - if(msz==2 && !ssz && HasSVE() && HasSME()) return ld1rqw_z_p_bi(ctx, dec); // -> ld1rqw_z_p_bi_u32 - if(msz==2 && ssz==1 && HasF64MM()) return ld1row_z_p_bi(ctx, dec); // -> ld1row_z_p_bi_u32 - if(msz==3 && !ssz && HasSVE() && HasSME()) return ld1rqd_z_p_bi(ctx, dec); // -> ld1rqd_z_p_bi_u64 - if(msz==3 && ssz==1 && HasF64MM()) return ld1rod_z_p_bi(ctx, dec); // -> ld1rod_z_p_bi_u64 - if((ssz&2)==2) UNALLOCATED(ENC_UNALLOCATED_551_SVE_MEM_LDQR_SI); - UNMATCHED; -} - -int decode_iclass_sve_mem_cld_si_q(context *ctx, Instruction *dec) -{ - uint32_t dtype=(INSWORD>>23)&3; - if(dtype==2 && HasSVE2p1()) return ld1w_z_p_bi(ctx, dec); // -> ld1w_z_p_bi_u128 - if(dtype==3 && HasSVE2p1()) return ld1d_z_p_bi(ctx, dec); // -> ld1d_z_p_bi_u128 - if(!(dtype&2)) UNALLOCATED(ENC_UNALLOCATED_552_SVE_MEM_CLD_SI_Q); - UNMATCHED; -} - -int decode_iclass_sve_mem_cld_ss(context *ctx, Instruction *dec) -{ - uint32_t dtype=(INSWORD>>21)&15, Rm=(INSWORD>>16)&0x1f; - if(!dtype && Rm!=0x1f && HasSVE() && HasSME()) return ld1b_z_p_br(ctx, dec); // -> ld1b_z_p_br_u8 - if(dtype==1 && Rm!=0x1f && HasSVE() && HasSME()) return ld1b_z_p_br(ctx, dec); // -> ld1b_z_p_br_u16 - if(dtype==2 && Rm!=0x1f && HasSVE() && HasSME()) return ld1b_z_p_br(ctx, dec); // -> ld1b_z_p_br_u32 - if(dtype==3 && Rm!=0x1f && HasSVE() && HasSME()) return ld1b_z_p_br(ctx, dec); // -> ld1b_z_p_br_u64 - if(dtype==4 && Rm!=0x1f && HasSVE() && HasSME()) return ld1sw_z_p_br(ctx, dec); // -> ld1sw_z_p_br_s64 - if(dtype==5 && Rm!=0x1f && HasSVE() && HasSME()) return ld1h_z_p_br(ctx, dec); // -> ld1h_z_p_br_u16 - if(dtype==6 && Rm!=0x1f && HasSVE() && HasSME()) return ld1h_z_p_br(ctx, dec); // -> ld1h_z_p_br_u32 - if(dtype==7 && Rm!=0x1f && HasSVE() && HasSME()) return ld1h_z_p_br(ctx, dec); // -> ld1h_z_p_br_u64 - if(dtype==8 && Rm!=0x1f && HasSVE() && HasSME()) return ld1sh_z_p_br(ctx, dec); // -> ld1sh_z_p_br_s64 - if(dtype==9 && Rm!=0x1f && HasSVE() && HasSME()) return ld1sh_z_p_br(ctx, dec); // -> ld1sh_z_p_br_s32 - if(dtype==10 && Rm!=0x1f && HasSVE() && HasSME()) return ld1w_z_p_br(ctx, dec); // -> ld1w_z_p_br_u32 - if(dtype==11 && Rm!=0x1f && HasSVE() && HasSME()) return ld1w_z_p_br(ctx, dec); // -> ld1w_z_p_br_u64 - if(dtype==12 && Rm!=0x1f && HasSVE() && HasSME()) return ld1sb_z_p_br(ctx, dec); // -> ld1sb_z_p_br_s64 - if(dtype==13 && Rm!=0x1f && HasSVE() && HasSME()) return ld1sb_z_p_br(ctx, dec); // -> ld1sb_z_p_br_s32 - if(dtype==14 && Rm!=0x1f && HasSVE() && HasSME()) return ld1sb_z_p_br(ctx, dec); // -> ld1sb_z_p_br_s16 - if(dtype==15 && Rm!=0x1f && HasSVE() && HasSME()) return ld1d_z_p_br(ctx, dec); // -> ld1d_z_p_br_u64 - if(Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_553_SVE_MEM_CLD_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_cldff_ss(context *ctx, Instruction *dec) -{ - uint32_t dtype=(INSWORD>>21)&15; - if(!dtype && HasSVE()) return ldff1b_z_p_br(ctx, dec); // -> ldff1b_z_p_br_u8 - if(dtype==1 && HasSVE()) return ldff1b_z_p_br(ctx, dec); // -> ldff1b_z_p_br_u16 - if(dtype==2 && HasSVE()) return ldff1b_z_p_br(ctx, dec); // -> ldff1b_z_p_br_u32 - if(dtype==3 && HasSVE()) return ldff1b_z_p_br(ctx, dec); // -> ldff1b_z_p_br_u64 - if(dtype==4 && HasSVE()) return ldff1sw_z_p_br(ctx, dec); // -> ldff1sw_z_p_br_s64 - if(dtype==5 && HasSVE()) return ldff1h_z_p_br(ctx, dec); // -> ldff1h_z_p_br_u16 - if(dtype==6 && HasSVE()) return ldff1h_z_p_br(ctx, dec); // -> ldff1h_z_p_br_u32 - if(dtype==7 && HasSVE()) return ldff1h_z_p_br(ctx, dec); // -> ldff1h_z_p_br_u64 - if(dtype==8 && HasSVE()) return ldff1sh_z_p_br(ctx, dec); // -> ldff1sh_z_p_br_s64 - if(dtype==9 && HasSVE()) return ldff1sh_z_p_br(ctx, dec); // -> ldff1sh_z_p_br_s32 - if(dtype==10 && HasSVE()) return ldff1w_z_p_br(ctx, dec); // -> ldff1w_z_p_br_u32 - if(dtype==11 && HasSVE()) return ldff1w_z_p_br(ctx, dec); // -> ldff1w_z_p_br_u64 - if(dtype==12 && HasSVE()) return ldff1sb_z_p_br(ctx, dec); // -> ldff1sb_z_p_br_s64 - if(dtype==13 && HasSVE()) return ldff1sb_z_p_br(ctx, dec); // -> ldff1sb_z_p_br_s32 - if(dtype==14 && HasSVE()) return ldff1sb_z_p_br(ctx, dec); // -> ldff1sb_z_p_br_s16 - if(dtype==15 && HasSVE()) return ldff1d_z_p_br(ctx, dec); // -> ldff1d_z_p_br_u64 - UNMATCHED; -} - -int decode_iclass_sve_mem_cld_ss_q(context *ctx, Instruction *dec) -{ - uint32_t dtype=(INSWORD>>23)&3, Rm=(INSWORD>>16)&0x1f; - if(dtype==2 && Rm!=0x1f && HasSVE2p1()) return ld1w_z_p_br(ctx, dec); // -> ld1w_z_p_br_u128 - if(dtype==3 && Rm!=0x1f && HasSVE2p1()) return ld1d_z_p_br(ctx, dec); // -> ld1d_z_p_br_u128 - if((dtype&2)==2 && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_555_SVE_MEM_CLD_SS_Q); - if(!(dtype&2)) UNALLOCATED(ENC_UNALLOCATED_554_SVE_MEM_CLD_SS_Q); - UNMATCHED; -} - -int decode_iclass_sve_mem_eldq_ss(context *ctx, Instruction *dec) -{ - uint32_t num=(INSWORD>>23)&3, Rm=(INSWORD>>16)&0x1f; - if(num==1 && Rm!=0x1f && HasSVE2p1() && HasSME2p1()) return ld2q_z_p_br(ctx, dec); // -> ld2q_z_p_br_contiguous - if(num==2 && Rm!=0x1f && HasSVE2p1() && HasSME2p1()) return ld3q_z_p_br(ctx, dec); // -> ld3q_z_p_br_contiguous - if(num==3 && Rm!=0x1f && HasSVE2p1() && HasSME2p1()) return ld4q_z_p_br(ctx, dec); // -> ld4q_z_p_br_contiguous - if(num && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_557_SVE_MEM_ELDQ_SS); - if(!num) UNALLOCATED(ENC_UNALLOCATED_556_SVE_MEM_ELDQ_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_cld_si(context *ctx, Instruction *dec) -{ - uint32_t dtype=(INSWORD>>21)&15; - if(!dtype && HasSVE() && HasSME()) return ld1b_z_p_bi(ctx, dec); // -> ld1b_z_p_bi_u8 - if(dtype==1 && HasSVE() && HasSME()) return ld1b_z_p_bi(ctx, dec); // -> ld1b_z_p_bi_u16 - if(dtype==2 && HasSVE() && HasSME()) return ld1b_z_p_bi(ctx, dec); // -> ld1b_z_p_bi_u32 - if(dtype==3 && HasSVE() && HasSME()) return ld1b_z_p_bi(ctx, dec); // -> ld1b_z_p_bi_u64 - if(dtype==4 && HasSVE() && HasSME()) return ld1sw_z_p_bi(ctx, dec); // -> ld1sw_z_p_bi_s64 - if(dtype==5 && HasSVE() && HasSME()) return ld1h_z_p_bi(ctx, dec); // -> ld1h_z_p_bi_u16 - if(dtype==6 && HasSVE() && HasSME()) return ld1h_z_p_bi(ctx, dec); // -> ld1h_z_p_bi_u32 - if(dtype==7 && HasSVE() && HasSME()) return ld1h_z_p_bi(ctx, dec); // -> ld1h_z_p_bi_u64 - if(dtype==8 && HasSVE() && HasSME()) return ld1sh_z_p_bi(ctx, dec); // -> ld1sh_z_p_bi_s64 - if(dtype==9 && HasSVE() && HasSME()) return ld1sh_z_p_bi(ctx, dec); // -> ld1sh_z_p_bi_s32 - if(dtype==10 && HasSVE() && HasSME()) return ld1w_z_p_bi(ctx, dec); // -> ld1w_z_p_bi_u32 - if(dtype==11 && HasSVE() && HasSME()) return ld1w_z_p_bi(ctx, dec); // -> ld1w_z_p_bi_u64 - if(dtype==12 && HasSVE() && HasSME()) return ld1sb_z_p_bi(ctx, dec); // -> ld1sb_z_p_bi_s64 - if(dtype==13 && HasSVE() && HasSME()) return ld1sb_z_p_bi(ctx, dec); // -> ld1sb_z_p_bi_s32 - if(dtype==14 && HasSVE() && HasSME()) return ld1sb_z_p_bi(ctx, dec); // -> ld1sb_z_p_bi_s16 - if(dtype==15 && HasSVE() && HasSME()) return ld1d_z_p_bi(ctx, dec); // -> ld1d_z_p_bi_u64 - UNMATCHED; -} - -int decode_iclass_sve_mem_cldnf_si(context *ctx, Instruction *dec) -{ - uint32_t dtype=(INSWORD>>21)&15; - if(!dtype && HasSVE()) return ldnf1b_z_p_bi(ctx, dec); // -> ldnf1b_z_p_bi_u8 - if(dtype==1 && HasSVE()) return ldnf1b_z_p_bi(ctx, dec); // -> ldnf1b_z_p_bi_u16 - if(dtype==2 && HasSVE()) return ldnf1b_z_p_bi(ctx, dec); // -> ldnf1b_z_p_bi_u32 - if(dtype==3 && HasSVE()) return ldnf1b_z_p_bi(ctx, dec); // -> ldnf1b_z_p_bi_u64 - if(dtype==4 && HasSVE()) return ldnf1sw_z_p_bi(ctx, dec); // -> ldnf1sw_z_p_bi_s64 - if(dtype==5 && HasSVE()) return ldnf1h_z_p_bi(ctx, dec); // -> ldnf1h_z_p_bi_u16 - if(dtype==6 && HasSVE()) return ldnf1h_z_p_bi(ctx, dec); // -> ldnf1h_z_p_bi_u32 - if(dtype==7 && HasSVE()) return ldnf1h_z_p_bi(ctx, dec); // -> ldnf1h_z_p_bi_u64 - if(dtype==8 && HasSVE()) return ldnf1sh_z_p_bi(ctx, dec); // -> ldnf1sh_z_p_bi_s64 - if(dtype==9 && HasSVE()) return ldnf1sh_z_p_bi(ctx, dec); // -> ldnf1sh_z_p_bi_s32 - if(dtype==10 && HasSVE()) return ldnf1w_z_p_bi(ctx, dec); // -> ldnf1w_z_p_bi_u32 - if(dtype==11 && HasSVE()) return ldnf1w_z_p_bi(ctx, dec); // -> ldnf1w_z_p_bi_u64 - if(dtype==12 && HasSVE()) return ldnf1sb_z_p_bi(ctx, dec); // -> ldnf1sb_z_p_bi_s64 - if(dtype==13 && HasSVE()) return ldnf1sb_z_p_bi(ctx, dec); // -> ldnf1sb_z_p_bi_s32 - if(dtype==14 && HasSVE()) return ldnf1sb_z_p_bi(ctx, dec); // -> ldnf1sb_z_p_bi_s16 - if(dtype==15 && HasSVE()) return ldnf1d_z_p_bi(ctx, dec); // -> ldnf1d_z_p_bi_u64 - UNMATCHED; -} - -int decode_iclass_sve_mem_cldnt_ss(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, Rm=(INSWORD>>16)&0x1f; - if(!msz && Rm!=0x1f && HasSVE() && HasSME()) return ldnt1b_z_p_br(ctx, dec); // -> ldnt1b_z_p_br_contiguous - if(msz==1 && Rm!=0x1f && HasSVE() && HasSME()) return ldnt1h_z_p_br(ctx, dec); // -> ldnt1h_z_p_br_contiguous - if(msz==2 && Rm!=0x1f && HasSVE() && HasSME()) return ldnt1w_z_p_br(ctx, dec); // -> ldnt1w_z_p_br_contiguous - if(msz==3 && Rm!=0x1f && HasSVE() && HasSME()) return ldnt1d_z_p_br(ctx, dec); // -> ldnt1d_z_p_br_contiguous - if(Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_558_SVE_MEM_CLDNT_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_eld_ss(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, opc=(INSWORD>>21)&3, Rm=(INSWORD>>16)&0x1f; - if(!msz && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return ld2b_z_p_br(ctx, dec); // -> ld2b_z_p_br_contiguous - if(!msz && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return ld3b_z_p_br(ctx, dec); // -> ld3b_z_p_br_contiguous - if(!msz && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return ld4b_z_p_br(ctx, dec); // -> ld4b_z_p_br_contiguous - if(msz==1 && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return ld2h_z_p_br(ctx, dec); // -> ld2h_z_p_br_contiguous - if(msz==1 && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return ld3h_z_p_br(ctx, dec); // -> ld3h_z_p_br_contiguous - if(msz==1 && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return ld4h_z_p_br(ctx, dec); // -> ld4h_z_p_br_contiguous - if(msz==2 && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return ld2w_z_p_br(ctx, dec); // -> ld2w_z_p_br_contiguous - if(msz==2 && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return ld3w_z_p_br(ctx, dec); // -> ld3w_z_p_br_contiguous - if(msz==2 && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return ld4w_z_p_br(ctx, dec); // -> ld4w_z_p_br_contiguous - if(msz==3 && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return ld2d_z_p_br(ctx, dec); // -> ld2d_z_p_br_contiguous - if(msz==3 && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return ld3d_z_p_br(ctx, dec); // -> ld3d_z_p_br_contiguous - if(msz==3 && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return ld4d_z_p_br(ctx, dec); // -> ld4d_z_p_br_contiguous - if(opc && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_559_SVE_MEM_ELD_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_cldnt_si(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE() && HasSME()) return ldnt1b_z_p_bi(ctx, dec); // -> ldnt1b_z_p_bi_contiguous - if(msz==1 && HasSVE() && HasSME()) return ldnt1h_z_p_bi(ctx, dec); // -> ldnt1h_z_p_bi_contiguous - if(msz==2 && HasSVE() && HasSME()) return ldnt1w_z_p_bi(ctx, dec); // -> ldnt1w_z_p_bi_contiguous - if(msz==3 && HasSVE() && HasSME()) return ldnt1d_z_p_bi(ctx, dec); // -> ldnt1d_z_p_bi_contiguous - UNMATCHED; -} - -int decode_iclass_sve_mem_eld_si(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, opc=(INSWORD>>21)&3; - if(!msz && opc==1 && HasSVE() && HasSME()) return ld2b_z_p_bi(ctx, dec); // -> ld2b_z_p_bi_contiguous - if(!msz && opc==2 && HasSVE() && HasSME()) return ld3b_z_p_bi(ctx, dec); // -> ld3b_z_p_bi_contiguous - if(!msz && opc==3 && HasSVE() && HasSME()) return ld4b_z_p_bi(ctx, dec); // -> ld4b_z_p_bi_contiguous - if(msz==1 && opc==1 && HasSVE() && HasSME()) return ld2h_z_p_bi(ctx, dec); // -> ld2h_z_p_bi_contiguous - if(msz==1 && opc==2 && HasSVE() && HasSME()) return ld3h_z_p_bi(ctx, dec); // -> ld3h_z_p_bi_contiguous - if(msz==1 && opc==3 && HasSVE() && HasSME()) return ld4h_z_p_bi(ctx, dec); // -> ld4h_z_p_bi_contiguous - if(msz==2 && opc==1 && HasSVE() && HasSME()) return ld2w_z_p_bi(ctx, dec); // -> ld2w_z_p_bi_contiguous - if(msz==2 && opc==2 && HasSVE() && HasSME()) return ld3w_z_p_bi(ctx, dec); // -> ld3w_z_p_bi_contiguous - if(msz==2 && opc==3 && HasSVE() && HasSME()) return ld4w_z_p_bi(ctx, dec); // -> ld4w_z_p_bi_contiguous - if(msz==3 && opc==1 && HasSVE() && HasSME()) return ld2d_z_p_bi(ctx, dec); // -> ld2d_z_p_bi_contiguous - if(msz==3 && opc==2 && HasSVE() && HasSME()) return ld3d_z_p_bi(ctx, dec); // -> ld3d_z_p_bi_contiguous - if(msz==3 && opc==3 && HasSVE() && HasSME()) return ld4d_z_p_bi(ctx, dec); // -> ld4d_z_p_bi_contiguous - UNMATCHED; -} - -int decode_iclass_sve_mem_eldq_si(context *ctx, Instruction *dec) -{ - uint32_t num=(INSWORD>>23)&3; - if(!num) UNALLOCATED(ENC_UNALLOCATED_560_SVE_MEM_ELDQ_SI); - if(num==1 && HasSVE2p1() && HasSME2p1()) return ld2q_z_p_bi(ctx, dec); // -> ld2q_z_p_bi_contiguous - if(num==2 && HasSVE2p1() && HasSME2p1()) return ld3q_z_p_bi(ctx, dec); // -> ld3q_z_p_bi_contiguous - if(num==3 && HasSVE2p1() && HasSME2p1()) return ld4q_z_p_bi(ctx, dec); // -> ld4q_z_p_bi_contiguous - UNMATCHED; -} - -int decode_iclass_sve_mem_estq_si(context *ctx, Instruction *dec) -{ - uint32_t num=(INSWORD>>22)&3; - if(!num) UNALLOCATED(ENC_UNALLOCATED_561_SVE_MEM_ESTQ_SI); - if(num==1 && HasSVE2p1() && HasSME2p1()) return st2q_z_p_bi(ctx, dec); // -> st2q_z_p_bi_contiguous - if(num==2 && HasSVE2p1() && HasSME2p1()) return st3q_z_p_bi(ctx, dec); // -> st3q_z_p_bi_contiguous - if(num==3 && HasSVE2p1() && HasSME2p1()) return st4q_z_p_bi(ctx, dec); // -> st4q_z_p_bi_contiguous - UNMATCHED; -} - -int decode_iclass_sve_mem_estq_ss(context *ctx, Instruction *dec) -{ - uint32_t num=(INSWORD>>22)&3, Rm=(INSWORD>>16)&0x1f; - if(num==1 && Rm!=0x1f && HasSVE2p1() && HasSME2p1()) return st2q_z_p_br(ctx, dec); // -> st2q_z_p_br_contiguous - if(num==2 && Rm!=0x1f && HasSVE2p1() && HasSME2p1()) return st3q_z_p_br(ctx, dec); // -> st3q_z_p_br_contiguous - if(num==3 && Rm!=0x1f && HasSVE2p1() && HasSME2p1()) return st4q_z_p_br(ctx, dec); // -> st4q_z_p_br_contiguous - if(num && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_563_SVE_MEM_ESTQ_SS); - if(!num) UNALLOCATED(ENC_UNALLOCATED_562_SVE_MEM_ESTQ_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_pspill(context *ctx, Instruction *dec) -{ - return str_p_bi(ctx, dec); -} - -int decode_iclass_sve_mem_cst_ss(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&7, o2=(INSWORD>>21)&1, Rm=(INSWORD>>16)&0x1f; - if(opc==4 && !o2 && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_567_SVE_MEM_CST_SS); - if(opc==4 && !o2 && Rm!=0x1f && HasSVE2p1()) return st1w_z_p_br(ctx, dec); // -> st1w_z_p_br_u128 - if(opc==7 && !o2 && Rm!=0x1f && HasSVE2p1()) return st1d_z_p_br(ctx, dec); // -> st1d_z_p_br_u128 - if(opc==7 && o2 && Rm!=0x1f && HasSVE() && HasSME()) return st1d_z_p_br(ctx, dec); // -> st1d_z_p_br_ - if(opc==5 && Rm!=0x1f && HasSVE() && HasSME()) return st1w_z_p_br(ctx, dec); // -> st1w_z_p_br_ - if(!(opc&5) && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_566_SVE_MEM_CST_SS); - if(!(opc&6) && Rm!=0x1f && HasSVE() && HasSME()) return st1b_z_p_br(ctx, dec); // -> st1b_z_p_br_ - if((opc&6)==2 && Rm!=0x1f && HasSVE() && HasSME()) return st1h_z_p_br(ctx, dec); // -> st1h_z_p_br_ - if(opc&1 && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_565_SVE_MEM_CST_SS); - if(opc==4 && o2) UNALLOCATED(ENC_UNALLOCATED_564_SVE_MEM_CST_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_spill(context *ctx, Instruction *dec) -{ - return str_z_bi(ctx, dec); -} - -int decode_iclass_sve_mem_cst_si(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, opc=(INSWORD>>21)&3; - if(msz==2 && !opc && HasSVE2p1()) return st1w_z_p_bi(ctx, dec); // -> st1w_z_p_bi_u128 - if(msz==2 && opc==1) UNALLOCATED(ENC_UNALLOCATED_569_SVE_MEM_CST_SI); - if(msz==3 && opc==2 && HasSVE2p1()) return st1d_z_p_bi(ctx, dec); // -> st1d_z_p_bi_u128 - if(msz==3 && opc==3 && HasSVE() && HasSME()) return st1d_z_p_bi(ctx, dec); // -> st1d_z_p_bi_ - if(msz==2 && (opc&2)==2 && HasSVE() && HasSME()) return st1w_z_p_bi(ctx, dec); // -> st1w_z_p_bi_ - if(msz==3 && !(opc&2)) UNALLOCATED(ENC_UNALLOCATED_568_SVE_MEM_CST_SI); - if(!msz && HasSVE() && HasSME()) return st1b_z_p_bi(ctx, dec); // -> st1b_z_p_bi_ - if(msz==1 && HasSVE() && HasSME()) return st1h_z_p_bi(ctx, dec); // -> st1h_z_p_bi_ - UNMATCHED; -} - -int decode_iclass_sve_mem_cstnt_si(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE() && HasSME()) return stnt1b_z_p_bi(ctx, dec); // -> stnt1b_z_p_bi_contiguous - if(msz==1 && HasSVE() && HasSME()) return stnt1h_z_p_bi(ctx, dec); // -> stnt1h_z_p_bi_contiguous - if(msz==2 && HasSVE() && HasSME()) return stnt1w_z_p_bi(ctx, dec); // -> stnt1w_z_p_bi_contiguous - if(msz==3 && HasSVE() && HasSME()) return stnt1d_z_p_bi(ctx, dec); // -> stnt1d_z_p_bi_contiguous - UNMATCHED; -} - -int decode_iclass_sve_mem_est_si(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, opc=(INSWORD>>21)&3; - if(!msz && opc==1 && HasSVE() && HasSME()) return st2b_z_p_bi(ctx, dec); // -> st2b_z_p_bi_contiguous - if(!msz && opc==2 && HasSVE() && HasSME()) return st3b_z_p_bi(ctx, dec); // -> st3b_z_p_bi_contiguous - if(!msz && opc==3 && HasSVE() && HasSME()) return st4b_z_p_bi(ctx, dec); // -> st4b_z_p_bi_contiguous - if(msz==1 && opc==1 && HasSVE() && HasSME()) return st2h_z_p_bi(ctx, dec); // -> st2h_z_p_bi_contiguous - if(msz==1 && opc==2 && HasSVE() && HasSME()) return st3h_z_p_bi(ctx, dec); // -> st3h_z_p_bi_contiguous - if(msz==1 && opc==3 && HasSVE() && HasSME()) return st4h_z_p_bi(ctx, dec); // -> st4h_z_p_bi_contiguous - if(msz==2 && opc==1 && HasSVE() && HasSME()) return st2w_z_p_bi(ctx, dec); // -> st2w_z_p_bi_contiguous - if(msz==2 && opc==2 && HasSVE() && HasSME()) return st3w_z_p_bi(ctx, dec); // -> st3w_z_p_bi_contiguous - if(msz==2 && opc==3 && HasSVE() && HasSME()) return st4w_z_p_bi(ctx, dec); // -> st4w_z_p_bi_contiguous - if(msz==3 && opc==1 && HasSVE() && HasSME()) return st2d_z_p_bi(ctx, dec); // -> st2d_z_p_bi_contiguous - if(msz==3 && opc==2 && HasSVE() && HasSME()) return st3d_z_p_bi(ctx, dec); // -> st3d_z_p_bi_contiguous - if(msz==3 && opc==3 && HasSVE() && HasSME()) return st4d_z_p_bi(ctx, dec); // -> st4d_z_p_bi_contiguous - UNMATCHED; -} - -int decode_iclass_sve_mem_cstnt_ss(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, Rm=(INSWORD>>16)&0x1f; - if(!msz && Rm!=0x1f && HasSVE() && HasSME()) return stnt1b_z_p_br(ctx, dec); // -> stnt1b_z_p_br_contiguous - if(msz==1 && Rm!=0x1f && HasSVE() && HasSME()) return stnt1h_z_p_br(ctx, dec); // -> stnt1h_z_p_br_contiguous - if(msz==2 && Rm!=0x1f && HasSVE() && HasSME()) return stnt1w_z_p_br(ctx, dec); // -> stnt1w_z_p_br_contiguous - if(msz==3 && Rm!=0x1f && HasSVE() && HasSME()) return stnt1d_z_p_br(ctx, dec); // -> stnt1d_z_p_br_contiguous - if(Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_570_SVE_MEM_CSTNT_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_est_ss(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3, opc=(INSWORD>>21)&3, Rm=(INSWORD>>16)&0x1f; - if(!msz && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return st2b_z_p_br(ctx, dec); // -> st2b_z_p_br_contiguous - if(!msz && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return st3b_z_p_br(ctx, dec); // -> st3b_z_p_br_contiguous - if(!msz && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return st4b_z_p_br(ctx, dec); // -> st4b_z_p_br_contiguous - if(msz==1 && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return st2h_z_p_br(ctx, dec); // -> st2h_z_p_br_contiguous - if(msz==1 && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return st3h_z_p_br(ctx, dec); // -> st3h_z_p_br_contiguous - if(msz==1 && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return st4h_z_p_br(ctx, dec); // -> st4h_z_p_br_contiguous - if(msz==2 && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return st2w_z_p_br(ctx, dec); // -> st2w_z_p_br_contiguous - if(msz==2 && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return st3w_z_p_br(ctx, dec); // -> st3w_z_p_br_contiguous - if(msz==2 && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return st4w_z_p_br(ctx, dec); // -> st4w_z_p_br_contiguous - if(msz==3 && opc==1 && Rm!=0x1f && HasSVE() && HasSME()) return st2d_z_p_br(ctx, dec); // -> st2d_z_p_br_contiguous - if(msz==3 && opc==2 && Rm!=0x1f && HasSVE() && HasSME()) return st3d_z_p_br(ctx, dec); // -> st3d_z_p_br_contiguous - if(msz==3 && opc==3 && Rm!=0x1f && HasSVE() && HasSME()) return st4d_z_p_br(ctx, dec); // -> st4d_z_p_br_contiguous - if(opc && Rm==0x1f) UNALLOCATED(ENC_UNALLOCATED_571_SVE_MEM_EST_SS); - UNMATCHED; -} - -int decode_iclass_sve_mem_sstnt_64b_vs(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE2()) return stnt1b_z_p_ar(ctx, dec); // -> stnt1b_z_p_ar_d_64_unscaled - if(msz==1 && HasSVE2()) return stnt1h_z_p_ar(ctx, dec); // -> stnt1h_z_p_ar_d_64_unscaled - if(msz==2 && HasSVE2()) return stnt1w_z_p_ar(ctx, dec); // -> stnt1w_z_p_ar_d_64_unscaled - if(msz==3 && HasSVE2()) return stnt1d_z_p_ar(ctx, dec); // -> stnt1d_z_p_ar_d_64_unscaled - UNMATCHED; -} - -int decode_iclass_sve_mem_sstnt_32b_vs(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE2()) return stnt1b_z_p_ar(ctx, dec); // -> stnt1b_z_p_ar_s_x32_unscaled - if(msz==1 && HasSVE2()) return stnt1h_z_p_ar(ctx, dec); // -> stnt1h_z_p_ar_s_x32_unscaled - if(msz==2 && HasSVE2()) return stnt1w_z_p_ar(ctx, dec); // -> stnt1w_z_p_ar_s_x32_unscaled - if(msz==3) UNALLOCATED(ENC_UNALLOCATED_572_SVE_MEM_SSTNT_32B_VS); - UNMATCHED; -} - -int decode_iclass_sve_mem_sstq_64b_vs(context *ctx, Instruction *dec) -{ - return st1q_z_p_ar(ctx, dec); -} - -int decode_iclass_sve_mem_sst_vs2(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE()) return st1b_z_p_bz(ctx, dec); // -> st1b_z_p_bz_d_64_unscaled - if(msz==1 && HasSVE()) return st1h_z_p_bz(ctx, dec); // -> st1h_z_p_bz_d_64_unscaled - if(msz==2 && HasSVE()) return st1w_z_p_bz(ctx, dec); // -> st1w_z_p_bz_d_64_unscaled - if(msz==3 && HasSVE()) return st1d_z_p_bz(ctx, dec); // -> st1d_z_p_bz_d_64_unscaled - UNMATCHED; -} - -int decode_iclass_sve_mem_sst_sv2(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz) UNALLOCATED(ENC_UNALLOCATED_573_SVE_MEM_SST_SV2); - if(msz==1 && HasSVE()) return st1h_z_p_bz(ctx, dec); // -> st1h_z_p_bz_d_64_scaled - if(msz==2 && HasSVE()) return st1w_z_p_bz(ctx, dec); // -> st1w_z_p_bz_d_64_scaled - if(msz==3 && HasSVE()) return st1d_z_p_bz(ctx, dec); // -> st1d_z_p_bz_d_64_scaled - UNMATCHED; -} - -int decode_iclass_sve_mem_sst_vi_a(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE()) return st1b_z_p_ai(ctx, dec); // -> st1b_z_p_ai_d - if(msz==1 && HasSVE()) return st1h_z_p_ai(ctx, dec); // -> st1h_z_p_ai_d - if(msz==2 && HasSVE()) return st1w_z_p_ai(ctx, dec); // -> st1w_z_p_ai_d - if(msz==3 && HasSVE()) return st1d_z_p_ai(ctx, dec); // -> st1d_z_p_ai_d - UNMATCHED; -} - -int decode_iclass_sve_mem_sst_vi_b(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE()) return st1b_z_p_ai(ctx, dec); // -> st1b_z_p_ai_s - if(msz==1 && HasSVE()) return st1h_z_p_ai(ctx, dec); // -> st1h_z_p_ai_s - if(msz==2 && HasSVE()) return st1w_z_p_ai(ctx, dec); // -> st1w_z_p_ai_s - if(msz==3) UNALLOCATED(ENC_UNALLOCATED_574_SVE_MEM_SST_VI_B); - UNMATCHED; -} - -int decode_iclass_sve_mem_sst_vs_a(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE()) return st1b_z_p_bz(ctx, dec); // -> st1b_z_p_bz_d_x32_unscaled - if(msz==1 && HasSVE()) return st1h_z_p_bz(ctx, dec); // -> st1h_z_p_bz_d_x32_unscaled - if(msz==2 && HasSVE()) return st1w_z_p_bz(ctx, dec); // -> st1w_z_p_bz_d_x32_unscaled - if(msz==3 && HasSVE()) return st1d_z_p_bz(ctx, dec); // -> st1d_z_p_bz_d_x32_unscaled - UNMATCHED; -} - -int decode_iclass_sve_mem_sst_vs_b(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz && HasSVE()) return st1b_z_p_bz(ctx, dec); // -> st1b_z_p_bz_s_x32_unscaled - if(msz==1 && HasSVE()) return st1h_z_p_bz(ctx, dec); // -> st1h_z_p_bz_s_x32_unscaled - if(msz==2 && HasSVE()) return st1w_z_p_bz(ctx, dec); // -> st1w_z_p_bz_s_x32_unscaled - if(msz==3) UNALLOCATED(ENC_UNALLOCATED_575_SVE_MEM_SST_VS_B); - UNMATCHED; -} - -int decode_iclass_sve_mem_sst_sv_a(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz) UNALLOCATED(ENC_UNALLOCATED_576_SVE_MEM_SST_SV_A); - if(msz==1 && HasSVE()) return st1h_z_p_bz(ctx, dec); // -> st1h_z_p_bz_d_x32_scaled - if(msz==2 && HasSVE()) return st1w_z_p_bz(ctx, dec); // -> st1w_z_p_bz_d_x32_scaled - if(msz==3 && HasSVE()) return st1d_z_p_bz(ctx, dec); // -> st1d_z_p_bz_d_x32_scaled - UNMATCHED; -} - -int decode_iclass_sve_mem_sst_sv_b(context *ctx, Instruction *dec) -{ - uint32_t msz=(INSWORD>>23)&3; - if(!msz) UNALLOCATED(ENC_UNALLOCATED_577_SVE_MEM_SST_SV_B); - if(msz==1 && HasSVE()) return st1h_z_p_bz(ctx, dec); // -> st1h_z_p_bz_s_x32_scaled - if(msz==2 && HasSVE()) return st1w_z_p_bz(ctx, dec); // -> st1w_z_p_bz_s_x32_scaled - if(msz==3) UNALLOCATED(ENC_UNALLOCATED_578_SVE_MEM_SST_SV_B); - UNMATCHED; -} - -int decode_iclass_sve_intx_clong(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>11)&1, tb=(INSWORD>>10)&1; - if(!S && !tb && HasSVE2() && HasSME()) return saddlbt_z_zz(ctx, dec); // -> saddlbt_z_zz_ - if(!S && tb) UNALLOCATED(ENC_UNALLOCATED_579_SVE_INTX_CLONG); - if(S && !tb && HasSVE2() && HasSME()) return ssublbt_z_zz(ctx, dec); // -> ssublbt_z_zz_ - if(S && tb && HasSVE2() && HasSME()) return ssubltb_z_zz(ctx, dec); // -> ssubltb_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_eorx(context *ctx, Instruction *dec) -{ - uint32_t tb=(INSWORD>>10)&1; - if(!tb && HasSVE2() && HasSME()) return eorbt_z_zz(ctx, dec); // -> eorbt_z_zz_ - if(tb && HasSVE2() && HasSME()) return eortb_z_zz(ctx, dec); // -> eortb_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_mmla(context *ctx, Instruction *dec) -{ - uint32_t uns=(INSWORD>>22)&3; - if(!uns && HasSVE() && HasI8MM()) return smmla_z_zzz(ctx, dec); // -> smmla_z_zzz_ - if(uns==1) UNALLOCATED(ENC_UNALLOCATED_580_SVE_INTX_MMLA); - if(uns==2 && HasSVE() && HasI8MM()) return usmmla_z_zzz(ctx, dec); // -> usmmla_z_zzz_ - if(uns==3 && HasSVE() && HasI8MM()) return ummla_z_zzz(ctx, dec); // -> ummla_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_shift_long(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!U && !T && HasSVE2() && HasSME()) return sshllb_z_zi(ctx, dec); // -> sshllb_z_zi_ - if(!U && T && HasSVE2() && HasSME()) return sshllt_z_zi(ctx, dec); // -> sshllt_z_zi_ - if(U && !T && HasSVE2() && HasSME()) return ushllb_z_zi(ctx, dec); // -> ushllb_z_zi_ - if(U && T && HasSVE2() && HasSME()) return ushllt_z_zi(ctx, dec); // -> ushllt_z_zi_ - UNMATCHED; -} - -int decode_iclass_sve_intx_perm_bit(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&3; - if(!opc && HasSVE_BitPerm()) return bext_z_zz(ctx, dec); // -> bext_z_zz_ - if(opc==1 && HasSVE_BitPerm()) return bdep_z_zz(ctx, dec); // -> bdep_z_zz_ - if(opc==2 && HasSVE_BitPerm()) return bgrp_z_zz(ctx, dec); // -> bgrp_z_zz_ - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_581_SVE_INTX_PERM_BIT); - UNMATCHED; -} - -int decode_iclass_sve_intx_dot_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, U=(INSWORD>>10)&1; - if(size==2 && !U && HasSVE() && HasSME()) return sdot_z_zzzi(ctx, dec); // -> sdot_z_zzzi_s - if(size==2 && U && HasSVE() && HasSME()) return udot_z_zzzi(ctx, dec); // -> udot_z_zzzi_s - if(size==3 && !U && HasSVE() && HasSME()) return sdot_z_zzzi(ctx, dec); // -> sdot_z_zzzi_d - if(size==3 && U && HasSVE() && HasSME()) return udot_z_zzzi(ctx, dec); // -> udot_z_zzzi_d - if(!(size&2) && !U && HasSVE2p3() && HasSME2p3()) return sdot_z32_zzzi(ctx, dec); // -> sdot_z16_zzzi_h - if(!(size&2) && U && HasSVE2p3() && HasSME2p3()) return udot_z32_zzzi(ctx, dec); // -> udot_z16_zzzi_h - UNMATCHED; -} - -int decode_iclass_sve_intx_mla_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, S=(INSWORD>>10)&1; - if(size==2 && !S && HasSVE2() && HasSME()) return mla_z_zzzi(ctx, dec); // -> mla_z_zzzi_s - if(size==2 && S && HasSVE2() && HasSME()) return mls_z_zzzi(ctx, dec); // -> mls_z_zzzi_s - if(size==3 && !S && HasSVE2() && HasSME()) return mla_z_zzzi(ctx, dec); // -> mla_z_zzzi_d - if(size==3 && S && HasSVE2() && HasSME()) return mls_z_zzzi(ctx, dec); // -> mls_z_zzzi_d - if(!(size&2) && !S && HasSVE2() && HasSME()) return mla_z_zzzi(ctx, dec); // -> mla_z_zzzi_h - if(!(size&2) && S && HasSVE2() && HasSME()) return mls_z_zzzi(ctx, dec); // -> mls_z_zzzi_h - UNMATCHED; -} - -int decode_iclass_sve_intx_qrdmlah_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, S=(INSWORD>>10)&1; - if(size==2 && !S && HasSVE2() && HasSME()) return sqrdmlah_z_zzzi(ctx, dec); // -> sqrdmlah_z_zzzi_s - if(size==2 && S && HasSVE2() && HasSME()) return sqrdmlsh_z_zzzi(ctx, dec); // -> sqrdmlsh_z_zzzi_s - if(size==3 && !S && HasSVE2() && HasSME()) return sqrdmlah_z_zzzi(ctx, dec); // -> sqrdmlah_z_zzzi_d - if(size==3 && S && HasSVE2() && HasSME()) return sqrdmlsh_z_zzzi(ctx, dec); // -> sqrdmlsh_z_zzzi_d - if(!(size&2) && !S && HasSVE2() && HasSME()) return sqrdmlah_z_zzzi(ctx, dec); // -> sqrdmlah_z_zzzi_h - if(!(size&2) && S && HasSVE2() && HasSME()) return sqrdmlsh_z_zzzi(ctx, dec); // -> sqrdmlsh_z_zzzi_h - UNMATCHED; -} - -int decode_iclass_sve_intx_mixed_dot_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, U=(INSWORD>>10)&1; - if(size==2 && !U && HasSVE() && HasI8MM() && HasSME() && HasI8MM()) return usdot_z_zzzi(ctx, dec); // -> usdot_z_zzzi_s - if(size==2 && U && HasSVE() && HasI8MM() && HasSME() && HasI8MM()) return sudot_z_zzzi(ctx, dec); // -> sudot_z_zzzi_s - if(size!=2) UNALLOCATED(ENC_UNALLOCATED_582_SVE_INTX_MIXED_DOT_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_qdmla_long_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, S=(INSWORD>>12)&1, T=(INSWORD>>10)&1; - if(size==2 && !S && !T && HasSVE2() && HasSME()) return sqdmlalb_z_zzzi(ctx, dec); // -> sqdmlalb_z_zzzi_s - if(size==2 && !S && T && HasSVE2() && HasSME()) return sqdmlalt_z_zzzi(ctx, dec); // -> sqdmlalt_z_zzzi_s - if(size==2 && S && !T && HasSVE2() && HasSME()) return sqdmlslb_z_zzzi(ctx, dec); // -> sqdmlslb_z_zzzi_s - if(size==2 && S && T && HasSVE2() && HasSME()) return sqdmlslt_z_zzzi(ctx, dec); // -> sqdmlslt_z_zzzi_s - if(size==3 && !S && !T && HasSVE2() && HasSME()) return sqdmlalb_z_zzzi(ctx, dec); // -> sqdmlalb_z_zzzi_d - if(size==3 && !S && T && HasSVE2() && HasSME()) return sqdmlalt_z_zzzi(ctx, dec); // -> sqdmlalt_z_zzzi_d - if(size==3 && S && !T && HasSVE2() && HasSME()) return sqdmlslb_z_zzzi(ctx, dec); // -> sqdmlslb_z_zzzi_d - if(size==3 && S && T && HasSVE2() && HasSME()) return sqdmlslt_z_zzzi(ctx, dec); // -> sqdmlslt_z_zzzi_d - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_583_SVE_INTX_QDMLA_LONG_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_cdot_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(size==2 && HasSVE2() && HasSME()) return cdot_z_zzzi(ctx, dec); // -> cdot_z_zzzi_s - if(size==3 && HasSVE2() && HasSME()) return cdot_z_zzzi(ctx, dec); // -> cdot_z_zzzi_d - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_584_SVE_INTX_CDOT_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_cmla_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(size==2 && HasSVE2() && HasSME()) return cmla_z_zzzi(ctx, dec); // -> cmla_z_zzzi_h - if(size==3 && HasSVE2() && HasSME()) return cmla_z_zzzi(ctx, dec); // -> cmla_z_zzzi_s - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_585_SVE_INTX_CMLA_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_qrdcmla_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(size==2 && HasSVE2() && HasSME()) return sqrdcmlah_z_zzzi(ctx, dec); // -> sqrdcmlah_z_zzzi_h - if(size==3 && HasSVE2() && HasSME()) return sqrdcmlah_z_zzzi(ctx, dec); // -> sqrdcmlah_z_zzzi_s - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_586_SVE_INTX_QRDCMLA_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_mla_long_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, S=(INSWORD>>13)&1, U=(INSWORD>>12)&1, T=(INSWORD>>10)&1; - if(size==2 && !S && !U && !T && HasSVE2() && HasSME()) return smlalb_z_zzzi(ctx, dec); // -> smlalb_z_zzzi_s - if(size==2 && !S && !U && T && HasSVE2() && HasSME()) return smlalt_z_zzzi(ctx, dec); // -> smlalt_z_zzzi_s - if(size==2 && !S && U && !T && HasSVE2() && HasSME()) return umlalb_z_zzzi(ctx, dec); // -> umlalb_z_zzzi_s - if(size==2 && !S && U && T && HasSVE2() && HasSME()) return umlalt_z_zzzi(ctx, dec); // -> umlalt_z_zzzi_s - if(size==2 && S && !U && !T && HasSVE2() && HasSME()) return smlslb_z_zzzi(ctx, dec); // -> smlslb_z_zzzi_s - if(size==2 && S && !U && T && HasSVE2() && HasSME()) return smlslt_z_zzzi(ctx, dec); // -> smlslt_z_zzzi_s - if(size==2 && S && U && !T && HasSVE2() && HasSME()) return umlslb_z_zzzi(ctx, dec); // -> umlslb_z_zzzi_s - if(size==2 && S && U && T && HasSVE2() && HasSME()) return umlslt_z_zzzi(ctx, dec); // -> umlslt_z_zzzi_s - if(size==3 && !S && !U && !T && HasSVE2() && HasSME()) return smlalb_z_zzzi(ctx, dec); // -> smlalb_z_zzzi_d - if(size==3 && !S && !U && T && HasSVE2() && HasSME()) return smlalt_z_zzzi(ctx, dec); // -> smlalt_z_zzzi_d - if(size==3 && !S && U && !T && HasSVE2() && HasSME()) return umlalb_z_zzzi(ctx, dec); // -> umlalb_z_zzzi_d - if(size==3 && !S && U && T && HasSVE2() && HasSME()) return umlalt_z_zzzi(ctx, dec); // -> umlalt_z_zzzi_d - if(size==3 && S && !U && !T && HasSVE2() && HasSME()) return smlslb_z_zzzi(ctx, dec); // -> smlslb_z_zzzi_d - if(size==3 && S && !U && T && HasSVE2() && HasSME()) return smlslt_z_zzzi(ctx, dec); // -> smlslt_z_zzzi_d - if(size==3 && S && U && !T && HasSVE2() && HasSME()) return umlslb_z_zzzi(ctx, dec); // -> umlslb_z_zzzi_d - if(size==3 && S && U && T && HasSVE2() && HasSME()) return umlslt_z_zzzi(ctx, dec); // -> umlslt_z_zzzi_d - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_587_SVE_INTX_MLA_LONG_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_mul_long_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, U=(INSWORD>>12)&1, T=(INSWORD>>10)&1; - if(size==2 && !U && !T && HasSVE2() && HasSME()) return smullb_z_zzi(ctx, dec); // -> smullb_z_zzi_s - if(size==2 && !U && T && HasSVE2() && HasSME()) return smullt_z_zzi(ctx, dec); // -> smullt_z_zzi_s - if(size==2 && U && !T && HasSVE2() && HasSME()) return umullb_z_zzi(ctx, dec); // -> umullb_z_zzi_s - if(size==2 && U && T && HasSVE2() && HasSME()) return umullt_z_zzi(ctx, dec); // -> umullt_z_zzi_s - if(size==3 && !U && !T && HasSVE2() && HasSME()) return smullb_z_zzi(ctx, dec); // -> smullb_z_zzi_d - if(size==3 && !U && T && HasSVE2() && HasSME()) return smullt_z_zzi(ctx, dec); // -> smullt_z_zzi_d - if(size==3 && U && !T && HasSVE2() && HasSME()) return umullb_z_zzi(ctx, dec); // -> umullb_z_zzi_d - if(size==3 && U && T && HasSVE2() && HasSME()) return umullt_z_zzi(ctx, dec); // -> umullt_z_zzi_d - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_588_SVE_INTX_MUL_LONG_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_qdmul_long_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, T=(INSWORD>>10)&1; - if(size==2 && !T && HasSVE2() && HasSME()) return sqdmullb_z_zzi(ctx, dec); // -> sqdmullb_z_zzi_s - if(size==2 && T && HasSVE2() && HasSME()) return sqdmullt_z_zzi(ctx, dec); // -> sqdmullt_z_zzi_s - if(size==3 && !T && HasSVE2() && HasSME()) return sqdmullb_z_zzi(ctx, dec); // -> sqdmullb_z_zzi_d - if(size==3 && T && HasSVE2() && HasSME()) return sqdmullt_z_zzi(ctx, dec); // -> sqdmullt_z_zzi_d - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_589_SVE_INTX_QDMUL_LONG_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_intx_qdmulh_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, R=(INSWORD>>10)&1; - if(size==2 && !R && HasSVE2() && HasSME()) return sqdmulh_z_zzi(ctx, dec); // -> sqdmulh_z_zzi_s - if(size==2 && R && HasSVE2() && HasSME()) return sqrdmulh_z_zzi(ctx, dec); // -> sqrdmulh_z_zzi_s - if(size==3 && !R && HasSVE2() && HasSME()) return sqdmulh_z_zzi(ctx, dec); // -> sqdmulh_z_zzi_d - if(size==3 && R && HasSVE2() && HasSME()) return sqrdmulh_z_zzi(ctx, dec); // -> sqrdmulh_z_zzi_d - if(!(size&2) && !R && HasSVE2() && HasSME()) return sqdmulh_z_zzi(ctx, dec); // -> sqdmulh_z_zzi_h - if(!(size&2) && R && HasSVE2() && HasSME()) return sqrdmulh_z_zzi(ctx, dec); // -> sqrdmulh_z_zzi_h - UNMATCHED; -} - -int decode_iclass_sve_intx_mul_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(size==2 && HasSVE2() && HasSME()) return mul_z_zzi(ctx, dec); // -> mul_z_zzi_s - if(size==3 && HasSVE2() && HasSME()) return mul_z_zzi(ctx, dec); // -> mul_z_zzi_d - if(!(size&2) && HasSVE2() && HasSME()) return mul_z_zzi(ctx, dec); // -> mul_z_zzi_h - UNMATCHED; -} - -int decode_iclass_sve_int_break(context *ctx, Instruction *dec) -{ - uint32_t B=(INSWORD>>23)&1, S=(INSWORD>>22)&1, M=(INSWORD>>4)&1; - if(!B && S && !M && HasSVE() && HasSME()) return brkas_p_p_p(ctx, dec); // -> brkas_p_p_p_z - if(B && S && !M && HasSVE() && HasSME()) return brkbs_p_p_p(ctx, dec); // -> brkbs_p_p_p_z - if(S && M) UNALLOCATED(ENC_UNALLOCATED_590_SVE_INT_BREAK); - if(!B && !S && HasSVE() && HasSME()) return brka_p_p_p(ctx, dec); // -> brka_p_p_p_ - if(B && !S && HasSVE() && HasSME()) return brkb_p_p_p(ctx, dec); // -> brkb_p_p_p_ - UNMATCHED; -} - -int decode_iclass_sve_int_brkn(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>22)&1; - if(!S && HasSVE() && HasSME()) return brkn_p_p_pp(ctx, dec); // -> brkn_p_p_pp_ - if(S && HasSVE() && HasSME()) return brkns_p_p_pp(ctx, dec); // -> brkns_p_p_pp_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_bin_perm_pp(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>11)&3, H=(INSWORD>>10)&1; - if(!opc && !H && HasSVE() && HasSME()) return zip1_p_pp(ctx, dec); // -> zip1_p_pp_ - if(!opc && H && HasSVE() && HasSME()) return zip1_p_pp(ctx, dec); // -> zip2_p_pp_ - if(opc==1 && !H && HasSVE() && HasSME()) return uzp1_p_pp(ctx, dec); // -> uzp1_p_pp_ - if(opc==1 && H && HasSVE() && HasSME()) return uzp1_p_pp(ctx, dec); // -> uzp2_p_pp_ - if(opc==2 && !H && HasSVE() && HasSME()) return trn1_p_pp(ctx, dec); // -> trn1_p_pp_ - if(opc==2 && H && HasSVE() && HasSME()) return trn1_p_pp(ctx, dec); // -> trn2_p_pp_ - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_591_SVE_INT_PERM_BIN_PERM_PP); - UNMATCHED; -} - -int decode_iclass_sve_int_perm_punpk(context *ctx, Instruction *dec) -{ - uint32_t H=(INSWORD>>16)&1; - if(!H && HasSVE() && HasSME()) return punpkhi_p_p(ctx, dec); // -> punpklo_p_p_ - if(H && HasSVE() && HasSME()) return punpkhi_p_p(ctx, dec); // -> punpkhi_p_p_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_reverse_p(context *ctx, Instruction *dec) -{ - return rev_p_p(ctx, dec); -} - -int decode_iclass_sve_int_perm_extract_i(context *ctx, Instruction *dec) -{ - return ext_z_zi(ctx, dec); -} - -int decode_iclass_sve_intx_perm_extract_i(context *ctx, Instruction *dec) -{ - return ext_z_zi(ctx, dec); -} - -int decode_iclass_sve_int_perm_dup_i(context *ctx, Instruction *dec) -{ - return dup_z_zi(ctx, dec); -} - -int decode_iclass_sve_int_perm_bin_perm_zz(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&7; - if(!opc && HasSVE() && HasSME()) return zip1_z_zz(ctx, dec); // -> zip1_z_zz_ - if(opc==1 && HasSVE() && HasSME()) return zip1_z_zz(ctx, dec); // -> zip2_z_zz_ - if(opc==2 && HasSVE() && HasSME()) return uzp1_z_zz(ctx, dec); // -> uzp1_z_zz_ - if(opc==3 && HasSVE() && HasSME()) return uzp1_z_zz(ctx, dec); // -> uzp2_z_zz_ - if(opc==4 && HasSVE() && HasSME()) return trn1_z_zz(ctx, dec); // -> trn1_z_zz_ - if(opc==5 && HasSVE() && HasSME()) return trn1_z_zz(ctx, dec); // -> trn2_z_zz_ - if((opc&6)==6) UNALLOCATED(ENC_UNALLOCATED_592_SVE_INT_PERM_BIN_PERM_ZZ); - UNMATCHED; -} - -int decode_iclass_sve_int_perm_dupq_i(context *ctx, Instruction *dec) -{ - return dupq_z_zi(ctx, dec); -} - -int decode_iclass_sve_int_perm_extq(context *ctx, Instruction *dec) -{ - return extq_z_zi(ctx, dec); -} - -int decode_iclass_sve_int_perm_cpy_v(context *ctx, Instruction *dec) -{ - return cpy_z_p_v(ctx, dec); -} - -int decode_iclass_sve_int_perm_compact(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!(size&2) && HasSVE2p2() && HasSME2p2()) return compact_z_p_z(ctx, dec); // -> compact_z_p_z_s - if((size&2)==2 && HasSVE() && HasSME2p2()) return compact_z_p_z(ctx, dec); // -> compact_z_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_last_v(context *ctx, Instruction *dec) -{ - uint32_t B=(INSWORD>>16)&1; - if(!B && HasSVE() && HasSME()) return lasta_v_p_z(ctx, dec); // -> lasta_v_p_z_ - if(B && HasSVE() && HasSME()) return lastb_v_p_z(ctx, dec); // -> lastb_v_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_rev(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&3, Z=(INSWORD>>13)&1; - if(!opc && !Z && HasSVE() && HasSME()) return revb_z_z(ctx, dec); // -> revb_z_z_m - if(!opc && Z && HasSVE2p2() && HasSME2p2()) return revb_z_z(ctx, dec); // -> revb_z_z_z - if(opc==1 && !Z && HasSVE() && HasSME()) return revb_z_z(ctx, dec); // -> revh_z_z_m - if(opc==1 && Z && HasSVE2p2() && HasSME2p2()) return revb_z_z(ctx, dec); // -> revh_z_z_z - if(opc==2 && !Z && HasSVE() && HasSME()) return revb_z_z(ctx, dec); // -> revw_z_z_m - if(opc==2 && Z && HasSVE2p2() && HasSME2p2()) return revb_z_z(ctx, dec); // -> revw_z_z_z - if(opc==3 && !Z && HasSVE() && HasSME()) return rbit_z_p_z(ctx, dec); // -> rbit_z_p_z_m - if(opc==3 && Z && HasSVE2p2() && HasSME2p2()) return rbit_z_p_z(ctx, dec); // -> rbit_z_p_z_z - UNMATCHED; -} - -int decode_iclass_sve_int_perm_clast_zz(context *ctx, Instruction *dec) -{ - uint32_t B=(INSWORD>>16)&1; - if(!B && HasSVE() && HasSME()) return clasta_z_p_zz(ctx, dec); // -> clasta_z_p_zz_ - if(B && HasSVE() && HasSME()) return clastb_z_p_zz(ctx, dec); // -> clastb_z_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_clast_vz(context *ctx, Instruction *dec) -{ - uint32_t B=(INSWORD>>16)&1; - if(!B && HasSVE() && HasSME()) return clasta_v_p_z(ctx, dec); // -> clasta_v_p_z_ - if(B && HasSVE() && HasSME()) return clastb_v_p_z(ctx, dec); // -> clastb_v_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_splice(context *ctx, Instruction *dec) -{ - return splice_z_p_zz(ctx, dec); -} - -int decode_iclass_sve_intx_perm_splice(context *ctx, Instruction *dec) -{ - return splice_z_p_zz(ctx, dec); -} - -int decode_iclass_sve_int_perm_last_r(context *ctx, Instruction *dec) -{ - uint32_t B=(INSWORD>>16)&1; - if(!B && HasSVE() && HasSME()) return lasta_r_p_z(ctx, dec); // -> lasta_r_p_z_ - if(B && HasSVE() && HasSME()) return lastb_r_p_z(ctx, dec); // -> lastb_r_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_cpy_r(context *ctx, Instruction *dec) -{ - return cpy_z_p_r(ctx, dec); -} - -int decode_iclass_sve_int_perm_clast_rz(context *ctx, Instruction *dec) -{ - uint32_t B=(INSWORD>>16)&1; - if(!B && HasSVE() && HasSME()) return clasta_r_p_z(ctx, dec); // -> clasta_r_p_z_ - if(B && HasSVE() && HasSME()) return clastb_r_p_z(ctx, dec); // -> clastb_r_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_revd(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, Z=(INSWORD>>13)&1; - if(!size && !Z && HasSME() && HasSVE2p1()) return revd_z_p_z(ctx, dec); // -> revd_z_p_z_m - if(!size && Z && HasSVE2p2() && HasSME2p2()) return revd_z_p_z(ctx, dec); // -> revd_z_p_z_z - if(size) UNALLOCATED(ENC_UNALLOCATED_593_SVE_INT_PERM_REVD); - UNMATCHED; -} - -int decode_iclass_sve_int_perm_expand(context *ctx, Instruction *dec) -{ - return expand_z_p_z(ctx, dec); -} - -int decode_iclass_sve_int_perm_bin_long_perm_zz(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>11)&3, H=(INSWORD>>10)&1; - if(!opc && !H && HasF64MM()) return zip1_z_zz(ctx, dec); // -> zip1_z_zz_q - if(!opc && H && HasF64MM()) return zip1_z_zz(ctx, dec); // -> zip2_z_zz_q - if(opc==1 && !H && HasF64MM()) return uzp1_z_zz(ctx, dec); // -> uzp1_z_zz_q - if(opc==1 && H && HasF64MM()) return uzp1_z_zz(ctx, dec); // -> uzp2_z_zz_q - if(opc==3 && !H && HasF64MM()) return trn1_z_zz(ctx, dec); // -> trn1_z_zz_q - if(opc==3 && H && HasF64MM()) return trn1_z_zz(ctx, dec); // -> trn2_z_zz_q - if(opc==2) UNALLOCATED(ENC_UNALLOCATED_594_SVE_INT_PERM_BIN_LONG_PERM_ZZ); - UNMATCHED; -} - -int decode_iclass_sve_int_perm_tbxquads(context *ctx, Instruction *dec) -{ - return tbxq_z_zz(ctx, dec); -} - -int decode_iclass_sve_int_perm_tbl_3src(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>10)&1; - if(!op && HasSVE2() && HasSME()) return tbl_z_zz(ctx, dec); // -> tbl_z_zz_2 - if(op && HasSVE2() && HasSME()) return tbx_z_zz(ctx, dec); // -> tbx_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_binquads(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&7; - if(!opc && HasSVE2p1() && HasSME2p1()) return zipq1_z_zz(ctx, dec); // -> zipq1_z_zz_ - if(opc==1 && HasSVE2p1() && HasSME2p1()) return zipq2_z_zz(ctx, dec); // -> zipq2_z_zz_ - if(opc==2 && HasSVE2p1() && HasSME2p1()) return uzpq1_z_zz(ctx, dec); // -> uzpq1_z_zz_ - if(opc==3 && HasSVE2p1() && HasSME2p1()) return uzpq2_z_zz(ctx, dec); // -> uzpq2_z_zz_ - if(opc==6 && HasSVE2p1() && HasSME2p1()) return tblq_z_zz(ctx, dec); // -> tblq_z_zz_ - if(opc==7) UNALLOCATED(ENC_UNALLOCATED_596_SVE_INT_PERM_BINQUADS); - if((opc&6)==4) UNALLOCATED(ENC_UNALLOCATED_595_SVE_INT_PERM_BINQUADS); - UNMATCHED; -} - -int decode_iclass_sve_int_perm_tbl(context *ctx, Instruction *dec) -{ - return tbl_z_zz(ctx, dec); -} - -int decode_iclass_sve_int_perm_dup_r(context *ctx, Instruction *dec) -{ - return dup_z_r(ctx, dec); -} - -int decode_iclass_sve_int_perm_insrs(context *ctx, Instruction *dec) -{ - return insr_z_r(ctx, dec); -} - -int decode_iclass_sve_int_mov_v2p(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>17)&3; - if(!opc && !opc2) UNALLOCATED(ENC_UNALLOCATED_597_SVE_INT_MOV_V2P); - if(!opc && opc2==1 && HasSVE2p1() && HasSME2p1()) return pmov_p_zi(ctx, dec); // -> pmov_p_zi_b - if(!opc && (opc2&2)==2 && HasSVE2p1() && HasSME2p1()) return pmov_p_zi(ctx, dec); // -> pmov_p_zi_h - if(opc==1 && HasSVE2p1() && HasSME2p1()) return pmov_p_zi(ctx, dec); // -> pmov_p_zi_s - if((opc&2)==2 && HasSVE2p1() && HasSME2p1()) return pmov_p_zi(ctx, dec); // -> pmov_p_zi_d - UNMATCHED; -} - -int decode_iclass_sve_int_mov_p2v(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>17)&3; - if(!opc && !opc2) UNALLOCATED(ENC_UNALLOCATED_598_SVE_INT_MOV_P2V); - if(!opc && opc2==1 && HasSVE2p1() && HasSME2p1()) return pmov_z_pi(ctx, dec); // -> pmov_z_pi_b - if(!opc && (opc2&2)==2 && HasSVE2p1() && HasSME2p1()) return pmov_z_pi(ctx, dec); // -> pmov_z_pi_h - if(opc==1 && HasSVE2p1() && HasSME2p1()) return pmov_z_pi(ctx, dec); // -> pmov_z_pi_s - if((opc&2)==2 && HasSVE2p1() && HasSME2p1()) return pmov_z_pi(ctx, dec); // -> pmov_z_pi_d - UNMATCHED; -} - -int decode_iclass_sve_int_perm_unpk(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>17)&1, H=(INSWORD>>16)&1; - if(!U && !H && HasSVE() && HasSME()) return sunpkhi_z_z(ctx, dec); // -> sunpklo_z_z_ - if(!U && H && HasSVE() && HasSME()) return sunpkhi_z_z(ctx, dec); // -> sunpkhi_z_z_ - if(U && !H && HasSVE() && HasSME()) return uunpkhi_z_z(ctx, dec); // -> uunpklo_z_z_ - if(U && H && HasSVE() && HasSME()) return uunpkhi_z_z(ctx, dec); // -> uunpkhi_z_z_ - UNMATCHED; -} - -int decode_iclass_sve_int_perm_insrv(context *ctx, Instruction *dec) -{ - return insr_z_v(ctx, dec); -} - -int decode_iclass_sve_int_perm_reverse_z(context *ctx, Instruction *dec) -{ - return rev_z_z(ctx, dec); -} - -int decode_iclass_sve_int_pcount_pred(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE() && HasSME()) return cntp_r_p_p(ctx, dec); // -> cntp_r_p_p_ - if(opc==1 && HasSVE2p2() && HasSME2p2()) return firstp_r_p_p(ctx, dec); // -> firstp_r_p_p_ - if(opc==2 && HasSVE2p2() && HasSME2p2()) return lastp_r_p_p(ctx, dec); // -> lastp_r_p_p_ - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_600_SVE_INT_PCOUNT_PRED); - if((opc&4)==4) UNALLOCATED(ENC_UNALLOCATED_599_SVE_INT_PCOUNT_PRED); - UNMATCHED; -} - -int decode_iclass_sve_int_pcount_pn(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSME2() && HasSVE2p1()) return cntp_r_pn(ctx, dec); // -> cntp_r_pn_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_601_SVE_INT_PCOUNT_PN); - UNMATCHED; -} - -int decode_iclass_sve_int_pred_log(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, S=(INSWORD>>22)&1, o2=(INSWORD>>9)&1, o3=(INSWORD>>4)&1; - if(!op && !S && !o2 && !o3 && HasSVE() && HasSME()) return and_p_p_pp(ctx, dec); // -> and_p_p_pp_z - if(!op && !S && !o2 && o3 && HasSVE() && HasSME()) return bic_p_p_pp(ctx, dec); // -> bic_p_p_pp_z - if(!op && !S && o2 && !o3 && HasSVE() && HasSME()) return eor_p_p_pp(ctx, dec); // -> eor_p_p_pp_z - if(!op && !S && o2 && o3 && HasSVE() && HasSME()) return sel_p_p_pp(ctx, dec); // -> sel_p_p_pp_ - if(!op && S && !o2 && !o3 && HasSVE() && HasSME()) return ands_p_p_pp(ctx, dec); // -> ands_p_p_pp_z - if(!op && S && !o2 && o3 && HasSVE() && HasSME()) return bics_p_p_pp(ctx, dec); // -> bics_p_p_pp_z - if(!op && S && o2 && !o3 && HasSVE() && HasSME()) return eors_p_p_pp(ctx, dec); // -> eors_p_p_pp_z - if(!op && S && o2 && o3) UNALLOCATED(ENC_UNALLOCATED_602_SVE_INT_PRED_LOG); - if(op && !S && !o2 && !o3 && HasSVE() && HasSME()) return orr_p_p_pp(ctx, dec); // -> orr_p_p_pp_z - if(op && !S && !o2 && o3 && HasSVE() && HasSME()) return orn_p_p_pp(ctx, dec); // -> orn_p_p_pp_z - if(op && !S && o2 && !o3 && HasSVE() && HasSME()) return nor_p_p_pp(ctx, dec); // -> nor_p_p_pp_z - if(op && !S && o2 && o3 && HasSVE() && HasSME()) return nand_p_p_pp(ctx, dec); // -> nand_p_p_pp_z - if(op && S && !o2 && !o3 && HasSVE() && HasSME()) return orrs_p_p_pp(ctx, dec); // -> orrs_p_p_pp_z - if(op && S && !o2 && o3 && HasSVE() && HasSME()) return orns_p_p_pp(ctx, dec); // -> orns_p_p_pp_z - if(op && S && o2 && !o3 && HasSVE() && HasSME()) return nors_p_p_pp(ctx, dec); // -> nors_p_p_pp_z - if(op && S && o2 && o3 && HasSVE() && HasSME()) return nands_p_p_pp(ctx, dec); // -> nands_p_p_pp_z - UNMATCHED; -} - -int decode_iclass_sve_int_ptest(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, S=(INSWORD>>22)&1, opc2=INSWORD&15; - if(!op && S && !opc2 && HasSVE() && HasSME()) return ptest_p_p(ctx, dec); // -> ptest__p_p_ - if(!op && S && opc2) UNALLOCATED(ENC_UNALLOCATED_605_SVE_INT_PTEST); - if(!op && !S) UNALLOCATED(ENC_UNALLOCATED_604_SVE_INT_PTEST); - if(op) UNALLOCATED(ENC_UNALLOCATED_603_SVE_INT_PTEST); - UNMATCHED; -} - -int decode_iclass_sve_int_pfirst(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, S=(INSWORD>>22)&1; - if(!op && !S) UNALLOCATED(ENC_UNALLOCATED_607_SVE_INT_PFIRST); - if(!op && S && HasSVE() && HasSME()) return pfirst_p_p_p(ctx, dec); // -> pfirst_p_p_p_ - if(op) UNALLOCATED(ENC_UNALLOCATED_606_SVE_INT_PFIRST); - UNMATCHED; -} - -int decode_iclass_sve_int_pnext(context *ctx, Instruction *dec) -{ - return pnext_p_p_p(ctx, dec); -} - -int decode_iclass_sve_int_ptrue(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>16)&1; - if(!S && HasSVE() && HasSME()) return ptrue_p_s(ctx, dec); // -> ptrue_p_s_ - if(S && HasSVE() && HasSME()) return ptrues_p_s(ctx, dec); // -> ptrues_p_s_ - UNMATCHED; -} - -int decode_iclass_sve_int_pfalse(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, S=(INSWORD>>22)&1; - if(!op && !S && HasSVE() && HasSME()) return pfalse_p(ctx, dec); // -> pfalse_p_ - if(!op && S) UNALLOCATED(ENC_UNALLOCATED_609_SVE_INT_PFALSE); - if(op) UNALLOCATED(ENC_UNALLOCATED_608_SVE_INT_PFALSE); - UNMATCHED; -} - -int decode_iclass_sve_int_rdffr(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, S=(INSWORD>>22)&1; - if(!op && !S && HasSVE()) return rdffr_p_p_f(ctx, dec); // -> rdffr_p_p_f_ - if(!op && S && HasSVE()) return rdffrs_p_p_f(ctx, dec); // -> rdffrs_p_p_f_ - if(op) UNALLOCATED(ENC_UNALLOCATED_610_SVE_INT_RDFFR); - UNMATCHED; -} - -int decode_iclass_sve_int_rdffr_2(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, S=(INSWORD>>22)&1; - if(!op && !S && HasSVE()) return rdffr_p_f(ctx, dec); // -> rdffr_p_f_ - if(!op && S) UNALLOCATED(ENC_UNALLOCATED_612_SVE_INT_RDFFR_2); - if(op) UNALLOCATED(ENC_UNALLOCATED_611_SVE_INT_RDFFR_2); - UNMATCHED; -} - -int decode_iclass_sve_int_pred_dup(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>9)&1; - if(!S && HasSME() && HasSVE2p1()) return psel_p_ppi(ctx, dec); // -> psel_p_ppi_ - if(S) UNALLOCATED(ENC_UNALLOCATED_613_SVE_INT_PRED_DUP); - UNMATCHED; -} - -int decode_iclass_sve_int_brkp(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>23)&1, S=(INSWORD>>22)&1, B=(INSWORD>>4)&1; - if(!op && !S && !B && HasSVE() && HasSME()) return brkpa_p_p_pp(ctx, dec); // -> brkpa_p_p_pp_ - if(!op && !S && B && HasSVE() && HasSME()) return brkpb_p_p_pp(ctx, dec); // -> brkpb_p_p_pp_ - if(!op && S && !B && HasSVE() && HasSME()) return brkpas_p_p_pp(ctx, dec); // -> brkpas_p_p_pp_ - if(!op && S && B && HasSVE() && HasSME()) return brkpbs_p_p_pp(ctx, dec); // -> brkpbs_p_p_pp_ - if(op) UNALLOCATED(ENC_UNALLOCATED_614_SVE_INT_BRKP); - UNMATCHED; -} - -int decode_iclass_sve_int_while_rr_pn(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>11)&1, lt=(INSWORD>>10)&1, eq=(INSWORD>>3)&1; - if(!U && !lt && !eq && HasSME2() && HasSVE2p1()) return whilege_pn_rr(ctx, dec); // -> whilege_pn_rr_ - if(!U && !lt && eq && HasSME2() && HasSVE2p1()) return whilegt_pn_rr(ctx, dec); // -> whilegt_pn_rr_ - if(!U && lt && !eq && HasSME2() && HasSVE2p1()) return whilelt_pn_rr(ctx, dec); // -> whilelt_pn_rr_ - if(!U && lt && eq && HasSME2() && HasSVE2p1()) return whilele_pn_rr(ctx, dec); // -> whilele_pn_rr_ - if(U && !lt && !eq && HasSME2() && HasSVE2p1()) return whilehs_pn_rr(ctx, dec); // -> whilehs_pn_rr_ - if(U && !lt && eq && HasSME2() && HasSVE2p1()) return whilehi_pn_rr(ctx, dec); // -> whilehi_pn_rr_ - if(U && lt && !eq && HasSME2() && HasSVE2p1()) return whilelo_pn_rr(ctx, dec); // -> whilelo_pn_rr_ - if(U && lt && eq && HasSME2() && HasSVE2p1()) return whilels_pn_rr(ctx, dec); // -> whilels_pn_rr_ - UNMATCHED; -} - -int decode_iclass_sve_int_while_rr_pair(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>11)&1, lt=(INSWORD>>10)&1, eq=INSWORD&1; - if(!U && !lt && !eq && HasSME2() && HasSVE2p1()) return whilege_pp_rr(ctx, dec); // -> whilege_pp_rr_ - if(!U && !lt && eq && HasSME2() && HasSVE2p1()) return whilegt_pp_rr(ctx, dec); // -> whilegt_pp_rr_ - if(!U && lt && !eq && HasSME2() && HasSVE2p1()) return whilelt_pp_rr(ctx, dec); // -> whilelt_pp_rr_ - if(!U && lt && eq && HasSME2() && HasSVE2p1()) return whilele_pp_rr(ctx, dec); // -> whilele_pp_rr_ - if(U && !lt && !eq && HasSME2() && HasSVE2p1()) return whilehs_pp_rr(ctx, dec); // -> whilehs_pp_rr_ - if(U && !lt && eq && HasSME2() && HasSVE2p1()) return whilehi_pp_rr(ctx, dec); // -> whilehi_pp_rr_ - if(U && lt && !eq && HasSME2() && HasSVE2p1()) return whilelo_pp_rr(ctx, dec); // -> whilelo_pp_rr_ - if(U && lt && eq && HasSME2() && HasSVE2p1()) return whilels_pp_rr(ctx, dec); // -> whilels_pp_rr_ - UNMATCHED; -} - -int decode_iclass_sve_int_ctr_to_mask(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>8)&7; - if((opc&6)==4 && HasSME2() && HasSVE2p1()) return pext_pp_rr(ctx, dec); // -> pext_pp_rr_ - if((opc&6)==6) UNALLOCATED(ENC_UNALLOCATED_615_SVE_INT_CTR_TO_MASK); - if(!(opc&4) && HasSME2() && HasSVE2p1()) return pext_pn_rr(ctx, dec); // -> pext_pn_rr_ - UNMATCHED; -} - -int decode_iclass_sve_int_pn_ptrue(context *ctx, Instruction *dec) -{ - return ptrue_pn_i(ctx, dec); -} - -int decode_iclass_sve_int_arith_vl(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1; - if(!op && HasSVE() && HasSME()) return addvl_r_ri(ctx, dec); // -> addvl_r_ri_ - if(op && HasSVE() && HasSME()) return addpl_r_ri(ctx, dec); // -> addpl_r_ri_ - UNMATCHED; -} - -int decode_iclass_sve_int_arith_svl(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1; - if(!op && HasSME()) return addsvl_r_ri(ctx, dec); // -> addsvl_r_ri_ - if(op && HasSME()) return addspl_r_ri(ctx, dec); // -> addspl_r_ri_ - UNMATCHED; -} - -int decode_iclass_sve_int_read_vl_a(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, opc2=(INSWORD>>16)&0x1f; - if(!op && opc2==0x1f && HasSVE() && HasSME()) return rdvl_r_i(ctx, dec); // -> rdvl_r_i_ - if(!op && opc2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_617_SVE_INT_READ_VL_A); - if(op) UNALLOCATED(ENC_UNALLOCATED_616_SVE_INT_READ_VL_A); - UNMATCHED; -} - -int decode_iclass_sve_int_read_svl_a(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, opc2=(INSWORD>>16)&0x1f; - if(!op && opc2==0x1f && HasSME()) return rdsvl_r_i(ctx, dec); // -> rdsvl_r_i_ - if(!op && opc2!=0x1f) UNALLOCATED(ENC_UNALLOCATED_619_SVE_INT_READ_SVL_A); - if(op) UNALLOCATED(ENC_UNALLOCATED_618_SVE_INT_READ_SVL_A); - UNMATCHED; -} - -int decode_iclass_sve_int_sel_vvv(context *ctx, Instruction *dec) -{ - return sel_z_p_zz(ctx, dec); -} - -int decode_iclass_sve_int_wrffr(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3; - if(!opc && HasSVE()) return wrffr_f_p(ctx, dec); // -> wrffr_f_p_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_620_SVE_INT_WRFFR); - UNMATCHED; -} - -int decode_iclass_sve_int_setffr(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3; - if(!opc && HasSVE()) return setffr_f(ctx, dec); // -> setffr_f_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_621_SVE_INT_SETFFR); - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_vd(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&3; - if(!opc && HasSVE()) return fadda_v_p_z(ctx, dec); // -> fadda_v_p_z_ - if(opc) UNALLOCATED(ENC_UNALLOCATED_622_SVE_FP_2OP_P_VD); - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_zds(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>16)&15; - if(!size && !opc && HasSVE_B16B16()) return bfadd_z_p_zz(ctx, dec); // -> bfadd_z_p_zz_ - if(!size && opc==1 && HasSVE_B16B16()) return bfsub_z_p_zz(ctx, dec); // -> bfsub_z_p_zz_ - if(!size && opc==2 && HasSVE_B16B16()) return bfmul_z_p_zz(ctx, dec); // -> bfmul_z_p_zz_ - if(!size && opc==4 && HasSVE_B16B16()) return bfmaxnm_z_p_zz(ctx, dec); // -> bfmaxnm_z_p_zz_ - if(!size && opc==5 && HasSVE_B16B16()) return bfminnm_z_p_zz(ctx, dec); // -> bfminnm_z_p_zz_ - if(!size && opc==6 && HasSVE_B16B16()) return bfmax_z_p_zz(ctx, dec); // -> bfmax_z_p_zz_ - if(!size && opc==7 && HasSVE_B16B16()) return bfmin_z_p_zz(ctx, dec); // -> bfmin_z_p_zz_ - if(!size && opc==9 && HasSVE_BFSCALE()) return bfscale_z_p_zz(ctx, dec); // -> bfscale_z_p_zz_ - if(size && !opc && HasSVE() && HasSME()) return fadd_z_p_zz(ctx, dec); // -> fadd_z_p_zz_ - if(size && opc==1 && HasSVE() && HasSME()) return fsub_z_p_zz(ctx, dec); // -> fsub_z_p_zz_ - if(size && opc==2 && HasSVE() && HasSME()) return fmul_z_p_zz(ctx, dec); // -> fmul_z_p_zz_ - if(size && opc==4 && HasSVE() && HasSME()) return fmaxnm_z_p_zz(ctx, dec); // -> fmaxnm_z_p_zz_ - if(size && opc==5 && HasSVE() && HasSME()) return fminnm_z_p_zz(ctx, dec); // -> fminnm_z_p_zz_ - if(size && opc==6 && HasSVE() && HasSME()) return fmax_z_p_zz(ctx, dec); // -> fmax_z_p_zz_ - if(size && opc==7 && HasSVE() && HasSME()) return fmin_z_p_zz(ctx, dec); // -> fmin_z_p_zz_ - if(size && opc==9 && HasSVE() && HasSME()) return fscale_z_p_zz(ctx, dec); // -> fscale_z_p_zz_ - if(opc==3 && HasSVE() && HasSME()) return fsubr_z_p_zz(ctx, dec); // -> fsubr_z_p_zz_ - if(opc==8 && HasSVE() && HasSME()) return fabd_z_p_zz(ctx, dec); // -> fabd_z_p_zz_ - if(opc==10 && HasSVE() && HasSME()) return fmulx_z_p_zz(ctx, dec); // -> fmulx_z_p_zz_ - if(opc==11) UNALLOCATED(ENC_UNALLOCATED_623_SVE_FP_2OP_P_ZDS); - if(opc==12 && HasSVE() && HasSME()) return fdivr_z_p_zz(ctx, dec); // -> fdivr_z_p_zz_ - if(opc==13 && HasSVE() && HasSME()) return fdiv_z_p_zz(ctx, dec); // -> fdiv_z_p_zz_ - if(opc==14 && HasSVE2() && HasFAMINMAX() && HasSME2() && HasFAMINMAX()) return famax_z_p_zz(ctx, dec); // -> famax_z_p_zz_ - if(opc==15 && HasSVE2() && HasFAMINMAX() && HasSME2() && HasFAMINMAX()) return famin_z_p_zz(ctx, dec); // -> famin_z_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_fp_ftmad(context *ctx, Instruction *dec) -{ - return ftmad_z_zzi(ctx, dec); -} - -int decode_iclass_sve_fp_2op_i_p_zds(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE() && HasSME()) return fadd_z_p_zs(ctx, dec); // -> fadd_z_p_zs_ - if(opc==1 && HasSVE() && HasSME()) return fsub_z_p_zs(ctx, dec); // -> fsub_z_p_zs_ - if(opc==2 && HasSVE() && HasSME()) return fmul_z_p_zs(ctx, dec); // -> fmul_z_p_zs_ - if(opc==3 && HasSVE() && HasSME()) return fsubr_z_p_zs(ctx, dec); // -> fsubr_z_p_zs_ - if(opc==4 && HasSVE() && HasSME()) return fmaxnm_z_p_zs(ctx, dec); // -> fmaxnm_z_p_zs_ - if(opc==5 && HasSVE() && HasSME()) return fminnm_z_p_zs(ctx, dec); // -> fminnm_z_p_zs_ - if(opc==6 && HasSVE() && HasSME()) return fmax_z_p_zs(ctx, dec); // -> fmax_z_p_zs_ - if(opc==7 && HasSVE() && HasSME()) return fmin_z_p_zs(ctx, dec); // -> fmin_z_p_zs_ - UNMATCHED; -} - -int decode_iclass_sve_fp_3op_u_zd(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>10)&7; - if(!size && !opc && HasSVE_B16B16()) return bfadd_z_zz(ctx, dec); // -> bfadd_z_zz_ - if(!size && opc==1 && HasSVE_B16B16()) return bfsub_z_zz(ctx, dec); // -> bfsub_z_zz_ - if(!size && opc==2 && HasSVE_B16B16()) return bfmul_z_zz(ctx, dec); // -> bfmul_z_zz_ - if(size && !opc && HasSVE() && HasSME()) return fadd_z_zz(ctx, dec); // -> fadd_z_zz_ - if(size && opc==1 && HasSVE() && HasSME()) return fsub_z_zz(ctx, dec); // -> fsub_z_zz_ - if(size && opc==2 && HasSVE() && HasSME()) return fmul_z_zz(ctx, dec); // -> fmul_z_zz_ - if(opc==3 && HasSVE()) return ftsmul_z_zz(ctx, dec); // -> ftsmul_z_zz_ - if(opc==6 && HasSVE() && HasSME()) return frecps_z_zz(ctx, dec); // -> frecps_z_zz_ - if(opc==7 && HasSVE() && HasSME()) return frsqrts_z_zz(ctx, dec); // -> frsqrts_z_zz_ - if((opc&6)==4) UNALLOCATED(ENC_UNALLOCATED_624_SVE_FP_3OP_U_ZD); - UNMATCHED; -} - -int decode_iclass_sve_fp_3op_p_pd(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>15)&1, o2=(INSWORD>>13)&1, o3=(INSWORD>>4)&1; - if(!op && !o2 && !o3 && HasSVE() && HasSME()) return fcmeq_p_p_zz(ctx, dec); // -> fcmge_p_p_zz_ - if(!op && !o2 && o3 && HasSVE() && HasSME()) return fcmeq_p_p_zz(ctx, dec); // -> fcmgt_p_p_zz_ - if(!op && o2 && !o3 && HasSVE() && HasSME()) return fcmeq_p_p_zz(ctx, dec); // -> fcmeq_p_p_zz_ - if(!op && o2 && o3 && HasSVE() && HasSME()) return fcmeq_p_p_zz(ctx, dec); // -> fcmne_p_p_zz_ - if(op && !o2 && !o3 && HasSVE() && HasSME()) return fcmeq_p_p_zz(ctx, dec); // -> fcmuo_p_p_zz_ - if(op && !o2 && o3 && HasSVE() && HasSME()) return facge_p_p_zz(ctx, dec); // -> facge_p_p_zz_ - if(op && o2 && !o3) UNALLOCATED(ENC_UNALLOCATED_625_SVE_FP_3OP_P_PD); - if(op && o2 && o3 && HasSVE() && HasSME()) return facge_p_p_zz(ctx, dec); // -> facgt_p_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_pd(context *ctx, Instruction *dec) -{ - uint32_t eq=(INSWORD>>17)&1, lt=(INSWORD>>16)&1, ne=(INSWORD>>4)&1; - if(!eq && !lt && !ne && HasSVE() && HasSME()) return fcmeq_p_p_z0(ctx, dec); // -> fcmge_p_p_z0_ - if(!eq && !lt && ne && HasSVE() && HasSME()) return fcmeq_p_p_z0(ctx, dec); // -> fcmgt_p_p_z0_ - if(!eq && lt && !ne && HasSVE() && HasSME()) return fcmeq_p_p_z0(ctx, dec); // -> fcmlt_p_p_z0_ - if(!eq && lt && ne && HasSVE() && HasSME()) return fcmeq_p_p_z0(ctx, dec); // -> fcmle_p_p_z0_ - if(eq && !lt && !ne && HasSVE() && HasSME()) return fcmeq_p_p_z0(ctx, dec); // -> fcmeq_p_p_z0_ - if(eq && lt && !ne && HasSVE() && HasSME()) return fcmeq_p_p_z0(ctx, dec); // -> fcmne_p_p_z0_ - if(eq && ne) UNALLOCATED(ENC_UNALLOCATED_626_SVE_FP_2OP_P_PD); - UNMATCHED; -} - -int decode_iclass_sve_fp_fcadd(context *ctx, Instruction *dec) -{ - return fcadd_z_p_zz(ctx, dec); -} - -int decode_iclass_sve_fp_fcmla_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(size==2 && HasSVE() && HasSME()) return fcmla_z_zzzi(ctx, dec); // -> fcmla_z_zzzi_h - if(size==3 && HasSVE() && HasSME()) return fcmla_z_zzzi(ctx, dec); // -> fcmla_z_zzzi_s - if(!(size&2)) UNALLOCATED(ENC_UNALLOCATED_627_SVE_FP_FCMLA_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_fp_fcmla(context *ctx, Instruction *dec) -{ - return fcmla_z_p_zzz(ctx, dec); -} - -int decode_iclass_sve_fp_fcvt2z(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>16)&3; - if(!opc && opc2==2 && HasSVE2p2() && HasSME2p2()) return fcvtxnt_z_p_z(ctx, dec); // -> fcvtxnt_z_p_z_d2sz - if(opc==2 && !opc2 && HasSVE2p2() && HasSME2p2()) return fcvtnt_z_p_z(ctx, dec); // -> fcvtnt_z_p_z_s2hz - if(opc==2 && opc2==1 && HasSVE2p2() && HasSME2p2()) return fcvtlt_z_p_z(ctx, dec); // -> fcvtlt_z_p_z_h2sz - if(opc==2 && opc2==2 && HasSVE2p2() && HasSME2p2()) return bfcvtnt_z_p_z(ctx, dec); // -> bfcvtnt_z_p_z_s2bfz - if(opc==3 && opc2==2 && HasSVE2p2() && HasSME2p2()) return fcvtnt_z_p_z(ctx, dec); // -> fcvtnt_z_p_z_d2sz - if(opc==3 && opc2==3 && HasSVE2p2() && HasSME2p2()) return fcvtlt_z_p_z(ctx, dec); // -> fcvtlt_z_p_z_s2dz - if(!(opc&1) && opc2==3) UNALLOCATED(ENC_UNALLOCATED_631_SVE_FP_FCVT2Z); - if(!opc && !(opc2&2)) UNALLOCATED(ENC_UNALLOCATED_629_SVE_FP_FCVT2Z); - if(opc==3 && !(opc2&2)) UNALLOCATED(ENC_UNALLOCATED_630_SVE_FP_FCVT2Z); - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_628_SVE_FP_FCVT2Z); - UNMATCHED; -} - -int decode_iclass_sve_fp_fcvt2(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>16)&3; - if(!opc && opc2==2 && HasSVE2() && HasSME()) return fcvtxnt_z_p_z(ctx, dec); // -> fcvtxnt_z_p_z_d2s - if(opc==2 && !opc2 && HasSVE2() && HasSME()) return fcvtnt_z_p_z(ctx, dec); // -> fcvtnt_z_p_z_s2h - if(opc==2 && opc2==1 && HasSVE2() && HasSME()) return fcvtlt_z_p_z(ctx, dec); // -> fcvtlt_z_p_z_h2s - if(opc==2 && opc2==2 && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfcvtnt_z_p_z(ctx, dec); // -> bfcvtnt_z_p_z_s2bf - if(opc==3 && opc2==2 && HasSVE2() && HasSME()) return fcvtnt_z_p_z(ctx, dec); // -> fcvtnt_z_p_z_d2s - if(opc==3 && opc2==3 && HasSVE2() && HasSME()) return fcvtlt_z_p_z(ctx, dec); // -> fcvtlt_z_p_z_s2d - if(!(opc&1) && opc2==3) UNALLOCATED(ENC_UNALLOCATED_635_SVE_FP_FCVT2); - if(!opc && !(opc2&2)) UNALLOCATED(ENC_UNALLOCATED_633_SVE_FP_FCVT2); - if(opc==3 && !(opc2&2)) UNALLOCATED(ENC_UNALLOCATED_634_SVE_FP_FCVT2); - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_632_SVE_FP_FCVT2); - UNMATCHED; -} - -int decode_iclass_sve_fp_fast_red(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE() && HasSME()) return faddv_v_p_z(ctx, dec); // -> faddv_v_p_z_ - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_637_SVE_FP_FAST_RED); - if(opc==4 && HasSVE() && HasSME()) return fmaxnmv_v_p_z(ctx, dec); // -> fmaxnmv_v_p_z_ - if(opc==5 && HasSVE() && HasSME()) return fminnmv_v_p_z(ctx, dec); // -> fminnmv_v_p_z_ - if(opc==6 && HasSVE() && HasSME()) return fmaxv_v_p_z(ctx, dec); // -> fmaxv_v_p_z_ - if(opc==7 && HasSVE() && HasSME()) return fminv_v_p_z(ctx, dec); // -> fminv_v_p_z_ - if((opc&6)==2) UNALLOCATED(ENC_UNALLOCATED_636_SVE_FP_FAST_RED); - UNMATCHED; -} - -int decode_iclass_sve_fp_fast_redq(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE2p1() && HasSME2p1()) return faddqv_z_p_z(ctx, dec); // -> faddqv_z_p_z_ - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_639_SVE_FP_FAST_REDQ); - if(opc==4 && HasSVE2p1() && HasSME2p1()) return fmaxnmqv_z_p_z(ctx, dec); // -> fmaxnmqv_z_p_z_ - if(opc==5 && HasSVE2p1() && HasSME2p1()) return fminnmqv_z_p_z(ctx, dec); // -> fminnmqv_z_p_z_ - if(opc==6 && HasSVE2p1() && HasSME2p1()) return fmaxqv_z_p_z(ctx, dec); // -> fmaxqv_z_p_z_ - if(opc==7 && HasSVE2p1() && HasSME2p1()) return fminqv_z_p_z(ctx, dec); // -> fminqv_z_p_z_ - if((opc&6)==2) UNALLOCATED(ENC_UNALLOCATED_638_SVE_FP_FAST_REDQ); - UNMATCHED; -} - -int decode_iclass_sve_fp_fmmla(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3; - if(!opc && HasSVE_F16F32MM()) return fmmla_z32_zzz(ctx, dec); // -> fmmla_z32_zzz_h - if(opc==1 && HasSVE() && HasBF16()) return bfmmla_z_zzz(ctx, dec); // -> bfmmla_z_zzz_ - if(opc==2 && HasF32MM()) return fmmla_z_zzz(ctx, dec); // -> fmmla_z_zzz_s - if(opc==3 && HasF64MM()) return fmmla_z_zzz(ctx, dec); // -> fmmla_z_zzz_d - UNMATCHED; -} - -int decode_iclass_sve_fp_fmul_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, o2=(INSWORD>>11)&1; - if(size==2 && !o2 && HasSVE() && HasSME()) return fmul_z_zzi(ctx, dec); // -> fmul_z_zzi_s - if(size==3 && !o2 && HasSVE() && HasSME()) return fmul_z_zzi(ctx, dec); // -> fmul_z_zzi_d - if(!(size&2) && !o2 && HasSVE() && HasSME()) return fmul_z_zzi(ctx, dec); // -> fmul_z_zzi_h - if(!(size&2) && o2 && HasSVE_B16B16()) return bfmul_z_zzi(ctx, dec); // -> bfmul_z_zzi_h - if((size&2)==2 && o2) UNALLOCATED(ENC_UNALLOCATED_640_SVE_FP_FMUL_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_fp_3op_p_zds_a(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>13)&3; - if(!size && !opc && HasSVE_B16B16()) return bfmla_z_p_zzz(ctx, dec); // -> bfmla_z_p_zzz_ - if(!size && opc==1 && HasSVE_B16B16()) return bfmls_z_p_zzz(ctx, dec); // -> bfmls_z_p_zzz_ - if(size && !opc && HasSVE() && HasSME()) return fmla_z_p_zzz(ctx, dec); // -> fmla_z_p_zzz_ - if(size && opc==1 && HasSVE() && HasSME()) return fmls_z_p_zzz(ctx, dec); // -> fmls_z_p_zzz_ - if(size && opc==2 && HasSVE() && HasSME()) return fnmla_z_p_zzz(ctx, dec); // -> fnmla_z_p_zzz_ - if(size && opc==3 && HasSVE() && HasSME()) return fnmls_z_p_zzz(ctx, dec); // -> fnmls_z_p_zzz_ - if(!size && (opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_641_SVE_FP_3OP_P_ZDS_A); - UNMATCHED; -} - -int decode_iclass_sve_fp_3op_p_zds_b(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>13)&3; - if(!opc && HasSVE() && HasSME()) return fmad_z_p_zzz(ctx, dec); // -> fmad_z_p_zzz_ - if(opc==1 && HasSVE() && HasSME()) return fmsb_z_p_zzz(ctx, dec); // -> fmsb_z_p_zzz_ - if(opc==2 && HasSVE() && HasSME()) return fnmad_z_p_zzz(ctx, dec); // -> fnmad_z_p_zzz_ - if(opc==3 && HasSVE() && HasSME()) return fnmsb_z_p_zzz(ctx, dec); // -> fnmsb_z_p_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_fp_fma_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, o2=(INSWORD>>11)&1, op=(INSWORD>>10)&1; - if(size==2 && !o2 && !op && HasSVE() && HasSME()) return fmla_z_zzzi(ctx, dec); // -> fmla_z_zzzi_s - if(size==2 && !o2 && op && HasSVE() && HasSME()) return fmls_z_zzzi(ctx, dec); // -> fmls_z_zzzi_s - if(size==3 && !o2 && !op && HasSVE() && HasSME()) return fmla_z_zzzi(ctx, dec); // -> fmla_z_zzzi_d - if(size==3 && !o2 && op && HasSVE() && HasSME()) return fmls_z_zzzi(ctx, dec); // -> fmls_z_zzzi_d - if(!(size&2) && !o2 && !op && HasSVE() && HasSME()) return fmla_z_zzzi(ctx, dec); // -> fmla_z_zzzi_h - if(!(size&2) && !o2 && op && HasSVE() && HasSME()) return fmls_z_zzzi(ctx, dec); // -> fmls_z_zzzi_h - if(!(size&2) && o2 && !op && HasSVE_B16B16()) return bfmla_z_zzzi(ctx, dec); // -> bfmla_z_zzzi_h - if(!(size&2) && o2 && op && HasSVE_B16B16()) return bfmls_z_zzzi(ctx, dec); // -> bfmls_z_zzzi_h - if((size&2)==2 && o2) UNALLOCATED(ENC_UNALLOCATED_642_SVE_FP_FMA_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_zd_a(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE() && HasSME()) return frinta_z_p_z(ctx, dec); // -> frintn_z_p_z_m - if(opc==1 && HasSVE() && HasSME()) return frinta_z_p_z(ctx, dec); // -> frintp_z_p_z_m - if(opc==2 && HasSVE() && HasSME()) return frinta_z_p_z(ctx, dec); // -> frintm_z_p_z_m - if(opc==3 && HasSVE() && HasSME()) return frinta_z_p_z(ctx, dec); // -> frintz_z_p_z_m - if(opc==4 && HasSVE() && HasSME()) return frinta_z_p_z(ctx, dec); // -> frinta_z_p_z_m - if(opc==5) UNALLOCATED(ENC_UNALLOCATED_643_SVE_FP_2OP_P_ZD_A); - if(opc==6 && HasSVE() && HasSME()) return frinta_z_p_z(ctx, dec); // -> frintx_z_p_z_m - if(opc==7 && HasSVE() && HasSME()) return frinta_z_p_z(ctx, dec); // -> frinti_z_p_z_m - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_zd_b_0(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>16)&3; - if(!opc && opc2==2 && HasSVE2() && HasSME()) return fcvtx_z_p_z(ctx, dec); // -> fcvtx_z_p_z_d2s - if(opc==2 && !opc2 && HasSVE() && HasSME()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_s2h - if(opc==2 && opc2==1 && HasSVE() && HasSME()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_h2s - if(opc==2 && opc2==2 && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfcvt_z_p_z(ctx, dec); // -> bfcvt_z_p_z_s2bf - if(opc==3 && !opc2 && HasSVE() && HasSME()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_d2h - if(opc==3 && opc2==1 && HasSVE() && HasSME()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_h2d - if(opc==3 && opc2==2 && HasSVE() && HasSME()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_d2s - if(opc==3 && opc2==3 && HasSVE() && HasSME()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_s2d - if(!(opc&1) && opc2==3) UNALLOCATED(ENC_UNALLOCATED_646_SVE_FP_2OP_P_ZD_B_0); - if(!opc && !(opc2&2)) UNALLOCATED(ENC_UNALLOCATED_645_SVE_FP_2OP_P_ZD_B_0); - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_644_SVE_FP_2OP_P_ZD_B_0); - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_zd_b_1(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&3; - if(!opc && HasSVE() && HasSME()) return frecpx_z_p_z(ctx, dec); // -> frecpx_z_p_z_m - if(opc==1 && HasSVE() && HasSME()) return fsqrt_z_p_z(ctx, dec); // -> fsqrt_z_p_z_m - if((opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_647_SVE_FP_2OP_P_ZD_B_1); - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_zd_c(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>17)&3, U=(INSWORD>>16)&1; - if(opc==1 && opc2==1 && !U && HasSVE() && HasSME()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_h2fp16 - if(opc==1 && opc2==1 && U && HasSVE() && HasSME()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_h2fp16 - if(opc==1 && opc2==2 && !U && HasSVE() && HasSME()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_w2fp16 - if(opc==1 && opc2==2 && U && HasSVE() && HasSME()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_w2fp16 - if(opc==1 && opc2==3 && !U && HasSVE() && HasSME()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_x2fp16 - if(opc==1 && opc2==3 && U && HasSVE() && HasSME()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_x2fp16 - if(opc==2 && opc2==2 && !U && HasSVE() && HasSME()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_w2s - if(opc==2 && opc2==2 && U && HasSVE() && HasSME()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_w2s - if(opc==3 && !opc2 && !U && HasSVE() && HasSME()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_w2d - if(opc==3 && !opc2 && U && HasSVE() && HasSME()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_w2d - if(opc==3 && opc2==2 && !U && HasSVE() && HasSME()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_x2s - if(opc==3 && opc2==2 && U && HasSVE() && HasSME()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_x2s - if(opc==3 && opc2==3 && !U && HasSVE() && HasSME()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_x2d - if(opc==3 && opc2==3 && U && HasSVE() && HasSME()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_x2d - if(!opc && !(opc2&2) && !U && HasSVE2p2() && HasSME2p2()) return frint32z_z_p_z(ctx, dec); // -> frint32z_z_p_z_m - if(!opc && !(opc2&2) && U && HasSVE2p2() && HasSME2p2()) return frint32x_z_p_z(ctx, dec); // -> frint32x_z_p_z_m - if(!opc && (opc2&2)==2 && !U && HasSVE2p2() && HasSME2p2()) return frint64z_z_p_z(ctx, dec); // -> frint64z_z_p_z_m - if(!opc && (opc2&2)==2 && U && HasSVE2p2() && HasSME2p2()) return frint64x_z_p_z(ctx, dec); // -> frint64x_z_p_z_m - if(opc==1 && !opc2) UNALLOCATED(ENC_UNALLOCATED_649_SVE_FP_2OP_P_ZD_C); - if(opc==2 && opc2!=2) UNALLOCATED(ENC_UNALLOCATED_648_SVE_FP_2OP_P_ZD_C); - if(opc==3 && opc2==1) UNALLOCATED(ENC_UNALLOCATED_650_SVE_FP_2OP_P_ZD_C); - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_p_zd_d(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>17)&3, U=(INSWORD>>16)&1; - if(opc==1 && opc2==1 && !U && HasSVE() && HasSME()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_fp162h - if(opc==1 && opc2==1 && U && HasSVE() && HasSME()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_fp162h - if(opc==1 && opc2==2 && !U && HasSVE() && HasSME()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_fp162w - if(opc==1 && opc2==2 && U && HasSVE() && HasSME()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_fp162w - if(opc==1 && opc2==3 && !U && HasSVE() && HasSME()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_fp162x - if(opc==1 && opc2==3 && U && HasSVE() && HasSME()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_fp162x - if(opc==2 && opc2==2 && !U && HasSVE() && HasSME()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_s2w - if(opc==2 && opc2==2 && U && HasSVE() && HasSME()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_s2w - if(opc==3 && !opc2 && !U && HasSVE() && HasSME()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_d2w - if(opc==3 && !opc2 && U && HasSVE() && HasSME()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_d2w - if(opc==3 && opc2==2 && !U && HasSVE() && HasSME()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_s2x - if(opc==3 && opc2==2 && U && HasSVE() && HasSME()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_s2x - if(opc==3 && opc2==3 && !U && HasSVE() && HasSME()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_d2x - if(opc==3 && opc2==3 && U && HasSVE() && HasSME()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_d2x - if(opc==1 && !opc2) UNALLOCATED(ENC_UNALLOCATED_653_SVE_FP_2OP_P_ZD_D); - if(opc==2 && opc2!=2) UNALLOCATED(ENC_UNALLOCATED_652_SVE_FP_2OP_P_ZD_D); - if(opc==3 && opc2==1) UNALLOCATED(ENC_UNALLOCATED_654_SVE_FP_2OP_P_ZD_D); - if(!opc && !U && HasSVE2() && HasSME()) return flogb_z_p_z(ctx, dec); // -> flogb_z_p_z_m - if(!opc && U) UNALLOCATED(ENC_UNALLOCATED_651_SVE_FP_2OP_P_ZD_D); - UNMATCHED; -} - -int decode_iclass_sve_fp8_fcvt_wide(context *ctx, Instruction *dec) -{ - uint32_t L=(INSWORD>>16)&1, opc=(INSWORD>>10)&3; - if(!L && !opc && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return f1cvt_z_z8(ctx, dec); // -> f1cvt_z_z8_b2h - if(!L && opc==1 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return f1cvt_z_z8(ctx, dec); // -> f2cvt_z_z8_b2h - if(!L && opc==2 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return bf1cvt_z_z8(ctx, dec); // -> bf1cvt_z_z8_b2bf - if(!L && opc==3 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return bf1cvt_z_z8(ctx, dec); // -> bf2cvt_z_z8_b2bf - if(L && !opc && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return f1cvtlt_z_z8(ctx, dec); // -> f1cvtlt_z_z8_b2h - if(L && opc==1 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return f1cvtlt_z_z8(ctx, dec); // -> f2cvtlt_z_z8_b2h - if(L && opc==2 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return bf1cvtlt_z_z8(ctx, dec); // -> bf1cvtlt_z_z8_b2bf - if(L && opc==3 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return bf1cvtlt_z_z8(ctx, dec); // -> bf2cvtlt_z_z8_b2bf - UNMATCHED; -} - -int decode_iclass_sve_fp8_fcvt_narrow(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&3; - if(!opc && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return fcvtn_z8_mz2(ctx, dec); // -> fcvtn_z8_mz2_h2b - if(opc==1 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return fcvtnb_z8_mz2(ctx, dec); // -> fcvtnb_z8_mz2_s2b - if(opc==2 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return bfcvtn_z8_mz2(ctx, dec); // -> bfcvtn_z8_mz2_bf2b - if(opc==3 && HasSVE2() && HasFP8() && HasSME2() && HasFP8()) return fcvtnt_z8_mz2(ctx, dec); // -> fcvtnt_z8_mz2_s2b - UNMATCHED; -} - -int decode_iclass_sve_fp_ucvtf_wide(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>10)&3; - if(!opc && HasSVE2p3() && HasSME2p3()) return scvtf_z_z(ctx, dec); // -> scvtf_z_z_ - if(opc==1 && HasSVE2p3() && HasSME2p3()) return ucvtf_z_z(ctx, dec); // -> ucvtf_z_z_ - if(opc==2 && HasSVE2p3() && HasSME2p3()) return scvtflt_z_z(ctx, dec); // -> scvtflt_z_z_ - if(opc==3 && HasSVE2p3() && HasSME2p3()) return ucvtflt_z_z(ctx, dec); // -> ucvtflt_z_z_ - UNMATCHED; -} - -int decode_iclass_sve_fp_fcvtzu_narrow(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>10)&1; - if(!op && HasSVE2p3() && HasSME2p3()) return fcvtzsn_z_mz2(ctx, dec); // -> fcvtzsn_z_mz2_ - if(op && HasSVE2p3() && HasSME2p3()) return fcvtzun_z_mz2(ctx, dec); // -> fcvtzun_z_mz2_ - UNMATCHED; -} - -int decode_iclass_sve_fp_2op_u_zd(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>16)&1; - if(!op && HasSVE() && HasSME()) return frecpe_z_z(ctx, dec); // -> frecpe_z_z_ - if(op && HasSVE() && HasSME()) return frsqrte_z_z(ctx, dec); // -> frsqrte_z_z_ - UNMATCHED; -} - -int decode_iclass_sve_fp_fdot(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, o2=(INSWORD>>10)&1; - if(!op && !o2 && HasSME2() && HasSVE2p1()) return fdot_z_zzz(ctx, dec); // -> fdot_z_zzz_ - if(!op && o2 && HasSSVE_FP8DOT2() && HasSVE2() && HasFP8DOT2()) return fdot_z_zz8z8(ctx, dec); // -> fdot_z_zz8z8_ - if(op && !o2 && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfdot_z_zzz(ctx, dec); // -> bfdot_z_zzz_ - if(op && o2 && HasSSVE_FP8DOT4() && HasSVE2() && HasFP8DOT4()) return fdot_z32_zz8z8(ctx, dec); // -> fdot_z32_zz8z8_ - UNMATCHED; -} - -int decode_iclass_sve_fp_fma_long(context *ctx, Instruction *dec) -{ - uint32_t o2=(INSWORD>>22)&1, op=(INSWORD>>13)&1, T=(INSWORD>>10)&1; - if(!o2 && !op && !T && HasSVE2() && HasSME()) return fmlalb_z_zzz(ctx, dec); // -> fmlalb_z_zzz_ - if(!o2 && !op && T && HasSVE2() && HasSME()) return fmlalt_z_zzz(ctx, dec); // -> fmlalt_z_zzz_ - if(!o2 && op && !T && HasSVE2() && HasSME()) return fmlslb_z_zzz(ctx, dec); // -> fmlslb_z_zzz_ - if(!o2 && op && T && HasSVE2() && HasSME()) return fmlslt_z_zzz(ctx, dec); // -> fmlslt_z_zzz_ - if(o2 && !op && !T && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfmlalb_z_zzz(ctx, dec); // -> bfmlalb_z_zzz_ - if(o2 && !op && T && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfmlalt_z_zzz(ctx, dec); // -> bfmlalt_z_zzz_ - if(o2 && op && !T && HasSME2() && HasSVE2p1()) return bfmlslb_z_zzz(ctx, dec); // -> bfmlslb_z_zzz_ - if(o2 && op && T && HasSME2() && HasSVE2p1()) return bfmlslt_z_zzz(ctx, dec); // -> bfmlslt_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_fp_fdot_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1, opc2=(INSWORD>>10)&3; - if(!op && !opc2 && HasSME2() && HasSVE2p1()) return fdot_z_zzzi(ctx, dec); // -> fdot_z_zzzi_ - if(!op && opc2==2) UNALLOCATED(ENC_UNALLOCATED_656_SVE_FP_FDOT_BY_INDEXED_ELEM); - if(op && !opc2 && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfdot_z_zzzi(ctx, dec); // -> bfdot_z_zzzi_ - if(op && opc2==1 && HasSSVE_FP8DOT4() && HasSVE2() && HasFP8DOT4()) return fdot_z32_zz8z8i(ctx, dec); // -> fdot_z32_zz8z8i_ - if(!op && opc2&1 && HasSSVE_FP8DOT2() && HasSVE2() && HasFP8DOT2()) return fdot_z_zz8z8i(ctx, dec); // -> fdot_z_zz8z8i_ - if(op && (opc2&2)==2) UNALLOCATED(ENC_UNALLOCATED_655_SVE_FP_FDOT_BY_INDEXED_ELEM); - UNMATCHED; -} - -int decode_iclass_sve_fp_fma_long_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t o2=(INSWORD>>22)&1, op=(INSWORD>>13)&1, T=(INSWORD>>10)&1; - if(!o2 && !op && !T && HasSVE2() && HasSME()) return fmlalb_z_zzzi(ctx, dec); // -> fmlalb_z_zzzi_s - if(!o2 && !op && T && HasSVE2() && HasSME()) return fmlalt_z_zzzi(ctx, dec); // -> fmlalt_z_zzzi_s - if(!o2 && op && !T && HasSVE2() && HasSME()) return fmlslb_z_zzzi(ctx, dec); // -> fmlslb_z_zzzi_s - if(!o2 && op && T && HasSVE2() && HasSME()) return fmlslt_z_zzzi(ctx, dec); // -> fmlslt_z_zzzi_s - if(o2 && !op && !T && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfmlalb_z_zzzi(ctx, dec); // -> bfmlalb_z_zzzi_ - if(o2 && !op && T && HasSVE() && HasBF16() && HasSME() && HasBF16()) return bfmlalt_z_zzzi(ctx, dec); // -> bfmlalt_z_zzzi_ - if(o2 && op && !T && HasSME2() && HasSVE2p1()) return bfmlslb_z_zzzi(ctx, dec); // -> bfmlslb_z_zzzi_ - if(o2 && op && T && HasSME2() && HasSVE2p1()) return bfmlslt_z_zzzi(ctx, dec); // -> bfmlslt_z_zzzi_ - UNMATCHED; -} - -int decode_iclass_sve_intx_clamp(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>10)&1; - if(!U && HasSME() && HasSVE2p1()) return sclamp_z_zz(ctx, dec); // -> sclamp_z_zz_ - if(U && HasSME() && HasSVE2p1()) return uclamp_z_zz(ctx, dec); // -> uclamp_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_dot2(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>10)&1; - if(!U && HasSME2() && HasSVE2p1()) return sdot_z32_zzz(ctx, dec); // -> sdot_z32_zzz_ - if(U && HasSME2() && HasSVE2p1()) return udot_z32_zzz(ctx, dec); // -> udot_z32_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_dot2_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>10)&1; - if(!U && HasSME2() && HasSVE2p1()) return sdot_z32_zzzi(ctx, dec); // -> sdot_z32_zzzi_ - if(U && HasSME2() && HasSVE2p1()) return udot_z32_zzzi(ctx, dec); // -> udot_z32_zzzi_ - UNMATCHED; -} - -int decode_iclass_sve_intx_aba_long(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!U && !T && HasSVE2() && HasSME()) return sabalb_z_zzz(ctx, dec); // -> sabalb_z_zzz_ - if(!U && T && HasSVE2() && HasSME()) return sabalt_z_zzz(ctx, dec); // -> sabalt_z_zzz_ - if(U && !T && HasSVE2() && HasSME()) return uabalb_z_zzz(ctx, dec); // -> uabalb_z_zzz_ - if(U && T && HasSVE2() && HasSME()) return uabalt_z_zzz(ctx, dec); // -> uabalt_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_adc_long(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, T=(INSWORD>>10)&1; - if(!(size&2) && !T && HasSVE2() && HasSME()) return adclb_z_zzz(ctx, dec); // -> adclb_z_zzz_ - if(!(size&2) && T && HasSVE2() && HasSME()) return adclt_z_zzz(ctx, dec); // -> adclt_z_zzz_ - if((size&2)==2 && !T && HasSVE2() && HasSME()) return sbclb_z_zzz(ctx, dec); // -> sbclb_z_zzz_ - if((size&2)==2 && T && HasSVE2() && HasSME()) return sbclt_z_zzz(ctx, dec); // -> sbclt_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_cadd(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>16)&1; - if(!op && HasSVE2() && HasSME()) return cadd_z_zz(ctx, dec); // -> cadd_z_zz_ - if(op && HasSVE2() && HasSME()) return sqcadd_z_zz(ctx, dec); // -> sqcadd_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_sra(context *ctx, Instruction *dec) -{ - uint32_t R=(INSWORD>>11)&1, U=(INSWORD>>10)&1; - if(!R && !U && HasSVE2() && HasSME()) return ssra_z_zi(ctx, dec); // -> ssra_z_zi_ - if(!R && U && HasSVE2() && HasSME()) return usra_z_zi(ctx, dec); // -> usra_z_zi_ - if(R && !U && HasSVE2() && HasSME()) return srsra_z_zi(ctx, dec); // -> srsra_z_zi_ - if(R && U && HasSVE2() && HasSME()) return ursra_z_zi(ctx, dec); // -> ursra_z_zi_ - UNMATCHED; -} - -int decode_iclass_sve_intx_shift_insert(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>10)&1; - if(!op && HasSVE2() && HasSME()) return sri_z_zzi(ctx, dec); // -> sri_z_zzi_ - if(op && HasSVE2() && HasSME()) return sli_z_zzi(ctx, dec); // -> sli_z_zzi_ - UNMATCHED; -} - -int decode_iclass_sve_intx_aba(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>10)&1; - if(!U && HasSVE2() && HasSME()) return saba_z_zzz(ctx, dec); // -> saba_z_zzz_ - if(U && HasSVE2() && HasSME()) return uaba_z_zzz(ctx, dec); // -> uaba_z_zzz_ - UNMATCHED; -} - -int decode_iclass_sve_crypto_unary(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>10)&1; - if(!size && !op && HasSVE_AES()) return aesmc_z_z(ctx, dec); // -> aesmc_z_z_ - if(!size && op && HasSVE_AES()) return aesimc_z_z(ctx, dec); // -> aesimc_z_z_ - if(size) UNALLOCATED(ENC_UNALLOCATED_657_SVE_CRYPTO_UNARY); - UNMATCHED; -} - -int decode_iclass_sve_crypto_binary_dest(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>16)&1, o2=(INSWORD>>10)&1; - if(!size && !op && !o2 && HasSVE_AES()) return aese_z_zz(ctx, dec); // -> aese_z_zz_ - if(!size && !op && o2 && HasSVE_AES()) return aesd_z_zz(ctx, dec); // -> aesd_z_zz_ - if(!size && op && !o2 && HasSVE_SM4()) return sm4e_z_zz(ctx, dec); // -> sm4e_z_zz_ - if(!size && op && o2) UNALLOCATED(ENC_UNALLOCATED_659_SVE_CRYPTO_BINARY_DEST); - if(size) UNALLOCATED(ENC_UNALLOCATED_658_SVE_CRYPTO_BINARY_DEST); - UNMATCHED; -} - -int decode_iclass_sve_crypto_binary_multi2(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>16)&1, o2=(INSWORD>>10)&1, o3=INSWORD&1; - if(!size && !op && !o2 && !o3 && HasSVE_AES2()) return aese_mz_zzi(ctx, dec); // -> aese_mz_zzi_2x1 - if(!size && !op && o2 && !o3 && HasSVE_AES2()) return aesd_mz_zzi(ctx, dec); // -> aesd_mz_zzi_2x1 - if(!size && op && !o2 && !o3 && HasSVE_AES2()) return aesemc_mz_zzi(ctx, dec); // -> aesemc_mz_zzi_2x1 - if(!size && op && o2 && !o3 && HasSVE_AES2()) return aesdimc_mz_zzi(ctx, dec); // -> aesdimc_mz_zzi_2x1 - if(!size && o3) UNALLOCATED(ENC_UNALLOCATED_661_SVE_CRYPTO_BINARY_MULTI2); - if(size) UNALLOCATED(ENC_UNALLOCATED_660_SVE_CRYPTO_BINARY_MULTI2); - UNMATCHED; -} - -int decode_iclass_sve_crypto_binary_multi4(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>16)&1, o2=(INSWORD>>10)&1, opc3=INSWORD&3; - if(!size && !op && !o2 && !opc3 && HasSVE_AES2()) return aese_mz_zzi(ctx, dec); // -> aese_mz_zzi_4x1 - if(!size && !op && o2 && !opc3 && HasSVE_AES2()) return aesd_mz_zzi(ctx, dec); // -> aesd_mz_zzi_4x1 - if(!size && op && !o2 && !opc3 && HasSVE_AES2()) return aesemc_mz_zzi(ctx, dec); // -> aesemc_mz_zzi_4x1 - if(!size && op && o2 && !opc3 && HasSVE_AES2()) return aesdimc_mz_zzi(ctx, dec); // -> aesdimc_mz_zzi_4x1 - if(!size && opc3) UNALLOCATED(ENC_UNALLOCATED_663_SVE_CRYPTO_BINARY_MULTI4); - if(size) UNALLOCATED(ENC_UNALLOCATED_662_SVE_CRYPTO_BINARY_MULTI4); - UNMATCHED; -} - -int decode_iclass_sve_crypto_binary_const(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>10)&1; - if(!size && !op && HasSVE_SM4()) return sm4ekey_z_zz(ctx, dec); // -> sm4ekey_z_zz_ - if(!size && op && HasSVE_SHA3()) return rax1_z_zz(ctx, dec); // -> rax1_z_zz_ - if(size) UNALLOCATED(ENC_UNALLOCATED_664_SVE_CRYPTO_BINARY_CONST); - UNMATCHED; -} - -int decode_iclass_sve_crypto_pmull_multi(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSVE_AES2()) return pmull_mz_zzw(ctx, dec); // -> pmull_mz_zzw_1x2 - if(size) UNALLOCATED(ENC_UNALLOCATED_665_SVE_CRYPTO_PMULL_MULTI); - UNMATCHED; -} - -int decode_iclass_sve_crypto_pmlal_multi(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3; - if(!size && HasSVE_AES2()) return pmlal_mz_zzzw(ctx, dec); // -> pmlal_mz_zzzw_1x2 - if(size) UNALLOCATED(ENC_UNALLOCATED_666_SVE_CRYPTO_PMLAL_MULTI); - UNMATCHED; -} - -int decode_iclass_sve_fp8_fma_long_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t T=(INSWORD>>23)&1; - if(!T && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalb_z_z8z8z8i(ctx, dec); // -> fmlalb_z_z8z8z8i_ - if(T && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalt_z_z8z8z8i(ctx, dec); // -> fmlalt_z_z8z8z8i_ - UNMATCHED; -} - -int decode_iclass_sve_fp8_fma_long_long_by_indexed_elem(context *ctx, Instruction *dec) -{ - uint32_t TT=(INSWORD>>22)&3; - if(!TT && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlallbb_z32_z8z8z8i(ctx, dec); // -> fmlallbb_z32_z8z8z8i_ - if(TT==1 && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlallbt_z32_z8z8z8i(ctx, dec); // -> fmlallbt_z32_z8z8z8i_ - if(TT==2 && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalltb_z32_z8z8z8i(ctx, dec); // -> fmlalltb_z32_z8z8z8i_ - if(TT==3 && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalltt_z32_z8z8z8i(ctx, dec); // -> fmlalltt_z32_z8z8z8i_ - UNMATCHED; -} - -int decode_iclass_sve_fp8_fmmla(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1; - if(!op && HasSVE2() && HasF8F32MM()) return fmmla_z32_zz8z8(ctx, dec); // -> fmmla_z32_zz8z8_ - if(op && HasSVE2() && HasF8F16MM()) return fmmla_z16_zz8z8(ctx, dec); // -> fmmla_z16_zz8z8_ - UNMATCHED; -} - -int decode_iclass_sve_fp8_fma_long_long(context *ctx, Instruction *dec) -{ - uint32_t TT=(INSWORD>>12)&3; - if(!TT && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlallbb_z32_z8z8z8(ctx, dec); // -> fmlallbb_z32_z8z8z8_ - if(TT==1 && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlallbt_z32_z8z8z8(ctx, dec); // -> fmlallbt_z32_z8z8z8_ - if(TT==2 && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalltb_z32_z8z8z8(ctx, dec); // -> fmlalltb_z32_z8z8z8_ - if(TT==3 && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalltt_z32_z8z8z8(ctx, dec); // -> fmlalltt_z32_z8z8z8_ - UNMATCHED; -} - -int decode_iclass_sve_fp8_fma_long(context *ctx, Instruction *dec) -{ - uint32_t T=(INSWORD>>12)&1; - if(!T && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalb_z_z8z8z8(ctx, dec); // -> fmlalb_z_z8z8z8_ - if(T && HasSSVE_FP8FMA() && HasSVE2() && HasFP8FMA()) return fmlalt_z_z8z8z8(ctx, dec); // -> fmlalt_z_z8z8z8_ - UNMATCHED; -} - -int decode_iclass_sve_intx_histseg(context *ctx, Instruction *dec) -{ - return histseg_z_zz(ctx, dec); -} - -int decode_iclass_sve_intx_lut2_8(context *ctx, Instruction *dec) -{ - return luti2_z_zz(ctx, dec); -} - -int decode_iclass_sve_intx_lut2_16(context *ctx, Instruction *dec) -{ - return luti2_z_zz(ctx, dec); -} - -int decode_iclass_sve_intx_lut4_8(context *ctx, Instruction *dec) -{ - return luti4_z_zz(ctx, dec); -} - -int decode_iclass_sve_intx_lut4_16(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>11)&1; - if(!op && HasSVE2() && HasLUT() && HasSME2() && HasLUT()) return luti4_z_zz(ctx, dec); // -> luti4_z_zz_2x16 - if(op && HasSVE2() && HasLUT() && HasSME2() && HasLUT()) return luti4_z_zz(ctx, dec); // -> luti4_z_zz_1x16 - UNMATCHED; -} - -int decode_iclass_sve_intx_lut6_8(context *ctx, Instruction *dec) -{ - return luti6_z_zzz(ctx, dec); -} - -int decode_iclass_sve_intx_lut6_16(context *ctx, Instruction *dec) -{ - return luti6_z_z2zz(ctx, dec); -} - -int decode_iclass_sve_intx_bin_pred_shift_sat_round(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>19)&1, R=(INSWORD>>18)&1, N=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!Q && !R && N && !U && HasSVE2() && HasSME()) return srshl_z_p_zz(ctx, dec); // -> srshl_z_p_zz_ - if(!Q && !R && N && U && HasSVE2() && HasSME()) return urshl_z_p_zz(ctx, dec); // -> urshl_z_p_zz_ - if(!Q && R && N && !U && HasSVE2() && HasSME()) return srshlr_z_p_zz(ctx, dec); // -> srshlr_z_p_zz_ - if(!Q && R && N && U && HasSVE2() && HasSME()) return urshlr_z_p_zz(ctx, dec); // -> urshlr_z_p_zz_ - if(Q && !R && !N && !U && HasSVE2() && HasSME()) return sqshl_z_p_zz(ctx, dec); // -> sqshl_z_p_zz_ - if(Q && !R && !N && U && HasSVE2() && HasSME()) return uqshl_z_p_zz(ctx, dec); // -> uqshl_z_p_zz_ - if(Q && !R && N && !U && HasSVE2() && HasSME()) return sqrshl_z_p_zz(ctx, dec); // -> sqrshl_z_p_zz_ - if(Q && !R && N && U && HasSVE2() && HasSME()) return uqrshl_z_p_zz(ctx, dec); // -> uqrshl_z_p_zz_ - if(Q && R && !N && !U && HasSVE2() && HasSME()) return sqshlr_z_p_zz(ctx, dec); // -> sqshlr_z_p_zz_ - if(Q && R && !N && U && HasSVE2() && HasSME()) return uqshlr_z_p_zz(ctx, dec); // -> uqshlr_z_p_zz_ - if(Q && R && N && !U && HasSVE2() && HasSME()) return sqrshlr_z_p_zz(ctx, dec); // -> sqrshlr_z_p_zz_ - if(Q && R && N && U && HasSVE2() && HasSME()) return uqrshlr_z_p_zz(ctx, dec); // -> uqrshlr_z_p_zz_ - if(!Q && !N) UNALLOCATED(ENC_UNALLOCATED_667_SVE_INTX_BIN_PRED_SHIFT_SAT_ROUND); - UNMATCHED; -} - -int decode_iclass_sve_intx_pred_arith_unary(context *ctx, Instruction *dec) -{ - uint32_t Q=(INSWORD>>19)&1, Z=(INSWORD>>17)&1, op=(INSWORD>>16)&1; - if(!Q && !Z && !op && HasSVE2() && HasSME()) return urecpe_z_p_z(ctx, dec); // -> urecpe_z_p_z_m - if(!Q && !Z && op && HasSVE2() && HasSME()) return ursqrte_z_p_z(ctx, dec); // -> ursqrte_z_p_z_m - if(!Q && Z && !op && HasSVE2p2() && HasSME2p2()) return urecpe_z_p_z(ctx, dec); // -> urecpe_z_p_z_z - if(!Q && Z && op && HasSVE2p2() && HasSME2p2()) return ursqrte_z_p_z(ctx, dec); // -> ursqrte_z_p_z_z - if(Q && !Z && !op && HasSVE2() && HasSME()) return sqabs_z_p_z(ctx, dec); // -> sqabs_z_p_z_m - if(Q && !Z && op && HasSVE2() && HasSME()) return sqneg_z_p_z(ctx, dec); // -> sqneg_z_p_z_m - if(Q && Z && !op && HasSVE2p2() && HasSME2p2()) return sqabs_z_p_z(ctx, dec); // -> sqabs_z_p_z_z - if(Q && Z && op && HasSVE2p2() && HasSME2p2()) return sqneg_z_p_z(ctx, dec); // -> sqneg_z_p_z_z - UNMATCHED; -} - -int decode_iclass_sve_intx_accumulate_long_pairs(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>16)&1; - if(!U && HasSVE2() && HasSME()) return sadalp_z_p_z(ctx, dec); // -> sadalp_z_p_z_ - if(U && HasSVE2() && HasSME()) return uadalp_z_p_z(ctx, dec); // -> uadalp_z_p_z_ - UNMATCHED; -} - -int decode_iclass_sve_intx_pred_arith_binary(context *ctx, Instruction *dec) -{ - uint32_t R=(INSWORD>>18)&1, S=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!R && !S && !U && HasSVE2() && HasSME()) return shadd_z_p_zz(ctx, dec); // -> shadd_z_p_zz_ - if(!R && !S && U && HasSVE2() && HasSME()) return uhadd_z_p_zz(ctx, dec); // -> uhadd_z_p_zz_ - if(!R && S && !U && HasSVE2() && HasSME()) return shsub_z_p_zz(ctx, dec); // -> shsub_z_p_zz_ - if(!R && S && U && HasSVE2() && HasSME()) return uhsub_z_p_zz(ctx, dec); // -> uhsub_z_p_zz_ - if(R && !S && !U && HasSVE2() && HasSME()) return srhadd_z_p_zz(ctx, dec); // -> srhadd_z_p_zz_ - if(R && !S && U && HasSVE2() && HasSME()) return urhadd_z_p_zz(ctx, dec); // -> urhadd_z_p_zz_ - if(R && S && !U && HasSVE2() && HasSME()) return shsubr_z_p_zz(ctx, dec); // -> shsubr_z_p_zz_ - if(R && S && U && HasSVE2() && HasSME()) return uhsubr_z_p_zz(ctx, dec); // -> uhsubr_z_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_arith_binary_pairs(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>17)&3, U=(INSWORD>>16)&1; - if(!opc && !U && HasSVE2p3() && HasSME2p3()) return subp_z_p_zz(ctx, dec); // -> subp_z_p_zz_ - if(!opc && U && HasSVE2() && HasSME()) return addp_z_p_zz(ctx, dec); // -> addp_z_p_zz_ - if(opc==2 && !U && HasSVE2() && HasSME()) return smaxp_z_p_zz(ctx, dec); // -> smaxp_z_p_zz_ - if(opc==2 && U && HasSVE2() && HasSME()) return umaxp_z_p_zz(ctx, dec); // -> umaxp_z_p_zz_ - if(opc==3 && !U && HasSVE2() && HasSME()) return sminp_z_p_zz(ctx, dec); // -> sminp_z_p_zz_ - if(opc==3 && U && HasSVE2() && HasSME()) return uminp_z_p_zz(ctx, dec); // -> uminp_z_p_zz_ - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_668_SVE_INTX_ARITH_BINARY_PAIRS); - UNMATCHED; -} - -int decode_iclass_sve_intx_pred_arith_binary_sat(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>18)&1, S=(INSWORD>>17)&1, U=(INSWORD>>16)&1; - if(!op && !S && !U && HasSVE2() && HasSME()) return sqadd_z_p_zz(ctx, dec); // -> sqadd_z_p_zz_ - if(!op && !S && U && HasSVE2() && HasSME()) return uqadd_z_p_zz(ctx, dec); // -> uqadd_z_p_zz_ - if(!op && S && !U && HasSVE2() && HasSME()) return sqsub_z_p_zz(ctx, dec); // -> sqsub_z_p_zz_ - if(!op && S && U && HasSVE2() && HasSME()) return uqsub_z_p_zz(ctx, dec); // -> uqsub_z_p_zz_ - if(op && !S && !U && HasSVE2() && HasSME()) return suqadd_z_p_zz(ctx, dec); // -> suqadd_z_p_zz_ - if(op && !S && U && HasSVE2() && HasSME()) return usqadd_z_p_zz(ctx, dec); // -> usqadd_z_p_zz_ - if(op && S && !U && HasSVE2() && HasSME()) return sqsubr_z_p_zz(ctx, dec); // -> sqsubr_z_p_zz_ - if(op && S && U && HasSVE2() && HasSME()) return uqsubr_z_p_zz(ctx, dec); // -> uqsubr_z_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_mul_b(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, opc=(INSWORD>>10)&3; - if(!size && opc==1 && HasSVE2() && HasSME()) return pmul_z_zz(ctx, dec); // -> pmul_z_zz_ - if(size && opc==1) UNALLOCATED(ENC_UNALLOCATED_669_SVE_INT_MUL_B); - if(!opc && HasSVE2() && HasSME()) return mul_z_zz(ctx, dec); // -> mul_z_zz_ - if(opc==2 && HasSVE2() && HasSME()) return smulh_z_zz(ctx, dec); // -> smulh_z_zz_ - if(opc==3 && HasSVE2() && HasSME()) return umulh_z_zz(ctx, dec); // -> umulh_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_sqdmulh(context *ctx, Instruction *dec) -{ - uint32_t R=(INSWORD>>10)&1; - if(!R && HasSVE2() && HasSME()) return sqdmulh_z_zz(ctx, dec); // -> sqdmulh_z_zz_ - if(R && HasSVE2() && HasSME()) return sqrdmulh_z_zz(ctx, dec); // -> sqrdmulh_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_int_addqp(context *ctx, Instruction *dec) -{ - return addqp_z_zz(ctx, dec); -} - -int decode_iclass_sve_int_addsubp(context *ctx, Instruction *dec) -{ - return addsubp_z_zz(ctx, dec); -} - -int decode_iclass_sve_intx_shift_narrow(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>13)&1, U=(INSWORD>>12)&1, R=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!op && !U && !R && !T && HasSVE2() && HasSME()) return sqshrunb_z_zi(ctx, dec); // -> sqshrunb_z_zi_ - if(!op && !U && !R && T && HasSVE2() && HasSME()) return sqshrunt_z_zi(ctx, dec); // -> sqshrunt_z_zi_ - if(!op && !U && R && !T && HasSVE2() && HasSME()) return sqrshrunb_z_zi(ctx, dec); // -> sqrshrunb_z_zi_ - if(!op && !U && R && T && HasSVE2() && HasSME()) return sqrshrunt_z_zi(ctx, dec); // -> sqrshrunt_z_zi_ - if(!op && U && !R && !T && HasSVE2() && HasSME()) return shrnb_z_zi(ctx, dec); // -> shrnb_z_zi_ - if(!op && U && !R && T && HasSVE2() && HasSME()) return shrnt_z_zi(ctx, dec); // -> shrnt_z_zi_ - if(!op && U && R && !T && HasSVE2() && HasSME()) return rshrnb_z_zi(ctx, dec); // -> rshrnb_z_zi_ - if(!op && U && R && T && HasSVE2() && HasSME()) return rshrnt_z_zi(ctx, dec); // -> rshrnt_z_zi_ - if(op && !U && !R && !T && HasSVE2() && HasSME()) return sqshrnb_z_zi(ctx, dec); // -> sqshrnb_z_zi_ - if(op && !U && !R && T && HasSVE2() && HasSME()) return sqshrnt_z_zi(ctx, dec); // -> sqshrnt_z_zi_ - if(op && !U && R && !T && HasSVE2() && HasSME()) return sqrshrnb_z_zi(ctx, dec); // -> sqrshrnb_z_zi_ - if(op && !U && R && T && HasSVE2() && HasSME()) return sqrshrnt_z_zi(ctx, dec); // -> sqrshrnt_z_zi_ - if(op && U && !R && !T && HasSVE2() && HasSME()) return uqshrnb_z_zi(ctx, dec); // -> uqshrnb_z_zi_ - if(op && U && !R && T && HasSVE2() && HasSME()) return uqshrnt_z_zi(ctx, dec); // -> uqshrnt_z_zi_ - if(op && U && R && !T && HasSVE2() && HasSME()) return uqrshrnb_z_zi(ctx, dec); // -> uqrshrnb_z_zi_ - if(op && U && R && T && HasSVE2() && HasSME()) return uqrshrnt_z_zi(ctx, dec); // -> uqrshrnt_z_zi_ - UNMATCHED; -} - -int decode_iclass_sve_intx_multi_shift_narrow(context *ctx, Instruction *dec) -{ - uint32_t op0=(INSWORD>>22)&1, opc=(INSWORD>>16)&0x1f, op1=(INSWORD>>13)&1, U=(INSWORD>>12)&1, R=(INSWORD>>11)&1; - if(!op0 && (opc&0x18)==8 && !op1 && !U && R && HasSVE2p3() && HasSME2p3()) return sqrshrun_z_mz2(ctx, dec); // -> sqrshrun_z_mz2_b - if(!op0 && (opc&0x18)==8 && op1 && !U && R && HasSVE2p3() && HasSME2p3()) return sqrshrn_z_mz2(ctx, dec); // -> sqrshrn_z_mz2_b - if(!op0 && (opc&0x18)==8 && op1 && U && R && HasSVE2p3() && HasSME2p3()) return uqrshrn_z_mz2(ctx, dec); // -> uqrshrn_z_mz2_b - if(!op0 && (opc&0x18)==0x10 && !op1 && U && R) UNALLOCATED(ENC_UNALLOCATED_674_SVE_INTX_MULTI_SHIFT_NARROW); - if(!op0 && (opc&8)==8 && !op1 && U && R) UNALLOCATED(ENC_UNALLOCATED_673_SVE_INTX_MULTI_SHIFT_NARROW); - if(!op0 && (opc&0x10)==0x10 && !op1 && !U && R && HasSME2() && HasSVE2p1()) return sqrshrun_z_mz2(ctx, dec); // -> sqrshrun_z_mz2_ - if(!op0 && (opc&0x10)==0x10 && op1 && !U && R && HasSME2() && HasSVE2p1()) return sqrshrn_z_mz2(ctx, dec); // -> sqrshrn_z_mz2_ - if(!op0 && (opc&0x10)==0x10 && op1 && U && R && HasSME2() && HasSVE2p1()) return uqrshrn_z_mz2(ctx, dec); // -> uqrshrn_z_mz2_ - if(!op0 && !op1 && !U && !R && HasSVE2p3() && HasSME2p3()) return sqshrn_z_mz2(ctx, dec); // -> sqshrn_z_mz2_ - if(!op0 && !op1 && U && !R && HasSVE2p3() && HasSME2p3()) return uqshrn_z_mz2(ctx, dec); // -> uqshrn_z_mz2_ - if(!op0 && op1 && !U && !R && HasSVE2p3() && HasSME2p3()) return sqshrun_z_mz2(ctx, dec); // -> sqshrun_z_mz2_ - if(!op0 && op1 && U && !R) UNALLOCATED(ENC_UNALLOCATED_672_SVE_INTX_MULTI_SHIFT_NARROW); - if(!op0 && !(opc&0x18) && R) UNALLOCATED(ENC_UNALLOCATED_671_SVE_INTX_MULTI_SHIFT_NARROW); - if(op0) UNALLOCATED(ENC_UNALLOCATED_670_SVE_INTX_MULTI_SHIFT_NARROW); - UNMATCHED; -} - -int decode_iclass_sve_intx_extract_narrow(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>11)&3, T=(INSWORD>>10)&1; - if(!opc && !T && HasSVE2() && HasSME()) return sqxtnb_z_zz(ctx, dec); // -> sqxtnb_z_zz_ - if(!opc && T && HasSVE2() && HasSME()) return sqxtnt_z_zz(ctx, dec); // -> sqxtnt_z_zz_ - if(opc==1 && !T && HasSVE2() && HasSME()) return uqxtnb_z_zz(ctx, dec); // -> uqxtnb_z_zz_ - if(opc==1 && T && HasSVE2() && HasSME()) return uqxtnt_z_zz(ctx, dec); // -> uqxtnt_z_zz_ - if(opc==2 && !T && HasSVE2() && HasSME()) return sqxtunb_z_zz(ctx, dec); // -> sqxtunb_z_zz_ - if(opc==2 && T && HasSVE2() && HasSME()) return sqxtunt_z_zz(ctx, dec); // -> sqxtunt_z_zz_ - if(opc==3) UNALLOCATED(ENC_UNALLOCATED_675_SVE_INTX_EXTRACT_NARROW); - UNMATCHED; -} - -int decode_iclass_sve_intx_multi_extract_narrow(context *ctx, Instruction *dec) -{ - uint32_t tszh=(INSWORD>>22)&1, tszl=(INSWORD>>19)&3, opc=(INSWORD>>11)&3; - if(!tszh && tszl==2 && !opc && HasSME2() && HasSVE2p1()) return sqcvtn_z_mz2(ctx, dec); // -> sqcvtn_z_mz2_ - if(!tszh && tszl==2 && opc==1 && HasSME2() && HasSVE2p1()) return uqcvtn_z_mz2(ctx, dec); // -> uqcvtn_z_mz2_ - if(!tszh && tszl==2 && opc==2 && HasSME2() && HasSVE2p1()) return sqcvtun_z_mz2(ctx, dec); // -> sqcvtun_z_mz2_ - if(!tszh && tszl==2 && opc==3) UNALLOCATED(ENC_UNALLOCATED_678_SVE_INTX_MULTI_EXTRACT_NARROW); - if(!tszh && tszl!=2) UNALLOCATED(ENC_UNALLOCATED_677_SVE_INTX_MULTI_EXTRACT_NARROW); - if(tszh) UNALLOCATED(ENC_UNALLOCATED_676_SVE_INTX_MULTI_EXTRACT_NARROW); - UNMATCHED; -} - -int decode_iclass_sve_intx_arith_narrow(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>12)&1, R=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!S && !R && !T && HasSVE2() && HasSME()) return addhnb_z_zz(ctx, dec); // -> addhnb_z_zz_ - if(!S && !R && T && HasSVE2() && HasSME()) return addhnt_z_zz(ctx, dec); // -> addhnt_z_zz_ - if(!S && R && !T && HasSVE2() && HasSME()) return raddhnb_z_zz(ctx, dec); // -> raddhnb_z_zz_ - if(!S && R && T && HasSVE2() && HasSME()) return raddhnt_z_zz(ctx, dec); // -> raddhnt_z_zz_ - if(S && !R && !T && HasSVE2() && HasSME()) return subhnb_z_zz(ctx, dec); // -> subhnb_z_zz_ - if(S && !R && T && HasSVE2() && HasSME()) return subhnt_z_zz(ctx, dec); // -> subhnt_z_zz_ - if(S && R && !T && HasSVE2() && HasSME()) return rsubhnb_z_zz(ctx, dec); // -> rsubhnb_z_zz_ - if(S && R && T && HasSVE2() && HasSME()) return rsubhnt_z_zz(ctx, dec); // -> rsubhnt_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_match(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>4)&1; - if(!op && HasSVE2()) return match_p_p_zz(ctx, dec); // -> match_p_p_zz_ - if(op && HasSVE2()) return nmatch_p_p_zz(ctx, dec); // -> nmatch_p_p_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_cons_arith_long(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>13)&1, S=(INSWORD>>12)&1, U=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!op && !S && !U && !T && HasSVE2() && HasSME()) return saddlb_z_zz(ctx, dec); // -> saddlb_z_zz_ - if(!op && !S && !U && T && HasSVE2() && HasSME()) return saddlt_z_zz(ctx, dec); // -> saddlt_z_zz_ - if(!op && !S && U && !T && HasSVE2() && HasSME()) return uaddlb_z_zz(ctx, dec); // -> uaddlb_z_zz_ - if(!op && !S && U && T && HasSVE2() && HasSME()) return uaddlt_z_zz(ctx, dec); // -> uaddlt_z_zz_ - if(!op && S && !U && !T && HasSVE2() && HasSME()) return ssublb_z_zz(ctx, dec); // -> ssublb_z_zz_ - if(!op && S && !U && T && HasSVE2() && HasSME()) return ssublt_z_zz(ctx, dec); // -> ssublt_z_zz_ - if(!op && S && U && !T && HasSVE2() && HasSME()) return usublb_z_zz(ctx, dec); // -> usublb_z_zz_ - if(!op && S && U && T && HasSVE2() && HasSME()) return usublt_z_zz(ctx, dec); // -> usublt_z_zz_ - if(op && S && !U && !T && HasSVE2() && HasSME()) return sabdlb_z_zz(ctx, dec); // -> sabdlb_z_zz_ - if(op && S && !U && T && HasSVE2() && HasSME()) return sabdlt_z_zz(ctx, dec); // -> sabdlt_z_zz_ - if(op && S && U && !T && HasSVE2() && HasSME()) return uabdlb_z_zz(ctx, dec); // -> uabdlb_z_zz_ - if(op && S && U && T && HasSVE2() && HasSME()) return uabdlt_z_zz(ctx, dec); // -> uabdlt_z_zz_ - if(op && !S) UNALLOCATED(ENC_UNALLOCATED_679_SVE_INTX_CONS_ARITH_LONG); - UNMATCHED; -} - -int decode_iclass_sve_intx_cons_arith_wide(context *ctx, Instruction *dec) -{ - uint32_t S=(INSWORD>>12)&1, U=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!S && !U && !T && HasSVE2() && HasSME()) return saddwb_z_zz(ctx, dec); // -> saddwb_z_zz_ - if(!S && !U && T && HasSVE2() && HasSME()) return saddwt_z_zz(ctx, dec); // -> saddwt_z_zz_ - if(!S && U && !T && HasSVE2() && HasSME()) return uaddwb_z_zz(ctx, dec); // -> uaddwb_z_zz_ - if(!S && U && T && HasSVE2() && HasSME()) return uaddwt_z_zz(ctx, dec); // -> uaddwt_z_zz_ - if(S && !U && !T && HasSVE2() && HasSME()) return ssubwb_z_zz(ctx, dec); // -> ssubwb_z_zz_ - if(S && !U && T && HasSVE2() && HasSME()) return ssubwt_z_zz(ctx, dec); // -> ssubwt_z_zz_ - if(S && U && !T && HasSVE2() && HasSME()) return usubwb_z_zz(ctx, dec); // -> usubwb_z_zz_ - if(S && U && T && HasSVE2() && HasSME()) return usubwt_z_zz(ctx, dec); // -> usubwt_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_intx_cons_mul_long(context *ctx, Instruction *dec) -{ - uint32_t size=(INSWORD>>22)&3, op=(INSWORD>>12)&1, U=(INSWORD>>11)&1, T=(INSWORD>>10)&1; - if(!size && !op && U && !T && HasSVE_PMULL128()) return pmullb_z_zz(ctx, dec); // -> pmullb_z_zz_q - if(!size && !op && U && T && HasSVE_PMULL128()) return pmullt_z_zz(ctx, dec); // -> pmullt_z_zz_q - if(size && !op && U && !T && HasSVE2() && HasSME()) return pmullb_z_zz(ctx, dec); // -> pmullb_z_zz_ - if(size && !op && U && T && HasSVE2() && HasSME()) return pmullt_z_zz(ctx, dec); // -> pmullt_z_zz_ - if(!op && !U && !T && HasSVE2() && HasSME()) return sqdmullb_z_zz(ctx, dec); // -> sqdmullb_z_zz_ - if(!op && !U && T && HasSVE2() && HasSME()) return sqdmullt_z_zz(ctx, dec); // -> sqdmullt_z_zz_ - if(op && !U && !T && HasSVE2() && HasSME()) return smullb_z_zz(ctx, dec); // -> smullb_z_zz_ - if(op && !U && T && HasSVE2() && HasSME()) return smullt_z_zz(ctx, dec); // -> smullt_z_zz_ - if(op && U && !T && HasSVE2() && HasSME()) return umullb_z_zz(ctx, dec); // -> umullb_z_zz_ - if(op && U && T && HasSVE2() && HasSME()) return umullt_z_zz(ctx, dec); // -> umullt_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_abal(context *ctx, Instruction *dec) -{ - uint32_t U=(INSWORD>>11)&1; - if(!U && HasSVE2p3() && HasSME2p3()) return sabal_z_zzz(ctx, dec); // -> sabal_z_zz_ - if(U && HasSVE2p3() && HasSME2p3()) return uabal_z_zzz(ctx, dec); // -> uabal_z_zz_ - UNMATCHED; -} - -int decode_iclass_sve_fp_fmmla_nw(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>22)&1; - if(!op && HasSVE2p2() && HasF16MM()) return fmmla_z_zzz(ctx, dec); // -> fmmla_z_zzz_h - if(op && HasSVE_B16MM()) return bfmmla_z16_zzz(ctx, dec); // -> bfmmla_z_zzz_h - UNMATCHED; -} - -int decode_iclass_sve_fp_pairwise(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>16)&7; - if(!opc && HasSVE2() && HasSME()) return faddp_z_p_zz(ctx, dec); // -> faddp_z_p_zz_ - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_681_SVE_FP_PAIRWISE); - if(opc==4 && HasSVE2() && HasSME()) return fmaxnmp_z_p_zz(ctx, dec); // -> fmaxnmp_z_p_zz_ - if(opc==5 && HasSVE2() && HasSME()) return fminnmp_z_p_zz(ctx, dec); // -> fminnmp_z_p_zz_ - if(opc==6 && HasSVE2() && HasSME()) return fmaxp_z_p_zz(ctx, dec); // -> fmaxp_z_p_zz_ - if(opc==7 && HasSVE2() && HasSME()) return fminp_z_p_zz(ctx, dec); // -> fminp_z_p_zz_ - if((opc&6)==2) UNALLOCATED(ENC_UNALLOCATED_680_SVE_FP_PAIRWISE); - UNMATCHED; -} - -int decode_iclass_sve_fp_z2op_p_zd_a(context *ctx, Instruction *dec) -{ - uint32_t op=(INSWORD>>16)&1, opc2=(INSWORD>>13)&3; - if(!op && !opc2 && HasSVE2p2() && HasSME2p2()) return frinta_z_p_z(ctx, dec); // -> frintn_z_p_z_z - if(!op && opc2==1 && HasSVE2p2() && HasSME2p2()) return frinta_z_p_z(ctx, dec); // -> frintp_z_p_z_z - if(!op && opc2==2 && HasSVE2p2() && HasSME2p2()) return frinta_z_p_z(ctx, dec); // -> frintm_z_p_z_z - if(!op && opc2==3 && HasSVE2p2() && HasSME2p2()) return frinta_z_p_z(ctx, dec); // -> frintz_z_p_z_z - if(op && !opc2 && HasSVE2p2() && HasSME2p2()) return frinta_z_p_z(ctx, dec); // -> frinta_z_p_z_z - if(op && opc2==1) UNALLOCATED(ENC_UNALLOCATED_682_SVE_FP_Z2OP_P_ZD_A); - if(op && opc2==2 && HasSVE2p2() && HasSME2p2()) return frinta_z_p_z(ctx, dec); // -> frintx_z_p_z_z - if(op && opc2==3 && HasSVE2p2() && HasSME2p2()) return frinta_z_p_z(ctx, dec); // -> frinti_z_p_z_z - UNMATCHED; -} - -int decode_iclass_sve_fp_z2op_p_zd_b_0(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, opc2=(INSWORD>>13)&3; - if(!opc && opc2==2 && HasSVE2p2() && HasSME2p2()) return fcvtx_z_p_z(ctx, dec); // -> fcvtx_z_p_z_d2sz - if(opc==2 && !opc2 && HasSVE2p2() && HasSME2p2()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_s2hz - if(opc==2 && opc2==1 && HasSVE2p2() && HasSME2p2()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_h2sz - if(opc==2 && opc2==2 && HasSVE2p2() && HasSME2p2()) return bfcvt_z_p_z(ctx, dec); // -> bfcvt_z_p_z_s2bfz - if(opc==3 && !opc2 && HasSVE2p2() && HasSME2p2()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_d2hz - if(opc==3 && opc2==1 && HasSVE2p2() && HasSME2p2()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_h2dz - if(opc==3 && opc2==2 && HasSVE2p2() && HasSME2p2()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_d2sz - if(opc==3 && opc2==3 && HasSVE2p2() && HasSME2p2()) return fcvt_z_p_z(ctx, dec); // -> fcvt_z_p_z_s2dz - if(!(opc&1) && opc2==3) UNALLOCATED(ENC_UNALLOCATED_685_SVE_FP_Z2OP_P_ZD_B_0); - if(!opc && !(opc2&2)) UNALLOCATED(ENC_UNALLOCATED_684_SVE_FP_Z2OP_P_ZD_B_0); - if(opc==1) UNALLOCATED(ENC_UNALLOCATED_683_SVE_FP_Z2OP_P_ZD_B_0); - UNMATCHED; -} - -int decode_iclass_sve_fp_z2op_p_zd_b_1(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>13)&3; - if(!opc && HasSVE2p2() && HasSME2p2()) return frecpx_z_p_z(ctx, dec); // -> frecpx_z_p_z_z - if(opc==1 && HasSVE2p2() && HasSME2p2()) return fsqrt_z_p_z(ctx, dec); // -> fsqrt_z_p_z_z - if((opc&2)==2) UNALLOCATED(ENC_UNALLOCATED_686_SVE_FP_Z2OP_P_ZD_B_1); - UNMATCHED; -} - -int decode_iclass_sve_fp_z2op_p_zd_c(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, o2=(INSWORD>>16)&1, o3=(INSWORD>>14)&1, U=(INSWORD>>13)&1; - if(opc==1 && !o2 && o3 && !U && HasSVE2p2() && HasSME2p2()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_h2fp16z - if(opc==1 && !o2 && o3 && U && HasSVE2p2() && HasSME2p2()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_h2fp16z - if(opc==1 && o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_w2fp16z - if(opc==1 && o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_w2fp16z - if(opc==1 && o2 && o3 && !U && HasSVE2p2() && HasSME2p2()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_x2fp16z - if(opc==1 && o2 && o3 && U && HasSVE2p2() && HasSME2p2()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_x2fp16z - if(opc==2 && o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_w2sz - if(opc==2 && o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_w2sz - if(opc==3 && !o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_w2dz - if(opc==3 && !o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_w2dz - if(opc==3 && o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_x2sz - if(opc==3 && o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_x2sz - if(opc==3 && o2 && o3 && !U && HasSVE2p2() && HasSME2p2()) return scvtf_z_p_z(ctx, dec); // -> scvtf_z_p_z_x2dz - if(opc==3 && o2 && o3 && U && HasSVE2p2() && HasSME2p2()) return ucvtf_z_p_z(ctx, dec); // -> ucvtf_z_p_z_x2dz - if(!opc && !o2 && !U && HasSVE2p2() && HasSME2p2()) return frint32z_z_p_z(ctx, dec); // -> frint32z_z_p_z_z - if(!opc && !o2 && U && HasSVE2p2() && HasSME2p2()) return frint32x_z_p_z(ctx, dec); // -> frint32x_z_p_z_z - if(!opc && o2 && !U && HasSVE2p2() && HasSME2p2()) return frint64z_z_p_z(ctx, dec); // -> frint64z_z_p_z_z - if(!opc && o2 && U && HasSVE2p2() && HasSME2p2()) return frint64x_z_p_z(ctx, dec); // -> frint64x_z_p_z_z - if(opc==1 && !o2 && !o3) UNALLOCATED(ENC_UNALLOCATED_688_SVE_FP_Z2OP_P_ZD_C); - if(opc==2 && o2 && o3) UNALLOCATED(ENC_UNALLOCATED_689_SVE_FP_Z2OP_P_ZD_C); - if(opc==3 && !o2 && o3) UNALLOCATED(ENC_UNALLOCATED_690_SVE_FP_Z2OP_P_ZD_C); - if(opc==2 && !o2) UNALLOCATED(ENC_UNALLOCATED_687_SVE_FP_Z2OP_P_ZD_C); - UNMATCHED; -} - -int decode_iclass_sve_fp_z2op_p_zd_d(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, o2=(INSWORD>>16)&1, o3=(INSWORD>>14)&1, U=(INSWORD>>13)&1; - if(opc==1 && !o2 && o3 && !U && HasSVE2p2() && HasSME2p2()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_fp162hz - if(opc==1 && !o2 && o3 && U && HasSVE2p2() && HasSME2p2()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_fp162hz - if(opc==1 && o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_fp162wz - if(opc==1 && o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_fp162wz - if(opc==1 && o2 && o3 && !U && HasSVE2p2() && HasSME2p2()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_fp162xz - if(opc==1 && o2 && o3 && U && HasSVE2p2() && HasSME2p2()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_fp162xz - if(opc==2 && o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_s2wz - if(opc==2 && o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_s2wz - if(opc==3 && !o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_d2wz - if(opc==3 && !o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_d2wz - if(opc==3 && o2 && !o3 && !U && HasSVE2p2() && HasSME2p2()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_s2xz - if(opc==3 && o2 && !o3 && U && HasSVE2p2() && HasSME2p2()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_s2xz - if(opc==3 && o2 && o3 && !U && HasSVE2p2() && HasSME2p2()) return fcvtzs_z_p_z(ctx, dec); // -> fcvtzs_z_p_z_d2xz - if(opc==3 && o2 && o3 && U && HasSVE2p2() && HasSME2p2()) return fcvtzu_z_p_z(ctx, dec); // -> fcvtzu_z_p_z_d2xz - if(opc==1 && !o2 && !o3) UNALLOCATED(ENC_UNALLOCATED_693_SVE_FP_Z2OP_P_ZD_D); - if(opc==2 && o2 && o3) UNALLOCATED(ENC_UNALLOCATED_694_SVE_FP_Z2OP_P_ZD_D); - if(opc==3 && !o2 && o3) UNALLOCATED(ENC_UNALLOCATED_695_SVE_FP_Z2OP_P_ZD_D); - if(!opc && !o2 && HasSVE2p2() && HasSME2p2()) return flogb_z_p_z(ctx, dec); // -> flogb_z_p_z_z - if(!opc && o2) UNALLOCATED(ENC_UNALLOCATED_691_SVE_FP_Z2OP_P_ZD_D); - if(opc==2 && !o2) UNALLOCATED(ENC_UNALLOCATED_692_SVE_FP_Z2OP_P_ZD_D); - UNMATCHED; -} - -int decode_iclass_sve_intx_histcnt(context *ctx, Instruction *dec) -{ - return histcnt_z_p_zz(ctx, dec); -} - -int decode_iclass_sve_ptr_muladd_unpred(context *ctx, Instruction *dec) -{ - uint32_t opc=(INSWORD>>22)&3, o2=(INSWORD>>11)&1; - if(opc==3 && !o2 && HasSVE() && HasCPA()) return mlapt_z_zzz(ctx, dec); // -> mlapt_z_zzz_ - if(opc==3 && o2 && HasSVE() && HasCPA()) return madpt_z_zzz(ctx, dec); // -> madpt_z_zzz_ - if(opc!=3) UNALLOCATED(ENC_UNALLOCATED_696_SVE_PTR_MULADD_UNPRED); - UNMATCHED; -} - diff --git a/arch/arm64/disassembler/decode1.h b/arch/arm64/disassembler/decode1.h deleted file mode 100644 index ef26e69a3..000000000 --- a/arch/arm64/disassembler/decode1.h +++ /dev/null @@ -1,635 +0,0 @@ -/* GENERATED FILE */ -#pragma once -int decode_iclass_barriers(context *ctx, Instruction *dec); -int decode_iclass_compbranch(context *ctx, Instruction *dec); -int decode_iclass_compbranch_regs2(context *ctx, Instruction *dec); -int decode_iclass_compbranch_imm(context *ctx, Instruction *dec); -int decode_iclass_compbranch_regs(context *ctx, Instruction *dec); -int decode_iclass_condbranch(context *ctx, Instruction *dec); -int decode_iclass_exception(context *ctx, Instruction *dec); -int decode_iclass_hints(context *ctx, Instruction *dec); -int decode_iclass_miscbranch(context *ctx, Instruction *dec); -int decode_iclass_pstate(context *ctx, Instruction *dec); -int decode_iclass_systeminstrs(context *ctx, Instruction *dec); -int decode_iclass_systeminstrswithreg(context *ctx, Instruction *dec); -int decode_iclass_syspairinstrs(context *ctx, Instruction *dec); -int decode_iclass_systemmove(context *ctx, Instruction *dec); -int decode_iclass_systemmovepr(context *ctx, Instruction *dec); -int decode_iclass_testbranch(context *ctx, Instruction *dec); -int decode_iclass_branch_imm(context *ctx, Instruction *dec); -int decode_iclass_branch_reg(context *ctx, Instruction *dec); -int decode_iclass_memop_128(context *ctx, Instruction *dec); -int decode_iclass_asisdlse(context *ctx, Instruction *dec); -int decode_iclass_asisdlsep(context *ctx, Instruction *dec); -int decode_iclass_asisdlso(context *ctx, Instruction *dec); -int decode_iclass_asisdlsop(context *ctx, Instruction *dec); -int decode_iclass_memop(context *ctx, Instruction *dec); -int decode_iclass_memop_unpriv(context *ctx, Instruction *dec); -int decode_iclass_comswap(context *ctx, Instruction *dec); -int decode_iclass_comswap_unpriv(context *ctx, Instruction *dec); -int decode_iclass_comswappr(context *ctx, Instruction *dec); -int decode_iclass_comswappr_unpriv(context *ctx, Instruction *dec); -int decode_iclass_ldst_gcs(context *ctx, Instruction *dec); -int decode_iclass_loadlit(context *ctx, Instruction *dec); -int decode_iclass_ldstexclp(context *ctx, Instruction *dec); -int decode_iclass_ldstexclr(context *ctx, Instruction *dec); -int decode_iclass_ldstexclr_unpriv(context *ctx, Instruction *dec); -int decode_iclass_ldsttags(context *ctx, Instruction *dec); -int decode_iclass_ldstnapair_offs(context *ctx, Instruction *dec); -int decode_iclass_ldstord(context *ctx, Instruction *dec); -int decode_iclass_ldapstl_simd(context *ctx, Instruction *dec); -int decode_iclass_ldapstl_unscaled(context *ctx, Instruction *dec); -int decode_iclass_ldapstl_writeback(context *ctx, Instruction *dec); -int decode_iclass_ldiappstilp(context *ctx, Instruction *dec); -int decode_iclass_ldst_immpost(context *ctx, Instruction *dec); -int decode_iclass_ldst_immpre(context *ctx, Instruction *dec); -int decode_iclass_ldst_pac(context *ctx, Instruction *dec); -int decode_iclass_ldst_regoff(context *ctx, Instruction *dec); -int decode_iclass_ldst_unpriv(context *ctx, Instruction *dec); -int decode_iclass_ldst_unscaled(context *ctx, Instruction *dec); -int decode_iclass_ldst_pos(context *ctx, Instruction *dec); -int decode_iclass_ldstpair_off(context *ctx, Instruction *dec); -int decode_iclass_ldstpair_post(context *ctx, Instruction *dec); -int decode_iclass_ldstpair_pre(context *ctx, Instruction *dec); -int decode_iclass_memcms(context *ctx, Instruction *dec); -int decode_iclass_rcwcomswap(context *ctx, Instruction *dec); -int decode_iclass_rcwcomswappr(context *ctx, Instruction *dec); -int decode_iclass_addsub_imm(context *ctx, Instruction *dec); -int decode_iclass_addsub_immtags(context *ctx, Instruction *dec); -int decode_iclass_bitfield(context *ctx, Instruction *dec); -int decode_iclass_dp_1src_imm(context *ctx, Instruction *dec); -int decode_iclass_extract(context *ctx, Instruction *dec); -int decode_iclass_log_imm(context *ctx, Instruction *dec); -int decode_iclass_minmax_imm(context *ctx, Instruction *dec); -int decode_iclass_movewide(context *ctx, Instruction *dec); -int decode_iclass_pcreladdr(context *ctx, Instruction *dec); -int decode_iclass_addsub_pt(context *ctx, Instruction *dec); -int decode_iclass_addsub_ext(context *ctx, Instruction *dec); -int decode_iclass_addsub_shift(context *ctx, Instruction *dec); -int decode_iclass_addsub_carry(context *ctx, Instruction *dec); -int decode_iclass_condcmp_imm(context *ctx, Instruction *dec); -int decode_iclass_condcmp_reg(context *ctx, Instruction *dec); -int decode_iclass_condsel(context *ctx, Instruction *dec); -int decode_iclass_dp_1src(context *ctx, Instruction *dec); -int decode_iclass_dp_2src(context *ctx, Instruction *dec); -int decode_iclass_dp_3src(context *ctx, Instruction *dec); -int decode_iclass_setf(context *ctx, Instruction *dec); -int decode_iclass_log_shift(context *ctx, Instruction *dec); -int decode_iclass_rmif(context *ctx, Instruction *dec); -int decode_iclass_asimdall(context *ctx, Instruction *dec); -int decode_iclass_asimdins(context *ctx, Instruction *dec); -int decode_iclass_asimdext(context *ctx, Instruction *dec); -int decode_iclass_asimdimm(context *ctx, Instruction *dec); -int decode_iclass_asimdperm(context *ctx, Instruction *dec); -int decode_iclass_asisdone(context *ctx, Instruction *dec); -int decode_iclass_asisdpair(context *ctx, Instruction *dec); -int decode_iclass_asisdshf(context *ctx, Instruction *dec); -int decode_iclass_asisddiff(context *ctx, Instruction *dec); -int decode_iclass_asisdsame(context *ctx, Instruction *dec); -int decode_iclass_asisdsamefp16(context *ctx, Instruction *dec); -int decode_iclass_asisdsame2(context *ctx, Instruction *dec); -int decode_iclass_asisdmisc(context *ctx, Instruction *dec); -int decode_iclass_asisdmiscfp16(context *ctx, Instruction *dec); -int decode_iclass_asisdelem(context *ctx, Instruction *dec); -int decode_iclass_asimdshf(context *ctx, Instruction *dec); -int decode_iclass_asimdtbl(context *ctx, Instruction *dec); -int decode_iclass_asimddiff(context *ctx, Instruction *dec); -int decode_iclass_asimdsame(context *ctx, Instruction *dec); -int decode_iclass_asimdsamefp16(context *ctx, Instruction *dec); -int decode_iclass_asimdsame2(context *ctx, Instruction *dec); -int decode_iclass_asimdmisc(context *ctx, Instruction *dec); -int decode_iclass_asimdmiscfp16(context *ctx, Instruction *dec); -int decode_iclass_asimdelem(context *ctx, Instruction *dec); -int decode_iclass_float2fix(context *ctx, Instruction *dec); -int decode_iclass_float2int(context *ctx, Instruction *dec); -int decode_iclass_cryptoaes(context *ctx, Instruction *dec); -int decode_iclass_crypto4(context *ctx, Instruction *dec); -int decode_iclass_cryptosha3(context *ctx, Instruction *dec); -int decode_iclass_cryptosha512_3(context *ctx, Instruction *dec); -int decode_iclass_crypto3_imm2(context *ctx, Instruction *dec); -int decode_iclass_crypto3_imm6(context *ctx, Instruction *dec); -int decode_iclass_cryptosha2(context *ctx, Instruction *dec); -int decode_iclass_cryptosha512_2(context *ctx, Instruction *dec); -int decode_iclass_floatcmp(context *ctx, Instruction *dec); -int decode_iclass_floatccmp(context *ctx, Instruction *dec); -int decode_iclass_floatsel(context *ctx, Instruction *dec); -int decode_iclass_floatdp1(context *ctx, Instruction *dec); -int decode_iclass_floatdp2(context *ctx, Instruction *dec); -int decode_iclass_floatdp3(context *ctx, Instruction *dec); -int decode_iclass_floatimm(context *ctx, Instruction *dec); -int decode_iclass_perm_undef(context *ctx, Instruction *dec); -int decode_iclass_mortlach_addhv(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f32f32_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_b16f32_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f16f32_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f8f32_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i8i32_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i16i32_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_contig_load(context *ctx, Instruction *dec); -int decode_iclass_mortlach_contig_store(context *ctx, Instruction *dec); -int decode_iclass_mortlach_ctxt_ldst(context *ctx, Instruction *dec); -int decode_iclass_mortlach_zt_ldst(context *ctx, Instruction *dec); -int decode_iclass_mortlach_contig_qload(context *ctx, Instruction *dec); -int decode_iclass_mortlach_contig_qstore(context *ctx, Instruction *dec); -int decode_iclass_mortlach_extract_pred(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_extract_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_extract_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_za_extract_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_za_extract_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_extract_zero(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_extract_zero(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_extract_zero(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_za_extract_zero(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_za_extract_zero(context *ctx, Instruction *dec); -int decode_iclass_mortlach_insert_pred(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_insert_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_insert_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_za_insert_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_za_insert_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f64f64_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i16i64_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_zero(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_2dst_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_4dst_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_1dst(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_4dst2src_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_4dst3src_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_2dst_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_4dst_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_4dst2src_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_expand_4dst3src_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_extract_zt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_insert_zt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_move_to_zt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fmul_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fmul_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_mla_long_long_idx_s(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fp8_fma_long_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zza_idx_h(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fp8_fdot_idx_h(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zza_idx_s(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_mla_long_long_idx_d(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fma_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fp8_fma_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zza_idx_d(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_mla_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_mla_long_long_idx_s(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_fp8_fma_long_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_mla_long_long_idx_d(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_fma_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_fp8_fma_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_mla_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_mla_long_long_idx_s(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zza_idx_h(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zza_idx_s(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_mla_long_long_idx_d(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fp8_fma_long_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fma_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fp8_fma_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fp8_fvdot_idx_s(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zza_idx_d(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_mla_long_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fp8_fdot_idx(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_lut6_16_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_lut6_16_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cld_cldnt_ss_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cld_cldnt_ss_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cst_cstnt_ss_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cst_cstnt_ss_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cld_cldnt_si_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cld_cldnt_si_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cst_cstnt_si_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cst_cstnt_si_ctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cld_cldnt_ss_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cld_cldnt_ss_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cst_cstnt_ss_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cst_cstnt_ss_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cld_cldnt_si_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cld_cldnt_si_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_cst_cstnt_si_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_cst_cstnt_si_nctg(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_mla_long_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_fma_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_mla_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_fpdot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_f16_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_4way_dot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_mixed_dot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_2way_dot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_float_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_int_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_float_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_int_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_f16_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_mla_long_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_fma_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_mla_long_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_fpdot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_f16_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_4way_dot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_mixed_dot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_2way_dot_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_float_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_int_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_float_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_int_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_f16_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_minmax_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_fminmax_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_fscale_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_shift_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_minmax_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_fminmax_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_fscale_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_shift_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_sqdmulh_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_sqdmulh_mm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_mla_long_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_fp8_fma_long_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_zz_za_fp8_fma_long_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_fma_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_mla_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_zz_za_fp8_fma_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_fpdot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_4way_dot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_mixed_dot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_za_2way_dot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_float_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_int_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_zz_za_f16_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_mla_long_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_fp8_fma_long_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_zz_za_mla_long_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_fma_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_mla_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_zz_za_fma_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi1_zz_za_mla_long_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_fpdot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_4way_dot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_mixed_dot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_za_2way_dot_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_float_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_int_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_zz_za_f16_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_minmax_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_fminmax_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_fscale_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_shift_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_add_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_sqdmulh_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_minmax_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_fminmax_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_fscale_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_shift_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_add_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_sqdmulh_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fclamp(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_clamp_int(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fclamp(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_clamp_int(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_zip(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_z_z_long_zip(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_qrshr(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_qrshr(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_narrow_fp_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fpint_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_intfp_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_narrow_int_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_narrow_fp8_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_wide_int(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_wide_fp8_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_frint(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_wide_fp_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fpint_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_intfp_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_narrow_int_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_narrow_fp8_cvrt(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_wide_int(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_zip(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_z_z_long_zip(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_frint(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_select_int(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_select_int(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi_zero(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi2_fmul_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_multi4_fmul_sm(context *ctx, Instruction *dec); -int decode_iclass_mortlach_bini32_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f8f16_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f16f16_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_b16b16_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f32f32_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f8f32_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_b16f32_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f16f32_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i8i32_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f8f16_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f16f16_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_b16b16_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i16i32_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f64f64_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i16i64_prod4(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f32f32_1in2ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f8f32_2in4ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_b16f32_2in4ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f16f32_2in4ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i8i32_2in4ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f8f16_2in4ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_f16f16_1in2ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_b16b16_1in2ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_i16i32_2in4ss_prod(context *ctx, Instruction *dec); -int decode_iclass_mortlach_zero_zt(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_misc_0_a(context *ctx, Instruction *dec); -int decode_iclass_sve_int_log_imm(context *ctx, Instruction *dec); -int decode_iclass_sve_int_dup_mask_imm(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_log(context *ctx, Instruction *dec); -int decode_iclass_sve_int_rotate_imm(context *ctx, Instruction *dec); -int decode_iclass_sve_int_tern_log(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_shift_0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_shift_1(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_shift_2(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_shift_a(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_shift_b(context *ctx, Instruction *dec); -int decode_iclass_sve_int_countvlv0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_countvlv1(context *ctx, Instruction *dec); -int decode_iclass_sve_int_count(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pred_pattern_a(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pred_pattern_b(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_clamp(context *ctx, Instruction *dec); -int decode_iclass_sve_int_count_v_sat(context *ctx, Instruction *dec); -int decode_iclass_sve_int_count_v(context *ctx, Instruction *dec); -int decode_iclass_sve_int_count_r_sat(context *ctx, Instruction *dec); -int decode_iclass_sve_int_count_r(context *ctx, Instruction *dec); -int decode_iclass_sve_int_index_ii(context *ctx, Instruction *dec); -int decode_iclass_sve_int_index_ri(context *ctx, Instruction *dec); -int decode_iclass_sve_int_index_ir(context *ctx, Instruction *dec); -int decode_iclass_sve_int_index_rr(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_arit_0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_arit_0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_arit_1(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_arit_2(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_div(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_pred_log(context *ctx, Instruction *dec); -int decode_iclass_sve_int_while_rr(context *ctx, Instruction *dec); -int decode_iclass_sve_int_cterm(context *ctx, Instruction *dec); -int decode_iclass_sve_int_whilenc(context *ctx, Instruction *dec); -int decode_iclass_sve_int_scmp_vi(context *ctx, Instruction *dec); -int decode_iclass_sve_int_ucmp_vi(context *ctx, Instruction *dec); -int decode_iclass_sve_int_cmp_0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_cmp_1(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_misc_0_b(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_misc_0_c(context *ctx, Instruction *dec); -int decode_iclass_sve_int_bin_cons_misc_0_d(context *ctx, Instruction *dec); -int decode_iclass_sve_int_mlas_vvv_pred(context *ctx, Instruction *dec); -int decode_iclass_sve_int_mladdsub_vvv_pred(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_dot(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qdmlalbt(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cdot(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cmla(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mlal_long(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qdmlal_long(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qrdmlah(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mixed_dot(context *ctx, Instruction *dec); -int decode_iclass_sve_int_reduce_0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_reduce_0q(context *ctx, Instruction *dec); -int decode_iclass_sve_int_reduce_1(context *ctx, Instruction *dec); -int decode_iclass_sve_int_reduce_1q(context *ctx, Instruction *dec); -int decode_iclass_sve_int_movprfx_pred(context *ctx, Instruction *dec); -int decode_iclass_sve_int_reduce_2(context *ctx, Instruction *dec); -int decode_iclass_sve_int_reduce_2q(context *ctx, Instruction *dec); -int decode_iclass_sve_int_un_pred_arit_0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_un_pred_arit_1(context *ctx, Instruction *dec); -int decode_iclass_sve_int_dup_imm_pred(context *ctx, Instruction *dec); -int decode_iclass_sve_int_dup_fpimm_pred(context *ctx, Instruction *dec); -int decode_iclass_sve_int_arith_imm0(context *ctx, Instruction *dec); -int decode_iclass_sve_int_arith_imm1(context *ctx, Instruction *dec); -int decode_iclass_sve_int_arith_imm2(context *ctx, Instruction *dec); -int decode_iclass_sve_int_dup_imm(context *ctx, Instruction *dec); -int decode_iclass_sve_int_dup_fpimm(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_gld_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_prfm_sv(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_gld_sv_a(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_gld_sv_b(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_pfill(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_fill(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_prfm_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_gldnt_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_prfm_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_prfm_vi(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_32b_gld_vi(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_ld_dup(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_gld_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_prfm_sv(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_gld_sv(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_gldnt_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_prfm_vi(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_gldq_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_gld_vi(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_gld_vs2(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_prfm_sv2(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_64b_gld_sv2(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_ldqr_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_ldqr_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cld_si_q(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cld_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cldff_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cld_ss_q(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_eldq_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cld_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cldnf_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cldnt_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_eld_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cldnt_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_eld_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_eldq_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_estq_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_estq_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_pspill(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cst_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_spill(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cst_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cstnt_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_est_si(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_cstnt_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_est_ss(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sstnt_64b_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sstnt_32b_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sstq_64b_vs(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_vs2(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_sv2(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_vi_a(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_vi_b(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_vs_a(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_vs_b(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_sv_a(context *ctx, Instruction *dec); -int decode_iclass_sve_mem_sst_sv_b(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_clong(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_eorx(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mmla(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_shift_long(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_perm_bit(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_dot_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mla_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qrdmlah_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mixed_dot_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qdmla_long_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cdot_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cmla_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qrdcmla_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mla_long_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mul_long_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qdmul_long_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_qdmulh_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_mul_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_int_break(context *ctx, Instruction *dec); -int decode_iclass_sve_int_brkn(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_bin_perm_pp(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_punpk(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_reverse_p(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_extract_i(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_perm_extract_i(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_dup_i(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_bin_perm_zz(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_dupq_i(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_extq(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_cpy_v(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_compact(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_last_v(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_rev(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_clast_zz(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_clast_vz(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_splice(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_perm_splice(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_last_r(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_cpy_r(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_clast_rz(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_revd(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_expand(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_bin_long_perm_zz(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_tbxquads(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_tbl_3src(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_binquads(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_tbl(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_dup_r(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_insrs(context *ctx, Instruction *dec); -int decode_iclass_sve_int_mov_v2p(context *ctx, Instruction *dec); -int decode_iclass_sve_int_mov_p2v(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_unpk(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_insrv(context *ctx, Instruction *dec); -int decode_iclass_sve_int_perm_reverse_z(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pcount_pred(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pcount_pn(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pred_log(context *ctx, Instruction *dec); -int decode_iclass_sve_int_ptest(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pfirst(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pnext(context *ctx, Instruction *dec); -int decode_iclass_sve_int_ptrue(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pfalse(context *ctx, Instruction *dec); -int decode_iclass_sve_int_rdffr(context *ctx, Instruction *dec); -int decode_iclass_sve_int_rdffr_2(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pred_dup(context *ctx, Instruction *dec); -int decode_iclass_sve_int_brkp(context *ctx, Instruction *dec); -int decode_iclass_sve_int_while_rr_pn(context *ctx, Instruction *dec); -int decode_iclass_sve_int_while_rr_pair(context *ctx, Instruction *dec); -int decode_iclass_sve_int_ctr_to_mask(context *ctx, Instruction *dec); -int decode_iclass_sve_int_pn_ptrue(context *ctx, Instruction *dec); -int decode_iclass_sve_int_arith_vl(context *ctx, Instruction *dec); -int decode_iclass_sve_int_arith_svl(context *ctx, Instruction *dec); -int decode_iclass_sve_int_read_vl_a(context *ctx, Instruction *dec); -int decode_iclass_sve_int_read_svl_a(context *ctx, Instruction *dec); -int decode_iclass_sve_int_sel_vvv(context *ctx, Instruction *dec); -int decode_iclass_sve_int_wrffr(context *ctx, Instruction *dec); -int decode_iclass_sve_int_setffr(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_vd(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_zds(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_ftmad(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_i_p_zds(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_3op_u_zd(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_3op_p_pd(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_pd(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fcadd(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fcmla_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fcmla(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fcvt2z(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fcvt2(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fast_red(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fast_redq(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fmmla(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fmul_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_3op_p_zds_a(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_3op_p_zds_b(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fma_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_zd_a(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_zd_b_0(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_zd_b_1(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_zd_c(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_p_zd_d(context *ctx, Instruction *dec); -int decode_iclass_sve_fp8_fcvt_wide(context *ctx, Instruction *dec); -int decode_iclass_sve_fp8_fcvt_narrow(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_ucvtf_wide(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fcvtzu_narrow(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_2op_u_zd(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fdot(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fma_long(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fdot_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fma_long_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_clamp(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_dot2(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_dot2_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_aba_long(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_adc_long(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cadd(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_sra(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_shift_insert(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_aba(context *ctx, Instruction *dec); -int decode_iclass_sve_crypto_unary(context *ctx, Instruction *dec); -int decode_iclass_sve_crypto_binary_dest(context *ctx, Instruction *dec); -int decode_iclass_sve_crypto_binary_multi2(context *ctx, Instruction *dec); -int decode_iclass_sve_crypto_binary_multi4(context *ctx, Instruction *dec); -int decode_iclass_sve_crypto_binary_const(context *ctx, Instruction *dec); -int decode_iclass_sve_crypto_pmull_multi(context *ctx, Instruction *dec); -int decode_iclass_sve_crypto_pmlal_multi(context *ctx, Instruction *dec); -int decode_iclass_sve_fp8_fma_long_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_fp8_fma_long_long_by_indexed_elem(context *ctx, Instruction *dec); -int decode_iclass_sve_fp8_fmmla(context *ctx, Instruction *dec); -int decode_iclass_sve_fp8_fma_long_long(context *ctx, Instruction *dec); -int decode_iclass_sve_fp8_fma_long(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_histseg(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_lut2_8(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_lut2_16(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_lut4_8(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_lut4_16(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_lut6_8(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_lut6_16(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_bin_pred_shift_sat_round(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_pred_arith_unary(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_accumulate_long_pairs(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_pred_arith_binary(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_arith_binary_pairs(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_pred_arith_binary_sat(context *ctx, Instruction *dec); -int decode_iclass_sve_int_mul_b(context *ctx, Instruction *dec); -int decode_iclass_sve_int_sqdmulh(context *ctx, Instruction *dec); -int decode_iclass_sve_int_addqp(context *ctx, Instruction *dec); -int decode_iclass_sve_int_addsubp(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_shift_narrow(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_multi_shift_narrow(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_extract_narrow(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_multi_extract_narrow(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_arith_narrow(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_match(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cons_arith_long(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cons_arith_wide(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_cons_mul_long(context *ctx, Instruction *dec); -int decode_iclass_sve_abal(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_fmmla_nw(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_pairwise(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_z2op_p_zd_a(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_z2op_p_zd_b_0(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_z2op_p_zd_b_1(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_z2op_p_zd_c(context *ctx, Instruction *dec); -int decode_iclass_sve_fp_z2op_p_zd_d(context *ctx, Instruction *dec); -int decode_iclass_sve_intx_histcnt(context *ctx, Instruction *dec); -int decode_iclass_sve_ptr_muladd_unpred(context *ctx, Instruction *dec); diff --git a/arch/arm64/disassembler/decode2.c b/arch/arm64/disassembler/decode2.c deleted file mode 100644 index 556837f93..000000000 --- a/arch/arm64/disassembler/decode2.c +++ /dev/null @@ -1,72168 +0,0 @@ -/* GENERATED FILE */ -#include -#include -#include - -#include "decode.h" -#include "decode2.h" -#include "pcode.h" -#include "decode_fields32.h" - -/* abs.xml */ -int ABS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|opcode=001000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x5AC02000) { - decode_fields32(ENC_ABS_32_DP_1SRC, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->sf==0) OK(ENC_ABS_32_DP_1SRC); - if(ctx->sf==1) OK(ENC_ABS_64_DP_1SRC); - } - return rc; -} - -/* abs_advsimd.xml */ -int ABS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|10000|opcode=01011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EE0B800) { - decode_fields32(ENC_ABS_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_ABS_ASISDMISC_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=01011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE20B800) { - decode_fields32(ENC_ABS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_ABS_ASIMDMISC_R); - } - return rc; -} - -/* adc.xml */ -int ADC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=0|S=0|11010000|Rm=xxxxx|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1A000000) { - decode_fields32(ENC_ADC_32_ADDSUB_CARRY, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_ADC_32_ADDSUB_CARRY); - if(ctx->sf==1) OK(ENC_ADC_64_ADDSUB_CARRY); - } - return rc; -} - -/* adcs.xml */ -int ADCS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=0|S=1|11010000|Rm=xxxxx|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x3A000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ADCS_32_ADDSUB_CARRY, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_ADCS_32_ADDSUB_CARRY); - if(ctx->sf==1) OK(ENC_ADCS_64_ADDSUB_CARRY); - } - return rc; -} - -/* addg.xml */ -int ADDG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|op=0|S=0|100|0110|imm6=xxxxxx|op3=(0)(0)|imm4=xxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC00000)==0x91800000) { - decode_fields32(ENC_ADDG_64_ADDSUB_IMMTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->tag_offset = ctx->imm4; - ctx->offset = LSL(ZeroExtend(ctx->imm6,0x40),LOG2_TAG_GRANULE); - OK(ENC_ADDG_64_ADDSUB_IMMTAGS); - } - return rc; -} - -/* addhn_advsimd.xml */ -int ADDHN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|01|o1=0|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE204000) { - decode_fields32(ENC_ADDHN_ASIMDDIFF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->round = FALSE; - OK(ENC_ADDHN_ASIMDDIFF_N); - } - return rc; -} - -/* addpt.xml */ -int ADDPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|op=0|S=0|1|101|0000|Rm=xxxxx|001|imm3=xxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x9A002000) { - decode_fields32(ENC_ADDPT_64_ADDSUB_PT, ctx, instr); - if(!HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->shift = UINT(ctx->imm3); - OK(ENC_ADDPT_64_ADDSUB_PT); - } - return rc; -} - -/* addp_advsimd_pair.xml */ -int ADDP_advsimd_pair(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 01|U=0|1|111|0|size=11|11000|opcode=11011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF1B800) { - decode_fields32(ENC_ADDP_ASISDPAIR_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x40; - ctx->datasize = 0x80; - OK(ENC_ADDP_ASISDPAIR_ONLY); - } - return rc; -} - -/* addp_advsimd_vec.xml */ -int ADDP_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=10111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20BC00) { - decode_fields32(ENC_ADDP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_ADDP_ASIMDSAME_ONLY); - } - return rc; -} - -/* adds_addsub_ext.xml */ -int ADDS_addsub_ext(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=0|S=1|01011|opt=00|1|Rm=xxxxx|option=xxx|imm3=xxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00000)==0x2B200000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ADDS_32S_ADDSUB_EXT, ctx, instr); - if((ctx->imm3==5 || ctx->imm3==6 || ctx->imm3==7)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->shift = UINT(ctx->imm3); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->extend_type = DecodeRegExtend(ctx->option); - /* regular aliases */ - if(ctx->Rd==0x1f) return CMN_ADDS_addsub_ext(ctx, instr); - if(ctx->sf==0) OK(ENC_ADDS_32S_ADDSUB_EXT); - if(ctx->sf==1) OK(ENC_ADDS_64S_ADDSUB_EXT); - } - return rc; -} - -/* adds_addsub_imm.xml */ -int ADDS_addsub_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=0|S=1|100010|sh=x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x31000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ADDS_32S_ADDSUB_IMM, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = (ctx->sh==0)!=0 ? ((0<<12)|ctx->imm12) : ((ctx->imm12<<12)|0); - /* regular aliases */ - if(ctx->Rd==0x1f) return CMN_ADDS_addsub_imm(ctx, instr); - if(ctx->sf==0) OK(ENC_ADDS_32S_ADDSUB_IMM); - if(ctx->sf==1) OK(ENC_ADDS_64S_ADDSUB_IMM); - } - return rc; -} - -/* adds_addsub_shift.xml */ -int ADDS_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=0|S=1|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x2B000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ADDS_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->shift==3) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - /* regular aliases */ - if(ctx->Rd==0x1f) return CMN_ADDS_addsub_shift(ctx, instr); - if(ctx->sf==0) OK(ENC_ADDS_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_ADDS_64_ADDSUB_SHIFT); - } - return rc; -} - -/* addv_advsimd.xml */ -int ADDV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=xx|11000|opcode=11011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE31B800) { - decode_fields32(ENC_ADDV_ASIMDALL_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==4) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_ADDV_ASIMDALL_ONLY); - } - return rc; -} - -/* add_addsub_ext.xml */ -int ADD_addsub_ext(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=0|S=0|01011|opt=00|1|Rm=xxxxx|option=xxx|imm3=xxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00000)==0xB200000) { - decode_fields32(ENC_ADD_32_ADDSUB_EXT, ctx, instr); - if((ctx->imm3==5 || ctx->imm3==6 || ctx->imm3==7)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->shift = UINT(ctx->imm3); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->extend_type = DecodeRegExtend(ctx->option); - if(ctx->sf==0) OK(ENC_ADD_32_ADDSUB_EXT); - if(ctx->sf==1) OK(ENC_ADD_64_ADDSUB_EXT); - } - return rc; -} - -/* add_addsub_imm.xml */ -int ADD_addsub_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=0|S=0|100010|sh=x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x11000000) { - decode_fields32(ENC_ADD_32_ADDSUB_IMM, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = (ctx->sh==0)!=0 ? ((0<<12)|ctx->imm12) : ((ctx->imm12<<12)|0); - /* regular aliases */ - if(ctx->sh==0 && ctx->imm12==0 && (ctx->Rd==0x1f || ctx->Rn==0x1f)) return MOV_ADD_addsub_imm(ctx, instr); - if(ctx->sf==0) OK(ENC_ADD_32_ADDSUB_IMM); - if(ctx->sf==1) OK(ENC_ADD_64_ADDSUB_IMM); - } - return rc; -} - -/* add_addsub_shift.xml */ -int ADD_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=0|S=0|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0xB000000) { - decode_fields32(ENC_ADD_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->shift==3) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - if(ctx->sf==0) OK(ENC_ADD_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_ADD_64_ADDSUB_SHIFT); - } - return rc; -} - -/* add_advsimd.xml */ -int ADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|1|Rm=xxxxx|opcode=10000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5EE08400) { - decode_fields32(ENC_ADD_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_ADD_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=10000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE208400) { - decode_fields32(ENC_ADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_ADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* adr.xml */ -int ADR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_literal */ - /* op=0|immlo=xx|100|00|immhi=xxxxxxxxxxxxxxxxxxx|Rd=xxxxx */ - if((INSWORD & 0x9F000000)==0x10000000) { - decode_fields32(ENC_ADR_ONLY_PCRELADDR, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->imm = SignExtend(((ctx->immhi<<2)|ctx->immlo),21); - OK(ENC_ADR_ONLY_PCRELADDR); - } - return rc; -} - -/* adrp.xml */ -int ADRP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_literal */ - /* op=1|immlo=xx|100|00|immhi=xxxxxxxxxxxxxxxxxxx|Rd=xxxxx */ - if((INSWORD & 0x9F000000)==0x90000000) { - decode_fields32(ENC_ADRP_ONLY_PCRELADDR, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->imm = SignExtend(((ctx->immhi<<14)|(ctx->immlo<<12)|0),33); - OK(ENC_ADRP_ONLY_PCRELADDR); - } - return rc; -} - -/* aesd_advsimd.xml */ -int AESD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0100|111|0|size=00|10100|0010|D=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x4E285800) { - decode_fields32(ENC_AESD_B_CRYPTOAES, ctx, instr); - if(!HaveAES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_AESD_B_CRYPTOAES); - } - return rc; -} - -/* aese_advsimd.xml */ -int AESE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0100|111|0|size=00|10100|0010|D=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x4E284800) { - decode_fields32(ENC_AESE_B_CRYPTOAES, ctx, instr); - if(!HaveAES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_AESE_B_CRYPTOAES); - } - return rc; -} - -/* aesimc_advsimd.xml */ -int AESIMC_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0100|111|0|size=00|10100|0011|D=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x4E287800) { - decode_fields32(ENC_AESIMC_B_CRYPTOAES, ctx, instr); - if(!HaveAES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_AESIMC_B_CRYPTOAES); - } - return rc; -} - -/* aesmc_advsimd.xml */ -int AESMC_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0100|111|0|size=00|10100|0011|D=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x4E286800) { - decode_fields32(ENC_AESMC_B_CRYPTOAES, ctx, instr); - if(!HaveAES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_AESMC_B_CRYPTOAES); - } - return rc; -} - -/* ands_log_imm.xml */ -int ANDS_log_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|opc=11|100100|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x72000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ANDS_32S_LOG_IMM, ctx, instr); - if(ctx->sf==0 && ctx->N!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - DecodeBitMasksCheckUndefined(ctx->N,ctx->imms); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(ctx->N,ctx->imms,ctx->immr); - ctx->imm = dbmrt.wmask; - /* regular aliases */ - if(ctx->Rd==0x1f) return TST_ANDS_log_imm(ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_ANDS_32S_LOG_IMM); - if(ctx->sf==1) OK(ENC_ANDS_64S_LOG_IMM); - } - return rc; -} - -/* ands_log_shift.xml */ -int ANDS_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|opc=11|01010|shift=xx|N=0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x6A000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ANDS_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - /* regular aliases */ - if(ctx->Rd==0x1f) return TST_ANDS_log_shift(ctx, instr); - if(ctx->sf==0) OK(ENC_ANDS_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_ANDS_64_LOG_SHIFT); - } - return rc; -} - -/* and_advsimd.xml */ -int AND_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=00|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE201C00) { - decode_fields32(ENC_AND_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_AND_ASIMDSAME_ONLY); - } - return rc; -} - -/* and_log_imm.xml */ -int AND_log_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=00|100100|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x12000000) { - decode_fields32(ENC_AND_32_LOG_IMM, ctx, instr); - if(ctx->sf==0 && ctx->N!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - DecodeBitMasksCheckUndefined(ctx->N,ctx->imms); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(ctx->N,ctx->imms,ctx->immr); - ctx->imm = dbmrt.wmask; - if(ctx->sf==0 && ctx->N==0) OK(ENC_AND_32_LOG_IMM); - if(ctx->sf==1) OK(ENC_AND_64_LOG_IMM); - } - return rc; -} - -/* and_log_shift.xml */ -int AND_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=00|01010|shift=xx|N=0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0xA000000) { - decode_fields32(ENC_AND_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - if(ctx->sf==0) OK(ENC_AND_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_AND_64_LOG_SHIFT); - } - return rc; -} - -/* apas_sys.xml */ -int APAS_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=110|CRn=0111|CRm=0000|op2=000|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50E7000) { - decode_fields32(ENC_APAS_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_APAS_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* asrv.xml */ -int ASRV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02800) { - decode_fields32(ENC_ASRV_32_DP_2SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->op2); - /* unconditional alias */ - if(ASR_ASRV(ctx, instr)==0) return 0; - if(ctx->sf==0) OK(ENC_ASRV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_ASRV_64_DP_2SRC); - } - return rc; -} - -/* asr_asrv.xml */ -int ASR_ASRV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02800) { - decode_fields32(ENC_ASR_ASRV_32_DP_2SRC, ctx, instr); - if(ctx->sf==0) OK(ENC_ASR_ASRV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_ASR_ASRV_64_DP_2SRC); - } - return rc; -} - -/* asr_sbfm.xml */ -int ASR_SBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_sign_replication_to_left_and_zeros_to_right */ - /* sf=x|opc=00|100110|N=x|immr=xxxxxx|imms=x11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F807C00)==0x13007C00) { - decode_fields32(ENC_ASR_SBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0 && ctx->imms==0x1f) OK(ENC_ASR_SBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1 && ctx->imms==0x3f) OK(ENC_ASR_SBFM_64M_BITFIELD); - } - return rc; -} - -/* at_sys.xml */ -int AT_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=xxx|CRn=0111|CRm=100x|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF8FE00)==0xD5087800) { - decode_fields32(ENC_AT_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_AT_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* autda.xml */ -int AUTDA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|110|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC11800) { - decode_fields32(ENC_AUTDA_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Z==1 && ctx->Rn!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->auth_combined = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->source_is_sp = ctx->Z==0 && ctx->n==0x1f; - if(ctx->Z==0) OK(ENC_AUTDA_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_AUTDZA_64Z_DP_1SRC); - } - return rc; -} - -/* autdb.xml */ -int AUTDB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC11C00) { - decode_fields32(ENC_AUTDB_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Z==1 && ctx->Rn!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->auth_combined = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->source_is_sp = ctx->Z==0 && ctx->n==0x1f; - if(ctx->Z==0) OK(ENC_AUTDB_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_AUTDZB_64Z_DP_1SRC); - } - return rc; -} - -/* autia.xml */ -int AUTIA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|100|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC11000) { - decode_fields32(ENC_AUTIA_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Z==1 && ctx->Rn!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->autia1716 = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->auth_combined = FALSE; - ctx->source_is_sp = ctx->Z==0 && ctx->n==0x1f; - if(ctx->Z==0) OK(ENC_AUTIA_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_AUTIZA_64Z_DP_1SRC); - } - /* class iclass_system */ - /* 11010101000000110010|CRm=00x1|op2=10x|11111 */ - if((INSWORD & 0xFFFFFDDF)==0xD503219F) { - decode_fields32(ENC_AUTIA1716_HI_HINTS, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_NOP); - } - ctx->source_is_sp = FALSE; - ctx->autia1716 = FALSE; - ctx->auth_combined = FALSE; - if(((ctx->CRm<<3)|ctx->op2)==0x1c) { - ctx->d = 0x1e; - ctx->n = 0x1f; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x1d) { - ctx->d = 0x1e; - ctx->source_is_sp = TRUE; - } - else if(((ctx->CRm<<3)|ctx->op2)==12) { - ctx->d = 0x11; - ctx->n = 0x10; - ctx->autia1716 = TRUE; - } - if(ctx->CRm==1 && ctx->op2==4) OK(ENC_AUTIA1716_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==5) OK(ENC_AUTIASP_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==4) OK(ENC_AUTIAZ_HI_HINTS); - } - return rc; -} - -/* autia171615.xml */ -int AUTIA171615(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=101110|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC1BBFE) { - decode_fields32(ENC_AUTIA171615_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_AUTIA171615_64LR_DP_1SRC); - } - return rc; -} - -/* autiasppcr.xml */ -int AUTIASPPCR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=100100|Rn=xxxxx|Rd=11110 */ - if((INSWORD & 0xFFFFFC1F)==0xDAC1901E) { - decode_fields32(ENC_AUTIASPPCR_64LRR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - ctx->n = UINT(ctx->Rn); - ctx->auth_combined = FALSE; - OK(ENC_AUTIASPPCR_64LRR_DP_1SRC); - } - return rc; -} - -/* autiasppc_imm.xml */ -int AUTIASPPC_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|11|100|111|opc=00|imm16=xxxxxxxxxxxxxxxx|Rd=11111 */ - if((INSWORD & 0xFFE0001F)==0xF380001F) { - decode_fields32(ENC_AUTIASPPC_ONLY_DP_1SRC_IMM, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - ctx->offset = ZeroExtend((ctx->imm16<<2),0x40); - ctx->auth_combined = FALSE; - OK(ENC_AUTIASPPC_ONLY_DP_1SRC_IMM); - } - return rc; -} - -/* autib.xml */ -int AUTIB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|101|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC11400) { - decode_fields32(ENC_AUTIB_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Z==1 && ctx->Rn!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->autib1716 = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->auth_combined = FALSE; - ctx->source_is_sp = ctx->Z==0 && ctx->n==0x1f; - if(ctx->Z==0) OK(ENC_AUTIB_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_AUTIZB_64Z_DP_1SRC); - } - /* class iclass_system */ - /* 11010101000000110010|CRm=00x1|op2=11x|11111 */ - if((INSWORD & 0xFFFFFDDF)==0xD50321DF) { - decode_fields32(ENC_AUTIB1716_HI_HINTS, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_NOP); - } - ctx->source_is_sp = FALSE; - ctx->autib1716 = FALSE; - ctx->auth_combined = FALSE; - if(((ctx->CRm<<3)|ctx->op2)==0x1e) { - ctx->d = 0x1e; - ctx->n = 0x1f; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x1f) { - ctx->d = 0x1e; - ctx->source_is_sp = TRUE; - } - else if(((ctx->CRm<<3)|ctx->op2)==14) { - ctx->d = 0x11; - ctx->n = 0x10; - ctx->autib1716 = TRUE; - } - if(ctx->CRm==1 && ctx->op2==6) OK(ENC_AUTIB1716_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==7) OK(ENC_AUTIBSP_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==6) OK(ENC_AUTIBZ_HI_HINTS); - } - return rc; -} - -/* autib171615.xml */ -int AUTIB171615(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=101111|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC1BFFE) { - decode_fields32(ENC_AUTIB171615_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_AUTIB171615_64LR_DP_1SRC); - } - return rc; -} - -/* autibsppcr.xml */ -int AUTIBSPPCR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=100101|Rn=xxxxx|Rd=11110 */ - if((INSWORD & 0xFFFFFC1F)==0xDAC1941E) { - decode_fields32(ENC_AUTIBSPPCR_64LRR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - ctx->n = UINT(ctx->Rn); - ctx->auth_combined = FALSE; - OK(ENC_AUTIBSPPCR_64LRR_DP_1SRC); - } - return rc; -} - -/* autibsppc_imm.xml */ -int AUTIBSPPC_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|11|100|111|opc=01|imm16=xxxxxxxxxxxxxxxx|Rd=11111 */ - if((INSWORD & 0xFFE0001F)==0xF3A0001F) { - decode_fields32(ENC_AUTIBSPPC_ONLY_DP_1SRC_IMM, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - ctx->offset = ZeroExtend((ctx->imm16<<2),0x40); - ctx->auth_combined = FALSE; - OK(ENC_AUTIBSPPC_ONLY_DP_1SRC_IMM); - } - return rc; -} - -/* axflag.xml */ -int AXFLAG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100000|op1=000|0100|CRm=(0)(0)(0)(0)|op2=010|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD500405F) { - decode_fields32(ENC_AXFLAG_M_PSTATE, ctx, instr); - if(!HaveFlagM2()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_AXFLAG_M_PSTATE); - } - return rc; -} - -/* bcax_advsimd.xml */ -int BCAX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|Op0=01|Rm=xxxxx|0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0xCE200000) { - decode_fields32(ENC_BCAX_VVV16_CRYPTO4, ctx, instr); - if(!HaveSHA3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - OK(ENC_BCAX_VVV16_CRYPTO4); - } - return rc; -} - -/* bc_cond.xml */ -int BC_cond(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_19_bit_signed_pc_relative_branch_offset */ - /* 010|101|00|imm19=xxxxxxxxxxxxxxxxxxx|o0=1|cond=xxxx */ - if((INSWORD & 0xFF000010)==0x54000010) { - decode_fields32(ENC_BC_ONLY_CONDBRANCH, ctx, instr); - if(!HaveHBC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend((ctx->imm19<<2),21); - ctx->condition = ctx->cond; - OK(ENC_BC_ONLY_CONDBRANCH); - } - return rc; -} - -/* bf12cvtl_advsimd.xml */ -int BF12CVTL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=1|01110|size=1x|10000|opcode=10111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA17800) { - decode_fields32(ENC_BF1CVTL_ASIMDMISC_V, ctx, instr); - if(!HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->part = UINT(ctx->Q); - ctx->elements = ((8)!=0 ? ((0x40) / (8)) : 0); - ctx->issrc2 = ctx->size==3; - if(ctx->size==2) OK(ENC_BF1CVTL_ASIMDMISC_V); - if(ctx->size==3) OK(ENC_BF2CVTL_ASIMDMISC_V); - } - return rc; -} - -/* bfcvtn_advsimd.xml */ -int BFCVTN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector_single_precision_to_bfloat16 */ - /* 0|Q=x|U=0|0|111|0|size=10|10000|opcode=10110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEA16800) { - decode_fields32(ENC_BFCVTN_ASIMDMISC_4S, ctx, instr); - if(!HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->part = UINT(ctx->Q); - ctx->elements = ((0x10)!=0 ? ((0x40) / (0x10)) : 0); - OK(ENC_BFCVTN_ASIMDMISC_4S); - } - return rc; -} - -/* bfcvt_float.xml */ -int BFCVT_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_precision_to_bfloat16 */ - /* M=0|0|S=0|1|111|0|ftype=01|1|opcode=000110|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x1E634000) { - decode_fields32(ENC_BFCVT_BS_FLOATDP1, ctx, instr); - if(!HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_BFCVT_BS_FLOATDP1); - } - return rc; -} - -/* bfc_bfm.xml */ -int BFC_BFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_leaving_other_bits_unchanged */ - /* sf=x|opc=01|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7F8003E0)==0x330003E0) { - decode_fields32(ENC_BFC_BFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_BFC_BFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_BFC_BFM_64M_BITFIELD); - } - return rc; -} - -/* bfdot_advsimd_elt.xml */ -int BFDOT_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|1|size=01|L=x|M=x|Rm=xxxx|opcode=1111|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF40F000) { - decode_fields32(ENC_BFDOT_ASIMDELEM_E, ctx, instr); - if(!HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - ctx->d = UINT(ctx->Rd); - ctx->i = UINT(((ctx->H<<1)|ctx->L)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((0x20)!=0 ? ((ctx->datasize) / (0x20)) : 0); - OK(ENC_BFDOT_ASIMDELEM_E); - } - return rc; -} - -/* bfdot_advsimd_vec.xml */ -int BFDOT_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=1|0|111|0|size=01|0|Rm=xxxxx|1|opcode=1111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E40FC00) { - decode_fields32(ENC_BFDOT_ASIMDSAME2_D, ctx, instr); - if(!HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((0x20)!=0 ? ((ctx->datasize) / (0x20)) : 0); - OK(ENC_BFDOT_ASIMDSAME2_D); - } - return rc; -} - -/* bfi_bfm.xml */ -int BFI_BFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_leaving_other_bits_unchanged */ - /* sf=x|opc=01|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn!=11111|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x33000000 && (INSWORD & 0x3E0)!=0x3E0) { - decode_fields32(ENC_BFI_BFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_BFI_BFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_BFI_BFM_64M_BITFIELD); - } - return rc; -} - -/* bfm.xml */ -int BFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_leaving_other_bits_unchanged */ - /* sf=x|opc=01|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x33000000) { - decode_fields32(ENC_BFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==1 && ctx->N!=1) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && (ctx->N!=0 || SLICE(ctx->immr,5,5)!=0 || SLICE(ctx->imms,5,5)!=0)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->s = UINT(ctx->imms); - ctx->r = UINT(ctx->immr); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(ctx->N,ctx->imms,ctx->immr); - ctx->wmask = dbmrt.wmask; - ctx->tmask = dbmrt.tmask; - /* regular aliases */ - if(ctx->Rn==0x1f && UINT(ctx->imms)immr)) return BFC_BFM(ctx, instr); - if(ctx->Rn!=0x1f && UINT(ctx->imms)immr)) return BFI_BFM(ctx, instr); - if(UINT(ctx->imms) >= UINT(ctx->immr)) return BFXIL_BFM(ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_BFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_BFM_64M_BITFIELD); - } - return rc; -} - -/* bfmlal_advsimd_elt.xml */ -int BFMLAL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=11|L=x|M=x|Rm=xxxx|opcode=1111|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xFC0F000) { - decode_fields32(ENC_BFMLAL_ASIMDELEM_F, ctx, instr); - if(!HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Rd); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->elements = ((0x20)!=0 ? ((0x80) / (0x20)) : 0); - ctx->sel = UINT(ctx->Q); - OK(ENC_BFMLAL_ASIMDELEM_F); - } - return rc; -} - -/* bfmlal_advsimd_vec.xml */ -int BFMLAL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=11|0|Rm=xxxxx|1|opcode=1111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC0FC00) { - decode_fields32(ENC_BFMLAL_ASIMDSAME2_F_, ctx, instr); - if(!HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->elements = ((0x20)!=0 ? ((0x80) / (0x20)) : 0); - ctx->sel = UINT(ctx->Q); - OK(ENC_BFMLAL_ASIMDSAME2_F_); - } - return rc; -} - -/* bfmmla_advsimd.xml */ -int BFMMLA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|U=1|0|111|0|size=01|0|Rm=xxxxx|1|opcode=1101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6E40EC00) { - decode_fields32(ENC_BFMMLA_ASIMDSAME2_E, ctx, instr); - if(!HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_BFMMLA_ASIMDSAME2_E); - } - return rc; -} - -/* bfxil_bfm.xml */ -int BFXIL_BFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_leaving_other_bits_unchanged */ - /* sf=x|opc=01|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x33000000) { - decode_fields32(ENC_BFXIL_BFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_BFXIL_BFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_BFXIL_BFM_64M_BITFIELD); - } - return rc; -} - -/* bics.xml */ -int BICS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|opc=11|01010|shift=xx|N=1|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x6A200000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_BICS_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - if(ctx->sf==0) OK(ENC_BICS_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_BICS_64_LOG_SHIFT); - } - return rc; -} - -/* bic_advsimd_imm.xml */ -int BIC_advsimd_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_shifted_immediate */ - /* 0|Q=x|op=1|0111100000|a=x|b=x|c=x|cmode=xxx1|o2=0|1|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx */ - if((INSWORD & 0xBFF81C00)==0x2F001400) { - decode_fields32(ENC_BIC_ASIMDIMM_L_HL, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->rd = UINT(ctx->Rd); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->imm64 = AdvSIMDExpandImm(ctx->op,ctx->cmode,((ctx->a<<7)|(ctx->b<<6)|(ctx->c<<5)|(ctx->d<<4)|(ctx->e<<3)|(ctx->f<<2)|(ctx->g<<1)|ctx->h)); - ctx->imm = Replicate(ctx->imm64, ((0x40)!=0 ? ((ctx->datasize) / (0x40)) : 0), 64); - if((ctx->cmode&13)==9) OK(ENC_BIC_ASIMDIMM_L_HL); - if((ctx->cmode&9)==1) OK(ENC_BIC_ASIMDIMM_L_SL); - } - return rc; -} - -/* bic_advsimd_reg.xml */ -int BIC_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=01|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE601C00) { - decode_fields32(ENC_BIC_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_BIC_ASIMDSAME_ONLY); - } - return rc; -} - -/* bic_log_shift.xml */ -int BIC_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=00|01010|shift=xx|N=1|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0xA200000) { - decode_fields32(ENC_BIC_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - if(ctx->sf==0) OK(ENC_BIC_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_BIC_64_LOG_SHIFT); - } - return rc; -} - -/* bif_advsimd.xml */ -int BIF_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|opc2=11|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EE01C00) { - decode_fields32(ENC_BIF_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_BIF_ASIMDSAME_ONLY); - } - return rc; -} - -/* bit_advsimd.xml */ -int BIT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|opc2=10|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EA01C00) { - decode_fields32(ENC_BIT_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_BIT_ASIMDSAME_ONLY); - } - return rc; -} - -/* bl.xml */ -int BL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_26_bit_signed_pc_relative_branch_offset */ - /* op=1|00|101|imm26=xxxxxxxxxxxxxxxxxxxxxxxxxx */ - if((INSWORD & 0xFC000000)==0x94000000) { - decode_fields32(ENC_BL_ONLY_BRANCH_IMM, ctx, instr); - ctx->offset = SignExtend((ctx->imm26<<2),28); - ctx->d = 0x1e; - OK(ENC_BL_ONLY_BRANCH_IMM); - } - return rc; -} - -/* blr.xml */ -int BLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 110|101|1|Z=0|0|op=01|op2=11111|0000|A=0|M=0|Rn=xxxxx|Rm=00000 */ - if((INSWORD & 0xFFFFFC1F)==0xD63F0000) { - decode_fields32(ENC_BLR_64_BRANCH_REG, ctx, instr); - ctx->n = UINT(ctx->Rn); - OK(ENC_BLR_64_BRANCH_REG); - } - return rc; -} - -/* blra.xml */ -int BLRA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101011|Z=x|0|op=01|op2=11111|0000|A=1|M=x|Rn=xxxxx|Rm=xxxxx */ - if((INSWORD & 0xFEFFF800)==0xD63F0800) { - decode_fields32(ENC_BLRAA_64P_BRANCH_REG, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Z==0 && ctx->Rm!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->use_key_a = (ctx->M==0); - ctx->source_is_sp = ((ctx->Z==1) && (ctx->m==0x1f)); - ctx->auth_then_branch = TRUE; - if(ctx->Z==1 && ctx->M==0) OK(ENC_BLRAA_64P_BRANCH_REG); - if(ctx->Z==0 && ctx->M==0 && ctx->Rm==0x1f) OK(ENC_BLRAAZ_64_BRANCH_REG); - if(ctx->Z==1 && ctx->M==1) OK(ENC_BLRAB_64P_BRANCH_REG); - if(ctx->Z==0 && ctx->M==1 && ctx->Rm==0x1f) OK(ENC_BLRABZ_64_BRANCH_REG); - } - return rc; -} - -/* br.xml */ -int BR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 110|101|1|Z=0|0|op=00|op2=11111|0000|A=0|M=0|Rn=xxxxx|Rm=00000 */ - if((INSWORD & 0xFFFFFC1F)==0xD61F0000) { - decode_fields32(ENC_BR_64_BRANCH_REG, ctx, instr); - ctx->n = UINT(ctx->Rn); - OK(ENC_BR_64_BRANCH_REG); - } - return rc; -} - -/* bra.xml */ -int BRA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101011|Z=x|0|op=00|op2=11111|0000|A=1|M=x|Rn=xxxxx|Rm=xxxxx */ - if((INSWORD & 0xFEFFF800)==0xD61F0800) { - decode_fields32(ENC_BRAA_64P_BRANCH_REG, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Z==0 && ctx->Rm!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->use_key_a = (ctx->M==0); - ctx->source_is_sp = ((ctx->Z==1) && (ctx->m==0x1f)); - ctx->auth_then_branch = TRUE; - if(ctx->Z==1 && ctx->M==0) OK(ENC_BRAA_64P_BRANCH_REG); - if(ctx->Z==0 && ctx->M==0 && ctx->Rm==0x1f) OK(ENC_BRAAZ_64_BRANCH_REG); - if(ctx->Z==1 && ctx->M==1) OK(ENC_BRAB_64P_BRANCH_REG); - if(ctx->Z==0 && ctx->M==1 && ctx->Rm==0x1f) OK(ENC_BRABZ_64_BRANCH_REG); - } - return rc; -} - -/* brb_sys.xml */ -int BRB_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=001|CRn=0111|CRm=0010|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFF00)==0xD5097200) { - decode_fields32(ENC_BRB_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_BRB_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* brk.xml */ -int BRK(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=001|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=00 */ - if((INSWORD & 0xFFE0001F)==0xD4200000) { - decode_fields32(ENC_BRK_EX_EXCEPTION, ctx, instr); - ctx->comment = ctx->imm16; - if(HaveBTI()) { - SetBTypeCompatible(TRUE); - } - OK(ENC_BRK_EX_EXCEPTION); - } - return rc; -} - -/* bsl_advsimd.xml */ -int BSL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|opc2=01|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E601C00) { - decode_fields32(ENC_BSL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_BSL_ASIMDSAME_ONLY); - } - return rc; -} - -/* bti.xml */ -int BTI(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0100|op2=xx0|11111 */ - if((INSWORD & 0xFFFFFF3F)==0xD503241F) { - decode_fields32(ENC_BTI_HB_HINTS, ctx, instr); - if(!HaveBTI()) { - EndOfDecode(Decode_NOP); - } - SetBTypeCompatible(BTypeCompatible_BTI(SLICE(ctx->op2,2,1), ctx->pstate_btype)); - OK(ENC_BTI_HB_HINTS); - } - return rc; -} - -/* b_cond.xml */ -int B_cond(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_19_bit_signed_pc_relative_branch_offset */ - /* 010|101|00|imm19=xxxxxxxxxxxxxxxxxxx|o0=0|cond=xxxx */ - if((INSWORD & 0xFF000010)==0x54000000) { - decode_fields32(ENC_B_ONLY_CONDBRANCH, ctx, instr); - ctx->offset = SignExtend((ctx->imm19<<2),21); - ctx->condition = ctx->cond; - OK(ENC_B_ONLY_CONDBRANCH); - } - return rc; -} - -/* b_uncond.xml */ -int B_uncond(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_26_bit_signed_pc_relative_branch_offset */ - /* op=0|00|101|imm26=xxxxxxxxxxxxxxxxxxxxxxxxxx */ - if((INSWORD & 0xFC000000)==0x14000000) { - decode_fields32(ENC_B_ONLY_BRANCH_IMM, ctx, instr); - ctx->offset = SignExtend((ctx->imm26<<2),28); - OK(ENC_B_ONLY_BRANCH_IMM); - } - return rc; -} - -/* cas.xml */ -int CAS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010001|L=x|1|Rs=xxxxx|o0=x|Rt2=11111|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFA07C00)==0x88A07C00) { - decode_fields32(ENC_CAS_C32_COMSWAP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->L==1 && ctx->t!=0x1f; - ctx->release = ctx->o0==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2 && ctx->L==0 && ctx->o0==0) OK(ENC_CAS_C32_COMSWAP); - if(ctx->size==2 && ctx->L==1 && ctx->o0==0) OK(ENC_CASA_C32_COMSWAP); - if(ctx->size==2 && ctx->L==1 && ctx->o0==1) OK(ENC_CASAL_C32_COMSWAP); - if(ctx->size==2 && ctx->L==0 && ctx->o0==1) OK(ENC_CASL_C32_COMSWAP); - if(ctx->size==3 && ctx->L==0 && ctx->o0==0) OK(ENC_CAS_C64_COMSWAP); - if(ctx->size==3 && ctx->L==1 && ctx->o0==0) OK(ENC_CASA_C64_COMSWAP); - if(ctx->size==3 && ctx->L==1 && ctx->o0==1) OK(ENC_CASAL_C64_COMSWAP); - if(ctx->size==3 && ctx->L==0 && ctx->o0==1) OK(ENC_CASL_C64_COMSWAP); - } - return rc; -} - -/* casb.xml */ -int CASB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|0010001|L=x|1|Rs=xxxxx|o0=x|Rt2=11111|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA07C00)==0x8A07C00) { - decode_fields32(ENC_CASB_C32_COMSWAP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->L==1 && ctx->t!=0x1f; - ctx->release = ctx->o0==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->L==0 && ctx->o0==0) OK(ENC_CASB_C32_COMSWAP); - if(ctx->L==1 && ctx->o0==0) OK(ENC_CASAB_C32_COMSWAP); - if(ctx->L==1 && ctx->o0==1) OK(ENC_CASALB_C32_COMSWAP); - if(ctx->L==0 && ctx->o0==1) OK(ENC_CASLB_C32_COMSWAP); - } - return rc; -} - -/* cash.xml */ -int CASH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|0010001|L=x|1|Rs=xxxxx|o0=x|Rt2=11111|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA07C00)==0x48A07C00) { - decode_fields32(ENC_CASH_C32_COMSWAP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->L==1 && ctx->t!=0x1f; - ctx->release = ctx->o0==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->L==0 && ctx->o0==0) OK(ENC_CASH_C32_COMSWAP); - if(ctx->L==1 && ctx->o0==0) OK(ENC_CASAH_C32_COMSWAP); - if(ctx->L==1 && ctx->o0==1) OK(ENC_CASALH_C32_COMSWAP); - if(ctx->L==0 && ctx->o0==1) OK(ENC_CASLH_C32_COMSWAP); - } - return rc; -} - -/* casp.xml */ -int CASP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|sz=x|0010000|L=x|1|Rs=xxxxx|o0=x|Rt2=11111|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFA07C00)==0x8207C00) { - decode_fields32(ENC_CASP_CP32_COMSWAPPR, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rs,0,0)==1 || SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sz)); - ctx->acquire = ctx->L==1; - ctx->release = ctx->o0==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->sz==0 && ctx->L==0 && ctx->o0==0) OK(ENC_CASP_CP32_COMSWAPPR); - if(ctx->sz==0 && ctx->L==1 && ctx->o0==0) OK(ENC_CASPA_CP32_COMSWAPPR); - if(ctx->sz==0 && ctx->L==1 && ctx->o0==1) OK(ENC_CASPAL_CP32_COMSWAPPR); - if(ctx->sz==0 && ctx->L==0 && ctx->o0==1) OK(ENC_CASPL_CP32_COMSWAPPR); - if(ctx->sz==1 && ctx->L==0 && ctx->o0==0) OK(ENC_CASP_CP64_COMSWAPPR); - if(ctx->sz==1 && ctx->L==1 && ctx->o0==0) OK(ENC_CASPA_CP64_COMSWAPPR); - if(ctx->sz==1 && ctx->L==1 && ctx->o0==1) OK(ENC_CASPAL_CP64_COMSWAPPR); - if(ctx->sz==1 && ctx->L==0 && ctx->o0==1) OK(ENC_CASPL_CP64_COMSWAPPR); - } - return rc; -} - -/* caspt.xml */ -int CASPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|sz=1|0010011|L=x|0|Rs=xxxxx|o0=x|Rt2=11111|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA07C00)==0x49807C00) { - decode_fields32(ENC_CASPT_CP64_COMSWAPPR_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rs,0,0)==1 || SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x40; - ctx->acquire = ctx->L==1; - ctx->release = ctx->o0==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->L==0 && ctx->o0==0) OK(ENC_CASPT_CP64_COMSWAPPR_UNPRIV); - if(ctx->L==1 && ctx->o0==0) OK(ENC_CASPAT_CP64_COMSWAPPR_UNPRIV); - if(ctx->L==1 && ctx->o0==1) OK(ENC_CASPALT_CP64_COMSWAPPR_UNPRIV); - if(ctx->L==0 && ctx->o0==1) OK(ENC_CASPLT_CP64_COMSWAPPR_UNPRIV); - } - return rc; -} - -/* cast.xml */ -int CAST(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=1|0010011|L=x|0|Rs=xxxxx|o0=x|Rt2=11111|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA07C00)==0xC9807C00) { - decode_fields32(ENC_CAST_C64_COMSWAP_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->L==1 && ctx->t!=0x1f; - ctx->release = ctx->o0==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->L==0 && ctx->o0==0) OK(ENC_CAST_C64_COMSWAP_UNPRIV); - if(ctx->L==1 && ctx->o0==0) OK(ENC_CASAT_C64_COMSWAP_UNPRIV); - if(ctx->L==1 && ctx->o0==1) OK(ENC_CASALT_C64_COMSWAP_UNPRIV); - if(ctx->L==0 && ctx->o0==1) OK(ENC_CASLT_C64_COMSWAP_UNPRIV); - } - return rc; -} - -/* cbble_regs.xml */ -int CBBLE_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=001|Rm=xxxxx|1|H=0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x74208000) { - decode_fields32(ENC_CBBLE_CBBGE_8_REGS, ctx, instr); - OK(ENC_CBBLE_CBBGE_8_REGS); - } - return rc; -} - -/* cbblo_regs.xml */ -int CBBLO_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=010|Rm=xxxxx|1|H=0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x74408000) { - decode_fields32(ENC_CBBLO_CBBHI_8_REGS, ctx, instr); - OK(ENC_CBBLO_CBBHI_8_REGS); - } - return rc; -} - -/* cbbls_regs.xml */ -int CBBLS_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=011|Rm=xxxxx|1|H=0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x74608000) { - decode_fields32(ENC_CBBLS_CBBHS_8_REGS, ctx, instr); - OK(ENC_CBBLS_CBBHS_8_REGS); - } - return rc; -} - -/* cbblt_regs.xml */ -int CBBLT_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=000|Rm=xxxxx|1|H=0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x74008000) { - decode_fields32(ENC_CBBLT_CBBGT_8_REGS, ctx, instr); - OK(ENC_CBBLT_CBBGT_8_REGS); - } - return rc; -} - -/* cbbcc_regs.xml */ -int CBBcc_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 01110100|cc=xxx|Rm=xxxxx|1|H=0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF00C000)==0x74008000) { - decode_fields32(ENC_CBBGT_8_REGS, ctx, instr); - if(!HaveCMPBR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->datasize = (8) << (UINT(ctx->H)); - ctx->t = UINT(ctx->Rt); - ctx->m = UINT(ctx->Rm); - ctx->offset = SignExtend((ctx->imm9<<2),11); - if(!ctx->cc) { - ctx->op = Cmp_GT; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==1) { - ctx->op = Cmp_GE; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==2) { - ctx->op = Cmp_GT; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==3) { - ctx->op = Cmp_GE; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==6) { - ctx->op = Cmp_EQ; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==7) { - ctx->op = Cmp_NE; - ctx->unsigned_ = TRUE; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->cc==0) OK(ENC_CBBGT_8_REGS); - if(ctx->cc==1) OK(ENC_CBBGE_8_REGS); - if(ctx->cc==2) OK(ENC_CBBHI_8_REGS); - if(ctx->cc==3) OK(ENC_CBBHS_8_REGS); - if(ctx->cc==6) OK(ENC_CBBEQ_8_REGS); - if(ctx->cc==7) OK(ENC_CBBNE_8_REGS); - } - return rc; -} - -/* cbge_imm.xml */ -int CBGE_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110101|cc=000|imm6=xxxxxx|0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE04000)==0x75000000) { - decode_fields32(ENC_CBGE_CBGT_32_IMM, ctx, instr); - if(ctx->sf==0) OK(ENC_CBGE_CBGT_32_IMM); - if(ctx->sf==1) OK(ENC_CBGE_CBGT_64_IMM); - } - return rc; -} - -/* cbhle_regs.xml */ -int CBHLE_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=001|Rm=xxxxx|1|H=1|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x7420C000) { - decode_fields32(ENC_CBHLE_CBHGE_16_REGS, ctx, instr); - OK(ENC_CBHLE_CBHGE_16_REGS); - } - return rc; -} - -/* cbhlo_regs.xml */ -int CBHLO_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=010|Rm=xxxxx|1|H=1|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x7440C000) { - decode_fields32(ENC_CBHLO_CBHHI_16_REGS, ctx, instr); - OK(ENC_CBHLO_CBHHI_16_REGS); - } - return rc; -} - -/* cbhls_regs.xml */ -int CBHLS_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=011|Rm=xxxxx|1|H=1|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x7460C000) { - decode_fields32(ENC_CBHLS_CBHHS_16_REGS, ctx, instr); - OK(ENC_CBHLS_CBHHS_16_REGS); - } - return rc; -} - -/* cbhlt_regs.xml */ -int CBHLT_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 011|101|00|cc=000|Rm=xxxxx|1|H=1|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0C000)==0x7400C000) { - decode_fields32(ENC_CBHLT_CBHGT_16_REGS, ctx, instr); - OK(ENC_CBHLT_CBHGT_16_REGS); - } - return rc; -} - -/* cbhs_imm.xml */ -int CBHS_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110101|cc=010|imm6=xxxxxx|0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE04000)==0x75400000) { - decode_fields32(ENC_CBHS_CBHI_32_IMM, ctx, instr); - if(ctx->sf==0) OK(ENC_CBHS_CBHI_32_IMM); - if(ctx->sf==1) OK(ENC_CBHS_CBHI_64_IMM); - } - return rc; -} - -/* cbhcc_regs.xml */ -int CBHcc_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* 01110100|cc=xxx|Rm=xxxxx|1|H=1|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF00C000)==0x7400C000) { - decode_fields32(ENC_CBHGT_16_REGS, ctx, instr); - if(!HaveCMPBR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->datasize = (8) << (UINT(ctx->H)); - ctx->t = UINT(ctx->Rt); - ctx->m = UINT(ctx->Rm); - ctx->offset = SignExtend((ctx->imm9<<2),11); - if(!ctx->cc) { - ctx->op = Cmp_GT; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==1) { - ctx->op = Cmp_GE; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==2) { - ctx->op = Cmp_GT; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==3) { - ctx->op = Cmp_GE; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==6) { - ctx->op = Cmp_EQ; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==7) { - ctx->op = Cmp_NE; - ctx->unsigned_ = TRUE; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->cc==0) OK(ENC_CBHGT_16_REGS); - if(ctx->cc==1) OK(ENC_CBHGE_16_REGS); - if(ctx->cc==2) OK(ENC_CBHHI_16_REGS); - if(ctx->cc==3) OK(ENC_CBHHS_16_REGS); - if(ctx->cc==6) OK(ENC_CBHEQ_16_REGS); - if(ctx->cc==7) OK(ENC_CBHNE_16_REGS); - } - return rc; -} - -/* cble_imm.xml */ -int CBLE_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110101|cc=001|imm6=xxxxxx|0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE04000)==0x75200000) { - decode_fields32(ENC_CBLE_CBLT_32_IMM, ctx, instr); - if(ctx->sf==0) OK(ENC_CBLE_CBLT_32_IMM); - if(ctx->sf==1) OK(ENC_CBLE_CBLT_64_IMM); - } - return rc; -} - -/* cble_regs.xml */ -int CBLE_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110100|cc=001|Rm=xxxxx|00|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE0C000)==0x74200000) { - decode_fields32(ENC_CBLE_CBGE_32_REGS, ctx, instr); - if(ctx->sf==0) OK(ENC_CBLE_CBGE_32_REGS); - if(ctx->sf==1) OK(ENC_CBLE_CBGE_64_REGS); - } - return rc; -} - -/* cblo_regs.xml */ -int CBLO_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110100|cc=010|Rm=xxxxx|00|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE0C000)==0x74400000) { - decode_fields32(ENC_CBLO_CBHI_32_REGS, ctx, instr); - if(ctx->sf==0) OK(ENC_CBLO_CBHI_32_REGS); - if(ctx->sf==1) OK(ENC_CBLO_CBHI_64_REGS); - } - return rc; -} - -/* cbls_imm.xml */ -int CBLS_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110101|cc=011|imm6=xxxxxx|0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE04000)==0x75600000) { - decode_fields32(ENC_CBLS_CBLO_32_IMM, ctx, instr); - if(ctx->sf==0) OK(ENC_CBLS_CBLO_32_IMM); - if(ctx->sf==1) OK(ENC_CBLS_CBLO_64_IMM); - } - return rc; -} - -/* cbls_regs.xml */ -int CBLS_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110100|cc=011|Rm=xxxxx|00|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE0C000)==0x74600000) { - decode_fields32(ENC_CBLS_CBHS_32_REGS, ctx, instr); - if(ctx->sf==0) OK(ENC_CBLS_CBHS_32_REGS); - if(ctx->sf==1) OK(ENC_CBLS_CBHS_64_REGS); - } - return rc; -} - -/* cblt_regs.xml */ -int CBLT_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110100|cc=000|Rm=xxxxx|00|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FE0C000)==0x74000000) { - decode_fields32(ENC_CBLT_CBGT_32_REGS, ctx, instr); - if(ctx->sf==0) OK(ENC_CBLT_CBGT_32_REGS); - if(ctx->sf==1) OK(ENC_CBLT_CBGT_64_REGS); - } - return rc; -} - -/* cbnz.xml */ -int CBNZ(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_19_bit_signed_pc_relative_branch_offset */ - /* sf=x|011010|op=1|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7F000000)==0x35000000) { - decode_fields32(ENC_CBNZ_32_COMPBRANCH, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->offset = SignExtend((ctx->imm19<<2),21); - if(ctx->sf==0) OK(ENC_CBNZ_32_COMPBRANCH); - if(ctx->sf==1) OK(ENC_CBNZ_64_COMPBRANCH); - } - return rc; -} - -/* cbz.xml */ -int CBZ(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_19_bit_signed_pc_relative_branch_offset */ - /* sf=x|011010|op=0|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7F000000)==0x34000000) { - decode_fields32(ENC_CBZ_32_COMPBRANCH, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->offset = SignExtend((ctx->imm19<<2),21); - if(ctx->sf==0) OK(ENC_CBZ_32_COMPBRANCH); - if(ctx->sf==1) OK(ENC_CBZ_64_COMPBRANCH); - } - return rc; -} - -/* cbcc_imm.xml */ -int CBcc_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110101|cc=xxx|imm6=xxxxxx|0|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7F004000)==0x75000000) { - decode_fields32(ENC_CBGT_32_IMM, ctx, instr); - if(!HaveCMPBR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->t = UINT(ctx->Rt); - ctx->offset = SignExtend((ctx->imm9<<2),11); - if(!ctx->cc) { - ctx->op = Cmp_GT; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==1) { - ctx->op = Cmp_LT; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==2) { - ctx->op = Cmp_GT; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==3) { - ctx->op = Cmp_LT; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==6) { - ctx->op = Cmp_EQ; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==7) { - ctx->op = Cmp_NE; - ctx->unsigned_ = TRUE; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->value2 = UINT(ctx->imm6); - if(ctx->sf==0 && ctx->cc==0) OK(ENC_CBGT_32_IMM); - if(ctx->sf==0 && ctx->cc==1) OK(ENC_CBLT_32_IMM); - if(ctx->sf==0 && ctx->cc==2) OK(ENC_CBHI_32_IMM); - if(ctx->sf==0 && ctx->cc==3) OK(ENC_CBLO_32_IMM); - if(ctx->sf==0 && ctx->cc==6) OK(ENC_CBEQ_32_IMM); - if(ctx->sf==0 && ctx->cc==7) OK(ENC_CBNE_32_IMM); - if(ctx->sf==1 && ctx->cc==0) OK(ENC_CBGT_64_IMM); - if(ctx->sf==1 && ctx->cc==1) OK(ENC_CBLT_64_IMM); - if(ctx->sf==1 && ctx->cc==2) OK(ENC_CBHI_64_IMM); - if(ctx->sf==1 && ctx->cc==3) OK(ENC_CBLO_64_IMM); - if(ctx->sf==1 && ctx->cc==6) OK(ENC_CBEQ_64_IMM); - if(ctx->sf==1 && ctx->cc==7) OK(ENC_CBNE_64_IMM); - } - return rc; -} - -/* cbcc_regs.xml */ -int CBcc_regs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_branch */ - /* sf=x|1110100|cc=xxx|Rm=xxxxx|00|imm9=xxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7F00C000)==0x74000000) { - decode_fields32(ENC_CBGT_32_REGS, ctx, instr); - if(!HaveCMPBR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->t = UINT(ctx->Rt); - ctx->m = UINT(ctx->Rm); - ctx->offset = SignExtend((ctx->imm9<<2),11); - if(!ctx->cc) { - ctx->op = Cmp_GT; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==1) { - ctx->op = Cmp_GE; - ctx->unsigned_ = FALSE; - } - else if(ctx->cc==2) { - ctx->op = Cmp_GT; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==3) { - ctx->op = Cmp_GE; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==6) { - ctx->op = Cmp_EQ; - ctx->unsigned_ = TRUE; - } - else if(ctx->cc==7) { - ctx->op = Cmp_NE; - ctx->unsigned_ = TRUE; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && ctx->cc==0) OK(ENC_CBGT_32_REGS); - if(ctx->sf==0 && ctx->cc==1) OK(ENC_CBGE_32_REGS); - if(ctx->sf==0 && ctx->cc==2) OK(ENC_CBHI_32_REGS); - if(ctx->sf==0 && ctx->cc==3) OK(ENC_CBHS_32_REGS); - if(ctx->sf==0 && ctx->cc==6) OK(ENC_CBEQ_32_REGS); - if(ctx->sf==0 && ctx->cc==7) OK(ENC_CBNE_32_REGS); - if(ctx->sf==1 && ctx->cc==0) OK(ENC_CBGT_64_REGS); - if(ctx->sf==1 && ctx->cc==1) OK(ENC_CBGE_64_REGS); - if(ctx->sf==1 && ctx->cc==2) OK(ENC_CBHI_64_REGS); - if(ctx->sf==1 && ctx->cc==3) OK(ENC_CBHS_64_REGS); - if(ctx->sf==1 && ctx->cc==6) OK(ENC_CBEQ_64_REGS); - if(ctx->sf==1 && ctx->cc==7) OK(ENC_CBNE_64_REGS); - } - return rc; -} - -/* ccmn_imm.xml */ -int CCMN_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_5_bit_unsigned_immediate */ - /* sf=x|op=0|S=1|11010010|imm5=xxxxx|cond=xxxx|1|o2=0|Rn=xxxxx|o3=0|nzcv=xxxx */ - if((INSWORD & 0x7FE00C10)==0x3A400800) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CCMN_32_CONDCMP_IMM, ctx, instr); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - ctx->flags = ctx->nzcv; - ctx->imm = ZeroExtend(ctx->imm5,ctx->datasize); - if(ctx->sf==0) OK(ENC_CCMN_32_CONDCMP_IMM); - if(ctx->sf==1) OK(ENC_CCMN_64_CONDCMP_IMM); - } - return rc; -} - -/* ccmn_reg.xml */ -int CCMN_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=1|11010010|Rm=xxxxx|cond=xxxx|0|o2=0|Rn=xxxxx|o3=0|nzcv=xxxx */ - if((INSWORD & 0x7FE00C10)==0x3A400000) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CCMN_32_CONDCMP_REG, ctx, instr); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - ctx->flags = ctx->nzcv; - if(ctx->sf==0) OK(ENC_CCMN_32_CONDCMP_REG); - if(ctx->sf==1) OK(ENC_CCMN_64_CONDCMP_REG); - } - return rc; -} - -/* ccmp_imm.xml */ -int CCMP_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_5_bit_unsigned_immediate */ - /* sf=x|op=1|S=1|11010010|imm5=xxxxx|cond=xxxx|1|o2=0|Rn=xxxxx|o3=0|nzcv=xxxx */ - if((INSWORD & 0x7FE00C10)==0x7A400800) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CCMP_32_CONDCMP_IMM, ctx, instr); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - ctx->flags = ctx->nzcv; - ctx->imm = ZeroExtend(ctx->imm5,ctx->datasize); - if(ctx->sf==0) OK(ENC_CCMP_32_CONDCMP_IMM); - if(ctx->sf==1) OK(ENC_CCMP_64_CONDCMP_IMM); - } - return rc; -} - -/* ccmp_reg.xml */ -int CCMP_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=1|S=1|11010010|Rm=xxxxx|cond=xxxx|0|o2=0|Rn=xxxxx|o3=0|nzcv=xxxx */ - if((INSWORD & 0x7FE00C10)==0x7A400000) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CCMP_32_CONDCMP_REG, ctx, instr); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - ctx->flags = ctx->nzcv; - if(ctx->sf==0) OK(ENC_CCMP_32_CONDCMP_REG); - if(ctx->sf==1) OK(ENC_CCMP_64_CONDCMP_REG); - } - return rc; -} - -/* cfinv.xml */ -int CFINV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100000|op1=000|0100|CRm=(0)(0)(0)(0)|op2=000|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD500401F) { - decode_fields32(ENC_CFINV_M_PSTATE, ctx, instr); - if(!HaveFlagM()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_CFINV_M_PSTATE); - } - return rc; -} - -/* cfp_sys.xml */ -int CFP_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=011|CRn=0111|CRm=0011|op2=100|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50B7380) { - decode_fields32(ENC_CFP_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_CFP_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* chkfeat.xml */ -int CHKFEAT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0101|op2=000|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503251F) { - decode_fields32(ENC_CHKFEAT_HF_HINTS, ctx, instr); - if(!HaveCHK()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_CHKFEAT_HF_HINTS); - } - return rc; -} - -/* cinc_csinc.xml */ -int CINC_CSINC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|11010100|Rm!=11111|cond!=111x|0|o2=1|Rn!=11111|Rd=xxxxx */ - if((INSWORD & 0x7FE00C00)==0x1A800400 && (INSWORD & 0x1FE3E0)!=0x1FE3E0) { - decode_fields32(ENC_CINC_CSINC_32_CONDSEL, ctx, instr); - if(ctx->sf==0) OK(ENC_CINC_CSINC_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CINC_CSINC_64_CONDSEL); - } - return rc; -} - -/* cinv_csinv.xml */ -int CINV_CSINV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=1|S=0|11010100|Rm!=11111|cond!=111x|0|o2=0|Rn!=11111|Rd=xxxxx */ - if((INSWORD & 0x7FE00C00)==0x5A800000 && (INSWORD & 0x1FE3E0)!=0x1FE3E0) { - decode_fields32(ENC_CINV_CSINV_32_CONDSEL, ctx, instr); - if(ctx->sf==0) OK(ENC_CINV_CSINV_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CINV_CSINV_64_CONDSEL); - } - return rc; -} - -/* clrbhb.xml */ -int CLRBHB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0010|op2=110|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD50322DF) { - decode_fields32(ENC_CLRBHB_HI_HINTS, ctx, instr); - if(!HaveCLRBHB()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_CLRBHB_HI_HINTS); - } - return rc; -} - -/* clrex.xml */ -int CLREX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110011|CRm=xxxx|op2=010|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD503305F) { - decode_fields32(ENC_CLREX_BN_BARRIERS, ctx, instr); - OK(ENC_CLREX_BN_BARRIERS); - } - return rc; -} - -/* cls_advsimd.xml */ -int CLS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=00100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE204800) { - decode_fields32(ENC_CLS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CLS_ASIMDMISC_R); - } - return rc; -} - -/* cls_int.xml */ -int CLS_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|00010|op=1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x5AC01400) { - decode_fields32(ENC_CLS_32_DP_1SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_CLS_32_DP_1SRC); - if(ctx->sf==1) OK(ENC_CLS_64_DP_1SRC); - } - return rc; -} - -/* clz_advsimd.xml */ -int CLZ_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|opcode=00100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E204800) { - decode_fields32(ENC_CLZ_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CLZ_ASIMDMISC_R); - } - return rc; -} - -/* clz_int.xml */ -int CLZ_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|00010|op=0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x5AC01000) { - decode_fields32(ENC_CLZ_32_DP_1SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_CLZ_32_DP_1SRC); - if(ctx->sf==1) OK(ENC_CLZ_64_DP_1SRC); - } - return rc; -} - -/* cmeq_advsimd_reg.xml */ -int CMEQ_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|1|Rm=xxxxx|opcode=10001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EE08C00) { - decode_fields32(ENC_CMEQ_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMEQ_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=10001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E208C00) { - decode_fields32(ENC_CMEQ_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMEQ_ASIMDSAME_ONLY); - } - return rc; -} - -/* cmeq_advsimd_zero.xml */ -int CMEQ_advsimd_zero(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|10000|0100|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EE09800) { - decode_fields32(ENC_CMEQ_ASISDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMEQ_ASISDMISC_Z); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|0100|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE209800) { - decode_fields32(ENC_CMEQ_ASIMDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMEQ_ASIMDMISC_Z); - } - return rc; -} - -/* cmge_advsimd_reg.xml */ -int CMGE_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|1|Rm=xxxxx|0011|eq=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5EE03C00) { - decode_fields32(ENC_CMGE_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMGE_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|0011|eq=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE203C00) { - decode_fields32(ENC_CMGE_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMGE_ASIMDSAME_ONLY); - } - return rc; -} - -/* cmge_advsimd_zero.xml */ -int CMGE_advsimd_zero(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|10000|0100|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EE08800) { - decode_fields32(ENC_CMGE_ASISDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMGE_ASISDMISC_Z); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|0100|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E208800) { - decode_fields32(ENC_CMGE_ASIMDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMGE_ASIMDMISC_Z); - } - return rc; -} - -/* cmgt_advsimd_reg.xml */ -int CMGT_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|1|Rm=xxxxx|0011|eq=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5EE03400) { - decode_fields32(ENC_CMGT_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMGT_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|0011|eq=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE203400) { - decode_fields32(ENC_CMGT_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMGT_ASIMDSAME_ONLY); - } - return rc; -} - -/* cmgt_advsimd_zero.xml */ -int CMGT_advsimd_zero(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|10000|0100|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EE08800) { - decode_fields32(ENC_CMGT_ASISDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMGT_ASISDMISC_Z); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|0100|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE208800) { - decode_fields32(ENC_CMGT_ASIMDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMGT_ASIMDMISC_Z); - } - return rc; -} - -/* cmhi_advsimd.xml */ -int CMHI_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|1|Rm=xxxxx|0011|eq=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EE03400) { - decode_fields32(ENC_CMHI_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMHI_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|0011|eq=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E203400) { - decode_fields32(ENC_CMHI_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMHI_ASIMDSAME_ONLY); - } - return rc; -} - -/* cmhs_advsimd.xml */ -int CMHS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|1|Rm=xxxxx|0011|eq=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EE03C00) { - decode_fields32(ENC_CMHS_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMHS_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|0011|eq=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E203C00) { - decode_fields32(ENC_CMHS_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMHS_ASIMDSAME_ONLY); - } - return rc; -} - -/* cmle_advsimd.xml */ -int CMLE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|10000|0100|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EE09800) { - decode_fields32(ENC_CMLE_ASISDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMLE_ASISDMISC_Z); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|0100|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E209800) { - decode_fields32(ENC_CMLE_ASIMDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMLE_ASIMDMISC_Z); - } - return rc; -} - -/* cmlt_advsimd.xml */ -int CMLT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|10000|opcode=01010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EE0A800) { - decode_fields32(ENC_CMLT_ASISDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMLT_ASISDMISC_Z); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=01010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE20A800) { - decode_fields32(ENC_CMLT_ASIMDMISC_Z, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMLT_ASIMDMISC_Z); - } - return rc; -} - -/* cmn_adds_addsub_ext.xml */ -int CMN_ADDS_addsub_ext(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=0|S=1|01011|opt=00|1|Rm=xxxxx|option=xxx|imm3=xxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7FE0001F)==0x2B20001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CMN_ADDS_32S_ADDSUB_EXT, ctx, instr); - if(ctx->sf==0) OK(ENC_CMN_ADDS_32S_ADDSUB_EXT); - if(ctx->sf==1) OK(ENC_CMN_ADDS_64S_ADDSUB_EXT); - } - return rc; -} - -/* cmn_adds_addsub_imm.xml */ -int CMN_ADDS_addsub_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=0|S=1|100010|sh=x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7F80001F)==0x3100001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CMN_ADDS_32S_ADDSUB_IMM, ctx, instr); - if(ctx->sf==0) OK(ENC_CMN_ADDS_32S_ADDSUB_IMM); - if(ctx->sf==1) OK(ENC_CMN_ADDS_64S_ADDSUB_IMM); - } - return rc; -} - -/* cmn_adds_addsub_shift.xml */ -int CMN_ADDS_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=0|S=1|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7F20001F)==0x2B00001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CMN_ADDS_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->sf==0) OK(ENC_CMN_ADDS_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_CMN_ADDS_64_ADDSUB_SHIFT); - } - return rc; -} - -/* cmpp_subps.xml */ -int CMPP_SUBPS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|0|S=1|1|101|0110|Rm=xxxxx|opcode=000000|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0xFFE0FC1F)==0xBAC0001F) { - decode_fields32(ENC_CMPP_SUBPS_64S_DP_2SRC, ctx, instr); - OK(ENC_CMPP_SUBPS_64S_DP_2SRC); - } - return rc; -} - -/* cmp_subs_addsub_ext.xml */ -int CMP_SUBS_addsub_ext(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|01011|opt=00|1|Rm=xxxxx|option=xxx|imm3=xxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7FE0001F)==0x6B20001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CMP_SUBS_32S_ADDSUB_EXT, ctx, instr); - if(ctx->sf==0) OK(ENC_CMP_SUBS_32S_ADDSUB_EXT); - if(ctx->sf==1) OK(ENC_CMP_SUBS_64S_ADDSUB_EXT); - } - return rc; -} - -/* cmp_subs_addsub_imm.xml */ -int CMP_SUBS_addsub_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|100010|sh=x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7F80001F)==0x7100001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CMP_SUBS_32S_ADDSUB_IMM, ctx, instr); - if(ctx->sf==0) OK(ENC_CMP_SUBS_32S_ADDSUB_IMM); - if(ctx->sf==1) OK(ENC_CMP_SUBS_64S_ADDSUB_IMM); - } - return rc; -} - -/* cmp_subs_addsub_shift.xml */ -int CMP_SUBS_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7F20001F)==0x6B00001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_CMP_SUBS_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->sf==0) OK(ENC_CMP_SUBS_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_CMP_SUBS_64_ADDSUB_SHIFT); - } - return rc; -} - -/* cmtst_advsimd.xml */ -int CMTST_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|1|Rm=xxxxx|opcode=10001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5EE08C00) { - decode_fields32(ENC_CMTST_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_CMTST_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=10001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE208C00) { - decode_fields32(ENC_CMTST_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_CMTST_ASIMDSAME_ONLY); - } - return rc; -} - -/* cneg_csneg.xml */ -int CNEG_CSNEG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=1|S=0|11010100|Rm=xxxxx|cond!=111x|0|o2=1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00C00)==0x5A800400 && (INSWORD & 0xE000)!=0xE000) { - decode_fields32(ENC_CNEG_CSNEG_32_CONDSEL, ctx, instr); - if(ctx->sf==0) OK(ENC_CNEG_CSNEG_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CNEG_CSNEG_64_CONDSEL); - } - return rc; -} - -/* cnt.xml */ -int CNT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|opcode=000111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x5AC01C00) { - decode_fields32(ENC_CNT_32_DP_1SRC, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->sf==0) OK(ENC_CNT_32_DP_1SRC); - if(ctx->sf==1) OK(ENC_CNT_64_DP_1SRC); - } - return rc; -} - -/* cnt_advsimd.xml */ -int CNT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=00101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE205800) { - decode_fields32(ENC_CNT_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 8; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((8)!=0 ? ((ctx->datasize) / (8)) : 0); - OK(ENC_CNT_ASIMDMISC_R); - } - return rc; -} - -/* cosp_sys.xml */ -int COSP_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=011|CRn=0111|CRm=0011|op2=110|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50B73C0) { - decode_fields32(ENC_COSP_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_COSP_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* cpp_sys.xml */ -int CPP_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=011|CRn=0111|CRm=0011|op2=111|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50B73E0) { - decode_fields32(ENC_CPP_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_CPP_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* cpyfp.xml */ -int CPYFP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0000|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19000400) { - decode_fields32(ENC_CPYFP_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFP_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFM_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFE_CPY_MEMCMS); - } - return rc; -} - -/* cpyfpn.xml */ -int CPYFPN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1100|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1900C400) { - decode_fields32(ENC_CPYFPN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFEN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfprn.xml */ -int CPYFPRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1000|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19008400) { - decode_fields32(ENC_CPYFPRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFERN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfprt.xml */ -int CPYFPRT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0010|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19002400) { - decode_fields32(ENC_CPYFPRT_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPRT_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMRT_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFERT_CPY_MEMCMS); - } - return rc; -} - -/* cpyfprtn.xml */ -int CPYFPRTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1110|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1900E400) { - decode_fields32(ENC_CPYFPRTN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPRTN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMRTN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFERTN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfprtrn.xml */ -int CPYFPRTRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1010|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1900A400) { - decode_fields32(ENC_CPYFPRTRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPRTRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMRTRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFERTRN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfprtwn.xml */ -int CPYFPRTWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0110|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19006400) { - decode_fields32(ENC_CPYFPRTWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPRTWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMRTWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFERTWN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfpt.xml */ -int CPYFPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0011|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19003400) { - decode_fields32(ENC_CPYFPT_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPT_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMT_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFET_CPY_MEMCMS); - } - return rc; -} - -/* cpyfptn.xml */ -int CPYFPTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1111|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1900F400) { - decode_fields32(ENC_CPYFPTN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPTN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMTN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFETN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfptrn.xml */ -int CPYFPTRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1011|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1900B400) { - decode_fields32(ENC_CPYFPTRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPTRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMTRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFETRN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfptwn.xml */ -int CPYFPTWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0111|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19007400) { - decode_fields32(ENC_CPYFPTWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPTWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMTWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFETWN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfpwn.xml */ -int CPYFPWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0100|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19004400) { - decode_fields32(ENC_CPYFPWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFEWN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfpwt.xml */ -int CPYFPWT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0001|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19001400) { - decode_fields32(ENC_CPYFPWT_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPWT_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMWT_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFEWT_CPY_MEMCMS); - } - return rc; -} - -/* cpyfpwtn.xml */ -int CPYFPWTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1101|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1900D400) { - decode_fields32(ENC_CPYFPWTN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPWTN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMWTN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFEWTN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfpwtrn.xml */ -int CPYFPWTRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=1001|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19009400) { - decode_fields32(ENC_CPYFPWTRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPWTRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMWTRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFEWTRN_CPY_MEMCMS); - } - return rc; -} - -/* cpyfpwtwn.xml */ -int CPYFPWTWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=xx|0|Rs=xxxxx|op2=0101|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x19005400) { - decode_fields32(ENC_CPYFPWTWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYFPWTWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYFMWTWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYFEWTWN_CPY_MEMCMS); - } - return rc; -} - -/* cpyp.xml */ -int CPYP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0000|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D000400) { - decode_fields32(ENC_CPYP_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYP_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYM_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYE_CPY_MEMCMS); - } - return rc; -} - -/* cpypn.xml */ -int CPYPN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1100|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D00C400) { - decode_fields32(ENC_CPYPN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYEN_CPY_MEMCMS); - } - return rc; -} - -/* cpyprn.xml */ -int CPYPRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1000|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D008400) { - decode_fields32(ENC_CPYPRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYERN_CPY_MEMCMS); - } - return rc; -} - -/* cpyprt.xml */ -int CPYPRT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0010|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D002400) { - decode_fields32(ENC_CPYPRT_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPRT_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMRT_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYERT_CPY_MEMCMS); - } - return rc; -} - -/* cpyprtn.xml */ -int CPYPRTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1110|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D00E400) { - decode_fields32(ENC_CPYPRTN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPRTN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMRTN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYERTN_CPY_MEMCMS); - } - return rc; -} - -/* cpyprtrn.xml */ -int CPYPRTRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1010|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D00A400) { - decode_fields32(ENC_CPYPRTRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPRTRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMRTRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYERTRN_CPY_MEMCMS); - } - return rc; -} - -/* cpyprtwn.xml */ -int CPYPRTWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0110|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D006400) { - decode_fields32(ENC_CPYPRTWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPRTWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMRTWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYERTWN_CPY_MEMCMS); - } - return rc; -} - -/* cpypt.xml */ -int CPYPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0011|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D003400) { - decode_fields32(ENC_CPYPT_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPT_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMT_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYET_CPY_MEMCMS); - } - return rc; -} - -/* cpyptn.xml */ -int CPYPTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1111|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D00F400) { - decode_fields32(ENC_CPYPTN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPTN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMTN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYETN_CPY_MEMCMS); - } - return rc; -} - -/* cpyptrn.xml */ -int CPYPTRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1011|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D00B400) { - decode_fields32(ENC_CPYPTRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPTRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMTRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYETRN_CPY_MEMCMS); - } - return rc; -} - -/* cpyptwn.xml */ -int CPYPTWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0111|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D007400) { - decode_fields32(ENC_CPYPTWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPTWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMTWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYETWN_CPY_MEMCMS); - } - return rc; -} - -/* cpypwn.xml */ -int CPYPWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0100|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D004400) { - decode_fields32(ENC_CPYPWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYEWN_CPY_MEMCMS); - } - return rc; -} - -/* cpypwt.xml */ -int CPYPWT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0001|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D001400) { - decode_fields32(ENC_CPYPWT_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPWT_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMWT_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYEWT_CPY_MEMCMS); - } - return rc; -} - -/* cpypwtn.xml */ -int CPYPWTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1101|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D00D400) { - decode_fields32(ENC_CPYPWTN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPWTN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMWTN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYEWTN_CPY_MEMCMS); - } - return rc; -} - -/* cpypwtrn.xml */ -int CPYPWTRN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=1001|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D009400) { - decode_fields32(ENC_CPYPWTRN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPWTRN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMWTRN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYEWTRN_CPY_MEMCMS); - } - return rc; -} - -/* cpypwtwn.xml */ -int CPYPWTWN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=xx|0|Rs=xxxxx|op2=0101|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x1D005400) { - decode_fields32(ENC_CPYPWTWN_CPY_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memcpy_d = UINT(ctx->Rd); - ctx->memcpy_s = UINT(ctx->Rs); - ctx->memcpy_n = UINT(ctx->Rn); - ctx->options = ctx->op2; - ctx->rnontemporal = SLICE(ctx->options,3,3)==1; - ctx->wnontemporal = SLICE(ctx->options,2,2)==1; - if(!ctx->op1) { - ctx->memcpy_stage = MOPSStage_Prologue; - } - else if(ctx->op1==1) { - ctx->memcpy_stage = MOPSStage_Main; - } - else if(ctx->op1==2) { - ctx->memcpy_stage = MOPSStage_Epilogue; - } - if(ctx->op1==0) OK(ENC_CPYPWTWN_CPY_MEMCMS); - if(ctx->op1==1) OK(ENC_CPYMWTWN_CPY_MEMCMS); - if(ctx->op1==2) OK(ENC_CPYEWTWN_CPY_MEMCMS); - } - return rc; -} - -/* crc32.xml */ -int CRC32(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_crc */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|010|C=0|sz=xx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0F000)==0x1AC04000) { - decode_fields32(ENC_CRC32B_32C_DP_2SRC, ctx, instr); - if(!HaveCRC32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(ctx->sf==1 && ctx->sz!=3) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && ctx->sz==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = (8) << (UINT(ctx->sz)); - if(ctx->sf==0 && ctx->sz==0) OK(ENC_CRC32B_32C_DP_2SRC); - if(ctx->sf==0 && ctx->sz==1) OK(ENC_CRC32H_32C_DP_2SRC); - if(ctx->sf==0 && ctx->sz==2) OK(ENC_CRC32W_32C_DP_2SRC); - if(ctx->sf==1 && ctx->sz==3) OK(ENC_CRC32X_64C_DP_2SRC); - } - return rc; -} - -/* crc32c.xml */ -int CRC32C(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_crc */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|010|C=1|sz=xx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0F000)==0x1AC05000) { - decode_fields32(ENC_CRC32CB_32C_DP_2SRC, ctx, instr); - if(!HaveCRC32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(ctx->sf==1 && ctx->sz!=3) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && ctx->sz==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = (8) << (UINT(ctx->sz)); - if(ctx->sf==0 && ctx->sz==0) OK(ENC_CRC32CB_32C_DP_2SRC); - if(ctx->sf==0 && ctx->sz==1) OK(ENC_CRC32CH_32C_DP_2SRC); - if(ctx->sf==0 && ctx->sz==2) OK(ENC_CRC32CW_32C_DP_2SRC); - if(ctx->sf==1 && ctx->sz==3) OK(ENC_CRC32CX_64C_DP_2SRC); - } - return rc; -} - -/* csdb.xml */ -int CSDB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0010|op2=100|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503229F) { - decode_fields32(ENC_CSDB_HI_HINTS, ctx, instr); - OK(ENC_CSDB_HI_HINTS); - } - return rc; -} - -/* csel.xml */ -int CSEL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|11010100|Rm=xxxxx|cond=xxxx|0|o2=0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00C00)==0x1A800000) { - decode_fields32(ENC_CSEL_32_CONDSEL, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - if(ctx->sf==0) OK(ENC_CSEL_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CSEL_64_CONDSEL); - } - return rc; -} - -/* csetm_csinv.xml */ -int CSETM_CSINV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=1|S=0|11010100|Rm=11111|cond!=111x|0|o2=0|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7FFF0FE0)==0x5A9F03E0 && (INSWORD & 0xE000)!=0xE000) { - decode_fields32(ENC_CSETM_CSINV_32_CONDSEL, ctx, instr); - if(ctx->sf==0) OK(ENC_CSETM_CSINV_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CSETM_CSINV_64_CONDSEL); - } - return rc; -} - -/* cset_csinc.xml */ -int CSET_CSINC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|11010100|Rm=11111|cond!=111x|0|o2=1|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7FFF0FE0)==0x1A9F07E0 && (INSWORD & 0xE000)!=0xE000) { - decode_fields32(ENC_CSET_CSINC_32_CONDSEL, ctx, instr); - if(ctx->sf==0) OK(ENC_CSET_CSINC_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CSET_CSINC_64_CONDSEL); - } - return rc; -} - -/* csinc.xml */ -int CSINC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|11010100|Rm=xxxxx|cond=xxxx|0|o2=1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00C00)==0x1A800400) { - decode_fields32(ENC_CSINC_32_CONDSEL, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - /* regular aliases */ - if(ctx->Rm!=0x1f && ctx->Rn!=0x1f && !(((ctx->cond&14)==14)) && ctx->Rn==ctx->Rm) return CINC_CSINC(ctx, instr); - if(ctx->Rm==0x1f && ctx->Rn==0x1f && !(((ctx->cond&14)==14))) return CSET_CSINC(ctx, instr); - if(ctx->sf==0) OK(ENC_CSINC_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CSINC_64_CONDSEL); - } - return rc; -} - -/* csinv.xml */ -int CSINV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=1|S=0|11010100|Rm=xxxxx|cond=xxxx|0|o2=0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00C00)==0x5A800000) { - decode_fields32(ENC_CSINV_32_CONDSEL, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - /* regular aliases */ - if(ctx->Rm!=0x1f && ctx->Rn!=0x1f && !(((ctx->cond&14)==14)) && ctx->Rn==ctx->Rm) return CINV_CSINV(ctx, instr); - if(ctx->Rm==0x1f && ctx->Rn==0x1f && !(((ctx->cond&14)==14))) return CSETM_CSINV(ctx, instr); - if(ctx->sf==0) OK(ENC_CSINV_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CSINV_64_CONDSEL); - } - return rc; -} - -/* csneg.xml */ -int CSNEG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=1|S=0|11010100|Rm=xxxxx|cond=xxxx|0|o2=1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00C00)==0x5A800400) { - decode_fields32(ENC_CSNEG_32_CONDSEL, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->condition = ctx->cond; - /* regular aliases */ - if(!(((ctx->cond&14)==14)) && ctx->Rn==ctx->Rm) return CNEG_CSNEG(ctx, instr); - if(ctx->sf==0) OK(ENC_CSNEG_32_CONDSEL); - if(ctx->sf==1) OK(ENC_CSNEG_64_CONDSEL); - } - return rc; -} - -/* ctz.xml */ -int CTZ(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|opcode=000110|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x5AC01800) { - decode_fields32(ENC_CTZ_32_DP_1SRC, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->sf==0) OK(ENC_CTZ_32_DP_1SRC); - if(ctx->sf==1) OK(ENC_CTZ_64_DP_1SRC); - } - return rc; -} - -/* dcps1.xml */ -int DCPS1(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=101|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=01 */ - if((INSWORD & 0xFFE0001F)==0xD4A00001) { - decode_fields32(ENC_DCPS1_DC_EXCEPTION, ctx, instr); - OK(ENC_DCPS1_DC_EXCEPTION); - } - return rc; -} - -/* dcps2.xml */ -int DCPS2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=101|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=10 */ - if((INSWORD & 0xFFE0001F)==0xD4A00002) { - decode_fields32(ENC_DCPS2_DC_EXCEPTION, ctx, instr); - OK(ENC_DCPS2_DC_EXCEPTION); - } - return rc; -} - -/* dcps3.xml */ -int DCPS3(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=101|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=11 */ - if((INSWORD & 0xFFE0001F)==0xD4A00003) { - decode_fields32(ENC_DCPS3_DC_EXCEPTION, ctx, instr); - OK(ENC_DCPS3_DC_EXCEPTION); - } - return rc; -} - -/* dc_sys.xml */ -int DC_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=xxx|CRn=0111|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF8F000)==0xD5087000) { - decode_fields32(ENC_DC_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_DC_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* dgh.xml */ -int DGH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=110|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD50320DF) { - decode_fields32(ENC_DGH_HI_HINTS, ctx, instr); - if(!HaveDGH()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_DGH_HI_HINTS); - } - return rc; -} - -/* dmb.xml */ -int DMB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110011|CRm=xxxx|1|opc=01|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD50330BF) { - decode_fields32(ENC_DMB_BO_BARRIERS, ctx, instr); - if(!SLICE(ctx->CRm,3,2)) { - ctx->domain = MBReqDomain_OuterShareable; - } - else if(SLICE(ctx->CRm,3,2)==1) { - ctx->domain = MBReqDomain_Nonshareable; - } - else if(SLICE(ctx->CRm,3,2)==2) { - ctx->domain = MBReqDomain_InnerShareable; - } - else if(SLICE(ctx->CRm,3,2)==3) { - ctx->domain = MBReqDomain_FullSystem; - } - if(!SLICE(ctx->CRm,1,0)) { - ctx->types = MBReqTypes_All; - ctx->domain = MBReqDomain_FullSystem; - } - else if(SLICE(ctx->CRm,1,0)==1) { - ctx->types = MBReqTypes_Reads; - } - else if(SLICE(ctx->CRm,1,0)==2) { - ctx->types = MBReqTypes_Writes; - } - else if(SLICE(ctx->CRm,1,0)==3) { - ctx->types = MBReqTypes_All; - } - OK(ENC_DMB_BO_BARRIERS); - } - return rc; -} - -/* drps.xml */ -int DRPS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|1|opc=0101|op2=11111|op3=000000|Rn=11111|op4=00000 */ - if((INSWORD & 0xFFFFFFFF)==0xD6BF03E0) { - decode_fields32(ENC_DRPS_64E_BRANCH_REG, ctx, instr); - OK(ENC_DRPS_64E_BRANCH_REG); - } - return rc; -} - -/* dsb.xml */ -int DSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_memory_barrier */ - /* 110|101|01000000110011|CRm=xxxx|1|opc=00|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD503309F) { - decode_fields32(ENC_DSB_BO_BARRIERS, ctx, instr); - ctx->nXS = FALSE; - if(!ctx->CRm) { - ctx->alias = DSBAlias_SSBB; - } - else if(ctx->CRm==4) { - ctx->alias = DSBAlias_PSSBB; - } - else { - ctx->alias = DSBAlias_DSB; - } - if(!SLICE(ctx->CRm,3,2)) { - ctx->domain = MBReqDomain_OuterShareable; - } - else if(SLICE(ctx->CRm,3,2)==1) { - ctx->domain = MBReqDomain_Nonshareable; - } - else if(SLICE(ctx->CRm,3,2)==2) { - ctx->domain = MBReqDomain_InnerShareable; - } - else if(SLICE(ctx->CRm,3,2)==3) { - ctx->domain = MBReqDomain_FullSystem; - } - if(!SLICE(ctx->CRm,1,0)) { - ctx->types = MBReqTypes_All; - ctx->domain = MBReqDomain_FullSystem; - } - else if(SLICE(ctx->CRm,1,0)==1) { - ctx->types = MBReqTypes_Reads; - } - else if(SLICE(ctx->CRm,1,0)==2) { - ctx->types = MBReqTypes_Writes; - } - else if(SLICE(ctx->CRm,1,0)==3) { - ctx->types = MBReqTypes_All; - } - /* regular aliases */ - if(ctx->CRm==4) return PSSBB_DSB(ctx, instr); - if(ctx->CRm==0) return SSBB_DSB(ctx, instr); - OK(ENC_DSB_BO_BARRIERS); - } - /* class iclass_memory_nxs_barrier */ - /* 110|101|01000000110011|imm2=xx|10|op2=001|Rt=11111 */ - if((INSWORD & 0xFFFFF3FF)==0xD503323F) { - decode_fields32(ENC_DSB_BON_BARRIERS, ctx, instr); - if(!HaveXS()) { - EndOfDecode(Decode_UNDEF); - } - ctx->types = MBReqTypes_All; - ctx->nXS = TRUE; - ctx->alias = DSBAlias_DSB; - if(!ctx->imm2) { - ctx->domain = MBReqDomain_OuterShareable; - } - else if(ctx->imm2==1) { - ctx->domain = MBReqDomain_Nonshareable; - } - else if(ctx->imm2==2) { - ctx->domain = MBReqDomain_InnerShareable; - } - else if(ctx->imm2==3) { - ctx->domain = MBReqDomain_FullSystem; - } - /* regular aliases */ - // alias:PSSBB_DSB with preference:["CRm == '0100'"] does not apply - // alias:SSBB_DSB with preference:["CRm == '0000'"] does not apply - OK(ENC_DSB_BON_BARRIERS); - } - return rc; -} - -/* dup_advsimd_elt.xml */ -int DUP_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|op=0|1|111|00|00|imm5=xxxxx|0|imm4=0000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E000400) { - decode_fields32(ENC_DUP_ASISDONE_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!(ctx->imm5&15)) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = LowestSetBitNZ(SLICE(ctx->imm5,3,0)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->index = UINT(SLICE(ctx->imm5,4,ctx->size+1)); - ctx->idxdsize = (0x40) << (UINT(SLICE(ctx->imm5,4,4))); - ctx->esize = (8) << (ctx->size); - ctx->datasize = ctx->esize; - ctx->elements = 1; - /* unconditional alias */ - if(MOV_DUP_advsimd_elt(ctx, instr)==0) return 0; - OK(ENC_DUP_ASISDONE_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|op=0|0|111|00|00|imm5=xxxxx|0|imm4=0000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE000400) { - decode_fields32(ENC_DUP_ASIMDINS_DV_V, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!(ctx->imm5&15)) { - EndOfDecode(Decode_UNDEF); - } - if((ctx->imm5&15)==8 && ctx->Q==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = LowestSetBitNZ(SLICE(ctx->imm5,3,0)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->index = UINT(SLICE(ctx->imm5,4,ctx->size+1)); - ctx->idxdsize = (0x40) << (UINT(SLICE(ctx->imm5,4,4))); - ctx->esize = (8) << (ctx->size); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - /* unconditional alias */ - if(MOV_DUP_advsimd_elt(ctx, instr)==0) return 0; - OK(ENC_DUP_ASIMDINS_DV_V); - } - return rc; -} - -/* dup_advsimd_gen.xml */ -int DUP_advsimd_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|op=0|0|111|00|00|imm5=xxxxx|0|imm4=0001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE000C00) { - decode_fields32(ENC_DUP_ASIMDINS_DR_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!(ctx->imm5&15)) { - EndOfDecode(Decode_UNDEF); - } - if((ctx->imm5&15)==8 && ctx->Q==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = LowestSetBitNZ(SLICE(ctx->imm5,3,0)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (ctx->size); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_DUP_ASIMDINS_DR_R); - } - return rc; -} - -/* dvp_sys.xml */ -int DVP_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=011|CRn=0111|CRm=0011|op2=101|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50B73A0) { - decode_fields32(ENC_DVP_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_DVP_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* eon.xml */ -int EON(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=10|01010|shift=xx|N=1|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x4A200000) { - decode_fields32(ENC_EON_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - if(ctx->sf==0) OK(ENC_EON_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_EON_64_LOG_SHIFT); - } - return rc; -} - -/* eor3_advsimd.xml */ -int EOR3_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|Op0=00|Rm=xxxxx|0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0xCE000000) { - decode_fields32(ENC_EOR3_VVV16_CRYPTO4, ctx, instr); - if(!HaveSHA3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - OK(ENC_EOR3_VVV16_CRYPTO4); - } - return rc; -} - -/* eor_advsimd.xml */ -int EOR_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|opc2=00|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E201C00) { - decode_fields32(ENC_EOR_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_EOR_ASIMDSAME_ONLY); - } - return rc; -} - -/* eor_log_imm.xml */ -int EOR_log_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=10|100100|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x52000000) { - decode_fields32(ENC_EOR_32_LOG_IMM, ctx, instr); - if(ctx->sf==0 && ctx->N!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - DecodeBitMasksCheckUndefined(ctx->N,ctx->imms); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(ctx->N,ctx->imms,ctx->immr); - ctx->imm = dbmrt.wmask; - if(ctx->sf==0 && ctx->N==0) OK(ENC_EOR_32_LOG_IMM); - if(ctx->sf==1) OK(ENC_EOR_64_LOG_IMM); - } - return rc; -} - -/* eor_log_shift.xml */ -int EOR_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|opc=10|01010|shift=xx|N=0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x4A000000) { - decode_fields32(ENC_EOR_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - if(ctx->sf==0) OK(ENC_EOR_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_EOR_64_LOG_SHIFT); - } - return rc; -} - -/* eret.xml */ -int ERET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|1|opc=0100|op2=11111|0000|A=0|M=0|Rn=11111|op4=00000 */ - if((INSWORD & 0xFFFFFFFF)==0xD69F03E0) { - decode_fields32(ENC_ERET_64E_BRANCH_REG, ctx, instr); - OK(ENC_ERET_64E_BRANCH_REG); - } - return rc; -} - -/* ereta.xml */ -int ERETA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101011|opc=0100|op2=11111|0000|A=1|M=x|Rn=11111|op4=11111 */ - if((INSWORD & 0xFFFFFBFF)==0xD69F0BFF) { - decode_fields32(ENC_ERETAA_64E_BRANCH_REG, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->pac = TRUE; - ctx->use_key_a = (ctx->M==0); - ctx->auth_then_branch = TRUE; - if(ctx->M==0) OK(ENC_ERETAA_64E_BRANCH_REG); - if(ctx->M==1) OK(ENC_ERETAB_64E_BRANCH_REG); - } - return rc; -} - -/* esb.xml */ -int ESB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0010|op2=000|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503221F) { - decode_fields32(ENC_ESB_HI_HINTS, ctx, instr); - if(!HaveRAS()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_ESB_HI_HINTS); - } - return rc; -} - -/* extr.xml */ -int EXTR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op21=00|100111|N=x|o0=0|Rm=xxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FA00000)==0x13800000) { - decode_fields32(ENC_EXTR_32_EXTRACT, ctx, instr); - if(ctx->N!=ctx->sf) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->imms,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->lsb = UINT(ctx->imms); - /* regular aliases */ - if(ctx->Rn==ctx->Rm) return ROR_EXTR(ctx, instr); - if(ctx->sf==0 && ctx->N==0 && !(ctx->imms&0x20)) OK(ENC_EXTR_32_EXTRACT); - if(ctx->sf==1 && ctx->N==1) OK(ENC_EXTR_64_EXTRACT); - } - return rc; -} - -/* ext_advsimd.xml */ -int EXT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|10|111|0|op2=00|0|Rm=xxxxx|0|imm4=xxxx|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE08400)==0x2E000000) { - decode_fields32(ENC_EXT_ASIMDEXT_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Q==0 && SLICE(ctx->imm4,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->position = (8) * (UINT(ctx->imm4)); - OK(ENC_EXT_ASIMDEXT_ONLY); - } - return rc; -} - -/* f12cvtl_advsimd.xml */ -int F12CVTL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=1|01110|size=0x|10000|opcode=10111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E217800) { - decode_fields32(ENC_F1CVTL_ASIMDMISC_V, ctx, instr); - if(!HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Rd); - ctx->part = UINT(ctx->Q); - ctx->elements = ((8)!=0 ? ((0x40) / (8)) : 0); - ctx->issrc2 = ctx->size==1; - if(ctx->size==0) OK(ENC_F1CVTL_ASIMDMISC_V); - if(ctx->size==1) OK(ENC_F2CVTL_ASIMDMISC_V); - } - return rc; -} - -/* fabd_advsimd.xml */ -int FABD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|a=1|10|Rm=xxxxx|00|opcode=010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EC01400) { - decode_fields32(ENC_FABD_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FABD_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|1|sz=x|1|Rm=xxxxx|opcode=11010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x7EA0D400) { - decode_fields32(ENC_FABD_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FABD_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|10|Rm=xxxxx|00|opcode=010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC01400) { - decode_fields32(ENC_FABD_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FABD_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|1|sz=x|1|Rm=xxxxx|opcode=11010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2EA0D400) { - decode_fields32(ENC_FABD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FABD_ASIMDSAME_ONLY); - } - return rc; -} - -/* fabs_advsimd.xml */ -int FABS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|1111|00|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF8F800) { - decode_fields32(ENC_FABS_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FABS_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|10000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA0F800) { - decode_fields32(ENC_FABS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FABS_ASIMDMISC_R); - } - return rc; -} - -/* fabs_float.xml */ -int FABS_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|10000|opc=01|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E20C000) { - decode_fields32(ENC_FABS_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FABS_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FABS_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FABS_D_FLOATDP1); - } - return rc; -} - -/* facge_advsimd.xml */ -int FACGE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|E=0|10|Rm=xxxxx|00|10|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7E402C00) { - decode_fields32(ENC_FACGE_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FACGE_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|E=0|sz=x|1|Rm=xxxxx|1110|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x7E20EC00) { - decode_fields32(ENC_FACGE_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FACGE_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|E=0|10|Rm=xxxxx|00|10|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E402C00) { - decode_fields32(ENC_FACGE_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FACGE_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|E=0|sz=x|1|Rm=xxxxx|1110|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2E20EC00) { - decode_fields32(ENC_FACGE_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FACGE_ASIMDSAME_ONLY); - } - return rc; -} - -/* facgt_advsimd.xml */ -int FACGT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|E=1|10|Rm=xxxxx|00|10|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EC02C00) { - decode_fields32(ENC_FACGT_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FACGT_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|E=1|sz=x|1|Rm=xxxxx|1110|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x7EA0EC00) { - decode_fields32(ENC_FACGT_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FACGT_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|E=1|10|Rm=xxxxx|00|10|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC02C00) { - decode_fields32(ENC_FACGT_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FACGT_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|E=1|sz=x|1|Rm=xxxxx|1110|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2EA0EC00) { - decode_fields32(ENC_FACGT_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FACGT_ASIMDSAME_ONLY); - } - return rc; -} - -/* faddp_advsimd_pair.xml */ -int FADDP_advsimd_pair(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 01|U=0|1|111|0|0|sz=0|11000|opcode=01101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E30D800) { - decode_fields32(ENC_FADDP_ASISDPAIR_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = 0x20; - OK(ENC_FADDP_ASISDPAIR_ONLY_H); - } - /* class iclass_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|0|sz=x|11000|opcode=01101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7E30D800) { - decode_fields32(ENC_FADDP_ASISDPAIR_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->esize) * (2); - OK(ENC_FADDP_ASISDPAIR_ONLY_SD); - } - return rc; -} - -/* faddp_advsimd_vec.xml */ -int FADDP_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=0|10|Rm=xxxxx|00|opcode=010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E401400) { - decode_fields32(ENC_FADDP_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FADDP_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|0|sz=x|1|Rm=xxxxx|opcode=11010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2E20D400) { - decode_fields32(ENC_FADDP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FADDP_ASIMDSAME_ONLY); - } - return rc; -} - -/* fadd_advsimd.xml */ -int FADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=0|10|Rm=xxxxx|00|opcode=010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE401400) { - decode_fields32(ENC_FADD_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FADD_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|1|Rm=xxxxx|opcode=11010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE20D400) { - decode_fields32(ENC_FADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* fadd_float.xml */ -int FADD_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|001|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E202800) { - decode_fields32(ENC_FADD_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FADD_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FADD_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FADD_D_FLOATDP2); - } - return rc; -} - -/* famax_advsimd.xml */ -int FAMAX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|10|Rm=xxxxx|00|opcode=011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEC01C00) { - decode_fields32(ENC_FAMAX_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FAMAX_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|size=1x|1|Rm=xxxxx|opcode=11011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xEA0DC00) { - decode_fields32(ENC_FAMAX_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Q==0 && ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FAMAX_ASIMDSAME_ONLY); - } - return rc; -} - -/* famin_advsimd.xml */ -int FAMIN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|10|Rm=xxxxx|00|opcode=011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC01C00) { - decode_fields32(ENC_FAMIN_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FAMIN_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|size=1x|1|Rm=xxxxx|opcode=11011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2EA0DC00) { - decode_fields32(ENC_FAMIN_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Q==0 && ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FAMIN_ASIMDSAME_ONLY); - } - return rc; -} - -/* fcadd_advsimd_vec.xml */ -int FCADD_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|0|Rm=xxxxx|1|11|rot=x|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20EC00)==0x2E00E400) { - decode_fields32(ENC_FCADD_ASIMDSAME2_C, ctx, instr); - if(!HaveFCMA()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==1 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Q==0 && ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCADD_ASIMDSAME2_C); - } - return rc; -} - -/* fccmpe_float.xml */ -int FCCMPE_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|cond=xxxx|01|Rn=xxxxx|op=1|nzcv=xxxx */ - if((INSWORD & 0xFF200C10)==0x1E200410) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_FLOAT; - - decode_fields32(ENC_FCCMPE_H_FLOATCCMP, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (UINT((ctx->ftype)^(2))); - ctx->condition = ctx->cond; - ctx->flags = ctx->nzcv; - if(ctx->ftype==3) OK(ENC_FCCMPE_H_FLOATCCMP); - if(ctx->ftype==0) OK(ENC_FCCMPE_S_FLOATCCMP); - if(ctx->ftype==1) OK(ENC_FCCMPE_D_FLOATCCMP); - } - return rc; -} - -/* fccmp_float.xml */ -int FCCMP_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|cond=xxxx|01|Rn=xxxxx|op=0|nzcv=xxxx */ - if((INSWORD & 0xFF200C10)==0x1E200400) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_FLOAT; - - decode_fields32(ENC_FCCMP_H_FLOATCCMP, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (UINT((ctx->ftype)^(2))); - ctx->condition = ctx->cond; - ctx->flags = ctx->nzcv; - if(ctx->ftype==3) OK(ENC_FCCMP_H_FLOATCCMP); - if(ctx->ftype==0) OK(ENC_FCCMP_S_FLOATCCMP); - if(ctx->ftype==1) OK(ENC_FCCMP_D_FLOATCCMP); - } - return rc; -} - -/* fcmeq_advsimd_reg.xml */ -int FCMEQ_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|E=0|10|Rm=xxxxx|00|10|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E402400) { - decode_fields32(ENC_FCMEQ_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMEQ_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|E=0|sz=x|1|Rm=xxxxx|1110|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x5E20E400) { - decode_fields32(ENC_FCMEQ_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMEQ_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|E=0|10|Rm=xxxxx|00|10|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE402400) { - decode_fields32(ENC_FCMEQ_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMEQ_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|E=0|sz=x|1|Rm=xxxxx|1110|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE20E400) { - decode_fields32(ENC_FCMEQ_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMEQ_ASIMDSAME_ONLY); - } - return rc; -} - -/* fcmeq_advsimd_zero.xml */ -int FCMEQ_advsimd_zero(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=1|1111|00|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF8D800) { - decode_fields32(ENC_FCMEQ_ASISDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMEQ_ASISDMISCFP16_FZ); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|1|sz=x|10000|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5EA0D800) { - decode_fields32(ENC_FCMEQ_ASISDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMEQ_ASISDMISC_FZ); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|1111|00|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF8D800) { - decode_fields32(ENC_FCMEQ_ASIMDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMEQ_ASIMDMISCFP16_FZ); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|10000|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA0D800) { - decode_fields32(ENC_FCMEQ_ASIMDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMEQ_ASIMDMISC_FZ); - } - return rc; -} - -/* fcmge_advsimd_reg.xml */ -int FCMGE_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|E=0|10|Rm=xxxxx|00|10|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7E402400) { - decode_fields32(ENC_FCMGE_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGE_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|E=0|sz=x|1|Rm=xxxxx|1110|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x7E20E400) { - decode_fields32(ENC_FCMGE_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGE_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|E=0|10|Rm=xxxxx|00|10|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E402400) { - decode_fields32(ENC_FCMGE_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGE_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|E=0|sz=x|1|Rm=xxxxx|1110|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2E20E400) { - decode_fields32(ENC_FCMGE_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGE_ASIMDSAME_ONLY); - } - return rc; -} - -/* fcmge_advsimd_zero.xml */ -int FCMGE_advsimd_zero(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|a=1|1111|00|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EF8C800) { - decode_fields32(ENC_FCMGE_ASISDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGE_ASISDMISCFP16_FZ); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|1|sz=x|10000|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7EA0C800) { - decode_fields32(ENC_FCMGE_ASISDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGE_ASISDMISC_FZ); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|1111|00|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF8C800) { - decode_fields32(ENC_FCMGE_ASIMDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGE_ASIMDMISCFP16_FZ); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|1|sz=x|10000|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA0C800) { - decode_fields32(ENC_FCMGE_ASIMDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGE_ASIMDMISC_FZ); - } - return rc; -} - -/* fcmgt_advsimd_reg.xml */ -int FCMGT_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|E=1|10|Rm=xxxxx|00|10|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EC02400) { - decode_fields32(ENC_FCMGT_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGT_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|E=1|sz=x|1|Rm=xxxxx|1110|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x7EA0E400) { - decode_fields32(ENC_FCMGT_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGT_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|E=1|10|Rm=xxxxx|00|10|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC02400) { - decode_fields32(ENC_FCMGT_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGT_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|E=1|sz=x|1|Rm=xxxxx|1110|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2EA0E400) { - decode_fields32(ENC_FCMGT_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGT_ASIMDSAME_ONLY); - } - return rc; -} - -/* fcmgt_advsimd_zero.xml */ -int FCMGT_advsimd_zero(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=1|1111|00|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF8C800) { - decode_fields32(ENC_FCMGT_ASISDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGT_ASISDMISCFP16_FZ); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|1|sz=x|10000|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5EA0C800) { - decode_fields32(ENC_FCMGT_ASISDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMGT_ASISDMISC_FZ); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|1111|00|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF8C800) { - decode_fields32(ENC_FCMGT_ASIMDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGT_ASIMDMISCFP16_FZ); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|10000|0110|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA0C800) { - decode_fields32(ENC_FCMGT_ASIMDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMGT_ASIMDMISC_FZ); - } - return rc; -} - -/* fcmla_advsimd_elt.xml */ -int FCMLA_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|rot=xx|1|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF009400)==0x2F001000) { - decode_fields32(ENC_FCMLA_ADVSIMD_ELT, ctx, instr); - if(!HaveFCMA()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16() && ctx->size==1) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==2 && (ctx->L==1 || ctx->Q==0)) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==1 && ctx->H==1 && ctx->Q==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - if(ctx->size==2) { - ctx->index = UINT(ctx->H); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMLA_ADVSIMD_ELT); - } - return rc; -} - -/* fcmla_advsimd_vec.xml */ -int FCMLA_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|0|Rm=xxxxx|1|10|rot=xx|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20E400)==0x2E00C400) { - decode_fields32(ENC_FCMLA_ASIMDSAME2_C, ctx, instr); - if(!HaveFCMA()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16() && ctx->size==1) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Q==0 && ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMLA_ASIMDSAME2_C); - } - return rc; -} - -/* fcmle_advsimd.xml */ -int FCMLE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|a=1|1111|00|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EF8D800) { - decode_fields32(ENC_FCMLE_ASISDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMLE_ASISDMISCFP16_FZ); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|1|sz=x|10000|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7EA0D800) { - decode_fields32(ENC_FCMLE_ASISDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMLE_ASISDMISC_FZ); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|1111|00|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF8D800) { - decode_fields32(ENC_FCMLE_ASIMDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMLE_ASIMDMISCFP16_FZ); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|1|sz=x|10000|0110|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA0D800) { - decode_fields32(ENC_FCMLE_ASIMDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMLE_ASIMDMISC_FZ); - } - return rc; -} - -/* fcmlt_advsimd.xml */ -int FCMLT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=1|1111|00|opcode=01110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF8E800) { - decode_fields32(ENC_FCMLT_ASISDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMLT_ASISDMISCFP16_FZ); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|1|sz=x|10000|opcode=01110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5EA0E800) { - decode_fields32(ENC_FCMLT_ASISDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FCMLT_ASISDMISC_FZ); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|1111|00|opcode=01110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF8E800) { - decode_fields32(ENC_FCMLT_ASIMDMISCFP16_FZ, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMLT_ASIMDMISCFP16_FZ); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|10000|opcode=01110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA0E800) { - decode_fields32(ENC_FCMLT_ASIMDMISC_FZ, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCMLT_ASIMDMISC_FZ); - } - return rc; -} - -/* fcmpe_float.xml */ -int FCMPE_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|op=00|1000|Rn=xxxxx|opc=1x|000 */ - if((INSWORD & 0xFF20FC17)==0x1E202010) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_FLOAT; - - decode_fields32(ENC_FCMPE_H_FLOATCMP, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (UINT((ctx->ftype)^(2))); - ctx->signal_all_nans = TRUE; - ctx->cmp_with_zero = (SLICE(ctx->opc,0,0)==1); - if(ctx->ftype==3 && ctx->opc==2) OK(ENC_FCMPE_H_FLOATCMP); - if(ctx->ftype==3 && /* PreferBitsEqual(['ctx->Rm'],'00000') */ true && ctx->opc==3) OK(ENC_FCMPE_HZ_FLOATCMP); - if(ctx->ftype==0 && ctx->opc==2) OK(ENC_FCMPE_S_FLOATCMP); - if(ctx->ftype==0 && /* PreferBitsEqual(['ctx->Rm'],'00000') */ true && ctx->opc==3) OK(ENC_FCMPE_SZ_FLOATCMP); - if(ctx->ftype==1 && ctx->opc==2) OK(ENC_FCMPE_D_FLOATCMP); - if(ctx->ftype==1 && /* PreferBitsEqual(['ctx->Rm'],'00000') */ true && ctx->opc==3) OK(ENC_FCMPE_DZ_FLOATCMP); - } - return rc; -} - -/* fcmp_float.xml */ -int FCMP_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|op=00|1000|Rn=xxxxx|opc=0x|000 */ - if((INSWORD & 0xFF20FC17)==0x1E202000) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_FLOAT; - - decode_fields32(ENC_FCMP_H_FLOATCMP, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (UINT((ctx->ftype)^(2))); - ctx->signal_all_nans = FALSE; - ctx->cmp_with_zero = (SLICE(ctx->opc,0,0)==1); - if(ctx->ftype==3 && ctx->opc==0) OK(ENC_FCMP_H_FLOATCMP); - if(ctx->ftype==3 && /* PreferBitsEqual(['ctx->Rm'],'00000') */ true && ctx->opc==1) OK(ENC_FCMP_HZ_FLOATCMP); - if(ctx->ftype==0 && ctx->opc==0) OK(ENC_FCMP_S_FLOATCMP); - if(ctx->ftype==0 && /* PreferBitsEqual(['ctx->Rm'],'00000') */ true && ctx->opc==1) OK(ENC_FCMP_SZ_FLOATCMP); - if(ctx->ftype==1 && ctx->opc==0) OK(ENC_FCMP_D_FLOATCMP); - if(ctx->ftype==1 && /* PreferBitsEqual(['ctx->Rm'],'00000') */ true && ctx->opc==1) OK(ENC_FCMP_DZ_FLOATCMP); - } - return rc; -} - -/* fcsel_float.xml */ -int FCSEL_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|cond=xxxx|11|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF200C00)==0x1E200C00) { - decode_fields32(ENC_FCSEL_H_FLOATSEL, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (UINT((ctx->ftype)^(2))); - ctx->condition = ctx->cond; - if(ctx->ftype==3) OK(ENC_FCSEL_H_FLOATSEL); - if(ctx->ftype==0) OK(ENC_FCSEL_S_FLOATSEL); - if(ctx->ftype==1) OK(ENC_FCSEL_D_FLOATSEL); - } - return rc; -} - -/* fcvtas_advsimd.xml */ -int FCVTAS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=0|1111|00|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E79C800) { - decode_fields32(ENC_FCVTAS_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = FALSE; - OK(ENC_FCVTAS_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|0|sz=x|10000|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5E21C800) { - decode_fields32(ENC_FCVTAS_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = FALSE; - OK(ENC_FCVTAS_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=0|1111|00|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE79C800) { - decode_fields32(ENC_FCVTAS_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = FALSE; - OK(ENC_FCVTAS_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|10000|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE21C800) { - decode_fields32(ENC_FCVTAS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = FALSE; - OK(ENC_FCVTAS_ASIMDMISC_R); - } - return rc; -} - -/* fcvtas_float.xml */ -int FCVTAS_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=100|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E240000) { - decode_fields32(ENC_FCVTAS_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTAS_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTAS_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTAS_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTAS_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTAS_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTAS_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtas_sisd.xml */ -int FCVTAS_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=010|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E3A0000) { - decode_fields32(ENC_FCVTAS_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTAS_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTAS_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTAS_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTAS_SISD_32D); - } - return rc; -} - -/* fcvtau_advsimd.xml */ -int FCVTAU_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|a=0|1111|00|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7E79C800) { - decode_fields32(ENC_FCVTAU_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = TRUE; - OK(ENC_FCVTAU_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|0|sz=x|10000|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7E21C800) { - decode_fields32(ENC_FCVTAU_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = TRUE; - OK(ENC_FCVTAU_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=0|1111|00|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E79C800) { - decode_fields32(ENC_FCVTAU_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = TRUE; - OK(ENC_FCVTAU_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|0|sz=x|10000|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E21C800) { - decode_fields32(ENC_FCVTAU_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = TRUE; - OK(ENC_FCVTAU_ASIMDMISC_R); - } - return rc; -} - -/* fcvtau_float.xml */ -int FCVTAU_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=101|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E250000) { - decode_fields32(ENC_FCVTAU_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_TIEAWAY; - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTAU_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTAU_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTAU_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTAU_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTAU_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTAU_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtau_sisd.xml */ -int FCVTAU_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=011|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E3B0000) { - decode_fields32(ENC_FCVTAU_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTAU_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTAU_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTAU_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTAU_SISD_32D); - } - return rc; -} - -/* fcvtl_advsimd.xml */ -int FCVTL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|10000|opcode=10111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE217800) { - decode_fields32(ENC_FCVTL_ASIMDMISC_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x10) << (UINT(ctx->sz)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCVTL_ASIMDMISC_L); - } - return rc; -} - -/* fcvtms_advsimd.xml */ -int FCVTMS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|o2=0|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E79B800) { - decode_fields32(ENC_FCVTMS_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTMS_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|o2=0|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5E21B800) { - decode_fields32(ENC_FCVTMS_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTMS_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE79B800) { - decode_fields32(ENC_FCVTMS_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTMS_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE21B800) { - decode_fields32(ENC_FCVTMS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTMS_ASIMDMISC_R); - } - return rc; -} - -/* fcvtms_float.xml */ -int FCVTMS_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=000|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E300000) { - decode_fields32(ENC_FCVTMS_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_NEGINF; - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTMS_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTMS_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTMS_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTMS_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTMS_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTMS_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtms_sisd.xml */ -int FCVTMS_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=100|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E340000) { - decode_fields32(ENC_FCVTMS_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTMS_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTMS_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTMS_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTMS_SISD_32D); - } - return rc; -} - -/* fcvtmu_advsimd.xml */ -int FCVTMU_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|o2=0|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7E79B800) { - decode_fields32(ENC_FCVTMU_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTMU_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o2=0|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7E21B800) { - decode_fields32(ENC_FCVTMU_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTMU_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E79B800) { - decode_fields32(ENC_FCVTMU_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTMU_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E21B800) { - decode_fields32(ENC_FCVTMU_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTMU_ASIMDMISC_R); - } - return rc; -} - -/* fcvtmu_float.xml */ -int FCVTMU_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=001|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E310000) { - decode_fields32(ENC_FCVTMU_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_NEGINF; - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTMU_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTMU_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTMU_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTMU_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTMU_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTMU_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtmu_sisd.xml */ -int FCVTMU_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=101|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E350000) { - decode_fields32(ENC_FCVTMU_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTMU_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTMU_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTMU_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTMU_SISD_32D); - } - return rc; -} - -/* fcvtns_advsimd.xml */ -int FCVTNS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|o2=0|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E79A800) { - decode_fields32(ENC_FCVTNS_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTNS_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|o2=0|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5E21A800) { - decode_fields32(ENC_FCVTNS_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTNS_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE79A800) { - decode_fields32(ENC_FCVTNS_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTNS_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE21A800) { - decode_fields32(ENC_FCVTNS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTNS_ASIMDMISC_R); - } - return rc; -} - -/* fcvtns_float.xml */ -int FCVTNS_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=000|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E200000) { - decode_fields32(ENC_FCVTNS_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_TIEEVEN; - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTNS_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTNS_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTNS_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTNS_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTNS_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTNS_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtns_sisd.xml */ -int FCVTNS_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=01|opcode=010|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E2A0000) { - decode_fields32(ENC_FCVTNS_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTNS_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTNS_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTNS_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTNS_SISD_32D); - } - return rc; -} - -/* fcvtnu_advsimd.xml */ -int FCVTNU_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|o2=0|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7E79A800) { - decode_fields32(ENC_FCVTNU_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTNU_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o2=0|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7E21A800) { - decode_fields32(ENC_FCVTNU_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTNU_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E79A800) { - decode_fields32(ENC_FCVTNU_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTNU_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E21A800) { - decode_fields32(ENC_FCVTNU_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTNU_ASIMDMISC_R); - } - return rc; -} - -/* fcvtnu_float.xml */ -int FCVTNU_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=001|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E210000) { - decode_fields32(ENC_FCVTNU_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_TIEEVEN; - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTNU_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTNU_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTNU_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTNU_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTNU_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTNU_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtnu_sisd.xml */ -int FCVTNU_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=01|opcode=011|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E2B0000) { - decode_fields32(ENC_FCVTNU_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTNU_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTNU_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTNU_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTNU_SISD_32D); - } - return rc; -} - -/* fcvtn_advsimd.xml */ -int FCVTN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|10000|opcode=10110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE216800) { - decode_fields32(ENC_FCVTN_ASIMDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x10) << (UINT(ctx->sz)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FCVTN_ASIMDMISC_N); - } - return rc; -} - -/* fcvtn_advsimd_168.xml */ -int FCVTN_advsimd_168(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=01|0|Rm=xxxxx|1|opcode=1110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE40F400) { - decode_fields32(ENC_FCVTN_ASIMDSAME2_D, ctx, instr); - if(!HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->elements = ((0x10)!=0 ? ((ctx->datasize) / (0x10)) : 0); - OK(ENC_FCVTN_ASIMDSAME2_D); - } - return rc; -} - -/* fcvtn_advsimd_328.xml */ -int FCVTN_advsimd_328(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=00|0|Rm=xxxxx|1|opcode=1110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE00F400) { - decode_fields32(ENC_FCVTN_ASIMDSAME2_H, ctx, instr); - if(!HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->part = UINT(ctx->Q); - ctx->elements = ((0x20)!=0 ? ((0x80) / (0x20)) : 0); - OK(ENC_FCVTN_ASIMDSAME2_H); - } - return rc; -} - -/* fcvtps_advsimd.xml */ -int FCVTPS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|o2=1|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF9A800) { - decode_fields32(ENC_FCVTPS_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTPS_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|o2=1|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5EA1A800) { - decode_fields32(ENC_FCVTPS_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTPS_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF9A800) { - decode_fields32(ENC_FCVTPS_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTPS_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA1A800) { - decode_fields32(ENC_FCVTPS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTPS_ASIMDMISC_R); - } - return rc; -} - -/* fcvtps_float.xml */ -int FCVTPS_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=01|opcode=000|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E280000) { - decode_fields32(ENC_FCVTPS_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_POSINF; - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTPS_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTPS_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTPS_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTPS_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTPS_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTPS_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtps_sisd.xml */ -int FCVTPS_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=010|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E320000) { - decode_fields32(ENC_FCVTPS_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTPS_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTPS_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTPS_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTPS_SISD_32D); - } - return rc; -} - -/* fcvtpu_advsimd.xml */ -int FCVTPU_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|o2=1|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EF9A800) { - decode_fields32(ENC_FCVTPU_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTPU_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o2=1|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7EA1A800) { - decode_fields32(ENC_FCVTPU_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTPU_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|o2=1|1111|00|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF9A800) { - decode_fields32(ENC_FCVTPU_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTPU_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o2=1|sz=x|10000|1101|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA1A800) { - decode_fields32(ENC_FCVTPU_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTPU_ASIMDMISC_R); - } - return rc; -} - -/* fcvtpu_float.xml */ -int FCVTPU_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=01|opcode=001|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E290000) { - decode_fields32(ENC_FCVTPU_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_POSINF; - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTPU_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTPU_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTPU_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTPU_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTPU_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTPU_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtpu_sisd.xml */ -int FCVTPU_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=011|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E330000) { - decode_fields32(ENC_FCVTPU_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTPU_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTPU_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTPU_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTPU_SISD_32D); - } - return rc; -} - -/* fcvtxn_advsimd.xml */ -int FCVTXN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=01|10000|opcode=10110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7E616800) { - decode_fields32(ENC_FCVTXN_ASISDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x20; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - OK(ENC_FCVTXN_ASISDMISC_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=01|10000|opcode=10110|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E616800) { - decode_fields32(ENC_FCVTXN_ASIMDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x20; - ctx->datasize = 0x40; - ctx->elements = 2; - ctx->part = UINT(ctx->Q); - OK(ENC_FCVTXN_ASIMDMISC_N); - } - return rc; -} - -/* fcvtzs_advsimd_fix.xml */ -int FCVTZS_advsimd_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh!=0000|immb=xxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x5F00FC00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_FCVTZS_ASISDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZS_ASISDSHF_C); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF00FC00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_FCVTZS_ASIMDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZS_ASIMDSHF_C); - } - return rc; -} - -/* fcvtzs_advsimd_int.xml */ -int FCVTZS_advsimd_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|o2=1|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF9B800) { - decode_fields32(ENC_FCVTZS_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTZS_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|o2=1|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5EA1B800) { - decode_fields32(ENC_FCVTZS_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTZS_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF9B800) { - decode_fields32(ENC_FCVTZS_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTZS_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA1B800) { - decode_fields32(ENC_FCVTZS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = FALSE; - OK(ENC_FCVTZS_ASIMDMISC_R); - } - return rc; -} - -/* fcvtzs_float_fix.xml */ -int FCVTZS_float_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|0|rmode=11|opcode=000|scale=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3F0000)==0x1E180000) { - decode_fields32(ENC_FCVTZS_32H_FLOAT2FIX, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->scale,5,5)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->decode_fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->fracbits = 0x40-UINT(ctx->scale); - ctx->rounding = FPRounding_ZERO; - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZS_32H_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZS_64H_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTZS_32S_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZS_64S_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZS_32D_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTZS_64D_FLOAT2FIX); - } - return rc; -} - -/* fcvtzs_float_int.xml */ -int FCVTZS_float_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=000|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E380000) { - decode_fields32(ENC_FCVTZS_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_ZERO; - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZS_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZS_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTZS_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZS_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZS_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTZS_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtzs_sisd.xml */ -int FCVTZS_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=110|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E360000) { - decode_fields32(ENC_FCVTZS_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZS_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZS_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZS_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZS_SISD_32D); - } - return rc; -} - -/* fcvtzu_advsimd_fix.xml */ -int FCVTZU_advsimd_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F00FC00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_FCVTZU_ASISDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZU_ASISDSHF_C); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F00FC00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_FCVTZU_ASIMDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZU_ASIMDSHF_C); - } - return rc; -} - -/* fcvtzu_advsimd_int.xml */ -int FCVTZU_advsimd_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|o2=1|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EF9B800) { - decode_fields32(ENC_FCVTZU_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTZU_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o2=1|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7EA1B800) { - decode_fields32(ENC_FCVTZU_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTZU_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|o2=1|1111|00|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF9B800) { - decode_fields32(ENC_FCVTZU_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTZU_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o2=1|sz=x|10000|1101|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA1B800) { - decode_fields32(ENC_FCVTZU_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FPDecodeRounding(((ctx->o1<<1)|ctx->o2)); - ctx->unsigned_ = TRUE; - OK(ENC_FCVTZU_ASIMDMISC_R); - } - return rc; -} - -/* fcvtzu_float_fix.xml */ -int FCVTZU_float_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|0|rmode=11|opcode=001|scale=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3F0000)==0x1E190000) { - decode_fields32(ENC_FCVTZU_32H_FLOAT2FIX, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->scale,5,5)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->decode_fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->fracbits = 0x40-UINT(ctx->scale); - ctx->rounding = FPRounding_ZERO; - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZU_32H_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZU_64H_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTZU_32S_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZU_64S_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZU_32D_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTZU_64D_FLOAT2FIX); - } - return rc; -} - -/* fcvtzu_float_int.xml */ -int FCVTZU_float_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=001|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E390000) { - decode_fields32(ENC_FCVTZU_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRounding_ZERO; - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZU_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZU_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_FCVTZU_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZU_64S_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZU_32D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_FCVTZU_64D_FLOAT2INT); - } - return rc; -} - -/* fcvtzu_sisd.xml */ -int FCVTZU_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=10|opcode=111|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E370000) { - decode_fields32(ENC_FCVTZU_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_FCVTZU_SISD_32H); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_FCVTZU_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_FCVTZU_SISD_64S); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_FCVTZU_SISD_32D); - } - return rc; -} - -/* fcvt_float.xml */ -int FCVT_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|10001|opc=xx|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3E7C00)==0x1E224000) { - decode_fields32(ENC_FCVT_SH_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==ctx->opc || ctx->ftype==2 || ctx->opc==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->srcsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->dstsize = (8) << (UINT((ctx->opc)^(2))); - if(ctx->ftype==3 && ctx->opc==0) OK(ENC_FCVT_SH_FLOATDP1); - if(ctx->ftype==3 && ctx->opc==1) OK(ENC_FCVT_DH_FLOATDP1); - if(ctx->ftype==0 && ctx->opc==3) OK(ENC_FCVT_HS_FLOATDP1); - if(ctx->ftype==0 && ctx->opc==1) OK(ENC_FCVT_DS_FLOATDP1); - if(ctx->ftype==1 && ctx->opc==3) OK(ENC_FCVT_HD_FLOATDP1); - if(ctx->ftype==1 && ctx->opc==0) OK(ENC_FCVT_SD_FLOATDP1); - } - return rc; -} - -/* fdiv_advsimd.xml */ -int FDIV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=0|10|Rm=xxxxx|00|opcode=111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E403C00) { - decode_fields32(ENC_FDIV_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FDIV_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|0|sz=x|1|Rm=xxxxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2E20FC00) { - decode_fields32(ENC_FDIV_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FDIV_ASIMDSAME_ONLY); - } - return rc; -} - -/* fdiv_float.xml */ -int FDIV_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|opcode=0001|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E201800) { - decode_fields32(ENC_FDIV_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FDIV_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FDIV_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FDIV_D_FLOATDP2); - } - return rc; -} - -/* fdot_advsimd_2wayelem.xml */ -int FDOT_advsimd_2wayelem(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|1|size=01|L=x|M=x|Rm=xxxx|opcode=0000|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF400000) { - decode_fields32(ENC_FDOT_ASIMDELEM_G, ctx, instr); - if(!HaveFP8DOT2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Rd); - ctx->m = UINT(ctx->Rm); - ctx->i = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->esize = 0x10; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FDOT_ASIMDELEM_G); - } - return rc; -} - -/* fdot_advsimd_2wayvec.xml */ -int FDOT_advsimd_2wayvec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=01|0|Rm=xxxxx|1|opcode=1111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE40FC00) { - decode_fields32(ENC_FDOT_ASIMDSAME2_D, ctx, instr); - if(!HaveFP8DOT2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->esize = 0x10; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FDOT_ASIMDSAME2_D); - } - return rc; -} - -/* fdot_advsimd_4wayelem.xml */ -int FDOT_advsimd_4wayelem(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|1|size=00|L=x|M=x|Rm=xxxx|opcode=0000|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF000000) { - decode_fields32(ENC_FDOT_ASIMDELEM_D, ctx, instr); - if(!HaveFP8DOT4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Rd); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - ctx->i = UINT(((ctx->H<<1)|ctx->L)); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->esize = 0x20; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FDOT_ASIMDELEM_D); - } - return rc; -} - -/* fdot_advsimd_4wayvec.xml */ -int FDOT_advsimd_4wayvec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=00|0|Rm=xxxxx|1|opcode=1111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE00FC00) { - decode_fields32(ENC_FDOT_ASIMDSAME2_DD, ctx, instr); - if(!HaveFP8DOT4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->esize = 0x20; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FDOT_ASIMDSAME2_DD); - } - return rc; -} - -/* fdot_advsimd_elt_fp16fp32.xml */ -int FDOT_advsimd_elt_fp16fp32(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|1|size=01|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF409000) { - decode_fields32(ENC_FDOT_ASIMDELEM_FP16FP32, ctx, instr); - if(!HaveF16F32DOT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - ctx->d = UINT(ctx->Rd); - ctx->i = UINT(((ctx->H<<1)|ctx->L)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((0x20)!=0 ? ((ctx->datasize) / (0x20)) : 0); - OK(ENC_FDOT_ASIMDELEM_FP16FP32); - } - return rc; -} - -/* fdot_advsimd_fp16fp32.xml */ -int FDOT_advsimd_fp16fp32(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=10|0|Rm=xxxxx|1|opcode=1111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE80FC00) { - decode_fields32(ENC_FDOT_ASIMDSAME2_FP16FP32, ctx, instr); - if(!HaveF16F32DOT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((0x20)!=0 ? ((ctx->datasize) / (0x20)) : 0); - OK(ENC_FDOT_ASIMDSAME2_FP16FP32); - } - return rc; -} - -/* fjcvtzs.xml */ -int FJCVTZS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_double_precision_to_32_bit */ - /* sf=0|0|S=0|1|111|0|ftype=01|1|rmode=11|opcode=110|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x1E7E0000) { - decode_fields32(ENC_FJCVTZS_32D_FLOAT2INT, ctx, instr); - if(!HaveJSCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_FJCVTZS_32D_FLOAT2INT); - } - return rc; -} - -/* fmadd_float.xml */ -int FMADD_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11111|ftype=xx|o1=0|Rm=xxxxx|o0=0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF208000)==0x1F000000) { - decode_fields32(ENC_FMADD_H_FLOATDP3, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMADD_H_FLOATDP3); - if(ctx->ftype==0) OK(ENC_FMADD_S_FLOATDP3); - if(ctx->ftype==1) OK(ENC_FMADD_D_FLOATDP3); - } - return rc; -} - -/* fmaxnmp_advsimd_pair.xml */ -int FMAXNMP_advsimd_pair(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 01|U=0|1|111|0|o1=0|sz=0|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E30C800) { - decode_fields32(ENC_FMAXNMP_ASISDPAIR_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = 0x20; - OK(ENC_FMAXNMP_ASISDPAIR_ONLY_H); - } - /* class iclass_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o1=0|sz=x|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7E30C800) { - decode_fields32(ENC_FMAXNMP_ASISDPAIR_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->esize) * (2); - OK(ENC_FMAXNMP_ASISDPAIR_ONLY_SD); - } - return rc; -} - -/* fmaxnmp_advsimd_vec.xml */ -int FMAXNMP_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=0|10|Rm=xxxxx|00|opcode=000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E400400) { - decode_fields32(ENC_FMAXNMP_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAXNMP_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o1=0|sz=x|1|Rm=xxxxx|opcode=11000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2E20C400) { - decode_fields32(ENC_FMAXNMP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAXNMP_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmaxnmv_advsimd.xml */ -int FMAXNMV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o1=0|0|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE30C800) { - decode_fields32(ENC_FMAXNMV_ASIMDALL_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMAXNMV_ASIMDALL_ONLY_H); - } - /* class iclass_single_precision */ - /* 0|Q=1|U=1|0|111|0|o1=0|sz=0|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x6E30C800) { - decode_fields32(ENC_FMAXNMV_ASIMDALL_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMAXNMV_ASIMDALL_ONLY_SD); - } - return rc; -} - -/* fmaxnm_advsimd.xml */ -int FMAXNM_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=0|10|Rm=xxxxx|00|opcode=000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE400400) { - decode_fields32(ENC_FMAXNM_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAXNM_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o1=0|sz=x|1|Rm=xxxxx|opcode=11000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE20C400) { - decode_fields32(ENC_FMAXNM_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAXNM_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmaxnm_float.xml */ -int FMAXNM_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|01|op=10|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E206800) { - decode_fields32(ENC_FMAXNM_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMAXNM_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FMAXNM_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FMAXNM_D_FLOATDP2); - } - return rc; -} - -/* fmaxp_advsimd_pair.xml */ -int FMAXP_advsimd_pair(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 01|U=0|1|111|0|o1=0|sz=0|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E30F800) { - decode_fields32(ENC_FMAXP_ASISDPAIR_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = 0x20; - OK(ENC_FMAXP_ASISDPAIR_ONLY_H); - } - /* class iclass_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o1=0|sz=x|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7E30F800) { - decode_fields32(ENC_FMAXP_ASISDPAIR_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->esize) * (2); - OK(ENC_FMAXP_ASISDPAIR_ONLY_SD); - } - return rc; -} - -/* fmaxp_advsimd_vec.xml */ -int FMAXP_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|o1=0|10|Rm=xxxxx|00|opcode=110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E403400) { - decode_fields32(ENC_FMAXP_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAXP_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o1=0|sz=x|1|Rm=xxxxx|opcode=11110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2E20F400) { - decode_fields32(ENC_FMAXP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAXP_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmaxv_advsimd.xml */ -int FMAXV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o1=0|0|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE30F800) { - decode_fields32(ENC_FMAXV_ASIMDALL_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMAXV_ASIMDALL_ONLY_H); - } - /* class iclass_single_precision */ - /* 0|Q=1|U=1|0|111|0|o1=0|sz=0|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x6E30F800) { - decode_fields32(ENC_FMAXV_ASIMDALL_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMAXV_ASIMDALL_ONLY_SD); - } - return rc; -} - -/* fmax_advsimd.xml */ -int FMAX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o1=0|10|Rm=xxxxx|00|opcode=110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE403400) { - decode_fields32(ENC_FMAX_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAX_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o1=0|sz=x|1|Rm=xxxxx|opcode=11110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE20F400) { - decode_fields32(ENC_FMAX_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMAX_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmax_float.xml */ -int FMAX_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|01|op=00|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E204800) { - decode_fields32(ENC_FMAX_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMAX_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FMAX_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FMAX_D_FLOATDP2); - } - return rc; -} - -/* fminnmp_advsimd_pair.xml */ -int FMINNMP_advsimd_pair(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 01|U=0|1|111|0|o1=1|sz=0|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EB0C800) { - decode_fields32(ENC_FMINNMP_ASISDPAIR_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = 0x20; - OK(ENC_FMINNMP_ASISDPAIR_ONLY_H); - } - /* class iclass_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o1=1|sz=x|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7EB0C800) { - decode_fields32(ENC_FMINNMP_ASISDPAIR_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->esize) * (2); - OK(ENC_FMINNMP_ASISDPAIR_ONLY_SD); - } - return rc; -} - -/* fminnmp_advsimd_vec.xml */ -int FMINNMP_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|10|Rm=xxxxx|00|opcode=000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC00400) { - decode_fields32(ENC_FMINNMP_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMINNMP_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o1=1|sz=x|1|Rm=xxxxx|opcode=11000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2EA0C400) { - decode_fields32(ENC_FMINNMP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMINNMP_ASIMDSAME_ONLY); - } - return rc; -} - -/* fminnmv_advsimd.xml */ -int FMINNMV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o1=1|0|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEB0C800) { - decode_fields32(ENC_FMINNMV_ASIMDALL_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMINNMV_ASIMDALL_ONLY_H); - } - /* class iclass_single_precision */ - /* 0|Q=1|U=1|0|111|0|o1=1|sz=0|11000|opcode=01100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x6EB0C800) { - decode_fields32(ENC_FMINNMV_ASIMDALL_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMINNMV_ASIMDALL_ONLY_SD); - } - return rc; -} - -/* fminnm_advsimd.xml */ -int FMINNM_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|10|Rm=xxxxx|00|opcode=000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEC00400) { - decode_fields32(ENC_FMINNM_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMINNM_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o1=1|sz=x|1|Rm=xxxxx|opcode=11000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xEA0C400) { - decode_fields32(ENC_FMINNM_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMINNM_ASIMDSAME_ONLY); - } - return rc; -} - -/* fminnm_float.xml */ -int FMINNM_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|01|op=11|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E207800) { - decode_fields32(ENC_FMINNM_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMINNM_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FMINNM_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FMINNM_D_FLOATDP2); - } - return rc; -} - -/* fminp_advsimd_pair.xml */ -int FMINP_advsimd_pair(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 01|U=0|1|111|0|o1=1|sz=0|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EB0F800) { - decode_fields32(ENC_FMINP_ASISDPAIR_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = 0x20; - OK(ENC_FMINP_ASISDPAIR_ONLY_H); - } - /* class iclass_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|o1=1|sz=x|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7EB0F800) { - decode_fields32(ENC_FMINP_ASISDPAIR_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->esize) * (2); - OK(ENC_FMINP_ASISDPAIR_ONLY_SD); - } - return rc; -} - -/* fminp_advsimd_vec.xml */ -int FMINP_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|o1=1|10|Rm=xxxxx|00|opcode=110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC03400) { - decode_fields32(ENC_FMINP_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMINP_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o1=1|sz=x|1|Rm=xxxxx|opcode=11110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2EA0F400) { - decode_fields32(ENC_FMINP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMINP_ASIMDSAME_ONLY); - } - return rc; -} - -/* fminv_advsimd.xml */ -int FMINV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o1=1|0|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEB0F800) { - decode_fields32(ENC_FMINV_ASIMDALL_ONLY_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMINV_ASIMDALL_ONLY_H); - } - /* class iclass_single_precision */ - /* 0|Q=1|U=1|0|111|0|o1=1|sz=0|11000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x6EB0F800) { - decode_fields32(ENC_FMINV_ASIMDALL_ONLY_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_FMINV_ASIMDALL_ONLY_SD); - } - return rc; -} - -/* fmin_advsimd.xml */ -int FMIN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o1=1|10|Rm=xxxxx|00|opcode=110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEC03400) { - decode_fields32(ENC_FMIN_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMIN_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o1=1|sz=x|1|Rm=xxxxx|opcode=11110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xEA0F400) { - decode_fields32(ENC_FMIN_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMIN_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmin_float.xml */ -int FMIN_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|01|op=01|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E205800) { - decode_fields32(ENC_FMIN_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMIN_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FMIN_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FMIN_D_FLOATDP2); - } - return rc; -} - -/* fmlalb_advsimd_elem.xml */ -int FMLALB_advsimd_elem(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|01111|size=11|L=x|M=x|Rm=xxxx|opcode=0000|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xFC00000) { - decode_fields32(ENC_FMLALB_ASIMDELEM_H, ctx, instr); - if(!HaveFP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(SLICE(ctx->Rm,2,0)); - ctx->d = UINT(ctx->Rd); - ctx->index = UINT(((ctx->H<<3)|(ctx->L<<2)|(ctx->M<<1)|SLICE(ctx->Rm,3,3))); - ctx->elements = ((0x10)!=0 ? ((0x80) / (0x10)) : 0); - ctx->sel = UINT(ctx->Q); - if(ctx->Q==0) OK(ENC_FMLALB_ASIMDELEM_H); - if(ctx->Q==1) OK(ENC_FMLALT_ASIMDELEM_H); - } - return rc; -} - -/* fmlalb_advsimd_vec.xml */ -int FMLALB_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|01110|size=11|0|Rm=xxxxx|1|opcode=1111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEC0FC00) { - decode_fields32(ENC_FMLALB_ASIMDSAME2_J, ctx, instr); - if(!HaveFP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->elements = ((0x10)!=0 ? ((0x80) / (0x10)) : 0); - ctx->sel = UINT(ctx->Q); - if(ctx->Q==0) OK(ENC_FMLALB_ASIMDSAME2_J); - if(ctx->Q==1) OK(ENC_FMLALT_ASIMDSAME2_J); - } - return rc; -} - -/* fmlallbb_advsimd_elem.xml */ -int FMLALLBB_advsimd_elem(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=1|01111|size=0x|L=x|M=x|Rm=xxxx|opcode=1000|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80F400)==0x2F008000) { - decode_fields32(ENC_FMLALLBB_ASIMDELEM_J, ctx, instr); - if(!HaveFP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(SLICE(ctx->Rm,2,0)); - ctx->d = UINT(ctx->Rd); - ctx->index = UINT(((ctx->H<<3)|(ctx->L<<2)|(ctx->M<<1)|SLICE(ctx->Rm,3,3))); - ctx->elements = ((0x20)!=0 ? ((0x80) / (0x20)) : 0); - ctx->sel = UINT(((ctx->Q<<1)|SLICE(ctx->size,0,0))); - if(ctx->Q==0 && ctx->size==0) OK(ENC_FMLALLBB_ASIMDELEM_J); - if(ctx->Q==0 && ctx->size==1) OK(ENC_FMLALLBT_ASIMDELEM_J); - if(ctx->Q==1 && ctx->size==0) OK(ENC_FMLALLTB_ASIMDELEM_J); - if(ctx->Q==1 && ctx->size==1) OK(ENC_FMLALLTT_ASIMDELEM_J); - } - return rc; -} - -/* fmlallbb_advsimd_vec.xml */ -int FMLALLBB_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|01110|size=0x|0|Rm=xxxxx|1|opcode=1000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE00C400) { - decode_fields32(ENC_FMLALLBB_ASIMDSAME2_G, ctx, instr); - if(!HaveFP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->elements = ((0x20)!=0 ? ((0x80) / (0x20)) : 0); - ctx->sel = UINT(((ctx->Q<<1)|SLICE(ctx->size,0,0))); - if(ctx->Q==0 && ctx->size==0) OK(ENC_FMLALLBB_ASIMDSAME2_G); - if(ctx->Q==0 && ctx->size==1) OK(ENC_FMLALLBT_ASIMDSAME2_G); - if(ctx->Q==1 && ctx->size==0) OK(ENC_FMLALLTB_ASIMDSAME2_G); - if(ctx->Q==1 && ctx->size==1) OK(ENC_FMLALLTT_ASIMDSAME2_G); - } - return rc; -} - -/* fmlal_advsimd_elt.xml */ -int FMLAL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_fmlal */ - /* 0|Q=x|U=0|0|111|1|1|sz=0|L=x|M=x|Rm=xxxx|0|S=0|00|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF800000) { - decode_fields32(ENC_FMLAL_ASIMDELEM_LH, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 0; - OK(ENC_FMLAL_ASIMDELEM_LH); - } - /* class iclass_fmlal2 */ - /* 0|Q=x|U=1|0|111|1|1|sz=0|L=x|M=x|Rm=xxxx|1|S=0|00|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0x2F808000) { - decode_fields32(ENC_FMLAL2_ASIMDELEM_LH, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 1; - OK(ENC_FMLAL2_ASIMDELEM_LH); - } - return rc; -} - -/* fmlal_advsimd_vec.xml */ -int FMLAL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_fmlal */ - /* 0|Q=x|U=0|0|111|0|S=0|sz=0|1|Rm=xxxxx|opcode=11101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE20EC00) { - decode_fields32(ENC_FMLAL_ASIMDSAME_F, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 0; - OK(ENC_FMLAL_ASIMDSAME_F); - } - /* class iclass_fmlal2 */ - /* 0|Q=x|U=1|0|111|0|S=0|sz=0|1|Rm=xxxxx|opcode=11001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E20CC00) { - decode_fields32(ENC_FMLAL2_ASIMDSAME_F, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 1; - OK(ENC_FMLAL2_ASIMDSAME_F); - } - return rc; -} - -/* fmla_advsimd_elt.xml */ -int FMLA_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|1|size=00|L=x|M=x|Rm=xxxx|0|o2=0|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0F400)==0x5F001000) { - decode_fields32(ENC_FMLA_ASISDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Rd); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMLA_ASISDELEM_RH_H); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|1|1|sz=x|L=x|M=x|Rm=xxxx|0|o2=0|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80F400)==0x5F801000) { - decode_fields32(ENC_FMLA_ASISDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMLA_ASISDELEM_R_SD); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|1|size=00|L=x|M=x|Rm=xxxx|0|o2=0|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF001000) { - decode_fields32(ENC_FMLA_ASIMDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Rd); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLA_ASIMDELEM_RH_H); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|1|1|sz=x|L=x|M=x|Rm=xxxx|0|o2=0|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80F400)==0xF801000) { - decode_fields32(ENC_FMLA_ASIMDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLA_ASIMDELEM_R_SD); - } - return rc; -} - -/* fmla_advsimd_vec.xml */ -int FMLA_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=0|10|Rm=xxxxx|00|opcode=001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE400C00) { - decode_fields32(ENC_FMLA_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLA_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|op=0|sz=x|1|Rm=xxxxx|opcode=11001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE20CC00) { - decode_fields32(ENC_FMLA_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLA_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmlsl_advsimd_elt.xml */ -int FMLSL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_fmlsl */ - /* 0|Q=x|U=0|0|111|1|1|sz=0|L=x|M=x|Rm=xxxx|0|S=1|00|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF804000) { - decode_fields32(ENC_FMLSL_ASIMDELEM_LH, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 0; - OK(ENC_FMLSL_ASIMDELEM_LH); - } - /* class iclass_fmlsl2 */ - /* 0|Q=x|U=1|0|111|1|1|sz=0|L=x|M=x|Rm=xxxx|1|S=1|00|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0x2F80C000) { - decode_fields32(ENC_FMLSL2_ASIMDELEM_LH, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 1; - OK(ENC_FMLSL2_ASIMDELEM_LH); - } - return rc; -} - -/* fmlsl_advsimd_vec.xml */ -int FMLSL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_fmlsl */ - /* 0|Q=x|U=0|0|111|0|S=1|sz=0|1|Rm=xxxxx|opcode=11101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEA0EC00) { - decode_fields32(ENC_FMLSL_ASIMDSAME_F, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 0; - OK(ENC_FMLSL_ASIMDSAME_F); - } - /* class iclass_fmlsl2 */ - /* 0|Q=x|U=1|0|111|0|S=1|sz=0|1|Rm=xxxxx|opcode=11001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EA0CC00) { - decode_fields32(ENC_FMLSL2_ASIMDSAME_F, ctx, instr); - if(!HaveFHM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = 1; - OK(ENC_FMLSL2_ASIMDSAME_F); - } - return rc; -} - -/* fmls_advsimd_elt.xml */ -int FMLS_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|1|size=00|L=x|M=x|Rm=xxxx|0|o2=1|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0F400)==0x5F005000) { - decode_fields32(ENC_FMLS_ASISDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Rd); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMLS_ASISDELEM_RH_H); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|1|1|sz=x|L=x|M=x|Rm=xxxx|0|o2=1|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80F400)==0x5F805000) { - decode_fields32(ENC_FMLS_ASISDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMLS_ASISDELEM_R_SD); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|1|size=00|L=x|M=x|Rm=xxxx|0|o2=1|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF005000) { - decode_fields32(ENC_FMLS_ASIMDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Rd); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLS_ASIMDELEM_RH_H); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|1|1|sz=x|L=x|M=x|Rm=xxxx|0|o2=1|01|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80F400)==0xF805000) { - decode_fields32(ENC_FMLS_ASIMDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLS_ASIMDELEM_R_SD); - } - return rc; -} - -/* fmls_advsimd_vec.xml */ -int FMLS_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|10|Rm=xxxxx|00|opcode=001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEC00C00) { - decode_fields32(ENC_FMLS_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLS_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|op=1|sz=x|1|Rm=xxxxx|opcode=11001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xEA0CC00) { - decode_fields32(ENC_FMLS_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMLS_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmmla_fp8fp16.xml */ -int FMMLA_FP8FP16(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|U=1|0|111|0|size=00|0|Rm=xxxxx|1|opcode=1101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6E00EC00) { - decode_fields32(ENC_FMMLA_ASIMD_FP8FP16, ctx, instr); - if(!HaveF8F16MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Rd); - OK(ENC_FMMLA_ASIMD_FP8FP16); - } - return rc; -} - -/* fmmla_fp8fp32.xml */ -int FMMLA_FP8FP32(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|U=1|0|111|0|size=10|0|Rm=xxxxx|1|opcode=1101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6E80EC00) { - decode_fields32(ENC_FMMLA_ASIMD_FP8FP32, ctx, instr); - if(!HaveF8F32MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Rd); - OK(ENC_FMMLA_ASIMD_FP8FP32); - } - return rc; -} - -/* fmmla_advsimd_fp16fp16.xml */ -int FMMLA_advsimd_fp16fp16(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|U=0|0|111|0|size=11|0|Rm=xxxxx|1|opcode=1101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4EC0EC00) { - decode_fields32(ENC_FMMLA_ASIMD_FP16FP16, ctx, instr); - if(!HaveF16MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_FMMLA_ASIMD_FP16FP16); - } - return rc; -} - -/* fmmla_advsimd_fp16fp32.xml */ -int FMMLA_advsimd_fp16fp32(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|U=0|0|111|0|size=01|0|Rm=xxxxx|1|opcode=1101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E40EC00) { - decode_fields32(ENC_FMMLA_ASIMD_FP16FP32, ctx, instr); - if(!HaveF16F32MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_FMMLA_ASIMD_FP16FP32); - } - return rc; -} - -/* fmov_advsimd.xml */ -int FMOV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|op=0|0|111|10|0000|a=x|b=x|c=x|cmode=1111|o2=1|1|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx */ - if((INSWORD & 0xBFF8FC00)==0xF00FC00) { - decode_fields32(ENC_FMOV_ASIMDIMM_H_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->rd = UINT(ctx->Rd); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->imm8 = ((ctx->a<<7)|(ctx->b<<6)|(ctx->c<<5)|(ctx->d<<4)|(ctx->e<<3)|(ctx->f<<2)|(ctx->g<<1)|ctx->h); - ctx->imm16 = ((SLICE(ctx->imm8,7,7)<<15)|(NOT(SLICE(ctx->imm8,6,6),1)<<14)|(Replicate(SLICE(ctx->imm8,6,6), 2, 1)<<12)|(SLICE(ctx->imm8,5,0)<<6)|0); - ctx->imm = Replicate(ctx->imm16, ((0x10)!=0 ? ((ctx->datasize) / (0x10)) : 0), 16); - OK(ENC_FMOV_ASIMDIMM_H_H); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|op=x|0111100000|a=x|b=x|c=x|cmode=1111|o2=0|1|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx */ - if((INSWORD & 0x9FF8FC00)==0xF00F400) { - decode_fields32(ENC_FMOV_ASIMDIMM_S_S, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->cmode<<1)|ctx->op)==0x1f) { - if(ctx->Q==0) { - EndOfDecode(Decode_UNDEF); - } - } - ctx->rd = UINT(ctx->Rd); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->imm64 = AdvSIMDExpandImm(ctx->op,ctx->cmode,((ctx->a<<7)|(ctx->b<<6)|(ctx->c<<5)|(ctx->d<<4)|(ctx->e<<3)|(ctx->f<<2)|(ctx->g<<1)|ctx->h)); - ctx->imm = Replicate(ctx->imm64, ((0x40)!=0 ? ((ctx->datasize) / (0x40)) : 0), 64); - if(ctx->op==0) OK(ENC_FMOV_ASIMDIMM_S_S); - if(ctx->Q==1 && ctx->op==1) OK(ENC_FMOV_ASIMDIMM_D2_D); - } - return rc; -} - -/* fmov_float.xml */ -int FMOV_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|10000|opc=00|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E204000) { - decode_fields32(ENC_FMOV_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMOV_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FMOV_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FMOV_D_FLOATDP1); - } - return rc; -} - -/* fmov_float_gen.xml */ -int FMOV_float_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=0x|opcode=11x|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F36FC00)==0x1E260000) { - decode_fields32(ENC_FMOV_32H_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2 && ((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)!=13) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (ctx->ftype==2)!=0 ? 0x40 : ((8) << (UINT((ctx->ftype)^(2)))); - ctx->part = UINT(SLICE(ctx->rmode,0,0)); - if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==12) { - if(ctx->fltsize!=0x10 && ctx->fltsize!=ctx->intsize) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opcode,0,0)==1) { - ctx->op = FPConvOp_MOV_ItoF; - }; - } - else if(((SLICE(ctx->opcode,2,1)<<2)|ctx->rmode)==13) { - if(ctx->intsize!=0x40 || ctx->ftype!=2) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opcode,0,0)==1) { - ctx->op = FPConvOp_MOV_ItoF; - }; - } - else { - ENDOFINSTRUCTION; - } - if(ctx->sf==0 && ctx->ftype==3 && ctx->rmode==0 && ctx->opcode==6) OK(ENC_FMOV_32H_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3 && ctx->rmode==0 && ctx->opcode==6) OK(ENC_FMOV_64H_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==3 && ctx->rmode==0 && ctx->opcode==7) OK(ENC_FMOV_H32_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0 && ctx->rmode==0 && ctx->opcode==7) OK(ENC_FMOV_S32_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0 && ctx->rmode==0 && ctx->opcode==6) OK(ENC_FMOV_32S_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3 && ctx->rmode==0 && ctx->opcode==7) OK(ENC_FMOV_H64_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1 && ctx->rmode==0 && ctx->opcode==7) OK(ENC_FMOV_D64_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==2 && ctx->rmode==1 && ctx->opcode==7) OK(ENC_FMOV_V64I_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1 && ctx->rmode==0 && ctx->opcode==6) OK(ENC_FMOV_64D_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==2 && ctx->rmode==1 && ctx->opcode==6) OK(ENC_FMOV_64VX_FLOAT2INT); - } - return rc; -} - -/* fmov_float_imm.xml */ -int FMOV_float_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point_constant_in_8_bits */ - /* M=0|0|S=0|11110|ftype=xx|1|imm8=xxxxxxxx|100|imm5=00000|Rd=xxxxx */ - if((INSWORD & 0xFF201FE0)==0x1E201000) { - decode_fields32(ENC_FMOV_H_FLOATIMM, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->datasize = (8) << (UINT((ctx->ftype)^(2))); - ctx->imm = VFPExpandImm(ctx->imm8,8); - if(ctx->ftype==3) OK(ENC_FMOV_H_FLOATIMM); - if(ctx->ftype==0) OK(ENC_FMOV_S_FLOATIMM); - if(ctx->ftype==1) OK(ENC_FMOV_D_FLOATIMM); - } - return rc; -} - -/* fmsub_float.xml */ -int FMSUB_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11111|ftype=xx|o1=0|Rm=xxxxx|o0=1|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF208000)==0x1F008000) { - decode_fields32(ENC_FMSUB_H_FLOATDP3, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMSUB_H_FLOATDP3); - if(ctx->ftype==0) OK(ENC_FMSUB_S_FLOATDP3); - if(ctx->ftype==1) OK(ENC_FMSUB_D_FLOATDP3); - } - return rc; -} - -/* fmulx_advsimd_elt.xml */ -int FMULX_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|1|size=00|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0F400)==0x7F009000) { - decode_fields32(ENC_FMULX_ASISDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMULX_ASISDELEM_RH_H); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|1|1|sz=x|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80F400)==0x7F809000) { - decode_fields32(ENC_FMULX_ASISDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMULX_ASISDELEM_R_SD); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|1|size=00|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0x2F009000) { - decode_fields32(ENC_FMULX_ASIMDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMULX_ASIMDELEM_RH_H); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|1|1|sz=x|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80F400)==0x2F809000) { - decode_fields32(ENC_FMULX_ASIMDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMULX_ASIMDELEM_R_SD); - } - return rc; -} - -/* fmulx_advsimd_vec.xml */ -int FMULX_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=0|10|Rm=xxxxx|00|opcode=011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E401C00) { - decode_fields32(ENC_FMULX_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMULX_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|0|sz=x|1|Rm=xxxxx|opcode=11011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x5E20DC00) { - decode_fields32(ENC_FMULX_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMULX_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=0|10|Rm=xxxxx|00|opcode=011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE401C00) { - decode_fields32(ENC_FMULX_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMULX_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|1|Rm=xxxxx|opcode=11011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE20DC00) { - decode_fields32(ENC_FMULX_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMULX_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmul_advsimd_elt.xml */ -int FMUL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|1|size=00|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0F400)==0x5F009000) { - decode_fields32(ENC_FMUL_ASISDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMUL_ASISDELEM_RH_H); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|1|1|sz=x|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80F400)==0x5F809000) { - decode_fields32(ENC_FMUL_ASISDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FMUL_ASISDELEM_R_SD); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|1|size=00|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF009000) { - decode_fields32(ENC_FMUL_ASIMDELEM_RH_H, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMUL_ASIMDELEM_RH_H); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|1|1|sz=x|L=x|M=x|Rm=xxxx|opcode=1001|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80F400)==0xF809000) { - decode_fields32(ENC_FMUL_ASIMDELEM_R_SD, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - ctx->Rmhi = ctx->M; - if(!(((ctx->sz<<1)|ctx->L)&2)) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - } - else if(((ctx->sz<<1)|ctx->L)==2) { - ctx->index = UINT(ctx->H); - } - else if(((ctx->sz<<1)|ctx->L)==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMUL_ASIMDELEM_R_SD); - } - return rc; -} - -/* fmul_advsimd_vec.xml */ -int FMUL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=0|10|Rm=xxxxx|00|opcode=011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2E401C00) { - decode_fields32(ENC_FMUL_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMUL_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|0|sz=x|1|Rm=xxxxx|opcode=11011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2E20DC00) { - decode_fields32(ENC_FMUL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FMUL_ASIMDSAME_ONLY); - } - return rc; -} - -/* fmul_float.xml */ -int FMUL_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|op=0|00010|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E200800) { - decode_fields32(ENC_FMUL_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FMUL_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FMUL_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FMUL_D_FLOATDP2); - } - return rc; -} - -/* fneg_advsimd.xml */ -int FNEG_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|1111|00|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF8F800) { - decode_fields32(ENC_FNEG_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FNEG_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|1|sz=x|10000|opcode=01111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA0F800) { - decode_fields32(ENC_FNEG_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FNEG_ASIMDMISC_R); - } - return rc; -} - -/* fneg_float.xml */ -int FNEG_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|10000|opc=10|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E214000) { - decode_fields32(ENC_FNEG_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FNEG_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FNEG_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FNEG_D_FLOATDP1); - } - return rc; -} - -/* fnmadd_float.xml */ -int FNMADD_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11111|ftype=xx|o1=1|Rm=xxxxx|o0=0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF208000)==0x1F200000) { - decode_fields32(ENC_FNMADD_H_FLOATDP3, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FNMADD_H_FLOATDP3); - if(ctx->ftype==0) OK(ENC_FNMADD_S_FLOATDP3); - if(ctx->ftype==1) OK(ENC_FNMADD_D_FLOATDP3); - } - return rc; -} - -/* fnmsub_float.xml */ -int FNMSUB_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11111|ftype=xx|o1=1|Rm=xxxxx|o0=1|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF208000)==0x1F208000) { - decode_fields32(ENC_FNMSUB_H_FLOATDP3, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FNMSUB_H_FLOATDP3); - if(ctx->ftype==0) OK(ENC_FNMSUB_S_FLOATDP3); - if(ctx->ftype==1) OK(ENC_FNMSUB_D_FLOATDP3); - } - return rc; -} - -/* fnmul_float.xml */ -int FNMUL_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|op=1|00010|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E208800) { - decode_fields32(ENC_FNMUL_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FNMUL_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FNMUL_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FNMUL_D_FLOATDP2); - } - return rc; -} - -/* frecpe_advsimd.xml */ -int FRECPE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=1|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF9D800) { - decode_fields32(ENC_FRECPE_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRECPE_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|1|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5EA1D800) { - decode_fields32(ENC_FRECPE_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRECPE_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF9D800) { - decode_fields32(ENC_FRECPE_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRECPE_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA1D800) { - decode_fields32(ENC_FRECPE_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRECPE_ASIMDMISC_R); - } - return rc; -} - -/* frecps_advsimd.xml */ -int FRECPS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=0|10|Rm=xxxxx|00|opcode=111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E403C00) { - decode_fields32(ENC_FRECPS_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRECPS_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|0|sz=x|1|Rm=xxxxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x5E20FC00) { - decode_fields32(ENC_FRECPS_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRECPS_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=0|10|Rm=xxxxx|00|opcode=111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE403C00) { - decode_fields32(ENC_FRECPS_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRECPS_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|1|Rm=xxxxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xE20FC00) { - decode_fields32(ENC_FRECPS_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRECPS_ASIMDSAME_ONLY); - } - return rc; -} - -/* frecpx_advsimd.xml */ -int FRECPX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 01|U=0|1|111|0|a=1|1111|00|opcode=11111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5EF9F800) { - decode_fields32(ENC_FRECPX_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - OK(ENC_FRECPX_ASISDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|1|sz=x|10000|opcode=11111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5EA1F800) { - decode_fields32(ENC_FRECPX_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - OK(ENC_FRECPX_ASISDMISC_R); - } - return rc; -} - -/* frint32x_advsimd.xml */ -int FRINT32X_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|0|sz=x|10000|1111|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E21E800) { - decode_fields32(ENC_FRINT32X_ASIMDMISC_R, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->intsize = 0x20; - OK(ENC_FRINT32X_ASIMDMISC_R); - } - return rc; -} - -/* frint32x_float.xml */ -int FRINT32X_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=0x|10100|op=01|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x1E28C000) { - decode_fields32(ENC_FRINT32X_S_FLOATDP1, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->ftype&2)==2)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(SLICE(ctx->ftype,0,0))); - ctx->intsize = 0x20; - if(ctx->ftype==0) OK(ENC_FRINT32X_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINT32X_D_FLOATDP1); - } - return rc; -} - -/* frint32z_advsimd.xml */ -int FRINT32Z_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|10000|1111|op=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE21E800) { - decode_fields32(ENC_FRINT32Z_ASIMDMISC_R, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->intsize = 0x20; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FRINT32Z_ASIMDMISC_R); - } - return rc; -} - -/* frint32z_float.xml */ -int FRINT32Z_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=0x|10100|op=00|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x1E284000) { - decode_fields32(ENC_FRINT32Z_S_FLOATDP1, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->ftype&2)==2)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(SLICE(ctx->ftype,0,0))); - ctx->intsize = 0x20; - ctx->rounding = FPRounding_ZERO; - if(ctx->ftype==0) OK(ENC_FRINT32Z_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINT32Z_D_FLOATDP1); - } - return rc; -} - -/* frint64x_advsimd.xml */ -int FRINT64X_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|0|sz=x|10000|1111|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E21F800) { - decode_fields32(ENC_FRINT64X_ASIMDMISC_R, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->intsize = 0x40; - OK(ENC_FRINT64X_ASIMDMISC_R); - } - return rc; -} - -/* frint64x_float.xml */ -int FRINT64X_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=0x|10100|op=11|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x1E29C000) { - decode_fields32(ENC_FRINT64X_S_FLOATDP1, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->ftype&2)==2)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(SLICE(ctx->ftype,0,0))); - ctx->intsize = 0x40; - if(ctx->ftype==0) OK(ENC_FRINT64X_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINT64X_D_FLOATDP1); - } - return rc; -} - -/* frint64z_advsimd.xml */ -int FRINT64Z_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|10000|1111|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE21F800) { - decode_fields32(ENC_FRINT64Z_ASIMDMISC_R, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->intsize = 0x40; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FRINT64Z_ASIMDMISC_R); - } - return rc; -} - -/* frint64z_float.xml */ -int FRINT64Z_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=0x|10100|op=10|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x1E294000) { - decode_fields32(ENC_FRINT64Z_S_FLOATDP1, ctx, instr); - if(!HaveFRINTTS()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->ftype&2)==2)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(SLICE(ctx->ftype,0,0))); - ctx->intsize = 0x40; - ctx->rounding = FPRounding_ZERO; - if(ctx->ftype==0) OK(ENC_FRINT64Z_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINT64Z_D_FLOATDP1); - } - return rc; -} - -/* frinta_advsimd.xml */ -int FRINTA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|1111|00|1100|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E798800) { - decode_fields32(ENC_FRINTA_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEAWAY; - OK(ENC_FRINTA_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|sz=x|10000|1100|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E218800) { - decode_fields32(ENC_FRINTA_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEAWAY; - OK(ENC_FRINTA_ASIMDMISC_R); - } - return rc; -} - -/* frinta_float.xml */ -int FRINTA_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1001|rmode=100|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E264000) { - decode_fields32(ENC_FRINTA_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEAWAY; - if(ctx->ftype==3) OK(ENC_FRINTA_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FRINTA_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINTA_D_FLOATDP1); - } - return rc; -} - -/* frinti_advsimd.xml */ -int FRINTI_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|o2=1|1111|00|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF99800) { - decode_fields32(ENC_FRINTI_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - OK(ENC_FRINTI_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o2=1|sz=x|10000|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA19800) { - decode_fields32(ENC_FRINTI_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - OK(ENC_FRINTI_ASIMDMISC_R); - } - return rc; -} - -/* frinti_float.xml */ -int FRINTI_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1001|rmode=111|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E27C000) { - decode_fields32(ENC_FRINTI_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - ctx->exact = FALSE; - if(ctx->ftype==3) OK(ENC_FRINTI_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FRINTI_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINTI_D_FLOATDP1); - } - return rc; -} - -/* frintm_advsimd.xml */ -int FRINTM_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|1111|00|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE799800) { - decode_fields32(ENC_FRINTM_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_NEGINF; - OK(ENC_FRINTM_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|sz=x|10000|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE219800) { - decode_fields32(ENC_FRINTM_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_NEGINF; - OK(ENC_FRINTM_ASIMDMISC_R); - } - return rc; -} - -/* frintm_float.xml */ -int FRINTM_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1001|rmode=010|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E254000) { - decode_fields32(ENC_FRINTM_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - ctx->exact = FALSE; - ctx->rounding = FPRounding_NEGINF; - if(ctx->ftype==3) OK(ENC_FRINTM_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FRINTM_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINTM_D_FLOATDP1); - } - return rc; -} - -/* frintn_advsimd.xml */ -int FRINTN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|1111|00|1100|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE798800) { - decode_fields32(ENC_FRINTN_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEEVEN; - OK(ENC_FRINTN_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=0|sz=x|10000|1100|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE218800) { - decode_fields32(ENC_FRINTN_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEEVEN; - OK(ENC_FRINTN_ASIMDMISC_R); - } - return rc; -} - -/* frintn_float.xml */ -int FRINTN_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1001|rmode=000|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E244000) { - decode_fields32(ENC_FRINTN_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEEVEN; - if(ctx->ftype==3) OK(ENC_FRINTN_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FRINTN_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINTN_D_FLOATDP1); - } - return rc; -} - -/* frintp_advsimd.xml */ -int FRINTP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|1111|00|1100|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF98800) { - decode_fields32(ENC_FRINTP_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_POSINF; - OK(ENC_FRINTP_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|sz=x|10000|1100|o1=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA18800) { - decode_fields32(ENC_FRINTP_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_POSINF; - OK(ENC_FRINTP_ASIMDMISC_R); - } - return rc; -} - -/* frintp_float.xml */ -int FRINTP_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1001|rmode=001|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E24C000) { - decode_fields32(ENC_FRINTP_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - ctx->exact = FALSE; - ctx->rounding = FPRounding_POSINF; - if(ctx->ftype==3) OK(ENC_FRINTP_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FRINTP_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINTP_D_FLOATDP1); - } - return rc; -} - -/* frintx_advsimd.xml */ -int FRINTX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|1111|00|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E799800) { - decode_fields32(ENC_FRINTX_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = TRUE; - OK(ENC_FRINTX_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|o2=0|sz=x|10000|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E219800) { - decode_fields32(ENC_FRINTX_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = TRUE; - OK(ENC_FRINTX_ASIMDMISC_R); - } - return rc; -} - -/* frintx_float.xml */ -int FRINTX_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1001|rmode=110|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E274000) { - decode_fields32(ENC_FRINTX_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - ctx->exact = TRUE; - if(ctx->ftype==3) OK(ENC_FRINTX_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FRINTX_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINTX_D_FLOATDP1); - } - return rc; -} - -/* frintz_advsimd.xml */ -int FRINTZ_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|1111|00|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xEF99800) { - decode_fields32(ENC_FRINTZ_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FRINTZ_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|o2=1|sz=x|10000|1100|o1=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA19800) { - decode_fields32(ENC_FRINTZ_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->exact = FALSE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FRINTZ_ASIMDMISC_R); - } - return rc; -} - -/* frintz_float.xml */ -int FRINTZ_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1001|rmode=011|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E25C000) { - decode_fields32(ENC_FRINTZ_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - ctx->exact = FALSE; - ctx->rounding = FPRounding_ZERO; - if(ctx->ftype==3) OK(ENC_FRINTZ_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FRINTZ_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FRINTZ_D_FLOATDP1); - } - return rc; -} - -/* frsqrte_advsimd.xml */ -int FRSQRTE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|a=1|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EF9D800) { - decode_fields32(ENC_FRSQRTE_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRSQRTE_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|1|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7EA1D800) { - decode_fields32(ENC_FRSQRTE_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRSQRTE_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF9D800) { - decode_fields32(ENC_FRSQRTE_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRSQRTE_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|1|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA1D800) { - decode_fields32(ENC_FRSQRTE_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRSQRTE_ASIMDMISC_R); - } - return rc; -} - -/* frsqrts_advsimd.xml */ -int FRSQRTS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=1|10|Rm=xxxxx|00|opcode=111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5EC03C00) { - decode_fields32(ENC_FRSQRTS_ASISDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRSQRTS_ASISDSAMEFP16_ONLY); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|1|sz=x|1|Rm=xxxxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x5EA0FC00) { - decode_fields32(ENC_FRSQRTS_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_FRSQRTS_ASISDSAME_ONLY); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|10|Rm=xxxxx|00|opcode=111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEC03C00) { - decode_fields32(ENC_FRSQRTS_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRSQRTS_ASIMDSAMEFP16_ONLY); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|1|Rm=xxxxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xEA0FC00) { - decode_fields32(ENC_FRSQRTS_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FRSQRTS_ASIMDSAME_ONLY); - } - return rc; -} - -/* fscale_advsimd.xml */ -int FSCALE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|10|Rm=xxxxx|00|opcode=111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0x2EC03C00) { - decode_fields32(ENC_FSCALE_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FSCALE_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|size=1x|1|Rm=xxxxx|opcode=11111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0x2EA0FC00) { - decode_fields32(ENC_FSCALE_ASIMDSAME_ONLY, ctx, instr); - if(!HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Q==0 && ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (ctx->Q==1)!=0 ? 0x80 : 0x40; - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FSCALE_ASIMDSAME_ONLY); - } - return rc; -} - -/* fsqrt_advsimd.xml */ -int FSQRT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=1|1111|00|opcode=11111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2EF9F800) { - decode_fields32(ENC_FSQRT_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FSQRT_ASIMDMISCFP16_R); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|1|sz=x|10000|opcode=11111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA1F800) { - decode_fields32(ENC_FSQRT_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FSQRT_ASIMDMISC_R); - } - return rc; -} - -/* fsqrt_float.xml */ -int FSQRT_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|10000|opc=11|10000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x1E21C000) { - decode_fields32(ENC_FSQRT_H_FLOATDP1, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FSQRT_H_FLOATDP1); - if(ctx->ftype==0) OK(ENC_FSQRT_S_FLOATDP1); - if(ctx->ftype==1) OK(ENC_FSQRT_D_FLOATDP1); - } - return rc; -} - -/* fsub_advsimd.xml */ -int FSUB_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=1|10|Rm=xxxxx|00|opcode=010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEC01400) { - decode_fields32(ENC_FSUB_ASIMDSAMEFP16_ONLY, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FSUB_ASIMDSAMEFP16_ONLY); - } - /* class iclass_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|1|Rm=xxxxx|opcode=11010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFA0FC00)==0xEA0D400) { - decode_fields32(ENC_FSUB_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_FSUB_ASIMDSAME_ONLY); - } - return rc; -} - -/* fsub_float.xml */ -int FSUB_float(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* M=0|0|S=0|11110|ftype=xx|1|Rm=xxxxx|001|op=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1E203800) { - decode_fields32(ENC_FSUB_H_FLOATDP2, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT((ctx->ftype)^(2))); - if(ctx->ftype==3) OK(ENC_FSUB_H_FLOATDP2); - if(ctx->ftype==0) OK(ENC_FSUB_S_FLOATDP2); - if(ctx->ftype==1) OK(ENC_FSUB_D_FLOATDP2); - } - return rc; -} - -/* gcsb.xml */ -int GCSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0010|op2=011|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503227F) { - decode_fields32(ENC_GCSB_HD_HINTS, ctx, instr); - if(!HaveGCS()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_GCSB_HD_HINTS); - } - return rc; -} - -/* gcspopcx_sys.xml */ -int GCSPOPCX_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=000|CRn=0111|CRm=0111|op2=101|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50877A0) { - decode_fields32(ENC_GCSPOPCX_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_GCSPOPCX_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* gcspopm_sysl.xml */ -int GCSPOPM_SYSL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=1|01|op1=011|CRn=0111|CRm=0111|op2=001|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD52B7720) { - decode_fields32(ENC_GCSPOPM_SYSL_RC_SYSTEMINSTRS, ctx, instr); - OK(ENC_GCSPOPM_SYSL_RC_SYSTEMINSTRS); - } - return rc; -} - -/* gcspopx_sys.xml */ -int GCSPOPX_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=000|CRn=0111|CRm=0111|op2=110|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50877C0) { - decode_fields32(ENC_GCSPOPX_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_GCSPOPX_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* gcspushm_sys.xml */ -int GCSPUSHM_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=011|CRn=0111|CRm=0111|op2=000|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50B7700) { - decode_fields32(ENC_GCSPUSHM_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_GCSPUSHM_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* gcspushx_sys.xml */ -int GCSPUSHX_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=000|CRn=0111|CRm=0111|op2=100|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD5087780) { - decode_fields32(ENC_GCSPUSHX_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_GCSPUSHX_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* gcsss1_sys.xml */ -int GCSSS1_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=011|CRn=0111|CRm=0111|op2=010|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50B7740) { - decode_fields32(ENC_GCSSS1_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_GCSSS1_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* gcsss2_sysl.xml */ -int GCSSS2_SYSL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=1|01|op1=011|CRn=0111|CRm=0111|op2=011|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD52B7760) { - decode_fields32(ENC_GCSSS2_SYSL_RC_SYSTEMINSTRS, ctx, instr); - OK(ENC_GCSSS2_SYSL_RC_SYSTEMINSTRS); - } - return rc; -} - -/* gcsstr.xml */ -int GCSSTR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101|1|0|0|1000111110|opc=000|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xD91F0C00) { - decode_fields32(ENC_GCSSTR_64_LDST_GCS, ctx, instr); - if(!HaveGCS()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - OK(ENC_GCSSTR_64_LDST_GCS); - } - return rc; -} - -/* gcssttr.xml */ -int GCSSTTR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101|1|0|0|1000111110|opc=001|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xD91F1C00) { - decode_fields32(ENC_GCSSTTR_64_LDST_GCS, ctx, instr); - if(!HaveGCS()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - OK(ENC_GCSSTTR_64_LDST_GCS); - } - return rc; -} - -/* gicr_sysl.xml */ -int GICR_SYSL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=1|01|op1=000|CRn=1100|CRm=0011|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFF00)==0xD528C300) { - decode_fields32(ENC_GICR_SYSL_RC_SYSTEMINSTRS, ctx, instr); - OK(ENC_GICR_SYSL_RC_SYSTEMINSTRS); - } - return rc; -} - -/* gic_sys.xml */ -int GIC_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=xxx|CRn=1100|CRm=0001|op2=xxx|Rt=xxxxx */ - /* 110|101|0100|L=0|01|op1=xxx|CRn=1100|CRm=0010|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF8FF00)==0xD508C100 || (INSWORD & 0xFFF8FF00)==0xD508C200) { - decode_fields32(ENC_GIC_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_GIC_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* gmi.xml */ -int GMI(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|0|S=0|1|101|0110|Rm=xxxxx|opcode=000101|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9AC01400) { - decode_fields32(ENC_GMI_64G_DP_2SRC, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_GMI_64G_DP_2SRC); - } - return rc; -} - -/* gsb_sys.xml */ -int GSB_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=000|CRn=1100|CRm=0000|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFF00)==0xD508C000) { - decode_fields32(ENC_GSB_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_GSB_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* hint.xml */ -int HINT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=xxxx|op2=xxx|11111 */ - if((INSWORD & 0xFFFFF01F)==0xD503201F) { - decode_fields32(ENC_HINT_HM_HINTS, ctx, instr); - if(!((ctx->CRm<<3)|ctx->op2)) { - ctx->op = SystemHintOp_NOP; - } - else if(((ctx->CRm<<3)|ctx->op2)==1) { - ctx->op = SystemHintOp_YIELD; - } - else if(((ctx->CRm<<3)|ctx->op2)==2) { - ctx->op = SystemHintOp_WFE; - } - else if(((ctx->CRm<<3)|ctx->op2)==3) { - ctx->op = SystemHintOp_WFI; - } - else if(((ctx->CRm<<3)|ctx->op2)==4) { - ctx->op = SystemHintOp_SEV; - } - else if(((ctx->CRm<<3)|ctx->op2)==5) { - ctx->op = SystemHintOp_SEVL; - } - else if(((ctx->CRm<<3)|ctx->op2)==6) { - if(!HaveDGH()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_DGH; - } - else if(((ctx->CRm<<3)|ctx->op2)==7) { - SEE /* XPACLRI */; - } - else if((((ctx->CRm<<3)|ctx->op2)&0x78)==8) { - if(!ctx->op2) { - SEE /* PACIA1716 */; - } - else if(ctx->op2==2) { - SEE /* PACIB1716 */; - } - else if(ctx->op2==4) { - SEE /* AUTIA1716 */; - } - else if(ctx->op2==6) { - SEE /* AUTIB1716 */; - } - else { - EndOfDecode(Decode_NOP); - } - } - else if(((ctx->CRm<<3)|ctx->op2)==0x10) { - if(!HaveRAS()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_ESB; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x11) { - if(!HaveSPE()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_PSB; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x12) { - if(!HaveTRF()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_TSB; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x13) { - if(!HaveGCS()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_GCSB; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x14) { - ctx->op = SystemHintOp_CSDB; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x16) { - if(!HaveCLRBHB()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_CLRBHB; - } - else if((((ctx->CRm<<3)|ctx->op2)&0x78)==0x18) { - if(!ctx->op2) { - SEE /* PACIAZ */; - } - else if(ctx->op2==1) { - SEE /* PACIASP */; - } - else if(ctx->op2==2) { - SEE /* PACIBZ */; - } - else if(ctx->op2==3) { - SEE /* PACIBSP */; - } - else if(ctx->op2==4) { - SEE /* AUTIAZ */; - } - else if(ctx->op2==5) { - SEE /* AUTIASP */; - } - else if(ctx->op2==6) { - SEE /* AUTIBZ */; - } - else if(ctx->op2==7) { - SEE /* AUTIBSP */; - } - } - else if((((ctx->CRm<<3)|ctx->op2)&0x79)==0x20) { - if(!HaveBTI()) { - EndOfDecode(Decode_NOP); - } - SetBTypeCompatible(BTypeCompatible_BTI(SLICE(ctx->op2,2,1), ctx->pstate_btype)); - ctx->op = SystemHintOp_BTI; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x27) { - SEE /* PACM */; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x28) { - if(!HaveCHK()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_CHKFEAT; - } - else if((((ctx->CRm<<3)|ctx->op2)&0x7e)==0x30) { - if(!HavePCDPHINT()) { - EndOfDecode(Decode_NOP); - } - ctx->stream = SLICE(ctx->op2,0,0)==1; - ctx->op = SystemHintOp_STSHH; - } - else if((((ctx->CRm<<3)|ctx->op2)&0x7e)==0x32) { - if(!HaveCMH()) { - EndOfDecode(Decode_NOP); - } - ctx->priority = SLICE(ctx->op2,0,0)==1; - ctx->op = SystemHintOp_SHUH; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x34) { - if(!HaveCMH()) { - EndOfDecode(Decode_NOP); - } - ctx->op = SystemHintOp_STCPH; - } - else { - EndOfDecode(Decode_NOP); - } - OK(ENC_HINT_HM_HINTS); - } - return rc; -} - -/* hlt.xml */ -int HLT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=010|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=00 */ - if((INSWORD & 0xFFE0001F)==0xD4400000) { - decode_fields32(ENC_HLT_EX_EXCEPTION, ctx, instr); - if(ctx->EDSCR_HDE==0 || !HaltingAllowed()) { - EndOfDecode(Decode_UNDEF); - } - else if(HaveBTI()) { - SetBTypeCompatible(TRUE); - } - OK(ENC_HLT_EX_EXCEPTION); - } - return rc; -} - -/* hvc.xml */ -int HVC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=000|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=10 */ - if((INSWORD & 0xFFE0001F)==0xD4000002) { - decode_fields32(ENC_HVC_EX_EXCEPTION, ctx, instr); - if(!HaveEL(EL2)) { - EndOfDecode(Decode_UNDEF); - } - ctx->imm = ctx->imm16; - OK(ENC_HVC_EX_EXCEPTION); - } - return rc; -} - -/* ic_sys.xml */ -int IC_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=xxx|CRn=0111|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF8F000)==0xD5087000) { - decode_fields32(ENC_IC_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_IC_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* ins_advsimd_elt.xml */ -int INS_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|op=1|0|111|00|00|imm5=xxxxx|0|imm4=xxxx|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08400)==0x6E000400) { - decode_fields32(ENC_INS_ASIMDINS_IV_V, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!(ctx->imm5&15)) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = LowestSetBitNZ(SLICE(ctx->imm5,3,0)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->dst_index = UINT(SLICE(ctx->imm5,4,ctx->size+1)); - ctx->src_index = UINT(SLICE(ctx->imm4,3,ctx->size)); - ctx->idxdsize = (0x40) << (UINT(SLICE(ctx->imm4,3,3))); - ctx->esize = (8) << (ctx->size); - /* unconditional alias */ - if(MOV_INS_advsimd_elt(ctx, instr)==0) return 0; - OK(ENC_INS_ASIMDINS_IV_V); - } - return rc; -} - -/* ins_advsimd_gen.xml */ -int INS_advsimd_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|op=0|0|111|00|00|imm5=xxxxx|0|imm4=0011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E001C00) { - decode_fields32(ENC_INS_ASIMDINS_IR_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!(ctx->imm5&15)) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = LowestSetBitNZ(SLICE(ctx->imm5,3,0)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->index = UINT(SLICE(ctx->imm5,4,ctx->size+1)); - ctx->esize = (8) << (ctx->size); - /* unconditional alias */ - if(MOV_INS_advsimd_gen(ctx, instr)==0) return 0; - OK(ENC_INS_ASIMDINS_IR_R); - } - return rc; -} - -/* irg.xml */ -int IRG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|0|S=0|1|101|0110|Rm=xxxxx|opcode=000100|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9AC01000) { - decode_fields32(ENC_IRG_64I_DP_2SRC, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_IRG_64I_DP_2SRC); - } - return rc; -} - -/* isb.xml */ -int ISB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110011|CRm=xxxx|1|opc=10|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD50330DF) { - decode_fields32(ENC_ISB_BI_BARRIERS, ctx, instr); - OK(ENC_ISB_BI_BARRIERS); - } - return rc; -} - -/* ld1r_advsimd.xml */ -int LD1R_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|10|L=1|R=0|0000|o2=0|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xD40C000) { - decode_fields32(ENC_LD1R_ASISDLSO_R1, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LD1R_ASISDLSO_R1); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=0|Rm=xxxxx|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xDC0C000) { - decode_fields32(ENC_LD1R_ASISDLSOP_R1_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_LD1R_ASISDLSOP_R1_I); - if(ctx->Rm!=0x1f) OK(ENC_LD1R_ASISDLSOP_RX1_R); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld1_advsimd_mult.xml */ -int LD1_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011000|L=1|000000|opcode=xx1x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xC402000) { - decode_fields32(ENC_LD1_ASISDLSE_R1_1V, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==7) OK(ENC_LD1_ASISDLSE_R1_1V); - if(ctx->opcode==10) OK(ENC_LD1_ASISDLSE_R2_2V); - if(ctx->opcode==6) OK(ENC_LD1_ASISDLSE_R3_3V); - if(ctx->opcode==2) OK(ENC_LD1_ASISDLSE_R4_4V); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=1|0|Rm=xxxxx|opcode=xx1x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xCC02000) { - decode_fields32(ENC_LD1_ASISDLSEP_I1_I1, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==7) OK(ENC_LD1_ASISDLSEP_I1_I1); - if(ctx->Rm!=0x1f && ctx->opcode==7) OK(ENC_LD1_ASISDLSEP_R1_R1); - if(ctx->Rm==0x1f && ctx->opcode==10) OK(ENC_LD1_ASISDLSEP_I2_I2); - if(ctx->Rm!=0x1f && ctx->opcode==10) OK(ENC_LD1_ASISDLSEP_R2_R2); - if(ctx->Rm==0x1f && ctx->opcode==6) OK(ENC_LD1_ASISDLSEP_I3_I3); - if(ctx->Rm!=0x1f && ctx->opcode==6) OK(ENC_LD1_ASISDLSEP_R3_R3); - if(ctx->Rm==0x1f && ctx->opcode==2) OK(ENC_LD1_ASISDLSEP_I4_I4); - if(ctx->Rm!=0x1f && ctx->opcode==2) OK(ENC_LD1_ASISDLSEP_R4_R4); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->selem = 1; - if(ctx->opcode==2) { - ctx->rpt = 4; - } - else if(ctx->opcode==6) { - ctx->rpt = 3; - } - else if(ctx->opcode==10) { - ctx->rpt = 2; - } - else if(ctx->opcode==7) { - ctx->rpt = 1; - } - else { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* ld1_advsimd_sngl.xml */ -int LD1_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=1|R=0|0000|o2=0|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD400000) { - decode_fields32(ENC_LD1_ASISDLSO_B1_1B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==0) OK(ENC_LD1_ASISDLSO_B1_1B); - if(ctx->opcode==2 && !(ctx->size&1)) OK(ENC_LD1_ASISDLSO_H1_1H); - if(ctx->opcode==4 && ctx->size==0) OK(ENC_LD1_ASISDLSO_S1_1S); - if(ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_LD1_ASISDLSO_D1_1D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=0|Rm=xxxxx|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xDC00000) { - decode_fields32(ENC_LD1_ASISDLSOP_B1_I1B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==0) OK(ENC_LD1_ASISDLSOP_B1_I1B); - if(ctx->Rm!=0x1f && ctx->opcode==0) OK(ENC_LD1_ASISDLSOP_BX1_R1B); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_LD1_ASISDLSOP_D1_I1D); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_LD1_ASISDLSOP_DX1_R1D); - if(ctx->Rm==0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_LD1_ASISDLSOP_H1_I1H); - if(ctx->Rm!=0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_LD1_ASISDLSOP_HX1_R1H); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_LD1_ASISDLSOP_S1_I1S); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_LD1_ASISDLSOP_SX1_R1S); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld2r_advsimd.xml */ -int LD2R_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|10|L=1|R=1|0000|o2=0|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xD60C000) { - decode_fields32(ENC_LD2R_ASISDLSO_R2, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LD2R_ASISDLSO_R2); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=1|Rm=xxxxx|opcode=110|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xDE0C000) { - decode_fields32(ENC_LD2R_ASISDLSOP_R2_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_LD2R_ASISDLSOP_R2_I); - if(ctx->Rm!=0x1f) OK(ENC_LD2R_ASISDLSOP_RX2_R); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld2_advsimd_mult.xml */ -int LD2_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|00|L=1|000000|opcode=1000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xC408000) { - decode_fields32(ENC_LD2_ASISDLSE_R2, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LD2_ASISDLSE_R2); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=1|0|Rm=xxxxx|opcode=1000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xCC08000) { - decode_fields32(ENC_LD2_ASISDLSEP_I2_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_LD2_ASISDLSEP_I2_I); - if(ctx->Rm!=0x1f) OK(ENC_LD2_ASISDLSEP_R2_R); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rpt = 1; - ctx->selem = 2; - if(((ctx->size<<1)|ctx->Q)==6 && ctx->selem!=1) { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* ld2_advsimd_sngl.xml */ -int LD2_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=1|R=1|0000|o2=0|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD600000) { - decode_fields32(ENC_LD2_ASISDLSO_B2_2B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==0) OK(ENC_LD2_ASISDLSO_B2_2B); - if(ctx->opcode==2 && !(ctx->size&1)) OK(ENC_LD2_ASISDLSO_H2_2H); - if(ctx->opcode==4 && ctx->size==0) OK(ENC_LD2_ASISDLSO_S2_2S); - if(ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_LD2_ASISDLSO_D2_2D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=1|Rm=xxxxx|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xDE00000) { - decode_fields32(ENC_LD2_ASISDLSOP_B2_I2B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==0) OK(ENC_LD2_ASISDLSOP_B2_I2B); - if(ctx->Rm!=0x1f && ctx->opcode==0) OK(ENC_LD2_ASISDLSOP_BX2_R2B); - if(ctx->Rm==0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_LD2_ASISDLSOP_H2_I2H); - if(ctx->Rm!=0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_LD2_ASISDLSOP_HX2_R2H); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_LD2_ASISDLSOP_S2_I2S); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_LD2_ASISDLSOP_SX2_R2S); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_LD2_ASISDLSOP_D2_I2D); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_LD2_ASISDLSOP_DX2_R2D); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld3r_advsimd.xml */ -int LD3R_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|10|L=1|R=0|0000|o2=0|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xD40E000) { - decode_fields32(ENC_LD3R_ASISDLSO_R3, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LD3R_ASISDLSO_R3); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=0|Rm=xxxxx|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xDC0E000) { - decode_fields32(ENC_LD3R_ASISDLSOP_R3_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_LD3R_ASISDLSOP_R3_I); - if(ctx->Rm!=0x1f) OK(ENC_LD3R_ASISDLSOP_RX3_R); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld3_advsimd_mult.xml */ -int LD3_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|00|L=1|000000|opcode=0100|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xC404000) { - decode_fields32(ENC_LD3_ASISDLSE_R3, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LD3_ASISDLSE_R3); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=1|0|Rm=xxxxx|opcode=0100|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xCC04000) { - decode_fields32(ENC_LD3_ASISDLSEP_I3_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_LD3_ASISDLSEP_I3_I); - if(ctx->Rm!=0x1f) OK(ENC_LD3_ASISDLSEP_R3_R); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rpt = 1; - ctx->selem = 3; - if(((ctx->size<<1)|ctx->Q)==6 && ctx->selem!=1) { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* ld3_advsimd_sngl.xml */ -int LD3_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=1|R=0|0000|o2=0|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD402000) { - decode_fields32(ENC_LD3_ASISDLSO_B3_3B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==1) OK(ENC_LD3_ASISDLSO_B3_3B); - if(ctx->opcode==3 && !(ctx->size&1)) OK(ENC_LD3_ASISDLSO_H3_3H); - if(ctx->opcode==5 && ctx->size==0) OK(ENC_LD3_ASISDLSO_S3_3S); - if(ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_LD3_ASISDLSO_D3_3D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=0|Rm=xxxxx|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xDC02000) { - decode_fields32(ENC_LD3_ASISDLSOP_B3_I3B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==1) OK(ENC_LD3_ASISDLSOP_B3_I3B); - if(ctx->Rm!=0x1f && ctx->opcode==1) OK(ENC_LD3_ASISDLSOP_BX3_R3B); - if(ctx->Rm==0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_LD3_ASISDLSOP_H3_I3H); - if(ctx->Rm!=0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_LD3_ASISDLSOP_HX3_R3H); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_LD3_ASISDLSOP_S3_I3S); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_LD3_ASISDLSOP_SX3_R3S); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_LD3_ASISDLSOP_D3_I3D); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_LD3_ASISDLSOP_DX3_R3D); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld4r_advsimd.xml */ -int LD4R_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|10|L=1|R=1|0000|o2=0|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xD60E000) { - decode_fields32(ENC_LD4R_ASISDLSO_R4, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LD4R_ASISDLSO_R4); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=1|Rm=xxxxx|opcode=111|S=0|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xDE0E000) { - decode_fields32(ENC_LD4R_ASISDLSOP_R4_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_LD4R_ASISDLSOP_R4_I); - if(ctx->Rm!=0x1f) OK(ENC_LD4R_ASISDLSOP_RX4_R); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld4_advsimd_mult.xml */ -int LD4_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|00|L=1|000000|opcode=0000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xC400000) { - decode_fields32(ENC_LD4_ASISDLSE_R4, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LD4_ASISDLSE_R4); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=1|0|Rm=xxxxx|opcode=0000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xCC00000) { - decode_fields32(ENC_LD4_ASISDLSEP_I4_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_LD4_ASISDLSEP_I4_I); - if(ctx->Rm!=0x1f) OK(ENC_LD4_ASISDLSEP_R4_R); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rpt = 1; - ctx->selem = 4; - if(((ctx->size<<1)|ctx->Q)==6 && ctx->selem!=1) { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* ld4_advsimd_sngl.xml */ -int LD4_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=1|R=1|0000|o2=0|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD602000) { - decode_fields32(ENC_LD4_ASISDLSO_B4_4B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==1) OK(ENC_LD4_ASISDLSO_B4_4B); - if(ctx->opcode==3 && !(ctx->size&1)) OK(ENC_LD4_ASISDLSO_H4_4H); - if(ctx->opcode==5 && ctx->size==0) OK(ENC_LD4_ASISDLSO_S4_4S); - if(ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_LD4_ASISDLSO_D4_4D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=1|R=1|Rm=xxxxx|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xDE02000) { - decode_fields32(ENC_LD4_ASISDLSOP_B4_I4B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==1) OK(ENC_LD4_ASISDLSOP_B4_I4B); - if(ctx->Rm!=0x1f && ctx->opcode==1) OK(ENC_LD4_ASISDLSOP_BX4_R4B); - if(ctx->Rm==0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_LD4_ASISDLSOP_H4_I4H); - if(ctx->Rm!=0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_LD4_ASISDLSOP_HX4_R4H); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_LD4_ASISDLSOP_S4_I4S); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_LD4_ASISDLSOP_SX4_R4S); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_LD4_ASISDLSOP_D4_I4D); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_LD4_ASISDLSOP_DX4_R4D); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ld64b.xml */ -int LD64B(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=11|11|1|VR=0|0|0|A=0|R=0|1|Rs=11111|o3=1|opc=101|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xF83FD000) { - decode_fields32(ENC_LD64B_64L_MEMOP, ctx, instr); - if(!HaveLS64()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,4,3)==3 || SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->withstatus = FALSE; - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LD64B_64L_MEMOP); - } - return rc; -} - -/* ldadd.xml */ -int LDADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8200000) { - decode_fields32(ENC_LDADD_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STADD_LDADD(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDADD_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDADDA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDADDAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDADDL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDADD_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDADDA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDADDAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDADDL_64_MEMOP); - } - return rc; -} - -/* ldaddb.xml */ -int LDADDB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38200000) { - decode_fields32(ENC_LDADDB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STADDB_LDADDB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDADDB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDADDAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDADDALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDADDLB_32_MEMOP); - } - return rc; -} - -/* ldaddh.xml */ -int LDADDH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78200000) { - decode_fields32(ENC_LDADDH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STADDH_LDADDH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDADDH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDADDAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDADDALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDADDLH_32_MEMOP); - } - return rc; -} - -/* ldap1_advsimd_sngl.xml */ -int LDAP1_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* 0|Q=x|00|1|1|0|10|L=1|R=0|0000|o2=1|opcode=100|S=0|size=01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xD418400) { - decode_fields32(ENC_LDAP1_ASISDLSO_D1, ctx, instr); - if(!HaveAdvSIMD() || !HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_LDAP1_ASISDLSO_D1); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* ldapp_gen.xml */ -int LDAPP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=11|01|1|0|0|10|L=1|0|Rt2=xxxxx|opc2=0111|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xD9407800) { - decode_fields32(ENC_LDAPP_64_LDIAPPSTILP, ctx, instr); - if(!HaveLSCP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->t!=0x1f && ctx->t2!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - ctx->ispair = TRUE; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - OK(ENC_LDAPP_64_LDIAPPSTILP); - } - return rc; -} - -/* ldapr.xml */ -int LDAPR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=1x|0110011|L=1|000000000010|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x99C00800) { - decode_fields32(ENC_LDAPR_32L_LDAPSTL_WRITEBACK, ctx, instr); - if(!HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->wback = TRUE; - ctx->acquirepc = ctx->t!=0x1f; - ctx->regsize = (ctx->size==3)!=0 ? 0x40 : 0x20; - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->offset = (1) << (UINT(ctx->size)); - ctx->tagchecked = TRUE; - ctx->wb_unknown = FALSE; - if(ctx->n==ctx->t && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD); - // assert - // switch on constraint - } - if(ctx->size==2) OK(ENC_LDAPR_32L_LDAPSTL_WRITEBACK); - if(ctx->size==3) OK(ENC_LDAPR_64L_LDAPSTL_WRITEBACK); - } - /* class iclass_no_offset */ - /* size=1x|111|VR=0|00|A=1|R=0|1|Rs=(1)(1)(1)(1)(1)|o3=1|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xB8A0C000) { - decode_fields32(ENC_LDAPR_32L_MEMOP, ctx, instr); - if(!HaveLRCPC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->wback = FALSE; - ctx->offset = 0; - ctx->wb_unknown = FALSE; - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->elsize==0x40)!=0 ? 0x40 : 0x20; - ctx->datasize = ctx->elsize; - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_LDAPR_32L_MEMOP); - if(ctx->size==3) OK(ENC_LDAPR_64L_MEMOP); - } - return rc; -} - -/* ldaprb.xml */ -int LDAPRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|11|1|VR=0|0|0|A=1|R=0|1|Rs=(1)(1)(1)(1)(1)|o3=1|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x38A0C000) { - decode_fields32(ENC_LDAPRB_32L_MEMOP, ctx, instr); - if(!HaveLRCPC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDAPRB_32L_MEMOP); - } - return rc; -} - -/* ldaprh.xml */ -int LDAPRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|11|1|VR=0|0|0|A=1|R=0|1|Rs=(1)(1)(1)(1)(1)|o3=1|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x78A0C000) { - decode_fields32(ENC_LDAPRH_32L_MEMOP, ctx, instr); - if(!HaveLRCPC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDAPRH_32L_MEMOP); - } - return rc; -} - -/* ldapurb.xml */ -int LDAPURB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|01|1|0|0|1|opc=01|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x19400000) { - decode_fields32(ENC_LDAPURB_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDAPURB_32_LDAPSTL_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 8; - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldapurh.xml */ -int LDAPURH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|01|1|0|0|1|opc=01|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x59400000) { - decode_fields32(ENC_LDAPURH_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDAPURH_32_LDAPSTL_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldapursb.xml */ -int LDAPURSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|011001|opc=1x|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x19800000) { - decode_fields32(ENC_LDAPURSB_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDAPURSB_32_LDAPSTL_UNSCALED); - if(ctx->opc==2) OK(ENC_LDAPURSB_64_LDAPSTL_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 8; - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldapursh.xml */ -int LDAPURSH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|011001|opc=1x|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x59800000) { - decode_fields32(ENC_LDAPURSH_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDAPURSH_32_LDAPSTL_UNSCALED); - if(ctx->opc==2) OK(ENC_LDAPURSH_64_LDAPSTL_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldapursw.xml */ -int LDAPURSW(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=10|01|1|0|0|1|opc=10|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x99800000) { - decode_fields32(ENC_LDAPURSW_64_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDAPURSW_64_LDAPSTL_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x20; - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldapur_fpsimd.xml */ -int LDAPUR_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=xx|011101|opc=x1|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x1D400800) { - decode_fields32(ENC_LDAPUR_B_LDAPSTL_SIMD, ctx, instr); - if(!HaveFP() || !HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==1) OK(ENC_LDAPUR_B_LDAPSTL_SIMD); - if(ctx->size==1 && ctx->opc==1) OK(ENC_LDAPUR_H_LDAPSTL_SIMD); - if(ctx->size==2 && ctx->opc==1) OK(ENC_LDAPUR_S_LDAPSTL_SIMD); - if(ctx->size==3 && ctx->opc==1) OK(ENC_LDAPUR_D_LDAPSTL_SIMD); - if(ctx->size==0 && ctx->opc==3) OK(ENC_LDAPUR_Q_LDAPSTL_SIMD); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldapur_gen.xml */ -int LDAPUR_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=1x|011001|opc=01|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0x99400000) { - decode_fields32(ENC_LDAPUR_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_LDAPUR_32_LDAPSTL_UNSCALED); - if(ctx->size==3) OK(ENC_LDAPUR_64_LDAPSTL_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquirepc = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldap_gen.xml */ -int LDAP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=11|01|1|0|0|10|L=1|0|Rt2=xxxxx|opc2=0101|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xD9405800) { - decode_fields32(ENC_LDAP_64_LDIAPPSTILP, ctx, instr); - if(!HaveLSCP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->t!=0x1f && ctx->t2!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - ctx->ispair = TRUE; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - OK(ENC_LDAP_64_LDIAPPSTILP); - } - return rc; -} - -/* ldar.xml */ -int LDAR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010001|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88C08000) { - decode_fields32(ENC_LDAR_LR32_LDSTORD, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->elsize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_LDAR_LR32_LDSTORD); - if(ctx->size==3) OK(ENC_LDAR_LR64_LDSTORD); - } - return rc; -} - -/* ldarb.xml */ -int LDARB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|01|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8C08000) { - decode_fields32(ENC_LDARB_LR32_LDSTORD, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDARB_LR32_LDSTORD); - } - return rc; -} - -/* ldarh.xml */ -int LDARH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|01|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48C08000) { - decode_fields32(ENC_LDARH_LR32_LDSTORD, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDARH_LR32_LDSTORD); - } - return rc; -} - -/* ldatxr.xml */ -int LDATXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010010|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x89408000) { - decode_fields32(ENC_LDATXR_LR32_LDSTEXCLR_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->regsize = (ctx->elsize==0x40)!=0 ? 0x40 : 0x20; - ctx->acqrel = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->sz==0) OK(ENC_LDATXR_LR32_LDSTEXCLR_UNPRIV); - if(ctx->sz==1) OK(ENC_LDATXR_LR64_LDSTEXCLR_UNPRIV); - } - return rc; -} - -/* ldaxp.xml */ -int LDAXP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010000|L=1|1|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88608000) { - decode_fields32(ENC_LDAXP_LP32_LDSTEXCLP, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->elsize) * (2); - ctx->acqrel = ctx->t!=0x1f && ctx->t2!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - if(ctx->sz==0) OK(ENC_LDAXP_LP32_LDSTEXCLP); - if(ctx->sz==1) OK(ENC_LDAXP_LP64_LDSTEXCLP); - } - return rc; -} - -/* ldaxr.xml */ -int LDAXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010000|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88408000) { - decode_fields32(ENC_LDAXR_LR32_LDSTEXCLR, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->elsize==0x40)!=0 ? 0x40 : 0x20; - ctx->acqrel = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_LDAXR_LR32_LDSTEXCLR); - if(ctx->size==3) OK(ENC_LDAXR_LR64_LDSTEXCLR); - } - return rc; -} - -/* ldaxrb.xml */ -int LDAXRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|00|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8408000) { - decode_fields32(ENC_LDAXRB_LR32_LDSTEXCLR, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDAXRB_LR32_LDSTEXCLR); - } - return rc; -} - -/* ldaxrh.xml */ -int LDAXRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|00|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48408000) { - decode_fields32(ENC_LDAXRH_LR32_LDSTEXCLR, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDAXRH_LR32_LDSTEXCLR); - } - return rc; -} - -/* ldbfadd.xml */ -int LDBFADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x3C200000) { - decode_fields32(ENC_LDBFADD_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = 0x10; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_LDBFADD_16); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDBFADDA_16); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDBFADDAL_16); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDBFADDL_16); - } - return rc; -} - -/* ldbfmax.xml */ -int LDBFMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x3C204000) { - decode_fields32(ENC_LDBFMAX_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = 0x10; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_LDBFMAX_16); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDBFMAXA_16); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDBFMAXAL_16); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDBFMAXL_16); - } - return rc; -} - -/* ldbfmaxnm.xml */ -int LDBFMAXNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x3C206000) { - decode_fields32(ENC_LDBFMAXNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = 0x10; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_LDBFMAXNM_16); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDBFMAXNMA_16); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDBFMAXNMAL_16); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDBFMAXNML_16); - } - return rc; -} - -/* ldbfmin.xml */ -int LDBFMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x3C205000) { - decode_fields32(ENC_LDBFMIN_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = 0x10; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_LDBFMIN_16); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDBFMINA_16); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDBFMINAL_16); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDBFMINL_16); - } - return rc; -} - -/* ldbfminnm.xml */ -int LDBFMINNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x3C207000) { - decode_fields32(ENC_LDBFMINNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = 0x10; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_LDBFMINNM_16); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDBFMINNMA_16); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDBFMINNMAL_16); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDBFMINNML_16); - } - return rc; -} - -/* ldclr.xml */ -int LDCLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8201000) { - decode_fields32(ENC_LDCLR_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STCLR_LDCLR(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDCLR_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDCLRA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDCLRAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDCLRL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDCLR_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDCLRA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDCLRAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDCLRL_64_MEMOP); - } - return rc; -} - -/* ldclrb.xml */ -int LDCLRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38201000) { - decode_fields32(ENC_LDCLRB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STCLRB_LDCLRB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDCLRB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDCLRAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDCLRALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDCLRLB_32_MEMOP); - } - return rc; -} - -/* ldclrh.xml */ -int LDCLRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78201000) { - decode_fields32(ENC_LDCLRH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STCLRH_LDCLRH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDCLRH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDCLRAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDCLRALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDCLRLH_32_MEMOP); - } - return rc; -} - -/* ldclrp.xml */ -int LDCLRP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rt2=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x19201000) { - decode_fields32(ENC_LDCLRP_128_MEMOP_128, ctx, instr); - if(!HaveLSE128()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_LDCLRP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDCLRPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDCLRPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDCLRPL_128_MEMOP_128); - } - return rc; -} - -/* ldeor.xml */ -int LDEOR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8202000) { - decode_fields32(ENC_LDEOR_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STEOR_LDEOR(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDEOR_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDEORA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDEORAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDEORL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDEOR_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDEORA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDEORAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDEORL_64_MEMOP); - } - return rc; -} - -/* ldeorb.xml */ -int LDEORB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38202000) { - decode_fields32(ENC_LDEORB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STEORB_LDEORB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDEORB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDEORAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDEORALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDEORLB_32_MEMOP); - } - return rc; -} - -/* ldeorh.xml */ -int LDEORH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78202000) { - decode_fields32(ENC_LDEORH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STEORH_LDEORH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDEORH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDEORAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDEORALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDEORLH_32_MEMOP); - } - return rc; -} - -/* ldfadd.xml */ -int LDFADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x3C200000) { - decode_fields32(ENC_LDFADD_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDFADD_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDFADDA_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDFADDAL_16); - if(ctx->size==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDFADDL_16); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDFADD_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDFADDA_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDFADDAL_32); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDFADDL_32); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDFADD_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDFADDA_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDFADDAL_64); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDFADDL_64); - } - return rc; -} - -/* ldfmax.xml */ -int LDFMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x3C204000) { - decode_fields32(ENC_LDFMAX_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMAX_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMAXA_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMAXAL_16); - if(ctx->size==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMAXL_16); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMAX_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMAXA_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMAXAL_32); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMAXL_32); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMAX_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMAXA_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMAXAL_64); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMAXL_64); - } - return rc; -} - -/* ldfmaxnm.xml */ -int LDFMAXNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x3C206000) { - decode_fields32(ENC_LDFMAXNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMAXNM_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMAXNMA_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMAXNMAL_16); - if(ctx->size==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMAXNML_16); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMAXNM_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMAXNMA_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMAXNMAL_32); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMAXNML_32); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMAXNM_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMAXNMA_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMAXNMAL_64); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMAXNML_64); - } - return rc; -} - -/* ldfmin.xml */ -int LDFMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x3C205000) { - decode_fields32(ENC_LDFMIN_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMIN_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMINA_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMINAL_16); - if(ctx->size==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMINL_16); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMIN_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMINA_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMINAL_32); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMINL_32); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMIN_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMINA_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMINAL_64); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMINL_64); - } - return rc; -} - -/* ldfminnm.xml */ -int LDFMINNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F20FC00)==0x3C207000) { - decode_fields32(ENC_LDFMINNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->s = UINT(ctx->Rs); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMINNM_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMINNMA_16); - if(ctx->size==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMINNMAL_16); - if(ctx->size==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMINNML_16); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMINNM_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMINNMA_32); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMINNMAL_32); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMINNML_32); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDFMINNM_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDFMINNMA_64); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDFMINNMAL_64); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDFMINNML_64); - } - return rc; -} - -/* ldg.xml */ -int LDG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101|1|0|0|1|opc=01|1|imm9=xxxxxxxxx|op2=00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9600000) { - decode_fields32(ENC_LDG_64LOFFSET_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - OK(ENC_LDG_64LOFFSET_LDSTTAGS); - } - return rc; -} - -/* ldgm.xml */ -int LDGM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101|1|0|0|1|opc=11|1|imm9=000000000|op2=00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xD9E00000) { - decode_fields32(ENC_LDGM_64BULK_LDSTTAGS, ctx, instr); - if(!HaveMTE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - OK(ENC_LDGM_64BULK_LDSTTAGS); - } - return rc; -} - -/* ldiapp.xml */ -int LDIAPP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|0110010|L=1|0|Rt2=xxxxx|opc2=000x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0EC00)==0x99400800) { - decode_fields32(ENC_LDIAPP_32LE_LDIAPPSTILP, ctx, instr); - if(!HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->ispair = TRUE; - ctx->postindex = SLICE(ctx->opc2,0,0)==0; - ctx->wback = SLICE(ctx->opc2,0,0)==0; - if(ctx->size==2 && ctx->opc2==0) OK(ENC_LDIAPP_32LE_LDIAPPSTILP); - if(ctx->size==2 && ctx->opc2==1) OK(ENC_LDIAPP_32L_LDIAPPSTILP); - if(ctx->size==3 && ctx->opc2==0) OK(ENC_LDIAPP_64LS_LDIAPPSTILP); - if(ctx->size==3 && ctx->opc2==1) OK(ENC_LDIAPP_64L_LDIAPPSTILP); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->scale = 2+UINT(SLICE(ctx->size,0,0)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = (SLICE(ctx->opc2,0,0)==0)!=0 ? ((2) << (ctx->scale)) : 0; - ctx->acqrel = ctx->t!=0x1f && ctx->t2!=0x1f; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->wb_unknown = FALSE; - if(ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD); - // assert - // switch on constraint - } - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - return rc; -} - -/* ldlar.xml */ -int LDLAR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010001|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88C00000) { - decode_fields32(ENC_LDLAR_LR32_LDSTORD, ctx, instr); - if(!HaveLOR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->elsize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_LDLAR_LR32_LDSTORD); - if(ctx->size==3) OK(ENC_LDLAR_LR64_LDSTORD); - } - return rc; -} - -/* ldlarb.xml */ -int LDLARB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|01|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8C00000) { - decode_fields32(ENC_LDLARB_LR32_LDSTORD, ctx, instr); - if(!HaveLOR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDLARB_LR32_LDSTORD); - } - return rc; -} - -/* ldlarh.xml */ -int LDLARH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|01|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48C00000) { - decode_fields32(ENC_LDLARH_LR32_LDSTORD, ctx, instr); - if(!HaveLOR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->t!=0x1f; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDLARH_LR32_LDSTORD); - } - return rc; -} - -/* ldnp_fpsimd.xml */ -int LDNP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=xx|101|VR=1|000|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2C400000) { - decode_fields32(ENC_LDNP_S_LDSTNAPAIR_OFFS, ctx, instr); - if(ctx->opc==0) OK(ENC_LDNP_S_LDSTNAPAIR_OFFS); - if(ctx->opc==1) OK(ENC_LDNP_D_LDSTNAPAIR_OFFS); - if(ctx->opc==2) OK(ENC_LDNP_Q_LDSTNAPAIR_OFFS); - } - /* post-decode pcode */ - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->scale = 2+(UINT(ctx->opc)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - return rc; -} - -/* ldnp_gen.xml */ -int LDNP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=x0|101|VR=0|000|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x28400000) { - decode_fields32(ENC_LDNP_32_LDSTNAPAIR_OFFS, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - if(ctx->opc==0) OK(ENC_LDNP_32_LDSTNAPAIR_OFFS); - if(ctx->opc==2) OK(ENC_LDNP_64_LDSTNAPAIR_OFFS); - } - return rc; -} - -/* ldpsw.xml */ -int LDPSW(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=01|10|1|VR=0|0|01|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x68C00000) { - decode_fields32(ENC_LDPSW_64_LDSTPAIR_POST, ctx, instr); - OK(ENC_LDPSW_64_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=01|10|1|VR=0|0|11|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x69C00000) { - decode_fields32(ENC_LDPSW_64_LDSTPAIR_PRE, ctx, instr); - OK(ENC_LDPSW_64_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=01|10|1|VR=0|0|10|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x69400000) { - decode_fields32(ENC_LDPSW_64_LDSTPAIR_OFF, ctx, instr); - OK(ENC_LDPSW_64_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); - ctx->datasize = 0x20; - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->wb_unknown = FALSE; - if(ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD); - // assert - // switch on constraint - } - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - return rc; -} - -/* ldp_fpsimd.xml */ -int LDP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=xx|101|VR=1|001|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2CC00000) { - decode_fields32(ENC_LDP_S_LDSTPAIR_POST, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = TRUE; - if(ctx->opc==0) OK(ENC_LDP_S_LDSTPAIR_POST); - if(ctx->opc==1) OK(ENC_LDP_D_LDSTPAIR_POST); - if(ctx->opc==2) OK(ENC_LDP_Q_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=xx|101|VR=1|011|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2DC00000) { - decode_fields32(ENC_LDP_S_LDSTPAIR_PRE, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = FALSE; - if(ctx->opc==0) OK(ENC_LDP_S_LDSTPAIR_PRE); - if(ctx->opc==1) OK(ENC_LDP_D_LDSTPAIR_PRE); - if(ctx->opc==2) OK(ENC_LDP_Q_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=xx|101|VR=1|010|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2D400000) { - decode_fields32(ENC_LDP_S_LDSTPAIR_OFF, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = FALSE; - ctx->postindex = FALSE; - if(ctx->opc==0) OK(ENC_LDP_S_LDSTPAIR_OFF); - if(ctx->opc==1) OK(ENC_LDP_D_LDSTPAIR_OFF); - if(ctx->opc==2) OK(ENC_LDP_Q_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->scale = 2+(UINT(ctx->opc)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - return rc; -} - -/* ldp_gen.xml */ -int LDP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=x0|101|VR=0|001|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x28C00000) { - decode_fields32(ENC_LDP_32_LDSTPAIR_POST, ctx, instr); - if(ctx->opc==0) OK(ENC_LDP_32_LDSTPAIR_POST); - if(ctx->opc==2) OK(ENC_LDP_64_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=x0|101|VR=0|011|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x29C00000) { - decode_fields32(ENC_LDP_32_LDSTPAIR_PRE, ctx, instr); - if(ctx->opc==0) OK(ENC_LDP_32_LDSTPAIR_PRE); - if(ctx->opc==2) OK(ENC_LDP_64_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=x0|101|VR=0|010|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x29400000) { - decode_fields32(ENC_LDP_32_LDSTPAIR_OFF, ctx, instr); - if(ctx->opc==0) OK(ENC_LDP_32_LDSTPAIR_OFF); - if(ctx->opc==2) OK(ENC_LDP_64_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->wb_unknown = FALSE; - if(ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD); - // assert - // switch on constraint - } - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - return rc; -} - -/* ldra.xml */ -int LDRA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_pac */ - /* size=11|111|VR=0|00|M=x|S=x|1|imm9=xxxxxxxxx|W=x|1|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF200400)==0xF8200400) { - decode_fields32(ENC_LDRAA_64_LDST_PAC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->wback = ctx->W==1; - ctx->use_key_a = ctx->M==0; - ctx->S10 = ((ctx->S<<9)|ctx->imm9); - ctx->offset = LSL(SignExtend(ctx->S10,10),3); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->wb_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD); - // assert - // switch on constraint - } - if(ctx->M==0 && ctx->W==0) OK(ENC_LDRAA_64_LDST_PAC); - if(ctx->M==0 && ctx->W==1) OK(ENC_LDRAA_64W_LDST_PAC); - if(ctx->M==1 && ctx->W==0) OK(ENC_LDRAB_64_LDST_PAC); - if(ctx->M==1 && ctx->W==1) OK(ENC_LDRAB_64W_LDST_PAC); - } - return rc; -} - -/* ldrb_imm.xml */ -int LDRB_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=00|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38400400) { - decode_fields32(ENC_LDRB_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDRB_32_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=00|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38400C00) { - decode_fields32(ENC_LDRB_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDRB_32_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=00|11|1|VR=0|0|1|opc=01|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x39400000) { - decode_fields32(ENC_LDRB_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),0); - OK(ENC_LDRB_32_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->wb_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* ldrb_reg.xml */ -int LDRB_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* size=00|111|VR=0|00|opc=01|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38600800) { - decode_fields32(ENC_LDRB_32B_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = 0; - if(ctx->option!=3) OK(ENC_LDRB_32B_LDST_REGOFF); - if(ctx->option==3) OK(ENC_LDRB_32BL_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* ldrh_imm.xml */ -int LDRH_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=01|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78400400) { - decode_fields32(ENC_LDRH_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDRH_32_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=01|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78400C00) { - decode_fields32(ENC_LDRH_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDRH_32_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=01|11|1|VR=0|0|1|opc=01|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x79400000) { - decode_fields32(ENC_LDRH_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),1); - OK(ENC_LDRH_32_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->wb_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* ldrh_reg.xml */ -int LDRH_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* size=01|11|1|VR=0|0|0|opc=01|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78600800) { - decode_fields32(ENC_LDRH_32_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = (ctx->S==1)!=0 ? 1 : 0; - OK(ENC_LDRH_32_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* ldrsb_imm.xml */ -int LDRSB_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=00|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x38800400) { - decode_fields32(ENC_LDRSB_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDRSB_32_LDST_IMMPOST); - if(ctx->opc==2) OK(ENC_LDRSB_64_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=00|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x38800C00) { - decode_fields32(ENC_LDRSB_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDRSB_32_LDST_IMMPRE); - if(ctx->opc==2) OK(ENC_LDRSB_64_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=00|111|VR=0|01|opc=1x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF800000)==0x39800000) { - decode_fields32(ENC_LDRSB_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),0); - if(ctx->opc==3) OK(ENC_LDRSB_32_LDST_POS); - if(ctx->opc==2) OK(ENC_LDRSB_64_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->wb_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* ldrsb_reg.xml */ -int LDRSB_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|opc=1x|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x38A00800) { - decode_fields32(ENC_LDRSB_32B_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = 0; - if(ctx->opc==3 && ctx->option!=3) OK(ENC_LDRSB_32B_LDST_REGOFF); - if(ctx->opc==3 && ctx->option==3) OK(ENC_LDRSB_32BL_LDST_REGOFF); - if(ctx->opc==2 && ctx->option!=3) OK(ENC_LDRSB_64B_LDST_REGOFF); - if(ctx->opc==2 && ctx->option==3) OK(ENC_LDRSB_64BL_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* ldrsh_imm.xml */ -int LDRSH_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=01|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x78800400) { - decode_fields32(ENC_LDRSH_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDRSH_32_LDST_IMMPOST); - if(ctx->opc==2) OK(ENC_LDRSH_64_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=01|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x78800C00) { - decode_fields32(ENC_LDRSH_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDRSH_32_LDST_IMMPRE); - if(ctx->opc==2) OK(ENC_LDRSH_64_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=01|111|VR=0|01|opc=1x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF800000)==0x79800000) { - decode_fields32(ENC_LDRSH_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),1); - if(ctx->opc==3) OK(ENC_LDRSH_32_LDST_POS); - if(ctx->opc==2) OK(ENC_LDRSH_64_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->wb_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* ldrsh_reg.xml */ -int LDRSH_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|opc=1x|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x78A00800) { - decode_fields32(ENC_LDRSH_32_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = (ctx->S==1)!=0 ? 1 : 0; - if(ctx->opc==3) OK(ENC_LDRSH_32_LDST_REGOFF); - if(ctx->opc==2) OK(ENC_LDRSH_64_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* ldrsw_imm.xml */ -int LDRSW_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=10|11|1|VR=0|0|0|opc=10|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xB8800400) { - decode_fields32(ENC_LDRSW_64_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDRSW_64_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=10|11|1|VR=0|0|0|opc=10|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xB8800C00) { - decode_fields32(ENC_LDRSW_64_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDRSW_64_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=10|11|1|VR=0|0|1|opc=10|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xB9800000) { - decode_fields32(ENC_LDRSW_64_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),2); - OK(ENC_LDRSW_64_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->wb_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* ldrsw_lit.xml */ -int LDRSW_lit(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_literal */ - /* opc=10|01|1|VR=0|0|0|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF000000)==0x98000000) { - decode_fields32(ENC_LDRSW_64_LOADLIT, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->nontemporal = FALSE; - ctx->tagchecked = FALSE; - ctx->offset = SignExtend((ctx->imm19<<2),21); - OK(ENC_LDRSW_64_LOADLIT); - } - return rc; -} - -/* ldrsw_reg.xml */ -int LDRSW_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* size=10|11|1|VR=0|0|0|opc=10|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xB8A00800) { - decode_fields32(ENC_LDRSW_64_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = (ctx->S==1)!=0 ? 2 : 0; - OK(ENC_LDRSW_64_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* ldr_imm_fpsimd.xml */ -int LDR_imm_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=xx|111|VR=1|00|opc=x1|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C400400) { - decode_fields32(ENC_LDR_B_LDST_IMMPOST, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==1) OK(ENC_LDR_B_LDST_IMMPOST); - if(ctx->size==1 && ctx->opc==1) OK(ENC_LDR_H_LDST_IMMPOST); - if(ctx->size==2 && ctx->opc==1) OK(ENC_LDR_S_LDST_IMMPOST); - if(ctx->size==3 && ctx->opc==1) OK(ENC_LDR_D_LDST_IMMPOST); - if(ctx->size==0 && ctx->opc==3) OK(ENC_LDR_Q_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=xx|111|VR=1|00|opc=x1|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C400C00) { - decode_fields32(ENC_LDR_B_LDST_IMMPRE, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==1) OK(ENC_LDR_B_LDST_IMMPRE); - if(ctx->size==1 && ctx->opc==1) OK(ENC_LDR_H_LDST_IMMPRE); - if(ctx->size==2 && ctx->opc==1) OK(ENC_LDR_S_LDST_IMMPRE); - if(ctx->size==3 && ctx->opc==1) OK(ENC_LDR_D_LDST_IMMPRE); - if(ctx->size==0 && ctx->opc==3) OK(ENC_LDR_Q_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=xx|111|VR=1|01|opc=x1|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F400000)==0x3D400000) { - decode_fields32(ENC_LDR_B_LDST_POS, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),ctx->scale); - if(ctx->size==0 && ctx->opc==1) OK(ENC_LDR_B_LDST_POS); - if(ctx->size==1 && ctx->opc==1) OK(ENC_LDR_H_LDST_POS); - if(ctx->size==2 && ctx->opc==1) OK(ENC_LDR_S_LDST_POS); - if(ctx->size==3 && ctx->opc==1) OK(ENC_LDR_D_LDST_POS); - if(ctx->size==0 && ctx->opc==3) OK(ENC_LDR_Q_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - return rc; -} - -/* ldr_imm_gen.xml */ -int LDR_imm_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=1x|111|VR=0|00|opc=01|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8400400) { - decode_fields32(ENC_LDR_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_LDR_32_LDST_IMMPOST); - if(ctx->size==3) OK(ENC_LDR_64_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=1x|111|VR=0|00|opc=01|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8400C00) { - decode_fields32(ENC_LDR_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_LDR_32_LDST_IMMPRE); - if(ctx->size==3) OK(ENC_LDR_64_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=1x|111|VR=0|01|opc=01|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFC00000)==0xB9400000) { - decode_fields32(ENC_LDR_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->scale = UINT(ctx->size); - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),ctx->scale); - if(ctx->size==2) OK(ENC_LDR_32_LDST_POS); - if(ctx->size==3) OK(ENC_LDR_64_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->wb_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* ldr_lit_fpsimd.xml */ -int LDR_lit_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_literal */ - /* opc=xx|011|VR=1|00|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F000000)==0x1C000000) { - decode_fields32(ENC_LDR_S_LOADLIT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - if(ctx->opc==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = (4) << ((UINT(ctx->opc))); - ctx->nontemporal = FALSE; - ctx->tagchecked = FALSE; - ctx->offset = SignExtend((ctx->imm19<<2),21); - if(ctx->opc==0) OK(ENC_LDR_S_LOADLIT); - if(ctx->opc==1) OK(ENC_LDR_D_LOADLIT); - if(ctx->opc==2) OK(ENC_LDR_Q_LOADLIT); - } - return rc; -} - -/* ldr_lit_gen.xml */ -int LDR_lit_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_literal */ - /* opc=0x|011|VR=0|00|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF000000)==0x18000000) { - decode_fields32(ENC_LDR_32_LOADLIT, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->size = (4) << (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = FALSE; - ctx->offset = SignExtend((ctx->imm19<<2),21); - if(ctx->opc==0) OK(ENC_LDR_32_LOADLIT); - if(ctx->opc==1) OK(ENC_LDR_64_LOADLIT); - } - return rc; -} - -/* ldr_reg_fpsimd.xml */ -int LDR_reg_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_simd_fp_registers */ - /* size=xx|111|VR=1|00|opc=x1|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C600800) { - decode_fields32(ENC_LDR_B_LDST_REGOFF, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = (ctx->S==1)!=0 ? ctx->scale : 0; - if(ctx->size==0 && ctx->opc==1 && ctx->option!=3) OK(ENC_LDR_B_LDST_REGOFF); - if(ctx->size==0 && ctx->opc==1 && ctx->option==3) OK(ENC_LDR_BL_LDST_REGOFF); - if(ctx->size==1 && ctx->opc==1) OK(ENC_LDR_H_LDST_REGOFF); - if(ctx->size==2 && ctx->opc==1) OK(ENC_LDR_S_LDST_REGOFF); - if(ctx->size==3 && ctx->opc==1) OK(ENC_LDR_D_LDST_REGOFF); - if(ctx->size==0 && ctx->opc==3) OK(ENC_LDR_Q_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* ldr_reg_gen.xml */ -int LDR_reg_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|opc=01|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8600800) { - decode_fields32(ENC_LDR_32_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->scale = UINT(ctx->size); - ctx->shift = (ctx->S==1)!=0 ? ctx->scale : 0; - if(ctx->size==2) OK(ENC_LDR_32_LDST_REGOFF); - if(ctx->size==3) OK(ENC_LDR_64_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (ctx->scale); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* ldset.xml */ -int LDSET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8203000) { - decode_fields32(ENC_LDSET_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSET_LDSET(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDSET_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDSETA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDSETAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDSETL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDSET_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDSETA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDSETAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDSETL_64_MEMOP); - } - return rc; -} - -/* ldsetb.xml */ -int LDSETB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38203000) { - decode_fields32(ENC_LDSETB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSETB_LDSETB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDSETB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDSETAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDSETALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDSETLB_32_MEMOP); - } - return rc; -} - -/* ldseth.xml */ -int LDSETH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78203000) { - decode_fields32(ENC_LDSETH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSETH_LDSETH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDSETH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDSETAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDSETALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDSETLH_32_MEMOP); - } - return rc; -} - -/* ldsetp.xml */ -int LDSETP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rt2=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x19203000) { - decode_fields32(ENC_LDSETP_128_MEMOP_128, ctx, instr); - if(!HaveLSE128()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_LDSETP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDSETPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDSETPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDSETPL_128_MEMOP_128); - } - return rc; -} - -/* ldsmax.xml */ -int LDSMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8204000) { - decode_fields32(ENC_LDSMAX_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSMAX_LDSMAX(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDSMAX_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDSMAXA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDSMAXAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDSMAXL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDSMAX_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDSMAXA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDSMAXAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDSMAXL_64_MEMOP); - } - return rc; -} - -/* ldsmaxb.xml */ -int LDSMAXB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38204000) { - decode_fields32(ENC_LDSMAXB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSMAXB_LDSMAXB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDSMAXB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDSMAXAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDSMAXALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDSMAXLB_32_MEMOP); - } - return rc; -} - -/* ldsmaxh.xml */ -int LDSMAXH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78204000) { - decode_fields32(ENC_LDSMAXH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSMAXH_LDSMAXH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDSMAXH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDSMAXAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDSMAXALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDSMAXLH_32_MEMOP); - } - return rc; -} - -/* ldsmin.xml */ -int LDSMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8205000) { - decode_fields32(ENC_LDSMIN_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSMIN_LDSMIN(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDSMIN_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDSMINA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDSMINAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDSMINL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDSMIN_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDSMINA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDSMINAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDSMINL_64_MEMOP); - } - return rc; -} - -/* ldsminb.xml */ -int LDSMINB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38205000) { - decode_fields32(ENC_LDSMINB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSMINB_LDSMINB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDSMINB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDSMINAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDSMINALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDSMINLB_32_MEMOP); - } - return rc; -} - -/* ldsminh.xml */ -int LDSMINH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78205000) { - decode_fields32(ENC_LDSMINH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STSMINH_LDSMINH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDSMINH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDSMINAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDSMINALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDSMINLH_32_MEMOP); - } - return rc; -} - -/* ldtadd.xml */ -int LDTADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|sz=x|011001|A=x|R=x|1|Rs=xxxxx|o3=0|opc=000|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x19200400) { - decode_fields32(ENC_LDTADD_32_MEMOP_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sz)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STTADD_LDTADD(ctx, instr); - if(ctx->sz==0 && ctx->A==0 && ctx->R==0) OK(ENC_LDTADD_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==0) OK(ENC_LDTADDA_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==1) OK(ENC_LDTADDAL_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==0 && ctx->R==1) OK(ENC_LDTADDL_32_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDTADD_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDTADDA_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDTADDAL_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDTADDL_64_MEMOP_UNPRIV); - } - return rc; -} - -/* ldtclr.xml */ -int LDTCLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|sz=x|011001|A=x|R=x|1|Rs=xxxxx|o3=0|opc=001|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x19201400) { - decode_fields32(ENC_LDTCLR_32_MEMOP_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sz)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STTCLR_LDTCLR(ctx, instr); - if(ctx->sz==0 && ctx->A==0 && ctx->R==0) OK(ENC_LDTCLR_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==0) OK(ENC_LDTCLRA_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==1) OK(ENC_LDTCLRAL_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==0 && ctx->R==1) OK(ENC_LDTCLRL_32_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDTCLR_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDTCLRA_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDTCLRAL_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDTCLRL_64_MEMOP_UNPRIV); - } - return rc; -} - -/* ldtnp_fpsimd.xml */ -int LDTNP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=1|0|00|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xEC400000) { - decode_fields32(ENC_LDTNP_Q_LDSTNAPAIR_OFFS, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->datasize = 0x80; - ctx->offset = LSL(SignExtend(ctx->imm7,7),4); - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - OK(ENC_LDTNP_Q_LDSTNAPAIR_OFFS); - } - return rc; -} - -/* ldtnp_gen.xml */ -int LDTNP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=0|0|00|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE8400000) { - decode_fields32(ENC_LDTNP_64_LDSTNAPAIR_OFFS, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->datasize = 0x40; - ctx->offset = LSL(SignExtend(ctx->imm7,7),3); - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - OK(ENC_LDTNP_64_LDSTNAPAIR_OFFS); - } - return rc; -} - -/* ldtp_fpsimd.xml */ -int LDTP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=11|10|1|VR=1|0|01|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xECC00000) { - decode_fields32(ENC_LDTP_Q_LDSTPAIR_POST, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = TRUE; - OK(ENC_LDTP_Q_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=11|10|1|VR=1|0|11|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xEDC00000) { - decode_fields32(ENC_LDTP_Q_LDSTPAIR_PRE, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = FALSE; - OK(ENC_LDTP_Q_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=1|0|10|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xED400000) { - decode_fields32(ENC_LDTP_Q_LDSTPAIR_OFF, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = FALSE; - ctx->postindex = FALSE; - OK(ENC_LDTP_Q_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->datasize = 0x80; - ctx->offset = LSL(SignExtend(ctx->imm7,7),4); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - return rc; -} - -/* ldtp_gen.xml */ -int LDTP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=11|10|1|VR=0|0|01|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE8C00000) { - decode_fields32(ENC_LDTP_64_LDSTPAIR_POST, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = TRUE; - OK(ENC_LDTP_64_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=11|10|1|VR=0|0|11|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE9C00000) { - decode_fields32(ENC_LDTP_64_LDSTPAIR_PRE, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = FALSE; - OK(ENC_LDTP_64_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=0|0|10|L=1|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE9400000) { - decode_fields32(ENC_LDTP_64_LDSTPAIR_OFF, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = FALSE; - ctx->postindex = FALSE; - OK(ENC_LDTP_64_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); - ctx->datasize = 0x40; - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->wb_unknown = FALSE; - if(ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPLD); - // assert - // switch on constraint - } - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - return rc; -} - -/* ldtr.xml */ -int LDTR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=1x|111|VR=0|00|opc=01|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8400800) { - decode_fields32(ENC_LDTR_32_LDST_UNPRIV, ctx, instr); - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_LDTR_32_LDST_UNPRIV); - if(ctx->size==3) OK(ENC_LDTR_64_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldtrb.xml */ -int LDTRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38400800) { - decode_fields32(ENC_LDTRB_32_LDST_UNPRIV, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDTRB_32_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 8; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldtrh.xml */ -int LDTRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78400800) { - decode_fields32(ENC_LDTRH_32_LDST_UNPRIV, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDTRH_32_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldtrsb.xml */ -int LDTRSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x38800800) { - decode_fields32(ENC_LDTRSB_32_LDST_UNPRIV, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDTRSB_32_LDST_UNPRIV); - if(ctx->opc==2) OK(ENC_LDTRSB_64_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 8; - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldtrsh.xml */ -int LDTRSH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x78800800) { - decode_fields32(ENC_LDTRSH_32_LDST_UNPRIV, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDTRSH_32_LDST_UNPRIV); - if(ctx->opc==2) OK(ENC_LDTRSH_64_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldtrsw.xml */ -int LDTRSW(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=10|11|1|VR=0|0|0|opc=10|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xB8800800) { - decode_fields32(ENC_LDTRSW_64_LDST_UNPRIV, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDTRSW_64_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x20; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldtset.xml */ -int LDTSET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|sz=x|011001|A=x|R=x|1|Rs=xxxxx|o3=0|opc=011|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x19203400) { - decode_fields32(ENC_LDTSET_32_MEMOP_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sz)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STTSET_LDTSET(ctx, instr); - if(ctx->sz==0 && ctx->A==0 && ctx->R==0) OK(ENC_LDTSET_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==0) OK(ENC_LDTSETA_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==1) OK(ENC_LDTSETAL_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==0 && ctx->R==1) OK(ENC_LDTSETL_32_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==0) OK(ENC_LDTSET_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==0) OK(ENC_LDTSETA_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==1) OK(ENC_LDTSETAL_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==1) OK(ENC_LDTSETL_64_MEMOP_UNPRIV); - } - return rc; -} - -/* ldtxr.xml */ -int LDTXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010010|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x89400000) { - decode_fields32(ENC_LDTXR_LR32_LDSTEXCLR_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->regsize = (ctx->elsize==0x40)!=0 ? 0x40 : 0x20; - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->sz==0) OK(ENC_LDTXR_LR32_LDSTEXCLR_UNPRIV); - if(ctx->sz==1) OK(ENC_LDTXR_LR64_LDSTEXCLR_UNPRIV); - } - return rc; -} - -/* ldumax.xml */ -int LDUMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8206000) { - decode_fields32(ENC_LDUMAX_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STUMAX_LDUMAX(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDUMAX_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDUMAXA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDUMAXAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDUMAXL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDUMAX_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDUMAXA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDUMAXAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDUMAXL_64_MEMOP); - } - return rc; -} - -/* ldumaxb.xml */ -int LDUMAXB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38206000) { - decode_fields32(ENC_LDUMAXB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STUMAXB_LDUMAXB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDUMAXB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDUMAXAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDUMAXALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDUMAXLB_32_MEMOP); - } - return rc; -} - -/* ldumaxh.xml */ -int LDUMAXH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78206000) { - decode_fields32(ENC_LDUMAXH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STUMAXH_LDUMAXH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDUMAXH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDUMAXAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDUMAXALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDUMAXLH_32_MEMOP); - } - return rc; -} - -/* ldumin.xml */ -int LDUMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8207000) { - decode_fields32(ENC_LDUMIN_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STUMIN_LDUMIN(ctx, instr); - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_LDUMIN_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_LDUMINA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_LDUMINAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_LDUMINL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_LDUMIN_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_LDUMINA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_LDUMINAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_LDUMINL_64_MEMOP); - } - return rc; -} - -/* lduminb.xml */ -int LDUMINB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38207000) { - decode_fields32(ENC_LDUMINB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STUMINB_LDUMINB(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDUMINB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDUMINAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDUMINALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDUMINLB_32_MEMOP); - } - return rc; -} - -/* lduminh.xml */ -int LDUMINH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78207000) { - decode_fields32(ENC_LDUMINH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - /* regular aliases */ - if(ctx->A==0 && ctx->Rt==0x1f) return STUMINH_LDUMINH(ctx, instr); - if(ctx->A==0 && ctx->R==0) OK(ENC_LDUMINH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_LDUMINAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_LDUMINALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_LDUMINLH_32_MEMOP); - } - return rc; -} - -/* ldurb.xml */ -int LDURB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38400000) { - decode_fields32(ENC_LDURB_32_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDURB_32_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 8; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldurh.xml */ -int LDURH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|11|1|VR=0|0|0|opc=01|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78400000) { - decode_fields32(ENC_LDURH_32_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDURH_32_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 0x10; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldursb.xml */ -int LDURSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x38800000) { - decode_fields32(ENC_LDURSB_32_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDURSB_32_LDST_UNSCALED); - if(ctx->opc==2) OK(ENC_LDURSB_64_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 8; - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldursh.xml */ -int LDURSH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|111|VR=0|00|opc=1x|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFA00C00)==0x78800000) { - decode_fields32(ENC_LDURSH_32_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->opc==3) OK(ENC_LDURSH_32_LDST_UNSCALED); - if(ctx->opc==2) OK(ENC_LDURSH_64_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 0x10; - ctx->regsize = (0x40) >> (UINT(SLICE(ctx->opc,0,0))); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldursw.xml */ -int LDURSW(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=10|11|1|VR=0|0|0|opc=10|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xB8800000) { - decode_fields32(ENC_LDURSW_64_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_LDURSW_64_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 0x20; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldur_fpsimd.xml */ -int LDUR_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=xx|111|VR=1|00|opc=x1|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C400000) { - decode_fields32(ENC_LDUR_B_LDST_UNSCALED, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==1) OK(ENC_LDUR_B_LDST_UNSCALED); - if(ctx->size==1 && ctx->opc==1) OK(ENC_LDUR_H_LDST_UNSCALED); - if(ctx->size==2 && ctx->opc==1) OK(ENC_LDUR_S_LDST_UNSCALED); - if(ctx->size==3 && ctx->opc==1) OK(ENC_LDUR_D_LDST_UNSCALED); - if(ctx->size==0 && ctx->opc==3) OK(ENC_LDUR_Q_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldur_gen.xml */ -int LDUR_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=1x|111|VR=0|00|opc=01|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8400000) { - decode_fields32(ENC_LDUR_32_LDST_UNSCALED, ctx, instr); - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_LDUR_32_LDST_UNSCALED); - if(ctx->size==3) OK(ENC_LDUR_64_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = (8) << (ctx->scale); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* ldxp.xml */ -int LDXP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010000|L=1|1|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88600000) { - decode_fields32(ENC_LDXP_LP32_LDSTEXCLP, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->elsize) * (2); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LDPOVERLAP); - // assert - // switch on constraint - } - if(ctx->sz==0) OK(ENC_LDXP_LP32_LDSTEXCLP); - if(ctx->sz==1) OK(ENC_LDXP_LP64_LDSTEXCLP); - } - return rc; -} - -/* ldxr.xml */ -int LDXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010000|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88400000) { - decode_fields32(ENC_LDXR_LR32_LDSTEXCLR, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->elsize==0x40)!=0 ? 0x40 : 0x20; - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_LDXR_LR32_LDSTEXCLR); - if(ctx->size==3) OK(ENC_LDXR_LR64_LDSTEXCLR); - } - return rc; -} - -/* ldxrb.xml */ -int LDXRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|00|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8400000) { - decode_fields32(ENC_LDXRB_LR32_LDSTEXCLR, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDXRB_LR32_LDSTEXCLR); - } - return rc; -} - -/* ldxrh.xml */ -int LDXRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|00|L=1|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48400000) { - decode_fields32(ENC_LDXRH_LR32_LDSTEXCLR, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_LDXRH_LR32_LDSTEXCLR); - } - return rc; -} - -/* lslv.xml */ -int LSLV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02000) { - decode_fields32(ENC_LSLV_32_DP_2SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->op2); - /* unconditional alias */ - if(LSL_LSLV(ctx, instr)==0) return 0; - if(ctx->sf==0) OK(ENC_LSLV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_LSLV_64_DP_2SRC); - } - return rc; -} - -/* lsl_lslv.xml */ -int LSL_LSLV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02000) { - decode_fields32(ENC_LSL_LSLV_32_DP_2SRC, ctx, instr); - if(ctx->sf==0) OK(ENC_LSL_LSLV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_LSL_LSLV_64_DP_2SRC); - } - return rc; -} - -/* lsl_ubfm.xml */ -int LSL_UBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_zeros_to_left_and_right */ - /* sf=x|opc=10|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x53000000) { - decode_fields32(ENC_LSL_UBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0 && ctx->imms!=0x1f) OK(ENC_LSL_UBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1 && ctx->imms!=0x3f) OK(ENC_LSL_UBFM_64M_BITFIELD); - } - return rc; -} - -/* lsrv.xml */ -int LSRV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02400) { - decode_fields32(ENC_LSRV_32_DP_2SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->op2); - /* unconditional alias */ - if(LSR_LSRV(ctx, instr)==0) return 0; - if(ctx->sf==0) OK(ENC_LSRV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_LSRV_64_DP_2SRC); - } - return rc; -} - -/* lsr_lsrv.xml */ -int LSR_LSRV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02400) { - decode_fields32(ENC_LSR_LSRV_32_DP_2SRC, ctx, instr); - if(ctx->sf==0) OK(ENC_LSR_LSRV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_LSR_LSRV_64_DP_2SRC); - } - return rc; -} - -/* lsr_ubfm.xml */ -int LSR_UBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_zeros_to_left_and_right */ - /* sf=x|opc=10|100110|N=x|immr=xxxxxx|imms=x11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F807C00)==0x53007C00) { - decode_fields32(ENC_LSR_UBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0 && ctx->imms==0x1f) OK(ENC_LSR_UBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1 && ctx->imms==0x3f) OK(ENC_LSR_UBFM_64M_BITFIELD); - } - return rc; -} - -/* luti2_advsimd.xml */ -int LUTI2_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|001110|op2=1x|0|Rm=xxxxx|0|len=xx|op=x|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFA08C00)==0x4E800000) { - decode_fields32(ENC_LUTI2_ASIMDTBL_L5, ctx, instr); - if(!HaveAdvSIMD() || !HaveLUT()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==2 && ctx->op==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->isize = 2; - ctx->esize = (ctx->op2==2)!=0 ? 8 : 0x10; - ctx->part = (ctx->op2==2)!=0 ? UINT(ctx->len) : UINT(((ctx->len<<1)|ctx->op)); - if(ctx->op2==2 && ctx->op==1) OK(ENC_LUTI2_ASIMDTBL_L5); - if(ctx->op2==3) OK(ENC_LUTI2_ASIMDTBL_L6); - } - return rc; -} - -/* luti4_advsimd.xml */ -int LUTI4_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|001110|op2=01|0|Rm=xxxxx|0|len=xx|op=x|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08C00)==0x4E400000) { - decode_fields32(ENC_LUTI4_ASIMDTBL_L5, ctx, instr); - if(!HaveAdvSIMD() || !HaveLUT()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->len,0,0)==0 && ctx->op==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->isize = 4; - ctx->esize = (8) << (UINT(ctx->op)); - ctx->ntblr = (1) << (UINT(ctx->op)); - ctx->part = (ctx->op==0)!=0 ? UINT(SLICE(ctx->len,1,1)) : UINT(ctx->len); - if(ctx->len&1 && ctx->op==0) OK(ENC_LUTI4_ASIMDTBL_L5); - if(ctx->op==1) OK(ENC_LUTI4_ASIMDTBL_L7); - } - return rc; -} - -/* madd.xml */ -int MADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op54=00|11011|op31=000|Rm=xxxxx|o0=0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE08000)==0x1B000000) { - decode_fields32(ENC_MADD_32A_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - /* regular aliases */ - if(ctx->Ra==0x1f) return MUL_MADD(ctx, instr); - if(ctx->sf==0) OK(ENC_MADD_32A_DP_3SRC); - if(ctx->sf==1) OK(ENC_MADD_64A_DP_3SRC); - } - return rc; -} - -/* maddpt.xml */ -int MADDPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|op54=00|1|101|1|op31=011|Rm=xxxxx|o0=0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9B600000) { - decode_fields32(ENC_MADDPT_64A_DP_3SRC, ctx, instr); - if(!HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - OK(ENC_MADDPT_64A_DP_3SRC); - } - return rc; -} - -/* mla_advsimd_elt.xml */ -int MLA_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=0|00|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F000000) { - decode_fields32(ENC_MLA_ASIMDELEM_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_MLA_ASIMDELEM_R); - } - return rc; -} - -/* mla_advsimd_vec.xml */ -int MLA_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=10010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE209400) { - decode_fields32(ENC_MLA_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_MLA_ASIMDSAME_ONLY); - } - return rc; -} - -/* mlbi_sys.xml */ -int MLBI_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=100|CRn=0111|CRm=0000|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFF00)==0xD50C7000) { - decode_fields32(ENC_MLBI_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_MLBI_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* mls_advsimd_elt.xml */ -int MLS_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=1|00|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F004000) { - decode_fields32(ENC_MLS_ASIMDELEM_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_MLS_ASIMDELEM_R); - } - return rc; -} - -/* mls_advsimd_vec.xml */ -int MLS_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=10010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E209400) { - decode_fields32(ENC_MLS_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_MLS_ASIMDSAME_ONLY); - } - return rc; -} - -/* mneg_msub.xml */ -int MNEG_MSUB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op54=00|11011|op31=000|Rm=xxxxx|o0=1|Ra=11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1B00FC00) { - decode_fields32(ENC_MNEG_MSUB_32A_DP_3SRC, ctx, instr); - if(ctx->sf==0) OK(ENC_MNEG_MSUB_32A_DP_3SRC); - if(ctx->sf==1) OK(ENC_MNEG_MSUB_64A_DP_3SRC); - } - return rc; -} - -/* movi_advsimd.xml */ -int MOVI_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|op=x|0111100000|a=x|b=x|c=x|cmode=xxxx|o2=0|1|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx */ - if((INSWORD & 0x9FF80C00)==0xF000400) { - decode_fields32(ENC_MOVI_ASIMDIMM_N_B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->rd = UINT(ctx->Rd); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->imm64 = AdvSIMDExpandImm(ctx->op,ctx->cmode,((ctx->a<<7)|(ctx->b<<6)|(ctx->c<<5)|(ctx->d<<4)|(ctx->e<<3)|(ctx->f<<2)|(ctx->g<<1)|ctx->h)); - ctx->imm = Replicate(ctx->imm64, ((0x40)!=0 ? ((ctx->datasize) / (0x40)) : 0), 64); - if(ctx->op==0 && ctx->cmode==14) OK(ENC_MOVI_ASIMDIMM_N_B); - if(ctx->op==0 && (ctx->cmode&13)==8) OK(ENC_MOVI_ASIMDIMM_L_HL); - if(ctx->op==0 && !(ctx->cmode&9)) OK(ENC_MOVI_ASIMDIMM_L_SL); - if(ctx->op==0 && (ctx->cmode&14)==12) OK(ENC_MOVI_ASIMDIMM_M_SM); - if(ctx->Q==0 && ctx->op==1 && ctx->cmode==14) OK(ENC_MOVI_ASIMDIMM_D_DS); - if(ctx->Q==1 && ctx->op==1 && ctx->cmode==14) OK(ENC_MOVI_ASIMDIMM_D2_D); - } - return rc; -} - -/* movk.xml */ -int MOVK(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_immediate_packed_into_16_bit_value_and_2_bit_shift */ - /* sf=x|opc=11|100101|hw=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x72800000) { - decode_fields32(ENC_MOVK_32_MOVEWIDE, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->hw,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = ctx->imm16; - ctx->pos = (UINT(ctx->hw)) << (4); - if(ctx->sf==0 && !(ctx->hw&2)) OK(ENC_MOVK_32_MOVEWIDE); - if(ctx->sf==1) OK(ENC_MOVK_64_MOVEWIDE); - } - return rc; -} - -/* movn.xml */ -int MOVN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_immediate_packed_into_16_bit_value_and_2_bit_shift */ - /* sf=x|opc=00|100101|hw=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x12800000) { - decode_fields32(ENC_MOVN_32_MOVEWIDE, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->hw,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = ctx->imm16; - ctx->pos = (UINT(ctx->hw)) << (4); - /* regular aliases */ - bool encoding32 = ctx->sf==0 && !(ctx->hw&2); - bool encoding64 = ctx->sf==1; - if((!(IsZero(ctx->imm16) && ctx->hw!=0) && !IsOnes(ctx->imm16,16) && EncodingLabeled32Bit()) || (!(IsZero(ctx->imm16) && ctx->hw!=0) && EncodingLabeled64Bit())) return MOV_MOVN(ctx, instr); - if(ctx->sf==0 && !(ctx->hw&2)) OK(ENC_MOVN_32_MOVEWIDE); - if(ctx->sf==1) OK(ENC_MOVN_64_MOVEWIDE); - } - return rc; -} - -/* movz.xml */ -int MOVZ(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_immediate_packed_into_16_bit_value_and_2_bit_shift */ - /* sf=x|opc=10|100101|hw=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x52800000) { - decode_fields32(ENC_MOVZ_32_MOVEWIDE, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->hw,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = ctx->imm16; - ctx->pos = (UINT(ctx->hw)) << (4); - /* regular aliases */ - if(!(IsZero(ctx->imm16) && ctx->hw!=0)) return MOV_MOVZ(ctx, instr); - if(ctx->sf==0 && !(ctx->hw&2)) OK(ENC_MOVZ_32_MOVEWIDE); - if(ctx->sf==1) OK(ENC_MOVZ_64_MOVEWIDE); - } - return rc; -} - -/* mov_add_addsub_imm.xml */ -int MOV_ADD_addsub_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=0|S=0|100010|sh=0|imm12=000000000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x11000000) { - decode_fields32(ENC_MOV_ADD_32_ADDSUB_IMM, ctx, instr); - if(ctx->sf==0) OK(ENC_MOV_ADD_32_ADDSUB_IMM); - if(ctx->sf==1) OK(ENC_MOV_ADD_64_ADDSUB_IMM); - } - return rc; -} - -/* mov_dup_advsimd_elt.xml */ -int MOV_DUP_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|op=0|1|111|00|00|imm5=xxxxx|0|imm4=0000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E000400) { - decode_fields32(ENC_MOV_DUP_ASISDONE_ONLY, ctx, instr); - OK(ENC_MOV_DUP_ASISDONE_ONLY); - } - return rc; -} - -/* mov_ins_advsimd_elt.xml */ -int MOV_INS_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|op=1|0|111|00|00|imm5=xxxxx|0|imm4=xxxx|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08400)==0x6E000400) { - decode_fields32(ENC_MOV_INS_ASIMDINS_IV_V, ctx, instr); - OK(ENC_MOV_INS_ASIMDINS_IV_V); - } - return rc; -} - -/* mov_ins_advsimd_gen.xml */ -int MOV_INS_advsimd_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=1|op=0|0|111|00|00|imm5=xxxxx|0|imm4=0011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E001C00) { - decode_fields32(ENC_MOV_INS_ASIMDINS_IR_R, ctx, instr); - OK(ENC_MOV_INS_ASIMDINS_IR_R); - } - return rc; -} - -/* mov_movn.xml */ -int MOV_MOVN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_immediate_packed_into_16_bit_value_and_2_bit_shift */ - /* sf=x|opc=00|100101|hw=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x12800000) { - decode_fields32(ENC_MOV_MOVN_32_MOVEWIDE, ctx, instr); - if(ctx->sf==0 && !(ctx->hw&2)) OK(ENC_MOV_MOVN_32_MOVEWIDE); - if(ctx->sf==1) OK(ENC_MOV_MOVN_64_MOVEWIDE); - } - return rc; -} - -/* mov_movz.xml */ -int MOV_MOVZ(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_immediate_packed_into_16_bit_value_and_2_bit_shift */ - /* sf=x|opc=10|100101|hw=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x52800000) { - decode_fields32(ENC_MOV_MOVZ_32_MOVEWIDE, ctx, instr); - if(ctx->sf==0 && !(ctx->hw&2)) OK(ENC_MOV_MOVZ_32_MOVEWIDE); - if(ctx->sf==1) OK(ENC_MOV_MOVZ_64_MOVEWIDE); - } - return rc; -} - -/* mov_orr_advsimd_reg.xml */ -int MOV_ORR_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=10|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEA01C00) { - decode_fields32(ENC_MOV_ORR_ASIMDSAME_ONLY, ctx, instr); - OK(ENC_MOV_ORR_ASIMDSAME_ONLY); - } - return rc; -} - -/* mov_orr_log_imm.xml */ -int MOV_ORR_log_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=01|100100|N=x|immr=xxxxxx|imms=xxxxxx|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7F8003E0)==0x320003E0) { - decode_fields32(ENC_MOV_ORR_32_LOG_IMM, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_MOV_ORR_32_LOG_IMM); - if(ctx->sf==1) OK(ENC_MOV_ORR_64_LOG_IMM); - } - return rc; -} - -/* mov_orr_log_shift.xml */ -int MOV_ORR_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=01|01010|shift=00|N=0|Rm=xxxxx|imm6=000000|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7FE0FFE0)==0x2A0003E0) { - decode_fields32(ENC_MOV_ORR_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0) OK(ENC_MOV_ORR_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_MOV_ORR_64_LOG_SHIFT); - } - return rc; -} - -/* mov_umov_advsimd.xml */ -int MOV_UMOV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|op=0|01110000|imm5=xxx00|0|imm4=0111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE3FC00)==0xE003C00) { - decode_fields32(ENC_MOV_UMOV_ASIMDINS_W_W, ctx, instr); - if(ctx->Q==0 && (ctx->imm5&7)==4) OK(ENC_MOV_UMOV_ASIMDINS_W_W); - if(ctx->Q==1 && (ctx->imm5&15)==8) OK(ENC_MOV_UMOV_ASIMDINS_X_X); - } - return rc; -} - -/* mrrs.xml */ -int MRRS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0101|L=1|1|o0=x|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF00000)==0xD5700000) { - decode_fields32(ENC_MRRS_RS_SYSTEMMOVEPR, ctx, instr); - if(!HaveSYSREG128()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt+1); - ctx->sys_L = ctx->L; - ctx->sys_op0 = ((1<<1)|ctx->o0); - ctx->sys_op1 = ctx->op1; - ctx->sys_op2 = ctx->op2; - ctx->sys_crn = ctx->CRn; - ctx->sys_crm = ctx->CRm; - OK(ENC_MRRS_RS_SYSTEMMOVEPR); - } - return rc; -} - -/* mrs.xml */ -int MRS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=1|1|o0=x|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF00000)==0xD5300000) { - decode_fields32(ENC_MRS_RS_SYSTEMMOVE, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->sys_L = ctx->L; - ctx->sys_op0 = ((1<<1)|ctx->o0); - ctx->sys_op1 = ctx->op1; - ctx->sys_op2 = ctx->op2; - ctx->sys_crn = ctx->CRn; - ctx->sys_crm = ctx->CRm; - OK(ENC_MRS_RS_SYSTEMMOVE); - } - return rc; -} - -/* msrr.xml */ -int MSRR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0101|L=0|1|o0=x|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF00000)==0xD5500000) { - decode_fields32(ENC_MSRR_SR_SYSTEMMOVEPR, ctx, instr); - if(!HaveSYSREG128()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt+1); - ctx->sys_L = ctx->L; - ctx->sys_op0 = ((1<<1)|ctx->o0); - ctx->sys_op1 = ctx->op1; - ctx->sys_op2 = ctx->op2; - ctx->sys_crn = ctx->CRn; - ctx->sys_crm = ctx->CRm; - OK(ENC_MSRR_SR_SYSTEMMOVEPR); - } - return rc; -} - -/* msr_imm.xml */ -int MSR_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100000|op1=xxx|0100|CRm=xxxx|op2=xxx|Rt=11111 */ - if((INSWORD & 0xFFF8F01F)==0xD500401F) { - decode_fields32(ENC_MSR_SI_PSTATE, ctx, instr); - if(ctx->op1==0 && ctx->op2==0) { - SEE /* CFINV */; - } - if(ctx->op1==0 && ctx->op2==1) { - SEE /* XAFLAG */; - } - if(ctx->op1==0 && ctx->op2==2) { - SEE /* AXFLAG */; - } - ctx->need_secure = FALSE; - if(!(ctx->op1&6)) { - ctx->min_EL = EL1; - } - else if(ctx->op1==2) { - ctx->min_EL = EL1; - } - else if(ctx->op1==3) { - ctx->min_EL = EL0; - } - else if(ctx->op1==4) { - ctx->min_EL = EL2; - } - else if(ctx->op1==5) { - if(!HaveVHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->min_EL = EL2; - } - else if(ctx->op1==6) { - ctx->min_EL = EL3; - } - else if(ctx->op1==7) { - ctx->min_EL = EL1; - ctx->need_secure = TRUE; - } - ctx->operand = ctx->CRm; - if(((ctx->op1<<3)|ctx->op2)==3) { - if(!HaveUAO()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_UAO; - } - else if(((ctx->op1<<3)|ctx->op2)==4) { - if(!HavePAN()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_PAN; - } - else if(((ctx->op1<<3)|ctx->op2)==5) { - ctx->field = PSTATEField_SP; - } - else if(((ctx->op1<<3)|ctx->op2)==8) { - if(!(ctx->CRm&14)) { - if(!HaveNMI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_ALLINT; - } - else if((ctx->CRm&14)==2) { - if(!HaveEBEP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_PM; - } - else { - EndOfDecode(Decode_UNDEF); - } - } - else if(((ctx->op1<<3)|ctx->op2)==0x1a) { - if(!HaveDIT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_DIT; - } - else if(((ctx->op1<<3)|ctx->op2)==0x1b) { - if((ctx->CRm&14)==2) { - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_SVCRSM; - } - else if((ctx->CRm&14)==4) { - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_SVCRZA; - } - else if((ctx->CRm&14)==6) { - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_SVCRSMZA; - } - else { - EndOfDecode(Decode_UNDEF); - } - } - else if(((ctx->op1<<3)|ctx->op2)==0x1c) { - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_TCO; - } - else if(((ctx->op1<<3)|ctx->op2)==0x1e) { - ctx->field = PSTATEField_DAIFSet; - } - else if(((ctx->op1<<3)|ctx->op2)==0x1f) { - ctx->field = PSTATEField_DAIFClr; - } - else if(((ctx->op1<<3)|ctx->op2)==0x19) { - if(!HaveSSBS()) { - EndOfDecode(Decode_UNDEF); - } - ctx->field = PSTATEField_SSBS; - } - else { - EndOfDecode(Decode_UNDEF); - } - /* regular aliases */ - if(ctx->op1==3 && ((ctx->CRm&9)==1) && ctx->op2==3) return SMSTART_MSR_imm(ctx, instr); - if(ctx->op1==3 && (!(ctx->CRm&9)) && ctx->op2==3) return SMSTOP_MSR_imm(ctx, instr); - if(!(ctx->op1==0 && (!(ctx->op2&6) || ctx->op2==2))) OK(ENC_MSR_SI_PSTATE); - } - return rc; -} - -/* msr_reg.xml */ -int MSR_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|1|o0=x|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF00000)==0xD5100000) { - decode_fields32(ENC_MSR_SR_SYSTEMMOVE, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->sys_L = ctx->L; - ctx->sys_op0 = ((1<<1)|ctx->o0); - ctx->sys_op1 = ctx->op1; - ctx->sys_op2 = ctx->op2; - ctx->sys_crn = ctx->CRn; - ctx->sys_crm = ctx->CRm; - OK(ENC_MSR_SR_SYSTEMMOVE); - } - return rc; -} - -/* msub.xml */ -int MSUB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op54=00|11011|op31=000|Rm=xxxxx|o0=1|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE08000)==0x1B008000) { - decode_fields32(ENC_MSUB_32A_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - /* regular aliases */ - if(ctx->Ra==0x1f) return MNEG_MSUB(ctx, instr); - if(ctx->sf==0) OK(ENC_MSUB_32A_DP_3SRC); - if(ctx->sf==1) OK(ENC_MSUB_64A_DP_3SRC); - } - return rc; -} - -/* msubpt.xml */ -int MSUBPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|op54=00|1|101|1|op31=011|Rm=xxxxx|o0=1|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9B608000) { - decode_fields32(ENC_MSUBPT_64A_DP_3SRC, ctx, instr); - if(!HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - OK(ENC_MSUBPT_64A_DP_3SRC); - } - return rc; -} - -/* mul_madd.xml */ -int MUL_MADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op54=00|11011|op31=000|Rm=xxxxx|o0=0|Ra=11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1B007C00) { - decode_fields32(ENC_MUL_MADD_32A_DP_3SRC, ctx, instr); - if(ctx->sf==0) OK(ENC_MUL_MADD_32A_DP_3SRC); - if(ctx->sf==1) OK(ENC_MUL_MADD_64A_DP_3SRC); - } - return rc; -} - -/* mul_advsimd_elt.xml */ -int MUL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|opcode=1000|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF008000) { - decode_fields32(ENC_MUL_ASIMDELEM_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_MUL_ASIMDELEM_R); - } - return rc; -} - -/* mul_advsimd_vec.xml */ -int MUL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=10011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE209C00) { - decode_fields32(ENC_MUL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->U==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_MUL_ASIMDSAME_ONLY); - } - return rc; -} - -/* mvni_advsimd.xml */ -int MVNI_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|op=1|0111100000|a=x|b=x|c=x|cmode=xxxx|o2=0|1|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx */ - if((INSWORD & 0xBFF80C00)==0x2F000400) { - decode_fields32(ENC_MVNI_ASIMDIMM_L_HL, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->rd = UINT(ctx->Rd); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->imm64 = AdvSIMDExpandImm(ctx->op,ctx->cmode,((ctx->a<<7)|(ctx->b<<6)|(ctx->c<<5)|(ctx->d<<4)|(ctx->e<<3)|(ctx->f<<2)|(ctx->g<<1)|ctx->h)); - ctx->imm = Replicate(ctx->imm64, ((0x40)!=0 ? ((ctx->datasize) / (0x40)) : 0), 64); - if((ctx->cmode&13)==8) OK(ENC_MVNI_ASIMDIMM_L_HL); - if(!(ctx->cmode&9)) OK(ENC_MVNI_ASIMDIMM_L_SL); - if((ctx->cmode&14)==12) OK(ENC_MVNI_ASIMDIMM_M_SM); - } - return rc; -} - -/* mvn_not_advsimd.xml */ -int MVN_NOT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=00|10000|opcode=00101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E205800) { - decode_fields32(ENC_MVN_NOT_ASIMDMISC_R, ctx, instr); - OK(ENC_MVN_NOT_ASIMDMISC_R); - } - return rc; -} - -/* mvn_orn_log_shift.xml */ -int MVN_ORN_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=01|01010|shift=xx|N=1|Rm=xxxxx|imm6=xxxxxx|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7F2003E0)==0x2A2003E0) { - decode_fields32(ENC_MVN_ORN_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0) OK(ENC_MVN_ORN_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_MVN_ORN_64_LOG_SHIFT); - } - return rc; -} - -/* negs_subs_addsub_shift.xml */ -int NEGS_SUBS_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=11111|Rd!=11111 */ - if((INSWORD & 0x7F2003E0)==0x6B0003E0 && (INSWORD & 0x1F)!=0x1F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_NEGS_SUBS_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->sf==0) OK(ENC_NEGS_SUBS_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_NEGS_SUBS_64_ADDSUB_SHIFT); - } - return rc; -} - -/* neg_sub_addsub_shift.xml */ -int NEG_SUB_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=1|S=0|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7F2003E0)==0x4B0003E0) { - decode_fields32(ENC_NEG_SUB_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->sf==0) OK(ENC_NEG_SUB_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_NEG_SUB_64_ADDSUB_SHIFT); - } - return rc; -} - -/* neg_advsimd.xml */ -int NEG_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|10000|opcode=01011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7EE0B800) { - decode_fields32(ENC_NEG_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_NEG_ASISDMISC_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|opcode=01011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E20B800) { - decode_fields32(ENC_NEG_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_NEG_ASIMDMISC_R); - } - return rc; -} - -/* ngcs_sbcs.xml */ -int NGCS_SBCS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|11010000|Rm=xxxxx|000000|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7FE0FFE0)==0x7A0003E0) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_NGCS_SBCS_32_ADDSUB_CARRY, ctx, instr); - if(ctx->sf==0) OK(ENC_NGCS_SBCS_32_ADDSUB_CARRY); - if(ctx->sf==1) OK(ENC_NGCS_SBCS_64_ADDSUB_CARRY); - } - return rc; -} - -/* ngc_sbc.xml */ -int NGC_SBC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=1|S=0|11010000|Rm=xxxxx|000000|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0x7FE0FFE0)==0x5A0003E0) { - decode_fields32(ENC_NGC_SBC_32_ADDSUB_CARRY, ctx, instr); - if(ctx->sf==0) OK(ENC_NGC_SBC_32_ADDSUB_CARRY); - if(ctx->sf==1) OK(ENC_NGC_SBC_64_ADDSUB_CARRY); - } - return rc; -} - -/* nop.xml */ -int NOP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=000|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503201F) { - decode_fields32(ENC_NOP_HI_HINTS, ctx, instr); - OK(ENC_NOP_HI_HINTS); - } - return rc; -} - -/* not_advsimd.xml */ -int NOT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=00|10000|opcode=00101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E205800) { - decode_fields32(ENC_NOT_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 8; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((8)!=0 ? ((ctx->datasize) / (8)) : 0); - /* unconditional alias */ - if(MVN_NOT_advsimd(ctx, instr)==0) return 0; - OK(ENC_NOT_ASIMDMISC_R); - } - return rc; -} - -/* orn_advsimd.xml */ -int ORN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=11|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEE01C00) { - decode_fields32(ENC_ORN_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - OK(ENC_ORN_ASIMDSAME_ONLY); - } - return rc; -} - -/* orn_log_shift.xml */ -int ORN_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=01|01010|shift=xx|N=1|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x2A200000) { - decode_fields32(ENC_ORN_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - /* regular aliases */ - if(ctx->Rn==0x1f) return MVN_ORN_log_shift(ctx, instr); - if(ctx->sf==0) OK(ENC_ORN_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_ORN_64_LOG_SHIFT); - } - return rc; -} - -/* orr_advsimd_imm.xml */ -int ORR_advsimd_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_shifted_immediate */ - /* 0|Q=x|op=0|0111100000|a=x|b=x|c=x|cmode=xxx1|o2=0|1|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx */ - if((INSWORD & 0xBFF81C00)==0xF001400) { - decode_fields32(ENC_ORR_ASIMDIMM_L_HL, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->rd = UINT(ctx->Rd); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->imm64 = AdvSIMDExpandImm(ctx->op,ctx->cmode,((ctx->a<<7)|(ctx->b<<6)|(ctx->c<<5)|(ctx->d<<4)|(ctx->e<<3)|(ctx->f<<2)|(ctx->g<<1)|ctx->h)); - ctx->imm = Replicate(ctx->imm64, ((0x40)!=0 ? ((ctx->datasize) / (0x40)) : 0), 64); - if((ctx->cmode&13)==9) OK(ENC_ORR_ASIMDIMM_L_HL); - if((ctx->cmode&9)==1) OK(ENC_ORR_ASIMDIMM_L_SL); - } - return rc; -} - -/* orr_advsimd_reg.xml */ -int ORR_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=10|1|Rm=xxxxx|opcode=00011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xEA01C00) { - decode_fields32(ENC_ORR_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - /* regular aliases */ - if(ctx->Rm==ctx->Rn) return MOV_ORR_advsimd_reg(ctx, instr); - OK(ENC_ORR_ASIMDSAME_ONLY); - } - return rc; -} - -/* orr_log_imm.xml */ -int ORR_log_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=01|100100|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x32000000) { - decode_fields32(ENC_ORR_32_LOG_IMM, ctx, instr); - if(ctx->sf==0 && ctx->N!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - DecodeBitMasksCheckUndefined(ctx->N,ctx->imms); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(ctx->N,ctx->imms,ctx->immr); - ctx->imm = dbmrt.wmask; - /* regular aliases */ - if(ctx->Rn==0x1f && !MoveWidePreferred(ctx->sf,ctx->N,ctx->imms,ctx->immr)) return MOV_ORR_log_imm(ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_ORR_32_LOG_IMM); - if(ctx->sf==1) OK(ENC_ORR_64_LOG_IMM); - } - return rc; -} - -/* orr_log_shift.xml */ -int ORR_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|opc=01|01010|shift=xx|N=0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x2A000000) { - decode_fields32(ENC_ORR_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - /* regular aliases */ - if(ctx->shift==0 && ctx->imm6==0 && ctx->Rn==0x1f) return MOV_ORR_log_shift(ctx, instr); - if(ctx->sf==0) OK(ENC_ORR_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_ORR_64_LOG_SHIFT); - } - return rc; -} - -/* pacda.xml */ -int PACDA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|010|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC10800) { - decode_fields32(ENC_PACDA_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->source_is_sp = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->Z==0) { - if(ctx->n==0x1f) { - ctx->source_is_sp = TRUE; - } - } - else { - if(ctx->n!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - } - if(ctx->Z==0) OK(ENC_PACDA_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_PACDZA_64Z_DP_1SRC); - } - return rc; -} - -/* pacdb.xml */ -int PACDB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|011|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC10C00) { - decode_fields32(ENC_PACDB_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->source_is_sp = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->Z==0) { - if(ctx->n==0x1f) { - ctx->source_is_sp = TRUE; - } - } - else { - if(ctx->n!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - } - if(ctx->Z==0) OK(ENC_PACDB_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_PACDZB_64Z_DP_1SRC); - } - return rc; -} - -/* pacga.xml */ -int PACGA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|0|S=0|1|101|0110|Rm=xxxxx|opcode=001100|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9AC03000) { - decode_fields32(ENC_PACGA_64P_DP_2SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->source_is_sp = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(ctx->m==0x1f) { - ctx->source_is_sp = TRUE; - } - OK(ENC_PACGA_64P_DP_2SRC); - } - return rc; -} - -/* pacia.xml */ -int PACIA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC10000) { - decode_fields32(ENC_PACIA_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->source_is_sp = FALSE; - ctx->pacia1716 = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->Z==0) { - if(ctx->n==0x1f) { - ctx->source_is_sp = TRUE; - } - } - else { - if(ctx->n!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - } - if(ctx->Z==0) OK(ENC_PACIA_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_PACIZA_64Z_DP_1SRC); - } - /* class iclass_system */ - /* 11010101000000110010|CRm=00x1|op2=00x|11111 */ - if((INSWORD & 0xFFFFFDDF)==0xD503211F) { - decode_fields32(ENC_PACIA1716_HI_HINTS, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_NOP); - } - ctx->source_is_sp = FALSE; - ctx->pacia1716 = FALSE; - if(((ctx->CRm<<3)|ctx->op2)==0x18) { - ctx->d = 0x1e; - ctx->n = 0x1f; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x19) { - ctx->d = 0x1e; - ctx->source_is_sp = TRUE; - if(HaveBTI()) { - ctx->pacinst = PACIxSP; - SetBTypeCompatible(BTypeCompatible_PAC(ctx->pacinst)); - } - } - else if(((ctx->CRm<<3)|ctx->op2)==8) { - ctx->d = 0x11; - ctx->n = 0x10; - ctx->pacia1716 = TRUE; - } - if(ctx->CRm==1 && ctx->op2==0) OK(ENC_PACIA1716_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==1) OK(ENC_PACIASP_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==0) OK(ENC_PACIAZ_HI_HINTS); - } - return rc; -} - -/* pacia171615.xml */ -int PACIA171615(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=100010|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC18BFE) { - decode_fields32(ENC_PACIA171615_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_PACIA171615_64LR_DP_1SRC); - } - return rc; -} - -/* paciasppc.xml */ -int PACIASPPC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=101000|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC1A3FE) { - decode_fields32(ENC_PACIASPPC_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - if(HaveBTI()) { - ctx->pacinst = PACIxSPPC; - SetBTypeCompatible(BTypeCompatible_PAC(ctx->pacinst)); - } - OK(ENC_PACIASPPC_64LR_DP_1SRC); - } - return rc; -} - -/* pacib.xml */ -int PACIB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|00|Z=x|001|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFDC00)==0xDAC10400) { - decode_fields32(ENC_PACIB_64P_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->source_is_sp = FALSE; - ctx->pacib1716 = FALSE; - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->Z==0) { - if(ctx->n==0x1f) { - ctx->source_is_sp = TRUE; - } - } - else { - if(ctx->n!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - } - if(ctx->Z==0) OK(ENC_PACIB_64P_DP_1SRC); - if(ctx->Z==1 && ctx->Rn==0x1f) OK(ENC_PACIZB_64Z_DP_1SRC); - } - /* class iclass_system */ - /* 11010101000000110010|CRm=00x1|op2=01x|11111 */ - if((INSWORD & 0xFFFFFDDF)==0xD503215F) { - decode_fields32(ENC_PACIB1716_HI_HINTS, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_NOP); - } - ctx->source_is_sp = FALSE; - ctx->pacib1716 = FALSE; - if(((ctx->CRm<<3)|ctx->op2)==0x1a) { - ctx->d = 0x1e; - ctx->n = 0x1f; - } - else if(((ctx->CRm<<3)|ctx->op2)==0x1b) { - ctx->d = 0x1e; - ctx->source_is_sp = TRUE; - if(HaveBTI()) { - ctx->pacinst = PACIxSP; - SetBTypeCompatible(BTypeCompatible_PAC(ctx->pacinst)); - } - } - else if(((ctx->CRm<<3)|ctx->op2)==10) { - ctx->d = 0x11; - ctx->n = 0x10; - ctx->pacib1716 = TRUE; - } - if(ctx->CRm==1 && ctx->op2==2) OK(ENC_PACIB1716_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==3) OK(ENC_PACIBSP_HI_HINTS); - if(ctx->CRm==3 && ctx->op2==2) OK(ENC_PACIBZ_HI_HINTS); - } - return rc; -} - -/* pacib171615.xml */ -int PACIB171615(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=100011|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC18FFE) { - decode_fields32(ENC_PACIB171615_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_PACIB171615_64LR_DP_1SRC); - } - return rc; -} - -/* pacibsppc.xml */ -int PACIBSPPC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=101001|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC1A7FE) { - decode_fields32(ENC_PACIBSPPC_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - if(HaveBTI()) { - ctx->pacinst = PACIxSPPC; - SetBTypeCompatible(BTypeCompatible_PAC(ctx->pacinst)); - } - OK(ENC_PACIBSPPC_64LR_DP_1SRC); - } - return rc; -} - -/* pacm.xml */ -int PACM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0100|op2=111|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD50324FF) { - decode_fields32(ENC_PACM_HI_HINTS, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_PACM_HI_HINTS); - } - return rc; -} - -/* pacnbiasppc.xml */ -int PACNBIASPPC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=100000|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC183FE) { - decode_fields32(ENC_PACNBIASPPC_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - OK(ENC_PACNBIASPPC_64LR_DP_1SRC); - } - return rc; -} - -/* pacnbibsppc.xml */ -int PACNBIBSPPC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00001|opcode=100001|Rn=11111|Rd=11110 */ - if((INSWORD & 0xFFFFFFFF)==0xDAC187FE) { - decode_fields32(ENC_PACNBIBSPPC_64LR_DP_1SRC, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = 0x1e; - OK(ENC_PACNBIBSPPC_64LR_DP_1SRC); - } - return rc; -} - -/* pmull_advsimd.xml */ -int PMULL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=1110|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20E000) { - decode_fields32(ENC_PMULL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==1 || ctx->size==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 && !HavePMULL()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_PMULL_ASIMDDIFF_L); - } - return rc; -} - -/* pmul_advsimd.xml */ -int PMUL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=10011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E209C00) { - decode_fields32(ENC_PMUL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->U==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_PMUL_ASIMDSAME_ONLY); - } - return rc; -} - -/* prfm_imm.xml */ -int PRFM_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unsigned_offset */ - /* size=11|11|1|VR=0|0|1|opc=10|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xF9800000) { - decode_fields32(ENC_PRFM_P_LDST_POS, ctx, instr); - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),3); - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->nontemporal = FALSE; - ctx->tagchecked = FALSE; - OK(ENC_PRFM_P_LDST_POS); - } - return rc; -} - -/* prfm_lit.xml */ -int PRFM_lit(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_literal */ - /* opc=11|01|1|VR=0|0|0|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF000000)==0xD8000000) { - decode_fields32(ENC_PRFM_P_LOADLIT, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->offset = SignExtend((ctx->imm19<<2),21); - OK(ENC_PRFM_P_LOADLIT); - } - return rc; -} - -/* prfm_reg.xml */ -int PRFM_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=11|11|1|VR=0|0|0|opc=10|1|Rm=xxxxx|option=x1x|S=x|10|Rn=xxxxx|Rt!=11xxx */ - if((INSWORD & 0xFFE04C00)==0xF8A04800 && (INSWORD & 0x18)!=0x18) { - decode_fields32(ENC_PRFM_P_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = (ctx->S==1)!=0 ? 3 : 0; - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->m = UINT(ctx->Rm); - ctx->nontemporal = FALSE; - ctx->tagchecked = FALSE; - OK(ENC_PRFM_P_LDST_REGOFF); - } - return rc; -} - -/* prfum.xml */ -int PRFUM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=11|11|1|VR=0|0|0|opc=10|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xF8800000) { - decode_fields32(ENC_PRFUM_P_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->nontemporal = FALSE; - ctx->tagchecked = FALSE; - OK(ENC_PRFUM_P_LDST_UNSCALED); - } - return rc; -} - -/* psb.xml */ -int PSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0010|op2=001|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503223F) { - decode_fields32(ENC_PSB_HC_HINTS, ctx, instr); - if(!HaveSPE()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_PSB_HC_HINTS); - } - return rc; -} - -/* pssbb_dsb.xml */ -int PSSBB_DSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_memory_barrier */ - /* 110|101|01000000110011|CRm=0100|1|opc=00|Rt=11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503349F) { - decode_fields32(ENC_PSSBB_DSB_BO_BARRIERS, ctx, instr); - OK(ENC_PSSBB_DSB_BO_BARRIERS); - } - return rc; -} - -/* raddhn_advsimd.xml */ -int RADDHN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|01|o1=0|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E204000) { - decode_fields32(ENC_RADDHN_ASIMDDIFF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->round = TRUE; - OK(ENC_RADDHN_ASIMDDIFF_N); - } - return rc; -} - -/* rax1_advsimd.xml */ -int RAX1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|11|Rm=xxxxx|1|O=0|00|opcode=11|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xCE608C00) { - decode_fields32(ENC_RAX1_VVV2_CRYPTOSHA512_3, ctx, instr); - if(!HaveSHA3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_RAX1_VVV2_CRYPTOSHA512_3); - } - return rc; -} - -/* rbit_advsimd.xml */ -int RBIT_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=01|10000|opcode=00101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E605800) { - decode_fields32(ENC_RBIT_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 8; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((8)!=0 ? ((ctx->datasize) / (8)) : 0); - OK(ENC_RBIT_ASIMDMISC_R); - } - return rc; -} - -/* rbit_int.xml */ -int RBIT_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|opcode=000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x5AC00000) { - decode_fields32(ENC_RBIT_32_DP_1SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_RBIT_32_DP_1SRC); - if(ctx->sf==1) OK(ENC_RBIT_64_DP_1SRC); - } - return rc; -} - -/* rcwcas.xml */ -int RCWCAS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rs=xxxxx|000010|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x19200800) { - decode_fields32(ENC_RCWCAS_C64_RCWCOMSWAP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = FALSE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWCAS_C64_RCWCOMSWAP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWCASA_C64_RCWCOMSWAP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWCASAL_C64_RCWCOMSWAP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWCASL_C64_RCWCOMSWAP); - } - return rc; -} - -/* rcwcasp.xml */ -int RCWCASP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rs=xxxxx|000011|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x19200C00) { - decode_fields32(ENC_RCWCASP_C64_RCWCOMSWAPPR, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rs,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->soft = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWCASP_C64_RCWCOMSWAPPR); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWCASPA_C64_RCWCOMSWAPPR); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWCASPAL_C64_RCWCOMSWAPPR); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWCASPL_C64_RCWCOMSWAPPR); - } - return rc; -} - -/* rcwclr.xml */ -int RCWCLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38209000) { - decode_fields32(ENC_RCWCLR_64_MEMOP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = FALSE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWCLR_64_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWCLRA_64_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWCLRAL_64_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWCLRL_64_MEMOP); - } - return rc; -} - -/* rcwclrp.xml */ -int RCWCLRP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rt2=xxxxx|o3=1|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x19209000) { - decode_fields32(ENC_RCWCLRP_128_MEMOP_128, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->soft = FALSE; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWCLRP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWCLRPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWCLRPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWCLRPL_128_MEMOP_128); - } - return rc; -} - -/* rcwscas.xml */ -int RCWSCAS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|011001|A=x|R=x|1|Rs=xxxxx|000010|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x59200800) { - decode_fields32(ENC_RCWSCAS_C64_RCWCOMSWAP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = TRUE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSCAS_C64_RCWCOMSWAP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSCASA_C64_RCWCOMSWAP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSCASAL_C64_RCWCOMSWAP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSCASL_C64_RCWCOMSWAP); - } - return rc; -} - -/* rcwscasp.xml */ -int RCWSCASP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|011001|A=x|R=x|1|Rs=xxxxx|000011|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x59200C00) { - decode_fields32(ENC_RCWSCASP_C64_RCWCOMSWAPPR, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rs,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->soft = TRUE; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSCASP_C64_RCWCOMSWAPPR); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSCASPA_C64_RCWCOMSWAPPR); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSCASPAL_C64_RCWCOMSWAPPR); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSCASPL_C64_RCWCOMSWAPPR); - } - return rc; -} - -/* rcwsclr.xml */ -int RCWSCLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78209000) { - decode_fields32(ENC_RCWSCLR_64_MEMOP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = TRUE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSCLR_64_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSCLRA_64_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSCLRAL_64_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSCLRL_64_MEMOP); - } - return rc; -} - -/* rcwsclrp.xml */ -int RCWSCLRP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|011001|A=x|R=x|1|Rt2=xxxxx|o3=1|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x59209000) { - decode_fields32(ENC_RCWSCLRP_128_MEMOP_128, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->soft = TRUE; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSCLRP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSCLRPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSCLRPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSCLRPL_128_MEMOP_128); - } - return rc; -} - -/* rcwset.xml */ -int RCWSET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x3820B000) { - decode_fields32(ENC_RCWSET_64_MEMOP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = FALSE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSET_64_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSETA_64_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSETAL_64_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSETL_64_MEMOP); - } - return rc; -} - -/* rcwsetp.xml */ -int RCWSETP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rt2=xxxxx|o3=1|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1920B000) { - decode_fields32(ENC_RCWSETP_128_MEMOP_128, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->soft = FALSE; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSETP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSETPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSETPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSETPL_128_MEMOP_128); - } - return rc; -} - -/* rcwsset.xml */ -int RCWSSET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7820B000) { - decode_fields32(ENC_RCWSSET_64_MEMOP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = TRUE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSSET_64_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSSETA_64_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSSETAL_64_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSSETL_64_MEMOP); - } - return rc; -} - -/* rcwssetp.xml */ -int RCWSSETP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|011001|A=x|R=x|1|Rt2=xxxxx|o3=1|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5920B000) { - decode_fields32(ENC_RCWSSETP_128_MEMOP_128, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->soft = TRUE; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSSETP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSSETPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSSETPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSSETPL_128_MEMOP_128); - } - return rc; -} - -/* rcwsswp.xml */ -int RCWSSWP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7820A000) { - decode_fields32(ENC_RCWSSWP_64_MEMOP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = TRUE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSSWP_64_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSSWPA_64_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSSWPAL_64_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSSWPL_64_MEMOP); - } - return rc; -} - -/* rcwsswpp.xml */ -int RCWSSWPP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=1|011001|A=x|R=x|1|Rt2=xxxxx|o3=1|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5920A000) { - decode_fields32(ENC_RCWSSWPP_128_MEMOP_128, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->soft = TRUE; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSSWPP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSSWPPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSSWPPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSSWPPL_128_MEMOP_128); - } - return rc; -} - -/* rcwswp.xml */ -int RCWSWP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x3820A000) { - decode_fields32(ENC_RCWSWP_64_MEMOP, ctx, instr); - if(!HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->soft = FALSE; - ctx->acquire = ctx->A==1 && ctx->t!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSWP_64_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSWPA_64_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSWPAL_64_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSWPL_64_MEMOP); - } - return rc; -} - -/* rcwswpp.xml */ -int RCWSWPP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rt2=xxxxx|o3=1|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x1920A000) { - decode_fields32(ENC_RCWSWPP_128_MEMOP_128, ctx, instr); - if(!HaveD128() || !HaveTHE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->soft = FALSE; - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_RCWSWPP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_RCWSWPPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_RCWSWPPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_RCWSWPPL_128_MEMOP_128); - } - return rc; -} - -/* ret.xml */ -int RET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 110|101|1|Z=0|0|op=10|op2=11111|0000|A=0|M=0|Rn=xxxxx|Rm=00000 */ - if((INSWORD & 0xFFFFFC1F)==0xD65F0000) { - decode_fields32(ENC_RET_64R_BRANCH_REG, ctx, instr); - ctx->n = UINT(ctx->Rn); - OK(ENC_RET_64R_BRANCH_REG); - } - return rc; -} - -/* reta.xml */ -int RETA(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101011|Z=0|0|op=10|op2=11111|0000|A=1|M=x|Rn=11111|Rm=11111 */ - if((INSWORD & 0xFFFFFBFF)==0xD65F0BFF) { - decode_fields32(ENC_RETAA_64E_BRANCH_REG, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->use_key_a = (ctx->M==0); - ctx->auth_then_branch = TRUE; - if(ctx->M==0) OK(ENC_RETAA_64E_BRANCH_REG); - if(ctx->M==1) OK(ENC_RETAB_64E_BRANCH_REG); - } - return rc; -} - -/* retasppcr_reg.xml */ -int RETASPPCR_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101011|opc=0010|op2=11111|00001|M=x|Rn=11111|Rm!=11111 */ - if((INSWORD & 0xFFFFFBE0)==0xD65F0BE0 && (INSWORD & 0x1F)!=0x1F) { - decode_fields32(ENC_RETAASPPCR_64M_BRANCH_REG, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Rm); - ctx->use_key_a = ctx->M==0; - ctx->auth_then_branch = TRUE; - if(ctx->M==0) OK(ENC_RETAASPPCR_64M_BRANCH_REG); - if(ctx->M==1) OK(ENC_RETABSPPCR_64M_BRANCH_REG); - } - return rc; -} - -/* retasppc_imm.xml */ -int RETASPPC_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 01010101|opc=00x|imm16=xxxxxxxxxxxxxxxx|op2=11111 */ - if((INSWORD & 0xFFC0001F)==0x5500001F) { - decode_fields32(ENC_RETAASPPC_ONLY_MISCBRANCH, ctx, instr); - if(!HavePAuth_LR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->use_key_a = SLICE(ctx->opc,0,0)==0; - ctx->offset = ZeroExtend((ctx->imm16<<2),0x40); - ctx->auth_then_branch = TRUE; - if(ctx->opc==0) OK(ENC_RETAASPPC_ONLY_MISCBRANCH); - if(ctx->opc==1) OK(ENC_RETABSPPC_ONLY_MISCBRANCH); - } - return rc; -} - -/* rev.xml */ -int REV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|0000|opc=1x|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFF800)==0x5AC00800) { - decode_fields32(ENC_REV_32_DP_1SRC, ctx, instr); - if(ctx->opc==3 && ctx->sf==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->container_size = (8) << (UINT(ctx->opc)); - if(ctx->sf==0 && ctx->opc==2) OK(ENC_REV_32_DP_1SRC); - if(ctx->sf==1 && ctx->opc==3) OK(ENC_REV_64_DP_1SRC); - } - return rc; -} - -/* rev16_advsimd.xml */ -int REV16_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|0000|o0=1|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE201800) { - decode_fields32(ENC_REV16_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->csize = (0x40) >> (UINT(((ctx->o0<<1)|ctx->U))); - ctx->esize = (8) << (UINT(ctx->size)); - if(ctx->csize <= ctx->esize) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->containers = ((ctx->csize)!=0 ? ((ctx->datasize) / (ctx->csize)) : 0); - OK(ENC_REV16_ASIMDMISC_R); - } - return rc; -} - -/* rev16_int.xml */ -int REV16_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|1|S=0|11010110|opcode2=00000|0000|opc=01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFFFC00)==0x5AC00400) { - decode_fields32(ENC_REV16_32_DP_1SRC, ctx, instr); - if(ctx->opc==3 && ctx->sf==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->container_size = (8) << (UINT(ctx->opc)); - if(ctx->sf==0) OK(ENC_REV16_32_DP_1SRC); - if(ctx->sf==1) OK(ENC_REV16_64_DP_1SRC); - } - return rc; -} - -/* rev32_advsimd.xml */ -int REV32_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|0000|o0=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E200800) { - decode_fields32(ENC_REV32_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->csize = (0x40) >> (UINT(((ctx->o0<<1)|ctx->U))); - ctx->esize = (8) << (UINT(ctx->size)); - if(ctx->csize <= ctx->esize) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->containers = ((ctx->csize)!=0 ? ((ctx->datasize) / (ctx->csize)) : 0); - OK(ENC_REV32_ASIMDMISC_R); - } - return rc; -} - -/* rev32_int.xml */ -int REV32_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|1|S=0|1|101|0110|opcode2=00000|0000|opc=10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xDAC00800) { - decode_fields32(ENC_REV32_64_DP_1SRC, ctx, instr); - if(ctx->opc==3 && ctx->sf==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->container_size = (8) << (UINT(ctx->opc)); - OK(ENC_REV32_64_DP_1SRC); - } - return rc; -} - -/* rev64_rev.xml */ -int REV64_REV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|1|101|0110|opcode2=00000|0000|opc=11|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xDAC00C00) { - decode_fields32(ENC_REV64_REV_64_DP_1SRC, ctx, instr); - OK(ENC_REV64_REV_64_DP_1SRC); - } - return rc; -} - -/* rev64_advsimd.xml */ -int REV64_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|0000|o0=0|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE200800) { - decode_fields32(ENC_REV64_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->csize = (0x40) >> (UINT(((ctx->o0<<1)|ctx->U))); - ctx->esize = (8) << (UINT(ctx->size)); - if(ctx->csize <= ctx->esize) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->containers = ((ctx->csize)!=0 ? ((ctx->datasize) / (ctx->csize)) : 0); - OK(ENC_REV64_ASIMDMISC_R); - } - return rc; -} - -/* rmif.xml */ -int RMIF(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|op=0|S=1|1|101|0000|imm6=xxxxxx|00001|Rn=xxxxx|o2=0|mask=xxxx */ - if((INSWORD & 0xFFE07C10)==0xBA000400) { - /* setflags from iform pcode */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_RMIF_ONLY_RMIF, ctx, instr); - if(!HaveFlagM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->imm = UINT(ctx->imm6); - ctx->flagmask = ctx->mask; - ctx->n = UINT(ctx->Rn); - OK(ENC_RMIF_ONLY_RMIF); - } - return rc; -} - -/* rorv.xml */ -int RORV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=11|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02C00) { - decode_fields32(ENC_RORV_32_DP_2SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->op2); - /* unconditional alias */ - if(ROR_RORV(ctx, instr)==0) return 0; - if(ctx->sf==0) OK(ENC_RORV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_RORV_64_DP_2SRC); - } - return rc; -} - -/* ror_extr.xml */ -int ROR_EXTR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op21=00|100111|N=x|o0=0|Rm=xxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FA00000)==0x13800000) { - decode_fields32(ENC_ROR_EXTR_32_EXTRACT, ctx, instr); - if(ctx->sf==0 && ctx->N==0 && !(ctx->imms&0x20)) OK(ENC_ROR_EXTR_32_EXTRACT); - if(ctx->sf==1 && ctx->N==1) OK(ENC_ROR_EXTR_64_EXTRACT); - } - return rc; -} - -/* ror_rorv.xml */ -int ROR_RORV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|0010|op2=11|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC02C00) { - decode_fields32(ENC_ROR_RORV_32_DP_2SRC, ctx, instr); - if(ctx->sf==0) OK(ENC_ROR_RORV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_ROR_RORV_64_DP_2SRC); - } - return rc; -} - -/* rprfm_reg.xml */ -int RPRFM_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=11|11|1|VR=0|0|0|opc=10|1|Rm=xxxxx|option=x1x|S=x|10|Rn=xxxxx|Rt=11xxx */ - if((INSWORD & 0xFFE04C18)==0xF8A04818) { - decode_fields32(ENC_RPRFM_R_LDST_REGOFF, ctx, instr); - if(!HaveRPRFM()) { - EndOfDecode(Decode_NOP); - } - ctx->operation_ = ((SLICE(ctx->option,2,2)<<5)|(SLICE(ctx->option,0,0)<<4)|(ctx->S<<3)|SLICE(ctx->Rt,2,0)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_RPRFM_R_LDST_REGOFF); - } - return rc; -} - -/* rshrn_advsimd.xml */ -int RSHRN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|1000|op=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF008C00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_RSHRN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = TRUE; - OK(ENC_RSHRN_ASIMDSHF_N); - } - return rc; -} - -/* rsubhn_advsimd.xml */ -int RSUBHN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|01|o1=1|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E206000) { - decode_fields32(ENC_RSUBHN_ASIMDDIFF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->round = TRUE; - OK(ENC_RSUBHN_ASIMDDIFF_N); - } - return rc; -} - -/* sabal_advsimd.xml */ -int SABAL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|01|op=0|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE205000) { - decode_fields32(ENC_SABAL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SABAL_ASIMDDIFF_L); - } - return rc; -} - -/* saba_advsimd.xml */ -int SABA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|0111|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE207C00) { - decode_fields32(ENC_SABA_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SABA_ASIMDSAME_ONLY); - } - return rc; -} - -/* sabdl_advsimd.xml */ -int SABDL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|01|op=1|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE207000) { - decode_fields32(ENC_SABDL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SABDL_ASIMDDIFF_L); - } - return rc; -} - -/* sabd_advsimd.xml */ -int SABD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|0111|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE207400) { - decode_fields32(ENC_SABD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SABD_ASIMDSAME_ONLY); - } - return rc; -} - -/* sadalp_advsimd.xml */ -int SADALP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|00|op=1|10|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE206800) { - decode_fields32(ENC_SADALP_ASIMDMISC_P, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((((2) * (ctx->esize)))!=0 ? ((ctx->datasize) / (((2) * (ctx->esize)))) : 0); - OK(ENC_SADALP_ASIMDMISC_P); - } - return rc; -} - -/* saddlp_advsimd.xml */ -int SADDLP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|00|op=0|10|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE202800) { - decode_fields32(ENC_SADDLP_ASIMDMISC_P, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((((2) * (ctx->esize)))!=0 ? ((ctx->datasize) / (((2) * (ctx->esize)))) : 0); - OK(ENC_SADDLP_ASIMDMISC_P); - } - return rc; -} - -/* saddlv_advsimd.xml */ -int SADDLV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=xx|11000|opcode=00011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE303800) { - decode_fields32(ENC_SADDLV_ASIMDALL_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==4) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SADDLV_ASIMDALL_ONLY); - } - return rc; -} - -/* saddl_advsimd.xml */ -int SADDL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|00|o1=0|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE200000) { - decode_fields32(ENC_SADDL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SADDL_ASIMDDIFF_L); - } - return rc; -} - -/* saddw_advsimd.xml */ -int SADDW_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|00|o1=0|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE201000) { - decode_fields32(ENC_SADDW_ASIMDDIFF_W, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SADDW_ASIMDDIFF_W); - } - return rc; -} - -/* sb.xml */ -int SB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110011|CRm=(0)(0)(0)(0)|1|opc=11|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD50330FF) { - decode_fields32(ENC_SB_ONLY_BARRIERS, ctx, instr); - if(!HaveSB()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_SB_ONLY_BARRIERS); - } - return rc; -} - -/* sbc.xml */ -int SBC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=1|S=0|11010000|Rm=xxxxx|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x5A000000) { - decode_fields32(ENC_SBC_32_ADDSUB_CARRY, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - /* regular aliases */ - if(ctx->Rn==0x1f) return NGC_SBC(ctx, instr); - if(ctx->sf==0) OK(ENC_SBC_32_ADDSUB_CARRY); - if(ctx->sf==1) OK(ENC_SBC_64_ADDSUB_CARRY); - } - return rc; -} - -/* sbcs.xml */ -int SBCS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|11010000|Rm=xxxxx|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x7A000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_SBCS_32_ADDSUB_CARRY, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - /* regular aliases */ - if(ctx->Rn==0x1f) return NGCS_SBCS(ctx, instr); - if(ctx->sf==0) OK(ENC_SBCS_32_ADDSUB_CARRY); - if(ctx->sf==1) OK(ENC_SBCS_64_ADDSUB_CARRY); - } - return rc; -} - -/* sbfiz_sbfm.xml */ -int SBFIZ_SBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_sign_replication_to_left_and_zeros_to_right */ - /* sf=x|opc=00|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x13000000) { - decode_fields32(ENC_SBFIZ_SBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_SBFIZ_SBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_SBFIZ_SBFM_64M_BITFIELD); - } - return rc; -} - -/* sbfm.xml */ -int SBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_sign_replication_to_left_and_zeros_to_right */ - /* sf=x|opc=00|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x13000000) { - decode_fields32(ENC_SBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==1 && ctx->N!=1) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && (ctx->N!=0 || SLICE(ctx->immr,5,5)!=0 || SLICE(ctx->imms,5,5)!=0)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->s = UINT(ctx->imms); - ctx->r = UINT(ctx->immr); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(ctx->N,ctx->imms,ctx->immr); - ctx->wmask = dbmrt.wmask; - ctx->tmask = dbmrt.tmask; - /* regular aliases */ - bool encoding32 = ctx->sf==0 && ctx->N==0; - bool encoding64 = ctx->sf==1 && ctx->N==1; - if((ctx->imms==0x1f && EncodingLabeled32Bit()) || (ctx->imms==0x3f && EncodingLabeled64Bit())) return ASR_SBFM(ctx, instr); - if(UINT(ctx->imms)immr)) return SBFIZ_SBFM(ctx, instr); - if(BFXPreferred(ctx->sf,SLICE(ctx->opc,1,1),ctx->imms,ctx->immr)) return SBFX_SBFM(ctx, instr); - if(ctx->immr==0 && ctx->imms==7) return SXTB_SBFM(ctx, instr); - if(ctx->immr==0 && ctx->imms==15) return SXTH_SBFM(ctx, instr); - if(ctx->immr==0 && ctx->imms==0x1f) return SXTW_SBFM(ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_SBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_SBFM_64M_BITFIELD); - } - return rc; -} - -/* sbfx_sbfm.xml */ -int SBFX_SBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_sign_replication_to_left_and_zeros_to_right */ - /* sf=x|opc=00|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x13000000) { - decode_fields32(ENC_SBFX_SBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_SBFX_SBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_SBFX_SBFM_64M_BITFIELD); - } - return rc; -} - -/* scvtf_advsimd_fix.xml */ -int SCVTF_advsimd_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh!=0000|immb=xxx|opcode=11100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x5F00E400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SCVTF_ASISDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - OK(ENC_SCVTF_ASISDSHF_C); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|opcode=11100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF00E400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SCVTF_ASIMDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - OK(ENC_SCVTF_ASIMDSHF_C); - } - return rc; -} - -/* scvtf_advsimd_int.xml */ -int SCVTF_advsimd_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=0|1|111|0|a=0|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E79D800) { - decode_fields32(ENC_SCVTF_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SCVTF_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=0|1|111|0|0|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x5E21D800) { - decode_fields32(ENC_SCVTF_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SCVTF_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=0|0|111|0|a=0|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xE79D800) { - decode_fields32(ENC_SCVTF_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SCVTF_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=0|0|111|0|0|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xE21D800) { - decode_fields32(ENC_SCVTF_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SCVTF_ASIMDMISC_R); - } - return rc; -} - -/* scvtf_float_fix.xml */ -int SCVTF_float_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|0|rmode=00|opcode=010|scale=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3F0000)==0x1E020000) { - decode_fields32(ENC_SCVTF_H32_FLOAT2FIX, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->scale,5,5)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->decode_fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->fracbits = 0x40-UINT(ctx->scale); - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_SCVTF_H32_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_SCVTF_H64_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_SCVTF_S32_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_SCVTF_S64_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_SCVTF_D32_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_SCVTF_D64_FLOAT2FIX); - } - return rc; -} - -/* scvtf_float_int.xml */ -int SCVTF_float_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=010|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E220000) { - decode_fields32(ENC_SCVTF_H32_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->decode_fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->unsigned_ = FALSE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_SCVTF_H32_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_SCVTF_S32_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_SCVTF_D32_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_SCVTF_H64_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_SCVTF_S64_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_SCVTF_D64_FLOAT2INT); - } - return rc; -} - -/* scvtf_sisd.xml */ -int SCVTF_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=100|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E3C0000) { - decode_fields32(ENC_SCVTF_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRoundingMode(ctx->FPCR); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_SCVTF_SISD_32H); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_SCVTF_SISD_32D); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_SCVTF_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_SCVTF_SISD_64S); - } - return rc; -} - -/* sdiv.xml */ -int SDIV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|00001|o1=1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC00C00) { - decode_fields32(ENC_SDIV_32_DP_2SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_SDIV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_SDIV_64_DP_2SRC); - } - return rc; -} - -/* sdot_advsimd_elt.xml */ -int SDOT_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|opcode=1110|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF00E000) { - decode_fields32(ENC_SDOT_ASIMDELEM_D, ctx, instr); - if(!HaveDotProd()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SDOT_ASIMDELEM_D); - } - return rc; -} - -/* sdot_advsimd_vec.xml */ -int SDOT_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|0|Rm=xxxxx|1|opcode=0010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE009400) { - decode_fields32(ENC_SDOT_ASIMDSAME2_D, ctx, instr); - if(!HaveDotProd()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SDOT_ASIMDSAME2_D); - } - return rc; -} - -/* setf.xml */ -int SETF(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=0|op=0|S=1|11010000|opcode2=000000|sz=x|0010|Rn=xxxxx|o3=0|mask=1101 */ - if((INSWORD & 0xFFFFBC1F)==0x3A00080D) { - decode_fields32(ENC_SETF8_ONLY_SETF, ctx, instr); - if(!HaveFlagM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = (8) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Rn); - if(ctx->sz==0) OK(ENC_SETF8_ONLY_SETF); - if(ctx->sz==1) OK(ENC_SETF16_ONLY_SETF); - } - return rc; -} - -/* setgp.xml */ -int SETGP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=11|0|Rs=xxxxx|op2=xx00|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x1DC00400) { - decode_fields32(ENC_SETGP_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || !HaveMTE() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==0) OK(ENC_SETGP_SET_MEMCMS); - if(ctx->op2==4) OK(ENC_SETGM_SET_MEMCMS); - if(ctx->op2==8) OK(ENC_SETGE_SET_MEMCMS); - } - return rc; -} - -/* setgpn.xml */ -int SETGPN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=11|0|Rs=xxxxx|op2=xx10|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x1DC02400) { - decode_fields32(ENC_SETGPN_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || !HaveMTE() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==2) OK(ENC_SETGPN_SET_MEMCMS); - if(ctx->op2==6) OK(ENC_SETGMN_SET_MEMCMS); - if(ctx->op2==10) OK(ENC_SETGEN_SET_MEMCMS); - } - return rc; -} - -/* setgpt.xml */ -int SETGPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=11|0|Rs=xxxxx|op2=xx01|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x1DC01400) { - decode_fields32(ENC_SETGPT_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || !HaveMTE() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==1) OK(ENC_SETGPT_SET_MEMCMS); - if(ctx->op2==5) OK(ENC_SETGMT_SET_MEMCMS); - if(ctx->op2==9) OK(ENC_SETGET_SET_MEMCMS); - } - return rc; -} - -/* setgptn.xml */ -int SETGPTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=1|01|op1=11|0|Rs=xxxxx|op2=xx11|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x1DC03400) { - decode_fields32(ENC_SETGPTN_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || !HaveMTE() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==3) OK(ENC_SETGPTN_SET_MEMCMS); - if(ctx->op2==7) OK(ENC_SETGMTN_SET_MEMCMS); - if(ctx->op2==11) OK(ENC_SETGETN_SET_MEMCMS); - } - return rc; -} - -/* setp.xml */ -int SETP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=11|0|Rs=xxxxx|op2=xx00|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x19C00400) { - decode_fields32(ENC_SETP_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==0) OK(ENC_SETP_SET_MEMCMS); - if(ctx->op2==4) OK(ENC_SETM_SET_MEMCMS); - if(ctx->op2==8) OK(ENC_SETE_SET_MEMCMS); - } - return rc; -} - -/* setpn.xml */ -int SETPN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=11|0|Rs=xxxxx|op2=xx10|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x19C02400) { - decode_fields32(ENC_SETPN_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==2) OK(ENC_SETPN_SET_MEMCMS); - if(ctx->op2==6) OK(ENC_SETMN_SET_MEMCMS); - if(ctx->op2==10) OK(ENC_SETEN_SET_MEMCMS); - } - return rc; -} - -/* setpt.xml */ -int SETPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=11|0|Rs=xxxxx|op2=xx01|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x19C01400) { - decode_fields32(ENC_SETPT_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==1) OK(ENC_SETPT_SET_MEMCMS); - if(ctx->op2==5) OK(ENC_SETMT_SET_MEMCMS); - if(ctx->op2==9) OK(ENC_SETET_SET_MEMCMS); - } - return rc; -} - -/* setptn.xml */ -int SETPTN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sz=xx|011|o0=0|01|op1=11|0|Rs=xxxxx|op2=xx11|01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x3FE03C00)==0x19C03400) { - decode_fields32(ENC_SETPTN_SET_MEMCMS, ctx, instr); - if(!HaveMOPS() || ctx->sz!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->memset_d = UINT(ctx->Rd); - ctx->memset_s = UINT(ctx->Rs); - ctx->memset_n = UINT(ctx->Rn); - ctx->options = SLICE(ctx->op2,1,0); - ctx->nontemporal = SLICE(ctx->options,1,1)==1; - if(!SLICE(ctx->op2,3,2)) { - ctx->memset_stage = MOPSStage_Prologue; - } - else if(SLICE(ctx->op2,3,2)==1) { - ctx->memset_stage = MOPSStage_Main; - } - else if(SLICE(ctx->op2,3,2)==2) { - ctx->memset_stage = MOPSStage_Epilogue; - } - else { - EndOfDecode(Decode_UNDEF); - } - if(ctx->op2==3) OK(ENC_SETPTN_SET_MEMCMS); - if(ctx->op2==7) OK(ENC_SETMTN_SET_MEMCMS); - if(ctx->op2==11) OK(ENC_SETETN_SET_MEMCMS); - } - return rc; -} - -/* sev.xml */ -int SEV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=100|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503209F) { - decode_fields32(ENC_SEV_HI_HINTS, ctx, instr); - OK(ENC_SEV_HI_HINTS); - } - return rc; -} - -/* sevl.xml */ -int SEVL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=101|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD50320BF) { - decode_fields32(ENC_SEVL_HI_HINTS, ctx, instr); - OK(ENC_SEVL_HI_HINTS); - } - return rc; -} - -/* sha1c_advsimd.xml */ -int SHA1C_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|0|Rm=xxxxx|0|opcode=000|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E000000) { - decode_fields32(ENC_SHA1C_QSV_CRYPTOSHA3, ctx, instr); - if(!HaveSHA1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA1C_QSV_CRYPTOSHA3); - } - return rc; -} - -/* sha1h_advsimd.xml */ -int SHA1H_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|10100|opcode=00000|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E280800) { - decode_fields32(ENC_SHA1H_SS_CRYPTOSHA2, ctx, instr); - if(!HaveSHA1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_SHA1H_SS_CRYPTOSHA2); - } - return rc; -} - -/* sha1m_advsimd.xml */ -int SHA1M_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|0|Rm=xxxxx|0|opcode=010|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E002000) { - decode_fields32(ENC_SHA1M_QSV_CRYPTOSHA3, ctx, instr); - if(!HaveSHA1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA1M_QSV_CRYPTOSHA3); - } - return rc; -} - -/* sha1p_advsimd.xml */ -int SHA1P_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|0|Rm=xxxxx|0|opcode=001|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E001000) { - decode_fields32(ENC_SHA1P_QSV_CRYPTOSHA3, ctx, instr); - if(!HaveSHA1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA1P_QSV_CRYPTOSHA3); - } - return rc; -} - -/* sha1su0_advsimd.xml */ -int SHA1SU0_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|0|Rm=xxxxx|0|opcode=011|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E003000) { - decode_fields32(ENC_SHA1SU0_VVV_CRYPTOSHA3, ctx, instr); - if(!HaveSHA1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA1SU0_VVV_CRYPTOSHA3); - } - return rc; -} - -/* sha1su1_advsimd.xml */ -int SHA1SU1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|10100|opcode=00001|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E281800) { - decode_fields32(ENC_SHA1SU1_VV_CRYPTOSHA2, ctx, instr); - if(!HaveSHA1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_SHA1SU1_VV_CRYPTOSHA2); - } - return rc; -} - -/* sha256h2_advsimd.xml */ -int SHA256H2_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|0|Rm=xxxxx|0|10|P=1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E005000) { - decode_fields32(ENC_SHA256H2_QQV_CRYPTOSHA3, ctx, instr); - if(!HaveSHA256()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA256H2_QQV_CRYPTOSHA3); - } - return rc; -} - -/* sha256h_advsimd.xml */ -int SHA256H_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|0|Rm=xxxxx|0|10|P=0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E004000) { - decode_fields32(ENC_SHA256H_QQV_CRYPTOSHA3, ctx, instr); - if(!HaveSHA256()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA256H_QQV_CRYPTOSHA3); - } - return rc; -} - -/* sha256su0_advsimd.xml */ -int SHA256SU0_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|10100|opcode=00010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x5E282800) { - decode_fields32(ENC_SHA256SU0_VV_CRYPTOSHA2, ctx, instr); - if(!HaveSHA256()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_SHA256SU0_VV_CRYPTOSHA2); - } - return rc; -} - -/* sha256su1_advsimd.xml */ -int SHA256SU1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0101|111|0|size=00|0|Rm=xxxxx|0|opcode=110|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5E006000) { - decode_fields32(ENC_SHA256SU1_VVV_CRYPTOSHA3, ctx, instr); - if(!HaveSHA256()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA256SU1_VVV_CRYPTOSHA3); - } - return rc; -} - -/* sha512h2_advsimd.xml */ -int SHA512H2_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|11|Rm=xxxxx|1|O=0|00|opcode=01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xCE608400) { - decode_fields32(ENC_SHA512H2_QQV_CRYPTOSHA512_3, ctx, instr); - if(!HaveSHA512()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA512H2_QQV_CRYPTOSHA512_3); - } - return rc; -} - -/* sha512h_advsimd.xml */ -int SHA512H_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|11|Rm=xxxxx|1|O=0|00|opcode=00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xCE608000) { - decode_fields32(ENC_SHA512H_QQV_CRYPTOSHA512_3, ctx, instr); - if(!HaveSHA512()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA512H_QQV_CRYPTOSHA512_3); - } - return rc; -} - -/* sha512su0_advsimd.xml */ -int SHA512SU0_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|01|1000|0001000|opcode=00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xCEC08000) { - decode_fields32(ENC_SHA512SU0_VV2_CRYPTOSHA512_2, ctx, instr); - if(!HaveSHA512()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_SHA512SU0_VV2_CRYPTOSHA512_2); - } - return rc; -} - -/* sha512su1_advsimd.xml */ -int SHA512SU1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|11|Rm=xxxxx|1|O=0|00|opcode=10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xCE608800) { - decode_fields32(ENC_SHA512SU1_VVV2_CRYPTOSHA512_3, ctx, instr); - if(!HaveSHA512()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SHA512SU1_VVV2_CRYPTOSHA512_3); - } - return rc; -} - -/* shadd_advsimd.xml */ -int SHADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=00000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE200400) { - decode_fields32(ENC_SHADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SHADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* shll_advsimd.xml */ -int SHLL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|opcode=10011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E213800) { - decode_fields32(ENC_SHLL_ASIMDMISC_S, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ctx->esize; - OK(ENC_SHLL_ASIMDMISC_S); - } - return rc; -} - -/* shl_advsimd.xml */ -int SHL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh=1xxx|immb=xxx|opcode=01010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x5F405400) { - decode_fields32(ENC_SHL_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - OK(ENC_SHL_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|opcode=01010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF005400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SHL_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - OK(ENC_SHL_ASIMDSHF_R); - } - return rc; -} - -/* shrn_advsimd.xml */ -int SHRN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|1000|op=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF008400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SHRN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = FALSE; - OK(ENC_SHRN_ASIMDSHF_N); - } - return rc; -} - -/* shsub_advsimd.xml */ -int SHSUB_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=00100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE202400) { - decode_fields32(ENC_SHSUB_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SHSUB_ASIMDSAME_ONLY); - } - return rc; -} - -/* shuh.xml */ -int SHUH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0110|op2=01x|11111 */ - if((INSWORD & 0xFFFFFFDF)==0xD503265F) { - decode_fields32(ENC_SHUH_HI_HINTS, ctx, instr); - if(!HaveCMH()) { - EndOfDecode(Decode_NOP); - } - ctx->priority = SLICE(ctx->op2,0,0)==1; - OK(ENC_SHUH_HI_HINTS); - } - return rc; -} - -/* sli_advsimd.xml */ -int SLI_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh=1xxx|immb=xxx|opcode=01010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x7F405400) { - decode_fields32(ENC_SLI_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - OK(ENC_SLI_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|opcode=01010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F005400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SLI_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - OK(ENC_SLI_ASIMDSHF_R); - } - return rc; -} - -/* sm3partw1_advsimd.xml */ -int SM3PARTW1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|11|Rm=xxxxx|1|O=1|00|opcode=00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xCE60C000) { - decode_fields32(ENC_SM3PARTW1_VVV4_CRYPTOSHA512_3, ctx, instr); - if(!HaveSM3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SM3PARTW1_VVV4_CRYPTOSHA512_3); - } - return rc; -} - -/* sm3partw2_advsimd.xml */ -int SM3PARTW2_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|11|Rm=xxxxx|1|O=1|00|opcode=01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xCE60C400) { - decode_fields32(ENC_SM3PARTW2_VVV4_CRYPTOSHA512_3, ctx, instr); - if(!HaveSM3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SM3PARTW2_VVV4_CRYPTOSHA512_3); - } - return rc; -} - -/* sm3ss1_advsimd.xml */ -int SM3SS1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|Op0=10|Rm=xxxxx|0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0xCE400000) { - decode_fields32(ENC_SM3SS1_VVV4_CRYPTO4, ctx, instr); - if(!HaveSM3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - OK(ENC_SM3SS1_VVV4_CRYPTO4); - } - return rc; -} - -/* sm3tt1a_advsimd.xml */ -int SM3TT1A_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|10|Rm=xxxxx|10|imm2=xx|opcode=00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0CC00)==0xCE408000) { - decode_fields32(ENC_SM3TT1A_VVV4_CRYPTO3_IMM2, ctx, instr); - if(!HaveSM3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->i = UINT(ctx->imm2); - OK(ENC_SM3TT1A_VVV4_CRYPTO3_IMM2); - } - return rc; -} - -/* sm3tt1b_advsimd.xml */ -int SM3TT1B_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|10|Rm=xxxxx|10|imm2=xx|opcode=01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0CC00)==0xCE408400) { - decode_fields32(ENC_SM3TT1B_VVV4_CRYPTO3_IMM2, ctx, instr); - if(!HaveSM3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->i = UINT(ctx->imm2); - OK(ENC_SM3TT1B_VVV4_CRYPTO3_IMM2); - } - return rc; -} - -/* sm3tt2a_advsimd.xml */ -int SM3TT2A_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|10|Rm=xxxxx|10|imm2=xx|opcode=10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0CC00)==0xCE408800) { - decode_fields32(ENC_SM3TT2A_VVV4_CRYPTO3_IMM2, ctx, instr); - if(!HaveSM3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->i = UINT(ctx->imm2); - OK(ENC_SM3TT2A_VVV4_CRYPTO3_IMM2); - } - return rc; -} - -/* sm3tt2b_advsimd.xml */ -int SM3TT2B_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|10|Rm=xxxxx|10|imm2=xx|opcode=11|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0CC00)==0xCE408C00) { - decode_fields32(ENC_SM3TT2B_VVV_CRYPTO3_IMM2, ctx, instr); - if(!HaveSM3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->i = UINT(ctx->imm2); - OK(ENC_SM3TT2B_VVV_CRYPTO3_IMM2); - } - return rc; -} - -/* sm4ekey_advsimd.xml */ -int SM4EKEY_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|00|11|Rm=xxxxx|1|O=1|00|opcode=10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xCE60C800) { - decode_fields32(ENC_SM4EKEY_VVV4_CRYPTOSHA512_3, ctx, instr); - if(!HaveSM4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SM4EKEY_VVV4_CRYPTOSHA512_3); - } - return rc; -} - -/* sm4e_advsimd.xml */ -int SM4E_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|01|1000|0001000|opcode=01|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xCEC08400) { - decode_fields32(ENC_SM4E_VV4_CRYPTOSHA512_2, ctx, instr); - if(!HaveSM4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - OK(ENC_SM4E_VV4_CRYPTOSHA512_2); - } - return rc; -} - -/* smaddl.xml */ -int SMADDL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=0|01|Rm=xxxxx|o0=0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9B200000) { - decode_fields32(ENC_SMADDL_64WA_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - /* regular aliases */ - if(ctx->Ra==0x1f) return SMULL_SMADDL(ctx, instr); - OK(ENC_SMADDL_64WA_DP_3SRC); - } - return rc; -} - -/* smaxp_advsimd.xml */ -int SMAXP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|1010|o1=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20A400) { - decode_fields32(ENC_SMAXP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMAXP_ASIMDSAME_ONLY); - } - return rc; -} - -/* smaxv_advsimd.xml */ -int SMAXV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=xx|11000|op=0|1010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE30A800) { - decode_fields32(ENC_SMAXV_ASIMDALL_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==4) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SMAXV_ASIMDALL_ONLY); - } - return rc; -} - -/* smax_advsimd.xml */ -int SMAX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|0110|o1=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE206400) { - decode_fields32(ENC_SMAX_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMAX_ASIMDSAME_ONLY); - } - return rc; -} - -/* smax_imm.xml */ -int SMAX_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|1000111|opc=0000|imm8=xxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFC0000)==0x11C00000) { - decode_fields32(ENC_SMAX_32_MINMAX_IMM, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = SInt(ctx->imm8,8); - if(ctx->sf==0) OK(ENC_SMAX_32_MINMAX_IMM); - if(ctx->sf==1) OK(ENC_SMAX_64_MINMAX_IMM); - } - return rc; -} - -/* smax_reg.xml */ -int SMAX_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|opcode=011000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC06000) { - decode_fields32(ENC_SMAX_32_DP_2SRC, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_SMAX_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_SMAX_64_DP_2SRC); - } - return rc; -} - -/* smc.xml */ -int SMC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=000|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=11 */ - if((INSWORD & 0xFFE0001F)==0xD4000003) { - decode_fields32(ENC_SMC_EX_EXCEPTION, ctx, instr); - OK(ENC_SMC_EX_EXCEPTION); - } - return rc; -} - -/* sminp_advsimd.xml */ -int SMINP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|1010|o1=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20AC00) { - decode_fields32(ENC_SMINP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMINP_ASIMDSAME_ONLY); - } - return rc; -} - -/* sminv_advsimd.xml */ -int SMINV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=0|0|111|0|size=xx|11000|op=1|1010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE31A800) { - decode_fields32(ENC_SMINV_ASIMDALL_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==4) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SMINV_ASIMDALL_ONLY); - } - return rc; -} - -/* smin_advsimd.xml */ -int SMIN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|0110|o1=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE206C00) { - decode_fields32(ENC_SMIN_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMIN_ASIMDSAME_ONLY); - } - return rc; -} - -/* smin_imm.xml */ -int SMIN_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|1000111|opc=0010|imm8=xxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFC0000)==0x11C80000) { - decode_fields32(ENC_SMIN_32_MINMAX_IMM, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = SInt(ctx->imm8,8); - if(ctx->sf==0) OK(ENC_SMIN_32_MINMAX_IMM); - if(ctx->sf==1) OK(ENC_SMIN_64_MINMAX_IMM); - } - return rc; -} - -/* smin_reg.xml */ -int SMIN_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|opcode=011010|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC06800) { - decode_fields32(ENC_SMIN_32_DP_2SRC, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_SMIN_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_SMIN_64_DP_2SRC); - } - return rc; -} - -/* smlal_advsimd_elt.xml */ -int SMLAL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=0|10|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF002000) { - decode_fields32(ENC_SMLAL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMLAL_ASIMDELEM_L); - } - return rc; -} - -/* smlal_advsimd_vec.xml */ -int SMLAL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|10|o1=0|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE208000) { - decode_fields32(ENC_SMLAL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMLAL_ASIMDDIFF_L); - } - return rc; -} - -/* smlsl_advsimd_elt.xml */ -int SMLSL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=1|10|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF006000) { - decode_fields32(ENC_SMLSL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMLSL_ASIMDELEM_L); - } - return rc; -} - -/* smlsl_advsimd_vec.xml */ -int SMLSL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|10|o1=1|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20A000) { - decode_fields32(ENC_SMLSL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMLSL_ASIMDDIFF_L); - } - return rc; -} - -/* smmla_advsimd_vec.xml */ -int SMMLA_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=1|U=0|0|111|0|size=10|0|Rm=xxxxx|1|010|B=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E80A400) { - decode_fields32(ENC_SMMLA_ASIMDSAME2_G, ctx, instr); - if(!HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMMLA_ASIMDSAME2_G); - } - return rc; -} - -/* smnegl_smsubl.xml */ -int SMNEGL_SMSUBL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=0|01|Rm=xxxxx|o0=1|Ra=11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9B20FC00) { - decode_fields32(ENC_SMNEGL_SMSUBL_64WA_DP_3SRC, ctx, instr); - OK(ENC_SMNEGL_SMSUBL_64WA_DP_3SRC); - } - return rc; -} - -/* smov_advsimd.xml */ -int SMOV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|op=0|01110000|imm5=xxxxx|0|imm4=0101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE002C00) { - decode_fields32(ENC_SMOV_ASIMDINS_W_W, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!(ctx->imm5&7)) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = LowestSetBitNZ(SLICE(ctx->imm5,2,0)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (ctx->size); - ctx->datasize = (0x20) << (UINT(ctx->Q)); - if(ctx->datasize <= ctx->esize) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(SLICE(ctx->imm5,4,ctx->size+1)); - ctx->idxdsize = (0x40) << (UINT(SLICE(ctx->imm5,4,4))); - if(ctx->Q==0) OK(ENC_SMOV_ASIMDINS_W_W); - if(ctx->Q==1) OK(ENC_SMOV_ASIMDINS_X_X); - } - return rc; -} - -/* smstart_msr_imm.xml */ -int SMSTART_MSR_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100000|op1=011|0100|CRm=0xx1|op2=011|Rt=11111 */ - if((INSWORD & 0xFFFFF9FF)==0xD503417F) { - decode_fields32(ENC_SMSTART_MSR_SI_PSTATE, ctx, instr); - OK(ENC_SMSTART_MSR_SI_PSTATE); - } - return rc; -} - -/* smstop_msr_imm.xml */ -int SMSTOP_MSR_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100000|op1=011|0100|CRm=0xx0|op2=011|Rt=11111 */ - if((INSWORD & 0xFFFFF9FF)==0xD503407F) { - decode_fields32(ENC_SMSTOP_MSR_SI_PSTATE, ctx, instr); - OK(ENC_SMSTOP_MSR_SI_PSTATE); - } - return rc; -} - -/* smsubl.xml */ -int SMSUBL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=0|01|Rm=xxxxx|o0=1|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9B208000) { - decode_fields32(ENC_SMSUBL_64WA_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - /* regular aliases */ - if(ctx->Ra==0x1f) return SMNEGL_SMSUBL(ctx, instr); - OK(ENC_SMSUBL_64WA_DP_3SRC); - } - return rc; -} - -/* smulh.xml */ -int SMULH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=0|10|Rm=xxxxx|o0=0|Ra=(1)(1)(1)(1)(1)|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9B400000) { - decode_fields32(ENC_SMULH_64_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SMULH_64_DP_3SRC); - } - return rc; -} - -/* smull_smaddl.xml */ -int SMULL_SMADDL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=0|01|Rm=xxxxx|o0=0|Ra=11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9B207C00) { - decode_fields32(ENC_SMULL_SMADDL_64WA_DP_3SRC, ctx, instr); - OK(ENC_SMULL_SMADDL_64WA_DP_3SRC); - } - return rc; -} - -/* smull_advsimd_elt.xml */ -int SMULL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|opcode=1010|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF00A000) { - decode_fields32(ENC_SMULL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMULL_ASIMDELEM_L); - } - return rc; -} - -/* smull_advsimd_vec.xml */ -int SMULL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=1100|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20C000) { - decode_fields32(ENC_SMULL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SMULL_ASIMDDIFF_L); - } - return rc; -} - -/* sqabs_advsimd.xml */ -int SQABS_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|10000|opcode=00111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5E207800) { - decode_fields32(ENC_SQABS_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_SQABS_ASISDMISC_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=00111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE207800) { - decode_fields32(ENC_SQABS_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQABS_ASIMDMISC_R); - } - return rc; -} - -/* sqadd_advsimd.xml */ -int SQADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|opcode=00001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E200C00) { - decode_fields32(ENC_SQADD_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SQADD_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=00001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE200C00) { - decode_fields32(ENC_SQADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SQADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* sqdmlal_advsimd_elt.xml */ -int SQDMLAL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=0|11|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF00F400)==0x5F003000) { - decode_fields32(ENC_SQDMLAL_ASISDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - OK(ENC_SQDMLAL_ASISDELEM_L); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=0|11|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF003000) { - decode_fields32(ENC_SQDMLAL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQDMLAL_ASIMDELEM_L); - } - return rc; -} - -/* sqdmlal_advsimd_vec.xml */ -int SQDMLAL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|10|o1=0|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E209000) { - decode_fields32(ENC_SQDMLAL_ASISDDIFF_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - OK(ENC_SQDMLAL_ASISDDIFF_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|10|o1=0|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE209000) { - decode_fields32(ENC_SQDMLAL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQDMLAL_ASIMDDIFF_L); - } - return rc; -} - -/* sqdmlsl_advsimd_elt.xml */ -int SQDMLSL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=1|11|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF00F400)==0x5F007000) { - decode_fields32(ENC_SQDMLSL_ASISDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - OK(ENC_SQDMLSL_ASISDELEM_L); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=1|11|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF007000) { - decode_fields32(ENC_SQDMLSL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQDMLSL_ASIMDELEM_L); - } - return rc; -} - -/* sqdmlsl_advsimd_vec.xml */ -int SQDMLSL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|10|o1=1|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E20B000) { - decode_fields32(ENC_SQDMLSL_ASISDDIFF_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - OK(ENC_SQDMLSL_ASISDDIFF_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|10|o1=1|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20B000) { - decode_fields32(ENC_SQDMLSL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQDMLSL_ASIMDDIFF_L); - } - return rc; -} - -/* sqdmulh_advsimd_elt.xml */ -int SQDMULH_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|1|size=xx|L=x|M=x|Rm=xxxx|110|op=0|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF00F400)==0x5F00C000) { - decode_fields32(ENC_SQDMULH_ASISDELEM_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->round = FALSE; - OK(ENC_SQDMULH_ASISDELEM_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|110|op=0|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF00C000) { - decode_fields32(ENC_SQDMULH_ASIMDELEM_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->round = FALSE; - OK(ENC_SQDMULH_ASIMDELEM_R); - } - return rc; -} - -/* sqdmulh_advsimd_vec.xml */ -int SQDMULH_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|opcode=10110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E20B400) { - decode_fields32(ENC_SQDMULH_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = FALSE; - OK(ENC_SQDMULH_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=10110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20B400) { - decode_fields32(ENC_SQDMULH_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = FALSE; - OK(ENC_SQDMULH_ASIMDSAME_ONLY); - } - return rc; -} - -/* sqdmull_advsimd_elt.xml */ -int SQDMULL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|opcode=1011|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF00B000) { - decode_fields32(ENC_SQDMULL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQDMULL_ASIMDELEM_L); - } - /* class iclass_scalar */ - /* 01|U=0|1|111|1|size=xx|L=x|M=x|Rm=xxxx|opcode=1011|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF00F400)==0x5F00B000) { - decode_fields32(ENC_SQDMULL_ASISDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - OK(ENC_SQDMULL_ASISDELEM_L); - } - return rc; -} - -/* sqdmull_advsimd_vec.xml */ -int SQDMULL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|opcode=1101|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E20D000) { - decode_fields32(ENC_SQDMULL_ASISDDIFF_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - OK(ENC_SQDMULL_ASISDDIFF_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=1101|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE20D000) { - decode_fields32(ENC_SQDMULL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQDMULL_ASIMDDIFF_L); - } - return rc; -} - -/* sqneg_advsimd.xml */ -int SQNEG_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|10000|opcode=00111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x7E207800) { - decode_fields32(ENC_SQNEG_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_SQNEG_ASISDMISC_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|opcode=00111|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E207800) { - decode_fields32(ENC_SQNEG_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQNEG_ASIMDMISC_R); - } - return rc; -} - -/* sqrdmlah_advsimd_elt.xml */ -int SQRDMLAH_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|1|size=xx|L=x|M=x|Rm=xxxx|11|S=0|1|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF00F400)==0x7F00D000) { - decode_fields32(ENC_SQRDMLAH_ASISDELEM_R, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = TRUE; - OK(ENC_SQRDMLAH_ASISDELEM_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|11|S=0|1|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F00D000) { - decode_fields32(ENC_SQRDMLAH_ASIMDELEM_R, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = TRUE; - OK(ENC_SQRDMLAH_ASIMDELEM_R); - } - return rc; -} - -/* sqrdmlah_advsimd_vec.xml */ -int SQRDMLAH_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|0|Rm=xxxxx|1|000|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7E008400) { - decode_fields32(ENC_SQRDMLAH_ASISDSAME2_ONLY, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = TRUE; - OK(ENC_SQRDMLAH_ASISDSAME2_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|0|Rm=xxxxx|1|000|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E008400) { - decode_fields32(ENC_SQRDMLAH_ASIMDSAME2_ONLY, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = TRUE; - OK(ENC_SQRDMLAH_ASIMDSAME2_ONLY); - } - return rc; -} - -/* sqrdmlsh_advsimd_elt.xml */ -int SQRDMLSH_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|1|size=xx|L=x|M=x|Rm=xxxx|11|S=1|1|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF00F400)==0x7F00F000) { - decode_fields32(ENC_SQRDMLSH_ASISDELEM_R, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = TRUE; - OK(ENC_SQRDMLSH_ASISDELEM_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|11|S=1|1|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F00F000) { - decode_fields32(ENC_SQRDMLSH_ASIMDELEM_R, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = TRUE; - OK(ENC_SQRDMLSH_ASIMDELEM_R); - } - return rc; -} - -/* sqrdmlsh_advsimd_vec.xml */ -int SQRDMLSH_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|0|Rm=xxxxx|1|000|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7E008C00) { - decode_fields32(ENC_SQRDMLSH_ASISDSAME2_ONLY, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = TRUE; - OK(ENC_SQRDMLSH_ASISDSAME2_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|0|Rm=xxxxx|1|000|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E008C00) { - decode_fields32(ENC_SQRDMLSH_ASIMDSAME2_ONLY, ctx, instr); - if(!HaveRDM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = TRUE; - OK(ENC_SQRDMLSH_ASIMDSAME2_ONLY); - } - return rc; -} - -/* sqrdmulh_advsimd_elt.xml */ -int SQRDMULH_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|1|size=xx|L=x|M=x|Rm=xxxx|110|op=1|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF00F400)==0x5F00D000) { - decode_fields32(ENC_SQRDMULH_ASISDELEM_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->round = TRUE; - OK(ENC_SQRDMULH_ASISDELEM_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|size=xx|L=x|M=x|Rm=xxxx|110|op=1|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0xF00D000) { - decode_fields32(ENC_SQRDMULH_ASIMDELEM_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->round = TRUE; - OK(ENC_SQRDMULH_ASIMDELEM_R); - } - return rc; -} - -/* sqrdmulh_advsimd_vec.xml */ -int SQRDMULH_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|1|Rm=xxxxx|opcode=10110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7E20B400) { - decode_fields32(ENC_SQRDMULH_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->rounding = TRUE; - OK(ENC_SQRDMULH_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=10110|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E20B400) { - decode_fields32(ENC_SQRDMULH_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 || ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rounding = TRUE; - OK(ENC_SQRDMULH_ASIMDSAME_ONLY); - } - return rc; -} - -/* sqrshl_advsimd.xml */ -int SQRSHL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|010|R=1|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E205C00) { - decode_fields32(ENC_SQRSHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = FALSE; - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_SQRSHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|010|R=1|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE205C00) { - decode_fields32(ENC_SQRSHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = FALSE; - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQRSHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* sqrshrn_advsimd.xml */ -int SQRSHRN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh!=0000|immb=xxx|1001|op=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x5F009C00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQRSHRN_ASISDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = TRUE; - ctx->unsigned_ = FALSE; - OK(ENC_SQRSHRN_ASISDSHF_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|1001|op=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF009C00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQRSHRN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = TRUE; - ctx->unsigned_ = FALSE; - OK(ENC_SQRSHRN_ASIMDSHF_N); - } - return rc; -} - -/* sqrshrun_advsimd.xml */ -int SQRSHRUN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|1000|op=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F008C00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQRSHRUN_ASISDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = TRUE; - OK(ENC_SQRSHRUN_ASISDSHF_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|1000|op=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F008C00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQRSHRUN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = TRUE; - OK(ENC_SQRSHRUN_ASIMDSHF_N); - } - return rc; -} - -/* sqshlu_advsimd.xml */ -int SQSHLU_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|011|op=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F006400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHLU_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->src_unsigned = FALSE; - ctx->dst_unsigned = TRUE; - OK(ENC_SQSHLU_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|011|op=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F006400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHLU_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->src_unsigned = FALSE; - ctx->dst_unsigned = TRUE; - OK(ENC_SQSHLU_ASIMDSHF_R); - } - return rc; -} - -/* sqshl_advsimd_imm.xml */ -int SQSHL_advsimd_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh!=0000|immb=xxx|011|op=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x5F007400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHL_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->src_unsigned = FALSE; - ctx->dst_unsigned = FALSE; - OK(ENC_SQSHL_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|011|op=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF007400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHL_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->src_unsigned = FALSE; - ctx->dst_unsigned = FALSE; - OK(ENC_SQSHL_ASIMDSHF_R); - } - return rc; -} - -/* sqshl_advsimd_reg.xml */ -int SQSHL_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|010|R=0|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E204C00) { - decode_fields32(ENC_SQSHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = FALSE; - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_SQSHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|010|R=0|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE204C00) { - decode_fields32(ENC_SQSHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = FALSE; - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQSHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* sqshrn_advsimd.xml */ -int SQSHRN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh!=0000|immb=xxx|1001|op=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x5F009400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHRN_ASISDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = FALSE; - ctx->unsigned_ = FALSE; - OK(ENC_SQSHRN_ASISDSHF_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|1001|op=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF009400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHRN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = FALSE; - ctx->unsigned_ = FALSE; - OK(ENC_SQSHRN_ASIMDSHF_N); - } - return rc; -} - -/* sqshrun_advsimd.xml */ -int SQSHRUN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|1000|op=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F008400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHRUN_ASISDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = FALSE; - OK(ENC_SQSHRUN_ASISDSHF_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|1000|op=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F008400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SQSHRUN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = FALSE; - OK(ENC_SQSHRUN_ASIMDSHF_N); - } - return rc; -} - -/* sqsub_advsimd.xml */ -int SQSUB_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|1|Rm=xxxxx|opcode=00101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5E202C00) { - decode_fields32(ENC_SQSUB_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SQSUB_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=00101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE202C00) { - decode_fields32(ENC_SQSUB_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SQSUB_ASIMDSAME_ONLY); - } - return rc; -} - -/* sqxtn_advsimd.xml */ -int SQXTN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|10000|opcode=10100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5E214800) { - decode_fields32(ENC_SQXTN_ASISDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->part = 0; - ctx->elements = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SQXTN_ASISDMISC_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=10100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE214800) { - decode_fields32(ENC_SQXTN_ASIMDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SQXTN_ASIMDMISC_N); - } - return rc; -} - -/* sqxtun_advsimd.xml */ -int SQXTUN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|10000|opcode=10010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x7E212800) { - decode_fields32(ENC_SQXTUN_ASISDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->part = 0; - ctx->elements = 1; - OK(ENC_SQXTUN_ASISDMISC_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|opcode=10010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E212800) { - decode_fields32(ENC_SQXTUN_ASIMDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SQXTUN_ASIMDMISC_N); - } - return rc; -} - -/* srhadd_advsimd.xml */ -int SRHADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|opcode=00010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE201400) { - decode_fields32(ENC_SRHADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SRHADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* sri_advsimd.xml */ -int SRI_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh=1xxx|immb=xxx|opcode=01000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x7F404400) { - decode_fields32(ENC_SRI_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - OK(ENC_SRI_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|opcode=01000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F004400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SRI_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - OK(ENC_SRI_ASIMDSHF_R); - } - return rc; -} - -/* srshl_advsimd.xml */ -int SRSHL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|1|Rm=xxxxx|010|R=1|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5EE05400) { - decode_fields32(ENC_SRSHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_SRSHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|010|R=1|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE205400) { - decode_fields32(ENC_SRSHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SRSHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* srshr_advsimd.xml */ -int SRSHR_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh=1xxx|immb=xxx|00|o1=1|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x5F402400) { - decode_fields32(ENC_SRSHR_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = TRUE; - OK(ENC_SRSHR_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|00|o1=1|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF002400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SRSHR_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = TRUE; - OK(ENC_SRSHR_ASIMDSHF_R); - } - return rc; -} - -/* srsra_advsimd.xml */ -int SRSRA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh=1xxx|immb=xxx|00|o1=1|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x5F403400) { - decode_fields32(ENC_SRSRA_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = TRUE; - OK(ENC_SRSRA_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|00|o1=1|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF003400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SRSRA_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = TRUE; - OK(ENC_SRSRA_ASIMDSHF_R); - } - return rc; -} - -/* ssbb_dsb.xml */ -int SSBB_DSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_memory_barrier */ - /* 110|101|01000000110011|CRm=0000|1|opc=00|Rt=11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503309F) { - decode_fields32(ENC_SSBB_DSB_BO_BARRIERS, ctx, instr); - OK(ENC_SSBB_DSB_BO_BARRIERS); - } - return rc; -} - -/* sshll_advsimd.xml */ -int SSHLL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|opcode=10100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF00A400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SSHLL_ASIMDSHF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->unsigned_ = FALSE; - /* regular aliases */ - if(ctx->immb==0 && BitCount(ctx->immh)==1) return SXTL_SSHLL_advsimd(ctx, instr); - OK(ENC_SSHLL_ASIMDSHF_L); - } - return rc; -} - -/* sshl_advsimd.xml */ -int SSHL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=11|1|Rm=xxxxx|010|R=0|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5EE04400) { - decode_fields32(ENC_SSHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_SSHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|010|R=0|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE204400) { - decode_fields32(ENC_SSHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SSHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* sshr_advsimd.xml */ -int SSHR_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh=1xxx|immb=xxx|00|o1=0|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x5F400400) { - decode_fields32(ENC_SSHR_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = FALSE; - OK(ENC_SSHR_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|00|o1=0|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF000400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SSHR_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = FALSE; - OK(ENC_SSHR_ASIMDSHF_R); - } - return rc; -} - -/* ssra_advsimd.xml */ -int SSRA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|10|immh=1xxx|immb=xxx|00|o1=0|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x5F401400) { - decode_fields32(ENC_SSRA_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = FALSE; - OK(ENC_SSRA_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=xxx|00|o1=0|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0xF001400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SSRA_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = FALSE; - ctx->round = FALSE; - OK(ENC_SSRA_ASIMDSHF_R); - } - return rc; -} - -/* ssubl_advsimd.xml */ -int SSUBL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|00|o1=1|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE202000) { - decode_fields32(ENC_SSUBL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SSUBL_ASIMDDIFF_L); - } - return rc; -} - -/* ssubw_advsimd.xml */ -int SSUBW_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|00|o1=1|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE203000) { - decode_fields32(ENC_SSUBW_ASIMDDIFF_W, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SSUBW_ASIMDDIFF_W); - } - return rc; -} - -/* st1_advsimd_mult.xml */ -int ST1_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011000|L=0|000000|opcode=xx1x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xC002000) { - decode_fields32(ENC_ST1_ASISDLSE_R1_1V, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==7) OK(ENC_ST1_ASISDLSE_R1_1V); - if(ctx->opcode==10) OK(ENC_ST1_ASISDLSE_R2_2V); - if(ctx->opcode==6) OK(ENC_ST1_ASISDLSE_R3_3V); - if(ctx->opcode==2) OK(ENC_ST1_ASISDLSE_R4_4V); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=0|0|Rm=xxxxx|opcode=xx1x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xC802000) { - decode_fields32(ENC_ST1_ASISDLSEP_I1_I1, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==7) OK(ENC_ST1_ASISDLSEP_I1_I1); - if(ctx->Rm!=0x1f && ctx->opcode==7) OK(ENC_ST1_ASISDLSEP_R1_R1); - if(ctx->Rm==0x1f && ctx->opcode==10) OK(ENC_ST1_ASISDLSEP_I2_I2); - if(ctx->Rm!=0x1f && ctx->opcode==10) OK(ENC_ST1_ASISDLSEP_R2_R2); - if(ctx->Rm==0x1f && ctx->opcode==6) OK(ENC_ST1_ASISDLSEP_I3_I3); - if(ctx->Rm!=0x1f && ctx->opcode==6) OK(ENC_ST1_ASISDLSEP_R3_R3); - if(ctx->Rm==0x1f && ctx->opcode==2) OK(ENC_ST1_ASISDLSEP_I4_I4); - if(ctx->Rm!=0x1f && ctx->opcode==2) OK(ENC_ST1_ASISDLSEP_R4_R4); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->selem = 1; - if(ctx->opcode==2) { - ctx->rpt = 4; - } - else if(ctx->opcode==6) { - ctx->rpt = 3; - } - else if(ctx->opcode==10) { - ctx->rpt = 2; - } - else if(ctx->opcode==7) { - ctx->rpt = 1; - } - else { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* st1_advsimd_sngl.xml */ -int ST1_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=0|R=0|0000|o2=0|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD000000) { - decode_fields32(ENC_ST1_ASISDLSO_B1_1B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==0) OK(ENC_ST1_ASISDLSO_B1_1B); - if(ctx->opcode==2 && !(ctx->size&1)) OK(ENC_ST1_ASISDLSO_H1_1H); - if(ctx->opcode==4 && ctx->size==0) OK(ENC_ST1_ASISDLSO_S1_1S); - if(ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_ST1_ASISDLSO_D1_1D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=0|R=0|Rm=xxxxx|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xD800000) { - decode_fields32(ENC_ST1_ASISDLSOP_B1_I1B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==0) OK(ENC_ST1_ASISDLSOP_B1_I1B); - if(ctx->Rm!=0x1f && ctx->opcode==0) OK(ENC_ST1_ASISDLSOP_BX1_R1B); - if(ctx->Rm==0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_ST1_ASISDLSOP_H1_I1H); - if(ctx->Rm!=0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_ST1_ASISDLSOP_HX1_R1H); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_ST1_ASISDLSOP_S1_I1S); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_ST1_ASISDLSOP_SX1_R1S); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_ST1_ASISDLSOP_D1_I1D); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_ST1_ASISDLSOP_DX1_R1D); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* st2g.xml */ -int ST2G(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* 1101|1|0|0|1|opc=10|1|imm9=xxxxxxxxx|op2=01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9A00400) { - decode_fields32(ENC_ST2G_64SPOST_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = TRUE; - OK(ENC_ST2G_64SPOST_LDSTTAGS); - } - /* class iclass_pre_index */ - /* 1101|1|0|0|1|opc=10|1|imm9=xxxxxxxxx|op2=11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9A00C00) { - decode_fields32(ENC_ST2G_64SPRE_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = FALSE; - OK(ENC_ST2G_64SPRE_LDSTTAGS); - } - /* class iclass_signed_offset */ - /* 1101|1|0|0|1|opc=10|1|imm9=xxxxxxxxx|op2=10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9A00800) { - decode_fields32(ENC_ST2G_64SOFFSET_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = FALSE; - ctx->postindex = FALSE; - OK(ENC_ST2G_64SOFFSET_LDSTTAGS); - } - return rc; -} - -/* st2_advsimd_mult.xml */ -int ST2_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|00|L=0|000000|opcode=1000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xC008000) { - decode_fields32(ENC_ST2_ASISDLSE_R2, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_ST2_ASISDLSE_R2); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=0|0|Rm=xxxxx|opcode=1000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xC808000) { - decode_fields32(ENC_ST2_ASISDLSEP_I2_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_ST2_ASISDLSEP_I2_I); - if(ctx->Rm!=0x1f) OK(ENC_ST2_ASISDLSEP_R2_R); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rpt = 1; - ctx->selem = 2; - if(((ctx->size<<1)|ctx->Q)==6 && ctx->selem!=1) { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* st2_advsimd_sngl.xml */ -int ST2_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=0|R=1|0000|o2=0|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD200000) { - decode_fields32(ENC_ST2_ASISDLSO_B2_2B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==0) OK(ENC_ST2_ASISDLSO_B2_2B); - if(ctx->opcode==2 && !(ctx->size&1)) OK(ENC_ST2_ASISDLSO_H2_2H); - if(ctx->opcode==4 && ctx->size==0) OK(ENC_ST2_ASISDLSO_S2_2S); - if(ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_ST2_ASISDLSO_D2_2D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=0|R=1|Rm=xxxxx|opcode=xx0|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xDA00000) { - decode_fields32(ENC_ST2_ASISDLSOP_B2_I2B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==0) OK(ENC_ST2_ASISDLSOP_B2_I2B); - if(ctx->Rm!=0x1f && ctx->opcode==0) OK(ENC_ST2_ASISDLSOP_BX2_R2B); - if(ctx->Rm==0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_ST2_ASISDLSOP_H2_I2H); - if(ctx->Rm!=0x1f && ctx->opcode==2 && !(ctx->size&1)) OK(ENC_ST2_ASISDLSOP_HX2_R2H); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_ST2_ASISDLSOP_S2_I2S); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->size==0) OK(ENC_ST2_ASISDLSOP_SX2_R2S); - if(ctx->Rm==0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_ST2_ASISDLSOP_D2_I2D); - if(ctx->Rm!=0x1f && ctx->opcode==4 && ctx->S==0 && ctx->size==1) OK(ENC_ST2_ASISDLSOP_DX2_R2D); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* st3_advsimd_mult.xml */ -int ST3_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|00|L=0|000000|opcode=0100|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xC004000) { - decode_fields32(ENC_ST3_ASISDLSE_R3, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_ST3_ASISDLSE_R3); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=0|0|Rm=xxxxx|opcode=0100|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xC804000) { - decode_fields32(ENC_ST3_ASISDLSEP_I3_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_ST3_ASISDLSEP_I3_I); - if(ctx->Rm!=0x1f) OK(ENC_ST3_ASISDLSEP_R3_R); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rpt = 1; - ctx->selem = 3; - if(((ctx->size<<1)|ctx->Q)==6 && ctx->selem!=1) { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* st3_advsimd_sngl.xml */ -int ST3_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=0|R=0|0000|o2=0|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD002000) { - decode_fields32(ENC_ST3_ASISDLSO_B3_3B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==1) OK(ENC_ST3_ASISDLSO_B3_3B); - if(ctx->opcode==3 && !(ctx->size&1)) OK(ENC_ST3_ASISDLSO_H3_3H); - if(ctx->opcode==5 && ctx->size==0) OK(ENC_ST3_ASISDLSO_S3_3S); - if(ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_ST3_ASISDLSO_D3_3D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=0|R=0|Rm=xxxxx|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xD802000) { - decode_fields32(ENC_ST3_ASISDLSOP_B3_I3B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==1) OK(ENC_ST3_ASISDLSOP_B3_I3B); - if(ctx->Rm!=0x1f && ctx->opcode==1) OK(ENC_ST3_ASISDLSOP_BX3_R3B); - if(ctx->Rm==0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_ST3_ASISDLSOP_H3_I3H); - if(ctx->Rm!=0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_ST3_ASISDLSOP_HX3_R3H); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_ST3_ASISDLSOP_S3_I3S); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_ST3_ASISDLSOP_SX3_R3S); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_ST3_ASISDLSOP_D3_I3D); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_ST3_ASISDLSOP_DX3_R3D); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* st4_advsimd_mult.xml */ -int ST4_advsimd_mult(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|00|1|1|0|00|L=0|000000|opcode=0000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFF000)==0xC000000) { - decode_fields32(ENC_ST4_ASISDLSE_R4, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_ST4_ASISDLSE_R4); - } - /* class iclass_post_index */ - /* 0|Q=x|0011001|L=0|0|Rm=xxxxx|opcode=0000|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0F000)==0xC800000) { - decode_fields32(ENC_ST4_ASISDLSEP_I4_I, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f) OK(ENC_ST4_ASISDLSEP_I4_I); - if(ctx->Rm!=0x1f) OK(ENC_ST4_ASISDLSEP_R4_R); - } - /* post-decode pcode */ - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->rpt = 1; - ctx->selem = 4; - if(((ctx->size<<1)|ctx->Q)==6 && ctx->selem!=1) { - EndOfDecode(Decode_UNDEF); - } - return rc; -} - -/* st4_advsimd_sngl.xml */ -int ST4_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 0|Q=x|0011010|L=0|R=1|0000|o2=0|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFF2000)==0xD202000) { - decode_fields32(ENC_ST4_ASISDLSO_B4_4B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->opcode==1) OK(ENC_ST4_ASISDLSO_B4_4B); - if(ctx->opcode==3 && !(ctx->size&1)) OK(ENC_ST4_ASISDLSO_H4_4H); - if(ctx->opcode==5 && ctx->size==0) OK(ENC_ST4_ASISDLSO_S4_4S); - if(ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_ST4_ASISDLSO_D4_4D); - } - /* class iclass_post_index */ - /* 0|Q=x|0011011|L=0|R=1|Rm=xxxxx|opcode=xx1|S=x|size=xx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE02000)==0xDA02000) { - decode_fields32(ENC_ST4_ASISDLSOP_B4_I4B, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->wback = TRUE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - if(ctx->Rm==0x1f && ctx->opcode==1) OK(ENC_ST4_ASISDLSOP_B4_I4B); - if(ctx->Rm!=0x1f && ctx->opcode==1) OK(ENC_ST4_ASISDLSOP_BX4_R4B); - if(ctx->Rm==0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_ST4_ASISDLSOP_H4_I4H); - if(ctx->Rm!=0x1f && ctx->opcode==3 && !(ctx->size&1)) OK(ENC_ST4_ASISDLSOP_HX4_R4H); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_ST4_ASISDLSOP_S4_I4S); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->size==0) OK(ENC_ST4_ASISDLSOP_SX4_R4S); - if(ctx->Rm==0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_ST4_ASISDLSOP_D4_I4D); - if(ctx->Rm!=0x1f && ctx->opcode==5 && ctx->S==0 && ctx->size==1) OK(ENC_ST4_ASISDLSOP_DX4_R4D); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* st64b.xml */ -int ST64B(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=11|11|1|VR=0|0|0|A=0|R=0|1|Rs=11111|o3=1|opc=001|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xF83F9000) { - decode_fields32(ENC_ST64B_64L_MEMOP, ctx, instr); - if(!HaveLS64()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,4,3)==3 || SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->withstatus = FALSE; - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_ST64B_64L_MEMOP); - } - return rc; -} - -/* st64bv.xml */ -int ST64BV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=11|11|1|VR=0|0|0|A=0|R=0|1|Rs=xxxxx|o3=1|opc=011|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xF820B000) { - decode_fields32(ENC_ST64BV_64_MEMOP, ctx, instr); - if(!HaveLS64_V()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,4,3)==3 || SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->withstatus = TRUE; - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_ST64BV_64_MEMOP); - } - return rc; -} - -/* st64bv0.xml */ -int ST64BV0(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=11|11|1|VR=0|0|0|A=0|R=0|1|Rs=xxxxx|o3=1|opc=010|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xF820A000) { - decode_fields32(ENC_ST64BV0_64_MEMOP, ctx, instr); - if(!HaveLS64_ACCDATA()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,4,3)==3 || SLICE(ctx->Rt,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->withstatus = TRUE; - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_ST64BV0_64_MEMOP); - } - return rc; -} - -/* staddb_ldaddb.xml */ -int STADDB_LDADDB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820001F) { - decode_fields32(ENC_STADDB_LDADDB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STADDB_LDADDB_32_MEMOP); - if(ctx->R==1) OK(ENC_STADDLB_LDADDLB_32_MEMOP); - } - return rc; -} - -/* staddh_ldaddh.xml */ -int STADDH_LDADDH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820001F) { - decode_fields32(ENC_STADDH_LDADDH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STADDH_LDADDH_32_MEMOP); - if(ctx->R==1) OK(ENC_STADDLH_LDADDLH_32_MEMOP); - } - return rc; -} - -/* stadd_ldadd.xml */ -int STADD_LDADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=000|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820001F) { - decode_fields32(ENC_STADD_LDADD_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STADD_LDADD_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STADDL_LDADDL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STADD_LDADD_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STADDL_LDADDL_64_MEMOP); - } - return rc; -} - -/* stbfadd.xml */ -int STBFADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=000|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3C20801F) { - decode_fields32(ENC_STBFADD_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->R==0) OK(ENC_STBFADD_16); - if(ctx->R==1) OK(ENC_STBFADDL_16); - } - return rc; -} - -/* stbfmax.xml */ -int STBFMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=100|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3C20C01F) { - decode_fields32(ENC_STBFMAX_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->R==0) OK(ENC_STBFMAX_16); - if(ctx->R==1) OK(ENC_STBFMAXL_16); - } - return rc; -} - -/* stbfmaxnm.xml */ -int STBFMAXNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=110|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3C20E01F) { - decode_fields32(ENC_STBFMAXNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->R==0) OK(ENC_STBFMAXNM_16); - if(ctx->R==1) OK(ENC_STBFMAXNML_16); - } - return rc; -} - -/* stbfmin.xml */ -int STBFMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=101|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3C20D01F) { - decode_fields32(ENC_STBFMIN_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->R==0) OK(ENC_STBFMIN_16); - if(ctx->R==1) OK(ENC_STBFMINL_16); - } - return rc; -} - -/* stbfminnm.xml */ -int STBFMINNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=00|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=111|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3C20F01F) { - decode_fields32(ENC_STBFMINNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->R==0) OK(ENC_STBFMINNM_16); - if(ctx->R==1) OK(ENC_STBFMINNML_16); - } - return rc; -} - -/* stclrb_ldclrb.xml */ -int STCLRB_LDCLRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820101F) { - decode_fields32(ENC_STCLRB_LDCLRB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STCLRB_LDCLRB_32_MEMOP); - if(ctx->R==1) OK(ENC_STCLRLB_LDCLRLB_32_MEMOP); - } - return rc; -} - -/* stclrh_ldclrh.xml */ -int STCLRH_LDCLRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820101F) { - decode_fields32(ENC_STCLRH_LDCLRH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STCLRH_LDCLRH_32_MEMOP); - if(ctx->R==1) OK(ENC_STCLRLH_LDCLRLH_32_MEMOP); - } - return rc; -} - -/* stclr_ldclr.xml */ -int STCLR_LDCLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=001|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820101F) { - decode_fields32(ENC_STCLR_LDCLR_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STCLR_LDCLR_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STCLRL_LDCLRL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STCLR_LDCLR_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STCLRL_LDCLRL_64_MEMOP); - } - return rc; -} - -/* stcph.xml */ -int STCPH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0110|op2=100|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503269F) { - decode_fields32(ENC_STCPH_HI_HINTS, ctx, instr); - if(!HaveCMH()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_STCPH_HI_HINTS); - } - return rc; -} - -/* steorb_ldeorb.xml */ -int STEORB_LDEORB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=010|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820201F) { - decode_fields32(ENC_STEORB_LDEORB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STEORB_LDEORB_32_MEMOP); - if(ctx->R==1) OK(ENC_STEORLB_LDEORLB_32_MEMOP); - } - return rc; -} - -/* steorh_ldeorh.xml */ -int STEORH_LDEORH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=010|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820201F) { - decode_fields32(ENC_STEORH_LDEORH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STEORH_LDEORH_32_MEMOP); - if(ctx->R==1) OK(ENC_STEORLH_LDEORLH_32_MEMOP); - } - return rc; -} - -/* steor_ldeor.xml */ -int STEOR_LDEOR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=010|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820201F) { - decode_fields32(ENC_STEOR_LDEOR_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STEOR_LDEOR_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STEORL_LDEORL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STEOR_LDEOR_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STEORL_LDEORL_64_MEMOP); - } - return rc; -} - -/* stfadd.xml */ -int STFADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=000|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0x3FA0FC1F)==0x3C20801F) { - decode_fields32(ENC_STFADD_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->R==0) OK(ENC_STFADD_16); - if(ctx->size==1 && ctx->R==1) OK(ENC_STFADDL_16); - if(ctx->size==2 && ctx->R==0) OK(ENC_STFADD_32); - if(ctx->size==2 && ctx->R==1) OK(ENC_STFADDL_32); - if(ctx->size==3 && ctx->R==0) OK(ENC_STFADD_64); - if(ctx->size==3 && ctx->R==1) OK(ENC_STFADDL_64); - } - return rc; -} - -/* stfmax.xml */ -int STFMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=100|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0x3FA0FC1F)==0x3C20C01F) { - decode_fields32(ENC_STFMAX_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->R==0) OK(ENC_STFMAX_16); - if(ctx->size==1 && ctx->R==1) OK(ENC_STFMAXL_16); - if(ctx->size==2 && ctx->R==0) OK(ENC_STFMAX_32); - if(ctx->size==2 && ctx->R==1) OK(ENC_STFMAXL_32); - if(ctx->size==3 && ctx->R==0) OK(ENC_STFMAX_64); - if(ctx->size==3 && ctx->R==1) OK(ENC_STFMAXL_64); - } - return rc; -} - -/* stfmaxnm.xml */ -int STFMAXNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=110|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0x3FA0FC1F)==0x3C20E01F) { - decode_fields32(ENC_STFMAXNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->R==0) OK(ENC_STFMAXNM_16); - if(ctx->size==1 && ctx->R==1) OK(ENC_STFMAXNML_16); - if(ctx->size==2 && ctx->R==0) OK(ENC_STFMAXNM_32); - if(ctx->size==2 && ctx->R==1) OK(ENC_STFMAXNML_32); - if(ctx->size==3 && ctx->R==0) OK(ENC_STFMAXNM_64); - if(ctx->size==3 && ctx->R==1) OK(ENC_STFMAXNML_64); - } - return rc; -} - -/* stfmin.xml */ -int STFMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=101|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0x3FA0FC1F)==0x3C20D01F) { - decode_fields32(ENC_STFMIN_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->R==0) OK(ENC_STFMIN_16); - if(ctx->size==1 && ctx->R==1) OK(ENC_STFMINL_16); - if(ctx->size==2 && ctx->R==0) OK(ENC_STFMIN_32); - if(ctx->size==2 && ctx->R==1) OK(ENC_STFMINL_32); - if(ctx->size==3 && ctx->R==0) OK(ENC_STFMIN_64); - if(ctx->size==3 && ctx->R==1) OK(ENC_STFMINL_64); - } - return rc; -} - -/* stfminnm.xml */ -int STFMINNM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* size=xx|111|VR=1|00|A=0|R=x|1|Rs=xxxxx|o3=1|opc=111|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0x3FA0FC1F)==0x3C20F01F) { - decode_fields32(ENC_STFMINNM_16, ctx, instr); - if(!HaveLSFE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->acquire = FALSE; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==1 && ctx->R==0) OK(ENC_STFMINNM_16); - if(ctx->size==1 && ctx->R==1) OK(ENC_STFMINNML_16); - if(ctx->size==2 && ctx->R==0) OK(ENC_STFMINNM_32); - if(ctx->size==2 && ctx->R==1) OK(ENC_STFMINNML_32); - if(ctx->size==3 && ctx->R==0) OK(ENC_STFMINNM_64); - if(ctx->size==3 && ctx->R==1) OK(ENC_STFMINNML_64); - } - return rc; -} - -/* stg.xml */ -int STG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* 1101|1|0|0|1|opc=00|1|imm9=xxxxxxxxx|op2=01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9200400) { - decode_fields32(ENC_STG_64SPOST_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = TRUE; - OK(ENC_STG_64SPOST_LDSTTAGS); - } - /* class iclass_pre_index */ - /* 1101|1|0|0|1|opc=00|1|imm9=xxxxxxxxx|op2=11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9200C00) { - decode_fields32(ENC_STG_64SPRE_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = FALSE; - OK(ENC_STG_64SPRE_LDSTTAGS); - } - /* class iclass_signed_offset */ - /* 1101|1|0|0|1|opc=00|1|imm9=xxxxxxxxx|op2=10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9200800) { - decode_fields32(ENC_STG_64SOFFSET_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = FALSE; - ctx->postindex = FALSE; - OK(ENC_STG_64SOFFSET_LDSTTAGS); - } - return rc; -} - -/* stgm.xml */ -int STGM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101|1|0|0|1|opc=10|1|imm9=000000000|op2=00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xD9A00000) { - decode_fields32(ENC_STGM_64BULK_LDSTTAGS, ctx, instr); - if(!HaveMTE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - OK(ENC_STGM_64BULK_LDSTTAGS); - } - return rc; -} - -/* stgp.xml */ -int STGP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=01|10|1|VR=0|0|01|L=0|simm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x68800000) { - decode_fields32(ENC_STGP_64_LDSTPAIR_POST, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->simm7,7),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = TRUE; - OK(ENC_STGP_64_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=01|10|1|VR=0|0|11|L=0|simm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x69800000) { - decode_fields32(ENC_STGP_64_LDSTPAIR_PRE, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->simm7,7),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = FALSE; - OK(ENC_STGP_64_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=01|10|1|VR=0|0|10|L=0|simm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x69000000) { - decode_fields32(ENC_STGP_64_LDSTPAIR_OFF, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->simm7,7),LOG2_TAG_GRANULE); - ctx->writeback = FALSE; - ctx->postindex = FALSE; - OK(ENC_STGP_64_LDSTPAIR_OFF); - } - return rc; -} - -/* stilp.xml */ -int STILP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|0110010|L=0|0|Rt2=xxxxx|opc2=000x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE0EC00)==0x99000800) { - decode_fields32(ENC_STILP_32SE_LDIAPPSTILP, ctx, instr); - if(!HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->ispair = TRUE; - ctx->wback = SLICE(ctx->opc2,0,0)==0; - if(ctx->size==2 && ctx->opc2==0) OK(ENC_STILP_32SE_LDIAPPSTILP); - if(ctx->size==2 && ctx->opc2==1) OK(ENC_STILP_32S_LDIAPPSTILP); - if(ctx->size==3 && ctx->opc2==0) OK(ENC_STILP_64SS_LDIAPPSTILP); - if(ctx->size==3 && ctx->opc2==1) OK(ENC_STILP_64S_LDIAPPSTILP); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->scale = 2+UINT(SLICE(ctx->size,0,0)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = (SLICE(ctx->opc2,0,0)==0)!=0 ? -(1) * (((2) << (ctx->scale))) : 0; - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPST); - // assert - // switch on constraint - } - return rc; -} - -/* stl1_advsimd_sngl.xml */ -int STL1_advsimd_sngl(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* 0|Q=x|00|1|1|0|10|L=0|R=0|0000|o2=1|opcode=100|S=0|size=01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0xD018400) { - decode_fields32(ENC_STL1_ASISDLSO_D1, ctx, instr); - if(!HaveAdvSIMD() || !HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = 0; - ctx->wback = FALSE; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - OK(ENC_STL1_ASISDLSO_D1); - } - /* post-decode pcode */ - ctx->scale = SLICE(ctx->opcode,2,1); - ctx->selem = UINT(((SLICE(ctx->opcode,0,0)<<1)|ctx->R))+1; - ctx->replicate = FALSE; - if(ctx->scale==3) { - if(ctx->L==0 || ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = ctx->size; - ctx->replicate = TRUE; - } - else if(!ctx->scale) { - ctx->index = UINT(((ctx->Q<<3)|(ctx->S<<2)|ctx->size)); - } - else if(ctx->scale==1) { - if(SLICE(ctx->size,0,0)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->Q<<2)|(ctx->S<<1)|SLICE(ctx->size,1,1))); - } - else if(ctx->scale==2) { - if(SLICE(ctx->size,1,1)==1) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - ctx->index = UINT(((ctx->Q<<1)|ctx->S)); - } - else { - if(ctx->S==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(ctx->Q); - ctx->scale = 3; - } - } - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->esize = (8) << (UINT(ctx->scale)); - return rc; -} - -/* stllr.xml */ -int STLLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010001|L=0|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88800000) { - decode_fields32(ENC_STLLR_SL32_LDSTORD, ctx, instr); - if(!HaveLOR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_STLLR_SL32_LDSTORD); - if(ctx->size==3) OK(ENC_STLLR_SL64_LDSTORD); - } - return rc; -} - -/* stllrb.xml */ -int STLLRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|01|L=0|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8800000) { - decode_fields32(ENC_STLLRB_SL32_LDSTORD, ctx, instr); - if(!HaveLOR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STLLRB_SL32_LDSTORD); - } - return rc; -} - -/* stllrh.xml */ -int STLLRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|01|L=0|0|Rs=(1)(1)(1)(1)(1)|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48800000) { - decode_fields32(ENC_STLLRH_SL32_LDSTORD, ctx, instr); - if(!HaveLOR()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STLLRH_SL32_LDSTORD); - } - return rc; -} - -/* stlp_gen.xml */ -int STLP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=11|01|1|0|0|10|L=0|0|Rt2=xxxxx|opc2=0101|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xD9005800) { - decode_fields32(ENC_STLP_64_LDIAPPSTILP, ctx, instr); - if(!HaveLSCP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->ispair = TRUE; - OK(ENC_STLP_64_LDIAPPSTILP); - } - return rc; -} - -/* stlr.xml */ -int STLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010001|L=0|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88808000) { - decode_fields32(ENC_STLR_SL32_LDSTORD, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->wback = FALSE; - ctx->offset = 0; - ctx->rt_unknown = FALSE; - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->elsize; - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_STLR_SL32_LDSTORD); - if(ctx->size==3) OK(ENC_STLR_SL64_LDSTORD); - } - /* class iclass_pre_index */ - /* size=1x|0110011|L=0|000000000010|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x99800800) { - decode_fields32(ENC_STLR_32S_LDAPSTL_WRITEBACK, ctx, instr); - if(!HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->offset = -(1) * (((1) << (UINT(ctx->size)))); - ctx->acquire = FALSE; - ctx->tagchecked = TRUE; - ctx->rt_unknown = FALSE; - if(ctx->n==ctx->t && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPST); - // assert - // switch on constraint - } - if(ctx->size==2) OK(ENC_STLR_32S_LDAPSTL_WRITEBACK); - if(ctx->size==3) OK(ENC_STLR_64S_LDAPSTL_WRITEBACK); - } - return rc; -} - -/* stlrb.xml */ -int STLRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|01|L=0|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8808000) { - decode_fields32(ENC_STLRB_SL32_LDSTORD, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STLRB_SL32_LDSTORD); - } - return rc; -} - -/* stlrh.xml */ -int STLRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|01|L=0|0|Rs=(1)(1)(1)(1)(1)|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48808000) { - decode_fields32(ENC_STLRH_SL32_LDSTORD, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STLRH_SL32_LDSTORD); - } - return rc; -} - -/* stltxr.xml */ -int STLTXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010010|L=0|0|Rs=xxxxx|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x89008000) { - decode_fields32(ENC_STLTXR_SR32_LDSTEXCLR_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->acqrel = TRUE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - if(ctx->sz==0) OK(ENC_STLTXR_SR32_LDSTEXCLR_UNPRIV); - if(ctx->sz==1) OK(ENC_STLTXR_SR64_LDSTEXCLR_UNPRIV); - } - return rc; -} - -/* stlurb.xml */ -int STLURB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|01|1|0|0|1|opc=00|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x19000000) { - decode_fields32(ENC_STLURB_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend(ctx->imm9,9); - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 8; - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STLURB_32_LDAPSTL_UNSCALED); - } - return rc; -} - -/* stlurh.xml */ -int STLURH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|01|1|0|0|1|opc=00|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x59000000) { - decode_fields32(ENC_STLURH_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->offset = SignExtend(ctx->imm9,9); - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 0x10; - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STLURH_32_LDAPSTL_UNSCALED); - } - return rc; -} - -/* stlur_fpsimd.xml */ -int STLUR_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=xx|011101|opc=x0|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x1D000800) { - decode_fields32(ENC_STLUR_B_LDAPSTL_SIMD, ctx, instr); - if(!HaveFP() || !HaveLRCPC3()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==0) OK(ENC_STLUR_B_LDAPSTL_SIMD); - if(ctx->size==1 && ctx->opc==0) OK(ENC_STLUR_H_LDAPSTL_SIMD); - if(ctx->size==2 && ctx->opc==0) OK(ENC_STLUR_S_LDAPSTL_SIMD); - if(ctx->size==3 && ctx->opc==0) OK(ENC_STLUR_D_LDAPSTL_SIMD); - if(ctx->size==0 && ctx->opc==2) OK(ENC_STLUR_Q_LDAPSTL_SIMD); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* stlur_gen.xml */ -int STLUR_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=1x|011001|opc=00|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0x99000000) { - decode_fields32(ENC_STLUR_32_LDAPSTL_UNSCALED, ctx, instr); - if(!HaveLRCPC2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = (8) << (ctx->scale); - ctx->acquire = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2) OK(ENC_STLUR_32_LDAPSTL_UNSCALED); - if(ctx->size==3) OK(ENC_STLUR_64_LDAPSTL_UNSCALED); - } - return rc; -} - -/* stlxp.xml */ -int STLXP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010000|L=0|1|Rs=xxxxx|o0=1|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88208000) { - decode_fields32(ENC_STLXP_SP32_LDSTEXCLP, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->elsize) * (2); - ctx->acqrel = TRUE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t || (ctx->s==ctx->t2)) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - if(ctx->sz==0) OK(ENC_STLXP_SP32_LDSTEXCLP); - if(ctx->sz==1) OK(ENC_STLXP_SP64_LDSTEXCLP); - } - return rc; -} - -/* stlxr.xml */ -int STLXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010000|L=0|0|Rs=xxxxx|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88008000) { - decode_fields32(ENC_STLXR_SR32_LDSTEXCLR, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->acqrel = TRUE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - if(ctx->size==2) OK(ENC_STLXR_SR32_LDSTEXCLR); - if(ctx->size==3) OK(ENC_STLXR_SR64_LDSTEXCLR); - } - return rc; -} - -/* stlxrb.xml */ -int STLXRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|00|L=0|0|Rs=xxxxx|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8008000) { - decode_fields32(ENC_STLXRB_SR32_LDSTEXCLR, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = TRUE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - OK(ENC_STLXRB_SR32_LDSTEXCLR); - } - return rc; -} - -/* stlxrh.xml */ -int STLXRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|00|L=0|0|Rs=xxxxx|o0=1|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48008000) { - decode_fields32(ENC_STLXRH_SR32_LDSTEXCLR, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = TRUE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - OK(ENC_STLXRH_SR32_LDSTEXCLR); - } - return rc; -} - -/* stnp_fpsimd.xml */ -int STNP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=xx|101|VR=1|000|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2C000000) { - decode_fields32(ENC_STNP_S_LDSTNAPAIR_OFFS, ctx, instr); - if(ctx->opc==0) OK(ENC_STNP_S_LDSTNAPAIR_OFFS); - if(ctx->opc==1) OK(ENC_STNP_D_LDSTNAPAIR_OFFS); - if(ctx->opc==2) OK(ENC_STNP_Q_LDSTNAPAIR_OFFS); - } - /* post-decode pcode */ - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->scale = 2+(UINT(ctx->opc)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* stnp_gen.xml */ -int STNP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=x0|101|VR=0|000|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x28000000) { - decode_fields32(ENC_STNP_32_LDSTNAPAIR_OFFS, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->opc==0) OK(ENC_STNP_32_LDSTNAPAIR_OFFS); - if(ctx->opc==2) OK(ENC_STNP_64_LDSTNAPAIR_OFFS); - } - return rc; -} - -/* stp_fpsimd.xml */ -int STP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=xx|101|VR=1|001|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2C800000) { - decode_fields32(ENC_STP_S_LDSTPAIR_POST, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = TRUE; - if(ctx->opc==0) OK(ENC_STP_S_LDSTPAIR_POST); - if(ctx->opc==1) OK(ENC_STP_D_LDSTPAIR_POST); - if(ctx->opc==2) OK(ENC_STP_Q_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=xx|101|VR=1|011|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2D800000) { - decode_fields32(ENC_STP_S_LDSTPAIR_PRE, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = FALSE; - if(ctx->opc==0) OK(ENC_STP_S_LDSTPAIR_PRE); - if(ctx->opc==1) OK(ENC_STP_D_LDSTPAIR_PRE); - if(ctx->opc==2) OK(ENC_STP_Q_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=xx|101|VR=1|010|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3FC00000)==0x2D000000) { - decode_fields32(ENC_STP_S_LDSTPAIR_OFF, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = FALSE; - ctx->postindex = FALSE; - if(ctx->opc==0) OK(ENC_STP_S_LDSTPAIR_OFF); - if(ctx->opc==1) OK(ENC_STP_D_LDSTPAIR_OFF); - if(ctx->opc==2) OK(ENC_STP_Q_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->scale = 2+(UINT(ctx->opc)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - return rc; -} - -/* stp_gen.xml */ -int STP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=x0|101|VR=0|001|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x28800000) { - decode_fields32(ENC_STP_32_LDSTPAIR_POST, ctx, instr); - if(ctx->opc==0) OK(ENC_STP_32_LDSTPAIR_POST); - if(ctx->opc==2) OK(ENC_STP_64_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=x0|101|VR=0|011|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x29800000) { - decode_fields32(ENC_STP_32_LDSTPAIR_PRE, ctx, instr); - if(ctx->opc==0) OK(ENC_STP_32_LDSTPAIR_PRE); - if(ctx->opc==2) OK(ENC_STP_64_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=x0|101|VR=0|010|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x7FC00000)==0x29000000) { - decode_fields32(ENC_STP_32_LDSTPAIR_OFF, ctx, instr); - if(ctx->opc==0) OK(ENC_STP_32_LDSTPAIR_OFF); - if(ctx->opc==2) OK(ENC_STP_64_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); - ctx->datasize = (8) << (ctx->scale); - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPST); - // assert - // switch on constraint - } - return rc; -} - -/* strb_imm.xml */ -int STRB_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=00|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38000400) { - decode_fields32(ENC_STRB_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STRB_32_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=00|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38000C00) { - decode_fields32(ENC_STRB_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STRB_32_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=00|11|1|VR=0|0|1|opc=00|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x39000000) { - decode_fields32(ENC_STRB_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),0); - OK(ENC_STRB_32_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* strb_reg.xml */ -int STRB_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* size=00|111|VR=0|00|opc=00|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38200800) { - decode_fields32(ENC_STRB_32B_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = 0; - if(ctx->option!=3) OK(ENC_STRB_32B_LDST_REGOFF); - if(ctx->option==3) OK(ENC_STRB_32BL_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* strh_imm.xml */ -int STRH_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=01|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78000400) { - decode_fields32(ENC_STRH_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STRH_32_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=01|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78000C00) { - decode_fields32(ENC_STRH_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STRH_32_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=01|11|1|VR=0|0|1|opc=00|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0x79000000) { - decode_fields32(ENC_STRH_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),1); - OK(ENC_STRH_32_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* strh_reg.xml */ -int STRH_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* size=01|11|1|VR=0|0|0|opc=00|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78200800) { - decode_fields32(ENC_STRH_32_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = (ctx->S==1)!=0 ? 1 : 0; - OK(ENC_STRH_32_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* str_imm_fpsimd.xml */ -int STR_imm_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=xx|111|VR=1|00|opc=x0|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C000400) { - decode_fields32(ENC_STR_B_LDST_IMMPOST, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==0) OK(ENC_STR_B_LDST_IMMPOST); - if(ctx->size==1 && ctx->opc==0) OK(ENC_STR_H_LDST_IMMPOST); - if(ctx->size==2 && ctx->opc==0) OK(ENC_STR_S_LDST_IMMPOST); - if(ctx->size==3 && ctx->opc==0) OK(ENC_STR_D_LDST_IMMPOST); - if(ctx->size==0 && ctx->opc==2) OK(ENC_STR_Q_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=xx|111|VR=1|00|opc=x0|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C000C00) { - decode_fields32(ENC_STR_B_LDST_IMMPRE, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==0) OK(ENC_STR_B_LDST_IMMPRE); - if(ctx->size==1 && ctx->opc==0) OK(ENC_STR_H_LDST_IMMPRE); - if(ctx->size==2 && ctx->opc==0) OK(ENC_STR_S_LDST_IMMPRE); - if(ctx->size==3 && ctx->opc==0) OK(ENC_STR_D_LDST_IMMPRE); - if(ctx->size==0 && ctx->opc==2) OK(ENC_STR_Q_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=xx|111|VR=1|01|opc=x0|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F400000)==0x3D000000) { - decode_fields32(ENC_STR_B_LDST_POS, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),ctx->scale); - if(ctx->size==0 && ctx->opc==0) OK(ENC_STR_B_LDST_POS); - if(ctx->size==1 && ctx->opc==0) OK(ENC_STR_H_LDST_POS); - if(ctx->size==2 && ctx->opc==0) OK(ENC_STR_S_LDST_POS); - if(ctx->size==3 && ctx->opc==0) OK(ENC_STR_D_LDST_POS); - if(ctx->size==0 && ctx->opc==2) OK(ENC_STR_Q_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - return rc; -} - -/* str_imm_gen.xml */ -int STR_imm_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* size=1x|111|VR=0|00|opc=00|0|imm9=xxxxxxxxx|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8000400) { - decode_fields32(ENC_STR_32_LDST_IMMPOST, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = TRUE; - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_STR_32_LDST_IMMPOST); - if(ctx->size==3) OK(ENC_STR_64_LDST_IMMPOST); - } - /* class iclass_pre_index */ - /* size=1x|111|VR=0|00|opc=00|0|imm9=xxxxxxxxx|11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8000C00) { - decode_fields32(ENC_STR_32_LDST_IMMPRE, ctx, instr); - ctx->wback = TRUE; - ctx->postindex = FALSE; - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_STR_32_LDST_IMMPRE); - if(ctx->size==3) OK(ENC_STR_64_LDST_IMMPRE); - } - /* class iclass_unsigned_offset */ - /* size=1x|111|VR=0|01|opc=00|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFC00000)==0xB9000000) { - decode_fields32(ENC_STR_32_LDST_POS, ctx, instr); - ctx->wback = FALSE; - ctx->postindex = FALSE; - ctx->scale = UINT(ctx->size); - ctx->offset = LSL(ZeroExtend(ctx->imm12,0x40),ctx->scale); - if(ctx->size==2) OK(ENC_STR_32_LDST_POS); - if(ctx->size==3) OK(ENC_STR_64_LDST_POS); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->wback && ctx->n==ctx->t && ctx->n!=0x1f) { - // assignment from ConstrainUnpredictable() - // assert - // switch on constraint - } - return rc; -} - -/* str_reg_fpsimd.xml */ -int STR_reg_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_simd_fp_registers */ - /* size=xx|111|VR=1|00|opc=x0|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C200800) { - decode_fields32(ENC_STR_B_LDST_REGOFF, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->shift = (ctx->S==1)!=0 ? ctx->scale : 0; - if(ctx->size==0 && ctx->opc==0 && ctx->option!=3) OK(ENC_STR_B_LDST_REGOFF); - if(ctx->size==0 && ctx->opc==0 && ctx->option==3) OK(ENC_STR_BL_LDST_REGOFF); - if(ctx->size==1 && ctx->opc==0) OK(ENC_STR_H_LDST_REGOFF); - if(ctx->size==2 && ctx->opc==0) OK(ENC_STR_S_LDST_REGOFF); - if(ctx->size==3 && ctx->opc==0) OK(ENC_STR_D_LDST_REGOFF); - if(ctx->size==0 && ctx->opc==2) OK(ENC_STR_Q_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* str_reg_gen.xml */ -int STR_reg_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|opc=00|1|Rm=xxxxx|option=xxx|S=x|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8200800) { - decode_fields32(ENC_STR_32_LDST_REGOFF, ctx, instr); - if(SLICE(ctx->option,1,1)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->extend_type = DecodeRegExtend(ctx->option); - ctx->scale = UINT(ctx->size); - ctx->shift = (ctx->S==1)!=0 ? ctx->scale : 0; - if(ctx->size==2) OK(ENC_STR_32_LDST_REGOFF); - if(ctx->size==3) OK(ENC_STR_64_LDST_REGOFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = TRUE; - return rc; -} - -/* stsetb_ldsetb.xml */ -int STSETB_LDSETB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820301F) { - decode_fields32(ENC_STSETB_LDSETB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STSETB_LDSETB_32_MEMOP); - if(ctx->R==1) OK(ENC_STSETLB_LDSETLB_32_MEMOP); - } - return rc; -} - -/* stseth_ldseth.xml */ -int STSETH_LDSETH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820301F) { - decode_fields32(ENC_STSETH_LDSETH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STSETH_LDSETH_32_MEMOP); - if(ctx->R==1) OK(ENC_STSETLH_LDSETLH_32_MEMOP); - } - return rc; -} - -/* stset_ldset.xml */ -int STSET_LDSET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=011|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820301F) { - decode_fields32(ENC_STSET_LDSET_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STSET_LDSET_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STSETL_LDSETL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STSET_LDSET_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STSETL_LDSETL_64_MEMOP); - } - return rc; -} - -/* stshh.xml */ -int STSHH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0110|op2=00x|11111 */ - if((INSWORD & 0xFFFFFFDF)==0xD503261F) { - decode_fields32(ENC_STSHH_HI_HINTS, ctx, instr); - if(!HavePCDPHINT()) { - EndOfDecode(Decode_NOP); - } - ctx->stream = SLICE(ctx->op2,0,0)==1; - OK(ENC_STSHH_HI_HINTS); - } - return rc; -} - -/* stsmaxb_ldsmaxb.xml */ -int STSMAXB_LDSMAXB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820401F) { - decode_fields32(ENC_STSMAXB_LDSMAXB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STSMAXB_LDSMAXB_32_MEMOP); - if(ctx->R==1) OK(ENC_STSMAXLB_LDSMAXLB_32_MEMOP); - } - return rc; -} - -/* stsmaxh_ldsmaxh.xml */ -int STSMAXH_LDSMAXH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820401F) { - decode_fields32(ENC_STSMAXH_LDSMAXH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STSMAXH_LDSMAXH_32_MEMOP); - if(ctx->R==1) OK(ENC_STSMAXLH_LDSMAXLH_32_MEMOP); - } - return rc; -} - -/* stsmax_ldsmax.xml */ -int STSMAX_LDSMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=100|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820401F) { - decode_fields32(ENC_STSMAX_LDSMAX_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STSMAX_LDSMAX_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STSMAXL_LDSMAXL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STSMAX_LDSMAX_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STSMAXL_LDSMAXL_64_MEMOP); - } - return rc; -} - -/* stsminb_ldsminb.xml */ -int STSMINB_LDSMINB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820501F) { - decode_fields32(ENC_STSMINB_LDSMINB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STSMINB_LDSMINB_32_MEMOP); - if(ctx->R==1) OK(ENC_STSMINLB_LDSMINLB_32_MEMOP); - } - return rc; -} - -/* stsminh_ldsminh.xml */ -int STSMINH_LDSMINH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820501F) { - decode_fields32(ENC_STSMINH_LDSMINH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STSMINH_LDSMINH_32_MEMOP); - if(ctx->R==1) OK(ENC_STSMINLH_LDSMINLH_32_MEMOP); - } - return rc; -} - -/* stsmin_ldsmin.xml */ -int STSMIN_LDSMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=101|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820501F) { - decode_fields32(ENC_STSMIN_LDSMIN_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STSMIN_LDSMIN_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STSMINL_LDSMINL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STSMIN_LDSMIN_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STSMINL_LDSMINL_64_MEMOP); - } - return rc; -} - -/* sttadd_ldtadd.xml */ -int STTADD_LDTADD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|sz=x|011001|A=0|R=x|1|Rs=xxxxx|o3=0|opc=000|01|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0x1920041F) { - decode_fields32(ENC_STTADD_LDTADD_32_MEMOP_UNPRIV, ctx, instr); - if(ctx->sz==0 && ctx->R==0) OK(ENC_STTADD_LDTADD_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->R==1) OK(ENC_STTADDL_LDTADDL_32_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->R==0) OK(ENC_STTADD_LDTADD_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->R==1) OK(ENC_STTADDL_LDTADDL_64_MEMOP_UNPRIV); - } - return rc; -} - -/* sttclr_ldtclr.xml */ -int STTCLR_LDTCLR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|sz=x|011001|A=0|R=x|1|Rs=xxxxx|o3=0|opc=001|01|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0x1920141F) { - decode_fields32(ENC_STTCLR_LDTCLR_32_MEMOP_UNPRIV, ctx, instr); - if(ctx->sz==0 && ctx->R==0) OK(ENC_STTCLR_LDTCLR_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->R==1) OK(ENC_STTCLRL_LDTCLRL_32_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->R==0) OK(ENC_STTCLR_LDTCLR_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->R==1) OK(ENC_STTCLRL_LDTCLRL_64_MEMOP_UNPRIV); - } - return rc; -} - -/* sttnp_fpsimd.xml */ -int STTNP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=1|0|00|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xEC000000) { - decode_fields32(ENC_STTNP_Q_LDSTNAPAIR_OFFS, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->datasize = 0x80; - ctx->offset = LSL(SignExtend(ctx->imm7,7),4); - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STTNP_Q_LDSTNAPAIR_OFFS); - } - return rc; -} - -/* sttnp_gen.xml */ -int STTNP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=0|0|00|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE8000000) { - decode_fields32(ENC_STTNP_64_LDSTNAPAIR_OFFS, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = TRUE; - ctx->datasize = 0x40; - ctx->offset = LSL(SignExtend(ctx->imm7,7),3); - ctx->tagchecked = ctx->n!=0x1f; - OK(ENC_STTNP_64_LDSTNAPAIR_OFFS); - } - return rc; -} - -/* sttp_fpsimd.xml */ -int STTP_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=11|10|1|VR=1|0|01|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xEC800000) { - decode_fields32(ENC_STTP_Q_LDSTPAIR_POST, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = TRUE; - OK(ENC_STTP_Q_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=11|10|1|VR=1|0|11|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xED800000) { - decode_fields32(ENC_STTP_Q_LDSTPAIR_PRE, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = FALSE; - OK(ENC_STTP_Q_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=1|0|10|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xED000000) { - decode_fields32(ENC_STTP_Q_LDSTPAIR_OFF, ctx, instr); - if(!HaveFP() || !HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = FALSE; - ctx->postindex = FALSE; - OK(ENC_STTP_Q_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->datasize = 0x80; - ctx->offset = LSL(SignExtend(ctx->imm7,7),4); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - return rc; -} - -/* sttp_gen.xml */ -int STTP_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* opc=11|10|1|VR=0|0|01|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE8800000) { - decode_fields32(ENC_STTP_64_LDSTPAIR_POST, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = TRUE; - OK(ENC_STTP_64_LDSTPAIR_POST); - } - /* class iclass_pre_index */ - /* opc=11|10|1|VR=0|0|11|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE9800000) { - decode_fields32(ENC_STTP_64_LDSTPAIR_PRE, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = TRUE; - ctx->postindex = FALSE; - OK(ENC_STTP_64_LDSTPAIR_PRE); - } - /* class iclass_signed_offset */ - /* opc=11|10|1|VR=0|0|10|L=0|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFC00000)==0xE9000000) { - decode_fields32(ENC_STTP_64_LDSTPAIR_OFF, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->wback = FALSE; - ctx->postindex = FALSE; - OK(ENC_STTP_64_LDSTPAIR_OFF); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->nontemporal = FALSE; - ctx->scale = 2+UINT(SLICE(ctx->opc,1,1)); - ctx->datasize = 0x40; - ctx->offset = LSL(SignExtend(ctx->imm7,7),ctx->scale); - ctx->tagchecked = ctx->wback || ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->wback && (ctx->t==ctx->n || ctx->t2==ctx->n) && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_WBOVERLAPST); - // assert - // switch on constraint - } - return rc; -} - -/* sttr.xml */ -int STTR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=1x|111|VR=0|00|opc=00|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8000800) { - decode_fields32(ENC_STTR_32_LDST_UNPRIV, ctx, instr); - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_STTR_32_LDST_UNPRIV); - if(ctx->size==3) OK(ENC_STTR_64_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* sttrb.xml */ -int STTRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38000800) { - decode_fields32(ENC_STTRB_32_LDST_UNPRIV, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STTRB_32_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 8; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* sttrh.xml */ -int STTRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78000800) { - decode_fields32(ENC_STTRH_32_LDST_UNPRIV, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STTRH_32_LDST_UNPRIV); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = 0x10; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* sttset_ldtset.xml */ -int STTSET_LDTSET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|sz=x|011001|A=0|R=x|1|Rs=xxxxx|o3=0|opc=011|01|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0x1920341F) { - decode_fields32(ENC_STTSET_LDTSET_32_MEMOP_UNPRIV, ctx, instr); - if(ctx->sz==0 && ctx->R==0) OK(ENC_STTSET_LDTSET_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->R==1) OK(ENC_STTSETL_LDTSETL_32_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->R==0) OK(ENC_STTSET_LDTSET_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->R==1) OK(ENC_STTSETL_LDTSETL_64_MEMOP_UNPRIV); - } - return rc; -} - -/* sttxr.xml */ -int STTXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010010|L=0|0|Rs=xxxxx|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x89000000) { - decode_fields32(ENC_STTXR_SR32_LDSTEXCLR_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - if(ctx->sz==0) OK(ENC_STTXR_SR32_LDSTEXCLR_UNPRIV); - if(ctx->sz==1) OK(ENC_STTXR_SR64_LDSTEXCLR_UNPRIV); - } - return rc; -} - -/* stumaxb_ldumaxb.xml */ -int STUMAXB_LDUMAXB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820601F) { - decode_fields32(ENC_STUMAXB_LDUMAXB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STUMAXB_LDUMAXB_32_MEMOP); - if(ctx->R==1) OK(ENC_STUMAXLB_LDUMAXLB_32_MEMOP); - } - return rc; -} - -/* stumaxh_ldumaxh.xml */ -int STUMAXH_LDUMAXH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820601F) { - decode_fields32(ENC_STUMAXH_LDUMAXH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STUMAXH_LDUMAXH_32_MEMOP); - if(ctx->R==1) OK(ENC_STUMAXLH_LDUMAXLH_32_MEMOP); - } - return rc; -} - -/* stumax_ldumax.xml */ -int STUMAX_LDUMAX(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=110|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820601F) { - decode_fields32(ENC_STUMAX_LDUMAX_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STUMAX_LDUMAX_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STUMAXL_LDUMAXL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STUMAX_LDUMAX_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STUMAXL_LDUMAXL_64_MEMOP); - } - return rc; -} - -/* stuminb_lduminb.xml */ -int STUMINB_LDUMINB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x3820701F) { - decode_fields32(ENC_STUMINB_LDUMINB_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STUMINB_LDUMINB_32_MEMOP); - if(ctx->R==1) OK(ENC_STUMINLB_LDUMINLB_32_MEMOP); - } - return rc; -} - -/* stuminh_lduminh.xml */ -int STUMINH_LDUMINH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xFFA0FC1F)==0x7820701F) { - decode_fields32(ENC_STUMINH_LDUMINH_32_MEMOP, ctx, instr); - if(ctx->R==0) OK(ENC_STUMINH_LDUMINH_32_MEMOP); - if(ctx->R==1) OK(ENC_STUMINLH_LDUMINLH_32_MEMOP); - } - return rc; -} - -/* stumin_ldumin.xml */ -int STUMIN_LDUMIN(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=0|R=x|1|Rs=xxxxx|o3=0|opc=111|00|Rn=xxxxx|Rt=11111 */ - if((INSWORD & 0xBFA0FC1F)==0xB820701F) { - decode_fields32(ENC_STUMIN_LDUMIN_32_MEMOP, ctx, instr); - if(ctx->size==2 && ctx->R==0) OK(ENC_STUMIN_LDUMIN_32_MEMOP); - if(ctx->size==2 && ctx->R==1) OK(ENC_STUMINL_LDUMINL_32_MEMOP); - if(ctx->size==3 && ctx->R==0) OK(ENC_STUMIN_LDUMIN_64_MEMOP); - if(ctx->size==3 && ctx->R==1) OK(ENC_STUMINL_LDUMINL_64_MEMOP); - } - return rc; -} - -/* sturb.xml */ -int STURB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=00|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x38000000) { - decode_fields32(ENC_STURB_32_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STURB_32_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 8; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* sturh.xml */ -int STURH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=01|11|1|VR=0|0|0|opc=00|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0x78000000) { - decode_fields32(ENC_STURH_32_LDST_UNSCALED, ctx, instr); - ctx->offset = SignExtend(ctx->imm9,9); - OK(ENC_STURH_32_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = 0x10; - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* stur_fpsimd.xml */ -int STUR_fpsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=xx|111|VR=1|00|opc=x0|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0x3F600C00)==0x3C000000) { - decode_fields32(ENC_STUR_B_LDST_UNSCALED, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->opc,1,1)==1 && ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->scale = (SLICE(ctx->opc,1,1)==1)!=0 ? 4 : UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==0 && ctx->opc==0) OK(ENC_STUR_B_LDST_UNSCALED); - if(ctx->size==1 && ctx->opc==0) OK(ENC_STUR_H_LDST_UNSCALED); - if(ctx->size==2 && ctx->opc==0) OK(ENC_STUR_S_LDST_UNSCALED); - if(ctx->size==3 && ctx->opc==0) OK(ENC_STUR_D_LDST_UNSCALED); - if(ctx->size==0 && ctx->opc==2) OK(ENC_STUR_Q_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* stur_gen.xml */ -int STUR_gen(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_unscaled_offset */ - /* size=1x|111|VR=0|00|opc=00|0|imm9=xxxxxxxxx|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE00C00)==0xB8000000) { - decode_fields32(ENC_STUR_32_LDST_UNSCALED, ctx, instr); - ctx->scale = UINT(ctx->size); - ctx->offset = SignExtend(ctx->imm9,9); - if(ctx->size==2) OK(ENC_STUR_32_LDST_UNSCALED); - if(ctx->size==3) OK(ENC_STUR_64_LDST_UNSCALED); - } - /* post-decode pcode */ - ctx->n = UINT(ctx->Rn); - ctx->t = UINT(ctx->Rt); - ctx->datasize = (8) << (ctx->scale); - ctx->nontemporal = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - return rc; -} - -/* stxp.xml */ -int STXP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* 1|sz=x|0010000|L=0|1|Rs=xxxxx|o0=0|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88200000) { - decode_fields32(ENC_STXP_SP32_LDSTEXCLP, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (ctx->elsize) * (2); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t || (ctx->s==ctx->t2)) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - if(ctx->sz==0) OK(ENC_STXP_SP32_LDSTEXCLP); - if(ctx->sz==1) OK(ENC_STXP_SP64_LDSTEXCLP); - } - return rc; -} - -/* stxr.xml */ -int STXR(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=1x|0010000|L=0|0|Rs=xxxxx|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBFE08000)==0x88000000) { - decode_fields32(ENC_STXR_SR32_LDSTEXCLR, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->elsize = (8) << (UINT(ctx->size)); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - if(ctx->size==2) OK(ENC_STXR_SR32_LDSTEXCLR); - if(ctx->size==3) OK(ENC_STXR_SR64_LDSTEXCLR); - } - return rc; -} - -/* stxrb.xml */ -int STXRB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=00|00|1|0|0|00|L=0|0|Rs=xxxxx|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x8000000) { - decode_fields32(ENC_STXRB_SR32_LDSTEXCLR, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - OK(ENC_STXRB_SR32_LDSTEXCLR); - } - return rc; -} - -/* stxrh.xml */ -int STXRH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_no_offset */ - /* size=01|00|1|0|0|00|L=0|0|Rs=xxxxx|o0=0|Rt2=(1)(1)(1)(1)(1)|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE08000)==0x48000000) { - decode_fields32(ENC_STXRH_SR32_LDSTEXCLR, ctx, instr); - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acqrel = FALSE; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - ctx->rn_unknown = FALSE; - if(ctx->s==ctx->t) { - ctx->c = ConstrainUnpredictable(Unpredictable_DATAOVERLAP); - // assert - // switch on constraint - } - if(ctx->s==ctx->n && ctx->n!=0x1f) { - ctx->c = ConstrainUnpredictable(Unpredictable_BASEOVERLAP); - // assert - // switch on constraint - } - OK(ENC_STXRH_SR32_LDSTEXCLR); - } - return rc; -} - -/* stz2g.xml */ -int STZ2G(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* 1101|1|0|0|1|opc=11|1|imm9=xxxxxxxxx|op2=01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9E00400) { - decode_fields32(ENC_STZ2G_64SPOST_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = TRUE; - OK(ENC_STZ2G_64SPOST_LDSTTAGS); - } - /* class iclass_pre_index */ - /* 1101|1|0|0|1|opc=11|1|imm9=xxxxxxxxx|op2=11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9E00C00) { - decode_fields32(ENC_STZ2G_64SPRE_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = FALSE; - OK(ENC_STZ2G_64SPRE_LDSTTAGS); - } - /* class iclass_signed_offset */ - /* 1101|1|0|0|1|opc=11|1|imm9=xxxxxxxxx|op2=10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9E00800) { - decode_fields32(ENC_STZ2G_64SOFFSET_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = FALSE; - ctx->postindex = FALSE; - OK(ENC_STZ2G_64SOFFSET_LDSTTAGS); - } - return rc; -} - -/* stzg.xml */ -int STZG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_post_index */ - /* 1101|1|0|0|1|opc=01|1|imm9=xxxxxxxxx|op2=01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9600400) { - decode_fields32(ENC_STZG_64SPOST_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = TRUE; - OK(ENC_STZG_64SPOST_LDSTTAGS); - } - /* class iclass_pre_index */ - /* 1101|1|0|0|1|opc=01|1|imm9=xxxxxxxxx|op2=11|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9600C00) { - decode_fields32(ENC_STZG_64SPRE_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = TRUE; - ctx->postindex = FALSE; - OK(ENC_STZG_64SPRE_LDSTTAGS); - } - /* class iclass_signed_offset */ - /* 1101|1|0|0|1|opc=01|1|imm9=xxxxxxxxx|op2=10|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFE00C00)==0xD9600800) { - decode_fields32(ENC_STZG_64SOFFSET_LDSTTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->offset = LSL(SignExtend(ctx->imm9,9),LOG2_TAG_GRANULE); - ctx->writeback = FALSE; - ctx->postindex = FALSE; - OK(ENC_STZG_64SOFFSET_LDSTTAGS); - } - return rc; -} - -/* stzgm.xml */ -int STZGM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 1101|1|0|0|1|opc=00|1|imm9=000000000|op2=00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xD9200000) { - decode_fields32(ENC_STZGM_64BULK_LDSTTAGS, ctx, instr); - if(!HaveMTE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - OK(ENC_STZGM_64BULK_LDSTTAGS); - } - return rc; -} - -/* subg.xml */ -int SUBG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|op=1|S=0|100|0110|imm6=xxxxxx|op3=(0)(0)|imm4=xxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC00000)==0xD1800000) { - decode_fields32(ENC_SUBG_64_ADDSUB_IMMTAGS, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->tag_offset = ctx->imm4; - ctx->offset = LSL(ZeroExtend(ctx->imm6,0x40),LOG2_TAG_GRANULE); - OK(ENC_SUBG_64_ADDSUB_IMMTAGS); - } - return rc; -} - -/* subhn_advsimd.xml */ -int SUBHN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=0|0|111|0|size=xx|1|Rm=xxxxx|01|o1=1|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE206000) { - decode_fields32(ENC_SUBHN_ASIMDDIFF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->round = FALSE; - OK(ENC_SUBHN_ASIMDDIFF_N); - } - return rc; -} - -/* subp.xml */ -int SUBP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|0|S=0|1|101|0110|Rm=xxxxx|opcode=000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9AC00000) { - decode_fields32(ENC_SUBP_64S_DP_2SRC, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_SUBP_64S_DP_2SRC); - } - return rc; -} - -/* subps.xml */ -int SUBPS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|0|S=1|1|101|0110|Rm=xxxxx|opcode=000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0xBAC00000) { - decode_fields32(ENC_SUBPS_64S_DP_2SRC, ctx, instr); - if(!HaveMTE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - /* regular aliases */ - if(ctx->S==1 && ctx->Rd==0x1f) return CMPP_SUBPS(ctx, instr); - OK(ENC_SUBPS_64S_DP_2SRC); - } - return rc; -} - -/* subpt.xml */ -int SUBPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|op=1|S=0|1|101|0000|Rm=xxxxx|001|imm3=xxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xDA002000) { - decode_fields32(ENC_SUBPT_64_ADDSUB_PT, ctx, instr); - if(!HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->shift = UINT(ctx->imm3); - OK(ENC_SUBPT_64_ADDSUB_PT); - } - return rc; -} - -/* subs_addsub_ext.xml */ -int SUBS_addsub_ext(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|01011|opt=00|1|Rm=xxxxx|option=xxx|imm3=xxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00000)==0x6B200000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_SUBS_32S_ADDSUB_EXT, ctx, instr); - if((ctx->imm3==5 || ctx->imm3==6 || ctx->imm3==7)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->shift = UINT(ctx->imm3); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->extend_type = DecodeRegExtend(ctx->option); - /* regular aliases */ - if(ctx->Rd==0x1f) return CMP_SUBS_addsub_ext(ctx, instr); - if(ctx->sf==0) OK(ENC_SUBS_32S_ADDSUB_EXT); - if(ctx->sf==1) OK(ENC_SUBS_64S_ADDSUB_EXT); - } - return rc; -} - -/* subs_addsub_imm.xml */ -int SUBS_addsub_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|100010|sh=x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x71000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_SUBS_32S_ADDSUB_IMM, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = (ctx->sh==0)!=0 ? ((0<<12)|ctx->imm12) : ((ctx->imm12<<12)|0); - /* regular aliases */ - if(ctx->Rd==0x1f) return CMP_SUBS_addsub_imm(ctx, instr); - if(ctx->sf==0) OK(ENC_SUBS_32S_ADDSUB_IMM); - if(ctx->sf==1) OK(ENC_SUBS_64S_ADDSUB_IMM); - } - return rc; -} - -/* subs_addsub_shift.xml */ -int SUBS_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|op=1|S=1|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x6B000000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_SUBS_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->shift==3) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - /* regular aliases */ - if(ctx->Rd==0x1f) return CMP_SUBS_addsub_shift(ctx, instr); - if(ctx->Rn==0x1f && ctx->Rd!=0x1f) return NEGS_SUBS_addsub_shift(ctx, instr); - if(ctx->sf==0) OK(ENC_SUBS_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_SUBS_64_ADDSUB_SHIFT); - } - return rc; -} - -/* sub_addsub_ext.xml */ -int SUB_addsub_ext(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=1|S=0|01011|opt=00|1|Rm=xxxxx|option=xxx|imm3=xxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE00000)==0x4B200000) { - decode_fields32(ENC_SUB_32_ADDSUB_EXT, ctx, instr); - if((ctx->imm3==5 || ctx->imm3==6 || ctx->imm3==7)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->shift = UINT(ctx->imm3); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->extend_type = DecodeRegExtend(ctx->option); - if(ctx->sf==0) OK(ENC_SUB_32_ADDSUB_EXT); - if(ctx->sf==1) OK(ENC_SUB_64_ADDSUB_EXT); - } - return rc; -} - -/* sub_addsub_imm.xml */ -int SUB_addsub_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=1|S=0|100010|sh=x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x51000000) { - decode_fields32(ENC_SUB_32_ADDSUB_IMM, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = (ctx->sh==0)!=0 ? ((0<<12)|ctx->imm12) : ((ctx->imm12<<12)|0); - if(ctx->sf==0) OK(ENC_SUB_32_ADDSUB_IMM); - if(ctx->sf==1) OK(ENC_SUB_64_ADDSUB_IMM); - } - return rc; -} - -/* sub_addsub_shift.xml */ -int SUB_addsub_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* sf=x|op=1|S=0|01011|shift=xx|0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F200000)==0x4B000000) { - decode_fields32(ENC_SUB_32_ADDSUB_SHIFT, ctx, instr); - if(ctx->shift==3) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->imm6,5,5)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->shift_type = DecodeShift(ctx->shift); - ctx->shift_amount = UINT(ctx->imm6); - /* regular aliases */ - if(ctx->Rn==0x1f) return NEG_SUB_addsub_shift(ctx, instr); - if(ctx->sf==0) OK(ENC_SUB_32_ADDSUB_SHIFT); - if(ctx->sf==1) OK(ENC_SUB_64_ADDSUB_SHIFT); - } - return rc; -} - -/* sub_advsimd.xml */ -int SUB_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|1|Rm=xxxxx|opcode=10000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EE08400) { - decode_fields32(ENC_SUB_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_SUB_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=10000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E208400) { - decode_fields32(ENC_SUB_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_SUB_ASIMDSAME_ONLY); - } - return rc; -} - -/* sudot_advsimd_elt.xml */ -int SUDOT_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|US=0|0|L=x|M=x|Rm=xxxx|opcode=1111|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF00F000) { - decode_fields32(ENC_SUDOT_ASIMDELEM_D, ctx, instr); - if(!HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - ctx->d = UINT(ctx->Rd); - ctx->i = UINT(((ctx->H<<1)|ctx->L)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((0x20)!=0 ? ((ctx->datasize) / (0x20)) : 0); - OK(ENC_SUDOT_ASIMDELEM_D); - } - return rc; -} - -/* suqadd_advsimd.xml */ -int SUQADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=0|1|111|0|size=xx|10000|opcode=00011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5E203800) { - decode_fields32(ENC_SUQADD_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SUQADD_ASISDMISC_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=00011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE203800) { - decode_fields32(ENC_SUQADD_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = FALSE; - OK(ENC_SUQADD_ASIMDMISC_R); - } - return rc; -} - -/* svc.xml */ -int SVC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|00|opc=000|imm16=xxxxxxxxxxxxxxxx|op2=000|LL=01 */ - if((INSWORD & 0xFFE0001F)==0xD4000001) { - decode_fields32(ENC_SVC_EX_EXCEPTION, ctx, instr); - OK(ENC_SVC_EX_EXCEPTION); - } - return rc; -} - -/* swp.xml */ -int SWP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=1x|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xB8208000) { - decode_fields32(ENC_SWP_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (8) << (UINT(ctx->size)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->size==2 && ctx->A==0 && ctx->R==0) OK(ENC_SWP_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==0) OK(ENC_SWPA_32_MEMOP); - if(ctx->size==2 && ctx->A==1 && ctx->R==1) OK(ENC_SWPAL_32_MEMOP); - if(ctx->size==2 && ctx->A==0 && ctx->R==1) OK(ENC_SWPL_32_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==0) OK(ENC_SWP_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==0) OK(ENC_SWPA_64_MEMOP); - if(ctx->size==3 && ctx->A==1 && ctx->R==1) OK(ENC_SWPAL_64_MEMOP); - if(ctx->size==3 && ctx->A==0 && ctx->R==1) OK(ENC_SWPL_64_MEMOP); - } - return rc; -} - -/* swpb.xml */ -int SWPB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=00|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x38208000) { - decode_fields32(ENC_SWPB_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_SWPB_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_SWPAB_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_SWPALB_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_SWPLB_32_MEMOP); - } - return rc; -} - -/* swph.xml */ -int SWPH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* size=01|111|VR=0|00|A=x|R=x|1|Rs=xxxxx|o3=1|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x78208000) { - decode_fields32(ENC_SWPH_32_MEMOP, ctx, instr); - if(!HaveLSE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->A==0 && ctx->R==0) OK(ENC_SWPH_32_MEMOP); - if(ctx->A==1 && ctx->R==0) OK(ENC_SWPAH_32_MEMOP); - if(ctx->A==1 && ctx->R==1) OK(ENC_SWPALH_32_MEMOP); - if(ctx->A==0 && ctx->R==1) OK(ENC_SWPLH_32_MEMOP); - } - return rc; -} - -/* swpp.xml */ -int SWPP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|S=0|011001|A=x|R=x|1|Rt2=xxxxx|o3=1|opc=000|00|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x19208000) { - decode_fields32(ENC_SWPP_128_MEMOP_128, ctx, instr); - if(!HaveLSE128()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt==0x1f) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rt2==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = UINT(ctx->Rt2); - ctx->n = UINT(ctx->Rn); - ctx->acquire = ctx->A==1; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - ctx->rt_unknown = FALSE; - if(ctx->t==ctx->t2) { - ctx->c = ConstrainUnpredictable(Unpredictable_LSE128OVERLAP); - // assert - // switch on constraint - } - if(ctx->A==0 && ctx->R==0) OK(ENC_SWPP_128_MEMOP_128); - if(ctx->A==1 && ctx->R==0) OK(ENC_SWPPA_128_MEMOP_128); - if(ctx->A==1 && ctx->R==1) OK(ENC_SWPPAL_128_MEMOP_128); - if(ctx->A==0 && ctx->R==1) OK(ENC_SWPPL_128_MEMOP_128); - } - return rc; -} - -/* swpt.xml */ -int SWPT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|sz=x|011001|A=x|R=x|1|Rs=xxxxx|o3=1|opc=000|01|Rn=xxxxx|Rt=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x19208400) { - decode_fields32(ENC_SWPT_32_MEMOP_UNPRIV, ctx, instr); - if(!HaveLSUI()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(ctx->Rs); - ctx->t = UINT(ctx->Rt); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sz)); - ctx->regsize = (ctx->datasize==0x40)!=0 ? 0x40 : 0x20; - ctx->acquire = ctx->A==1 && ctx->Rt!=0x1f; - ctx->release = ctx->R==1; - ctx->tagchecked = ctx->n!=0x1f; - if(ctx->sz==0 && ctx->A==0 && ctx->R==0) OK(ENC_SWPT_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==0) OK(ENC_SWPTA_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==1 && ctx->R==1) OK(ENC_SWPTAL_32_MEMOP_UNPRIV); - if(ctx->sz==0 && ctx->A==0 && ctx->R==1) OK(ENC_SWPTL_32_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==0) OK(ENC_SWPT_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==0) OK(ENC_SWPTA_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==1 && ctx->R==1) OK(ENC_SWPTAL_64_MEMOP_UNPRIV); - if(ctx->sz==1 && ctx->A==0 && ctx->R==1) OK(ENC_SWPTL_64_MEMOP_UNPRIV); - } - return rc; -} - -/* sxtb_sbfm.xml */ -int SXTB_SBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_sign_replication_to_left_and_zeros_to_right */ - /* sf=x|opc=00|100110|N=x|immr=000000|imms=000111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FBFFC00)==0x13001C00) { - decode_fields32(ENC_SXTB_SBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_SXTB_SBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_SXTB_SBFM_64M_BITFIELD); - } - return rc; -} - -/* sxth_sbfm.xml */ -int SXTH_SBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_sign_replication_to_left_and_zeros_to_right */ - /* sf=x|opc=00|100110|N=x|immr=000000|imms=001111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FBFFC00)==0x13003C00) { - decode_fields32(ENC_SXTH_SBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_SXTH_SBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_SXTH_SBFM_64M_BITFIELD); - } - return rc; -} - -/* sxtl_sshll_advsimd.xml */ -int SXTL_SSHLL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|10|immh!=0000|immb=000|opcode=10100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF87FC00)==0xF00A400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_SXTL_SSHLL_ASIMDSHF_L, ctx, instr); - OK(ENC_SXTL_SSHLL_ASIMDSHF_L); - } - return rc; -} - -/* sxtw_sbfm.xml */ -int SXTW_SBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_sign_replication_to_left_and_zeros_to_right */ - /* sf=1|opc=00|100|110|N=1|immr=000000|imms=011111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x93407C00) { - decode_fields32(ENC_SXTW_SBFM_64M_BITFIELD, ctx, instr); - OK(ENC_SXTW_SBFM_64M_BITFIELD); - } - return rc; -} - -/* sys.xml */ -int SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF80000)==0xD5080000) { - decode_fields32(ENC_SYS_CR_SYSTEMINSTRS, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->sys_L = ctx->L; - ctx->sys_op0 = 1; - ctx->sys_op1 = ctx->op1; - ctx->sys_op2 = ctx->op2; - ctx->sys_crn = ctx->CRn; - ctx->sys_crm = ctx->CRm; - /* regular aliases */ - if(ctx->op1==6 && ctx->CRn==7 && ctx->CRm==0 && ctx->op2==0) return APAS_SYS(ctx, instr); - if(ctx->CRn==7 && ((ctx->CRm&14)==8) && SysOp(ctx->op1,7,ctx->CRm,ctx->op2)==Sys_AT) return AT_SYS(ctx, instr); - // alias:BRB_SYS with preference:["op1 == '001' && CRn == '0111' && CRm == '0010' && SysOp('001', '0111', '0010', op2) == Sys_BRB"] does not apply - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==3 && ctx->op2==4) return CFP_SYS(ctx, instr); - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==3 && ctx->op2==6) return COSP_SYS(ctx, instr); - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==3 && ctx->op2==7) return CPP_SYS(ctx, instr); - if(ctx->CRn==7 && SysOp(ctx->op1,7,ctx->CRm,ctx->op2)==Sys_DC) return DC_SYS(ctx, instr); - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==3 && ctx->op2==5) return DVP_SYS(ctx, instr); - if(ctx->op1==0 && ctx->CRn==7 && ctx->CRm==7 && ctx->op2==5) return GCSPOPCX_SYS(ctx, instr); - if(ctx->op1==0 && ctx->CRn==7 && ctx->CRm==7 && ctx->op2==6) return GCSPOPX_SYS(ctx, instr); - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==7 && ctx->op2==0) return GCSPUSHM_SYS(ctx, instr); - if(ctx->op1==0 && ctx->CRn==7 && ctx->CRm==7 && ctx->op2==4) return GCSPUSHX_SYS(ctx, instr); - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==7 && ctx->op2==2) return GCSSS1_SYS(ctx, instr); - // alias:GIC_SYS with preference:["CRn == '1100' && CRm IN {'0001', '0010'} && SysOp(op1, '1100', CRm, op2) == Sys_GIC"] does not apply - // alias:GSB_SYS with preference:["op1 == '000' && CRn == '1100' && CRm == '0000' && SysOp('000', '1100', '0000', op2) == Sys_GSB"] does not apply - if(ctx->CRn==7 && SysOp(ctx->op1,7,ctx->CRm,ctx->op2)==Sys_IC) return IC_SYS(ctx, instr); - // alias:MLBI_SYS with preference:["op1 == '100' && CRn == '0111' && CRm == '0000' && SysOp('100', '0111', '0000', op2) == Sys_MLBI"] does not apply - if(((ctx->CRn&14)==8) && SysOp(ctx->op1,ctx->CRn,ctx->CRm,ctx->op2)==Sys_TLBI) return TLBI_SYS(ctx, instr); - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==2 && ctx->op2==7) return TRCIT_SYS(ctx, instr); - OK(ENC_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* sysl.xml */ -int SYSL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=1|01|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF80000)==0xD5280000) { - decode_fields32(ENC_SYSL_RC_SYSTEMINSTRS, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->sys_L = ctx->L; - ctx->sys_op0 = 1; - ctx->sys_op1 = ctx->op1; - ctx->sys_op2 = ctx->op2; - ctx->sys_crn = ctx->CRn; - ctx->sys_crm = ctx->CRm; - /* regular aliases */ - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==7 && ctx->op2==1) return GCSPOPM_SYSL(ctx, instr); - if(ctx->op1==3 && ctx->CRn==7 && ctx->CRm==7 && ctx->op2==3) return GCSSS2_SYSL(ctx, instr); - // alias:GICR_SYSL with preference:["op1 == '000' && CRn == '1100' && CRm == '0011' && SysLOp('000', '1100', '0011', op2) == Sysl_GICR"] does not apply - OK(ENC_SYSL_RC_SYSTEMINSTRS); - } - return rc; -} - -/* sysp.xml */ -int SYSP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0101|L=0|01|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF80000)==0xD5480000) { - decode_fields32(ENC_SYSP_CR_SYSPAIRINSTRS, ctx, instr); - if(!HaveSYSINSTR128()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->Rt,0,0)==1 && ctx->Rt!=0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Rt); - ctx->t2 = (ctx->t==0x1f)!=0 ? 0x1f : ctx->t+1; - ctx->sys_L = ctx->L; - ctx->sys_op0 = 1; - ctx->sys_op1 = ctx->op1; - ctx->sys_op2 = ctx->op2; - ctx->sys_crn = ctx->CRn; - ctx->sys_crm = ctx->CRm; - /* regular aliases */ - // alias:TLBIP_SYSP with preference:["CRn IN {'100x'} && SysOp128(op1, CRn, CRm, op2) == Sys_TLBIP"] does not apply - OK(ENC_SYSP_CR_SYSPAIRINSTRS); - } - return rc; -} - -/* tbl_advsimd.xml */ -int TBL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|001110|op2=00|0|Rm=xxxxx|0|len=xx|op=0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE09C00)==0xE000000) { - decode_fields32(ENC_TBL_ASIMDTBL_L1_1, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((8)!=0 ? ((ctx->datasize) / (8)) : 0); - ctx->regs = UINT(ctx->len)+1; - ctx->is_tbl = (ctx->op==0); - if(ctx->len==0) OK(ENC_TBL_ASIMDTBL_L1_1); - if(ctx->len==1) OK(ENC_TBL_ASIMDTBL_L2_2); - if(ctx->len==2) OK(ENC_TBL_ASIMDTBL_L3_3); - if(ctx->len==3) OK(ENC_TBL_ASIMDTBL_L4_4); - } - return rc; -} - -/* tbnz.xml */ -int TBNZ(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_14_bit_signed_pc_relative_branch_offset */ - /* b5=x|01|101|1|op=1|b40=xxxxx|imm14=xxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7F000000)==0x37000000) { - decode_fields32(ENC_TBNZ_ONLY_TESTBRANCH, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->datasize = (0x20) << (UINT(ctx->b5)); - ctx->bit_pos = UINT(((ctx->b5<<5)|ctx->b40)); - ctx->offset = SignExtend((ctx->imm14<<2),16); - OK(ENC_TBNZ_ONLY_TESTBRANCH); - } - return rc; -} - -/* tbx_advsimd.xml */ -int TBX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|001110|op2=00|0|Rm=xxxxx|0|len=xx|op=1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE09C00)==0xE001000) { - decode_fields32(ENC_TBX_ASIMDTBL_L1_1, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((8)!=0 ? ((ctx->datasize) / (8)) : 0); - ctx->regs = UINT(ctx->len)+1; - ctx->is_tbl = (ctx->op==0); - if(ctx->len==0) OK(ENC_TBX_ASIMDTBL_L1_1); - if(ctx->len==1) OK(ENC_TBX_ASIMDTBL_L2_2); - if(ctx->len==2) OK(ENC_TBX_ASIMDTBL_L3_3); - if(ctx->len==3) OK(ENC_TBX_ASIMDTBL_L4_4); - } - return rc; -} - -/* tbz.xml */ -int TBZ(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_14_bit_signed_pc_relative_branch_offset */ - /* b5=x|01|101|1|op=0|b40=xxxxx|imm14=xxxxxxxxxxxxxx|Rt=xxxxx */ - if((INSWORD & 0x7F000000)==0x36000000) { - decode_fields32(ENC_TBZ_ONLY_TESTBRANCH, ctx, instr); - ctx->t = UINT(ctx->Rt); - ctx->datasize = (0x20) << (UINT(ctx->b5)); - ctx->bit_pos = UINT(((ctx->b5<<5)|ctx->b40)); - ctx->offset = SignExtend((ctx->imm14<<2),16); - OK(ENC_TBZ_ONLY_TESTBRANCH); - } - return rc; -} - -/* tlbip_sysp.xml */ -int TLBIP_SYSP(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0101|L=0|01|op1=xxx|CRn=100x|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF8E000)==0xD5488000) { - decode_fields32(ENC_TLBIP_SYSP_CR_SYSPAIRINSTRS, ctx, instr); - OK(ENC_TLBIP_SYSP_CR_SYSPAIRINSTRS); - } - return rc; -} - -/* tlbi_sys.xml */ -int TLBI_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=xxx|CRn=100x|CRm=xxxx|op2=xxx|Rt=xxxxx */ - if((INSWORD & 0xFFF8E000)==0xD5088000) { - decode_fields32(ENC_TLBI_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_TLBI_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* trcit_sys.xml */ -int TRCIT_SYS(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100|L=0|01|op1=011|CRn=0111|CRm=0010|op2=111|Rt=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD50B72E0) { - decode_fields32(ENC_TRCIT_SYS_CR_SYSTEMINSTRS, ctx, instr); - OK(ENC_TRCIT_SYS_CR_SYSTEMINSTRS); - } - return rc; -} - -/* trn1_advsimd.xml */ -int TRN1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|00|111|0|size=xx|0|Rm=xxxxx|0|op=0|10|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE002800) { - decode_fields32(ENC_TRN1_ASIMDPERM_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = UINT(ctx->op); - ctx->pairs = ((2)!=0 ? ((ctx->elements) / (2)) : 0); - OK(ENC_TRN1_ASIMDPERM_ONLY); - } - return rc; -} - -/* trn2_advsimd.xml */ -int TRN2_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|00|111|0|size=xx|0|Rm=xxxxx|0|op=1|10|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE006800) { - decode_fields32(ENC_TRN2_ASIMDPERM_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = UINT(ctx->op); - ctx->pairs = ((2)!=0 ? ((ctx->elements) / (2)) : 0); - OK(ENC_TRN2_ASIMDPERM_ONLY); - } - return rc; -} - -/* tsb.xml */ -int TSB(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0010|op2=010|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503225F) { - decode_fields32(ENC_TSB_HC_HINTS, ctx, instr); - if(!HaveTRF()) { - EndOfDecode(Decode_NOP); - } - OK(ENC_TSB_HC_HINTS); - } - return rc; -} - -/* tst_ands_log_imm.xml */ -int TST_ANDS_log_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|opc=11|100100|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7F80001F)==0x7200001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_TST_ANDS_32S_LOG_IMM, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_TST_ANDS_32S_LOG_IMM); - if(ctx->sf==1) OK(ENC_TST_ANDS_64S_LOG_IMM); - } - return rc; -} - -/* tst_ands_log_shift.xml */ -int TST_ANDS_log_shift(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* sf=x|opc=11|01010|shift=xx|N=0|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=11111 */ - if((INSWORD & 0x7F20001F)==0x6A00001F) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_TST_ANDS_32_LOG_SHIFT, ctx, instr); - if(ctx->sf==0) OK(ENC_TST_ANDS_32_LOG_SHIFT); - if(ctx->sf==1) OK(ENC_TST_ANDS_64_LOG_SHIFT); - } - return rc; -} - -/* uabal_advsimd.xml */ -int UABAL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|01|op=0|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E205000) { - decode_fields32(ENC_UABAL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UABAL_ASIMDDIFF_L); - } - return rc; -} - -/* uaba_advsimd.xml */ -int UABA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|0111|ac=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E207C00) { - decode_fields32(ENC_UABA_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UABA_ASIMDSAME_ONLY); - } - return rc; -} - -/* uabdl_advsimd.xml */ -int UABDL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|01|op=1|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E207000) { - decode_fields32(ENC_UABDL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UABDL_ASIMDDIFF_L); - } - return rc; -} - -/* uabd_advsimd.xml */ -int UABD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|0111|ac=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E207400) { - decode_fields32(ENC_UABD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UABD_ASIMDSAME_ONLY); - } - return rc; -} - -/* uadalp_advsimd.xml */ -int UADALP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|00|op=1|10|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E206800) { - decode_fields32(ENC_UADALP_ASIMDMISC_P, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((((2) * (ctx->esize)))!=0 ? ((ctx->datasize) / (((2) * (ctx->esize)))) : 0); - OK(ENC_UADALP_ASIMDMISC_P); - } - return rc; -} - -/* uaddlp_advsimd.xml */ -int UADDLP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|00|op=0|10|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E202800) { - decode_fields32(ENC_UADDLP_ASIMDMISC_P, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((((2) * (ctx->esize)))!=0 ? ((ctx->datasize) / (((2) * (ctx->esize)))) : 0); - OK(ENC_UADDLP_ASIMDMISC_P); - } - return rc; -} - -/* uaddlv_advsimd.xml */ -int UADDLV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=1|0|111|0|size=xx|11000|opcode=00011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E303800) { - decode_fields32(ENC_UADDLV_ASIMDALL_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==4) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UADDLV_ASIMDALL_ONLY); - } - return rc; -} - -/* uaddl_advsimd.xml */ -int UADDL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|00|o1=0|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E200000) { - decode_fields32(ENC_UADDL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UADDL_ASIMDDIFF_L); - } - return rc; -} - -/* uaddw_advsimd.xml */ -int UADDW_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|00|o1=0|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E201000) { - decode_fields32(ENC_UADDW_ASIMDDIFF_W, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UADDW_ASIMDDIFF_W); - } - return rc; -} - -/* ubfiz_ubfm.xml */ -int UBFIZ_UBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_zeros_to_left_and_right */ - /* sf=x|opc=10|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x53000000) { - decode_fields32(ENC_UBFIZ_UBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_UBFIZ_UBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_UBFIZ_UBFM_64M_BITFIELD); - } - return rc; -} - -/* ubfm.xml */ -int UBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_zeros_to_left_and_right */ - /* sf=x|opc=10|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x53000000) { - decode_fields32(ENC_UBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==1 && ctx->N!=1) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && (ctx->N!=0 || SLICE(ctx->immr,5,5)!=0 || SLICE(ctx->imms,5,5)!=0)) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->s = UINT(ctx->imms); - ctx->r = UINT(ctx->immr); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(ctx->N,ctx->imms,ctx->immr); - ctx->wmask = dbmrt.wmask; - ctx->tmask = dbmrt.tmask; - /* regular aliases */ - bool encoding32 = ctx->sf==0 && ctx->N==0; - bool encoding64 = ctx->sf==1 && ctx->N==1; - if((ctx->imms!=0x1f && UINT(ctx->imms)+1==UINT(ctx->immr) && EncodingLabeled32Bit()) || (ctx->imms!=0x3f && UINT(ctx->imms)+1==UINT(ctx->immr) && EncodingLabeled64Bit())) return LSL_UBFM(ctx, instr); - if((ctx->imms==0x1f && EncodingLabeled32Bit()) || (ctx->imms==0x3f && EncodingLabeled64Bit())) return LSR_UBFM(ctx, instr); - if(UINT(ctx->imms)immr)) return UBFIZ_UBFM(ctx, instr); - if(BFXPreferred(ctx->sf,SLICE(ctx->opc,1,1),ctx->imms,ctx->immr)) return UBFX_UBFM(ctx, instr); - if(ctx->immr==0 && ctx->imms==7) return UXTB_UBFM(ctx, instr); - if(ctx->immr==0 && ctx->imms==15) return UXTH_UBFM(ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_UBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_UBFM_64M_BITFIELD); - } - return rc; -} - -/* ubfx_ubfm.xml */ -int UBFX_UBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_zeros_to_left_and_right */ - /* sf=x|opc=10|100110|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F800000)==0x53000000) { - decode_fields32(ENC_UBFX_UBFM_32M_BITFIELD, ctx, instr); - if(ctx->sf==0 && ctx->N==0) OK(ENC_UBFX_UBFM_32M_BITFIELD); - if(ctx->sf==1 && ctx->N==1) OK(ENC_UBFX_UBFM_64M_BITFIELD); - } - return rc; -} - -/* ucvtf_advsimd_fix.xml */ -int UCVTF_advsimd_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|opcode=11100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F00E400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UCVTF_ASISDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - OK(ENC_UCVTF_ASISDSHF_C); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|opcode=11100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F00E400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UCVTF_ASIMDSHF_C, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->immh&14)) || (((ctx->immh&14)==2) && !HaveFP16())) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (((ctx->immh&8)==8))!=0 ? 0x40 : ((((ctx->immh&12)==4)) ? 0x20 : 0x10); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->fracbits = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - OK(ENC_UCVTF_ASIMDSHF_C); - } - return rc; -} - -/* ucvtf_advsimd_int.xml */ -int UCVTF_advsimd_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar_half_precision */ - /* 01|U=1|1|111|0|a=0|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x7E79D800) { - decode_fields32(ENC_UCVTF_ASISDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = TRUE; - OK(ENC_UCVTF_ASISDMISCFP16_R); - } - /* class iclass_scalar_single_precision_and_double_precision */ - /* 01|U=1|1|111|0|0|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFBFFC00)==0x7E21D800) { - decode_fields32(ENC_UCVTF_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = TRUE; - OK(ENC_UCVTF_ASISDMISC_R); - } - /* class iclass_vector_half_precision */ - /* 0|Q=x|U=1|0|111|0|a=0|1111|00|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFFFFC00)==0x2E79D800) { - decode_fields32(ENC_UCVTF_ASIMDMISCFP16_R, ctx, instr); - if(!HaveAdvSIMD() || !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = 0x10; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UCVTF_ASIMDMISCFP16_R); - } - /* class iclass_vector_single_precision_and_double_precision */ - /* 0|Q=x|U=1|0|111|0|0|sz=x|10000|opcode=11101|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2E21D800) { - decode_fields32(ENC_UCVTF_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(((ctx->sz<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UCVTF_ASIMDMISC_R); - } - return rc; -} - -/* ucvtf_float_fix.xml */ -int UCVTF_float_fix(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|0|rmode=00|opcode=011|scale=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3F0000)==0x1E030000) { - decode_fields32(ENC_UCVTF_H32_FLOAT2FIX, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sf==0 && SLICE(ctx->scale,5,5)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->decode_fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->fracbits = 0x40-UINT(ctx->scale); - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_UCVTF_H32_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_UCVTF_H64_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_UCVTF_S32_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_UCVTF_S64_FLOAT2FIX); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_UCVTF_D32_FLOAT2FIX); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_UCVTF_D64_FLOAT2FIX); - } - return rc; -} - -/* ucvtf_float_int.xml */ -int UCVTF_float_int(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_floating_point */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=00|opcode=011|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E230000) { - decode_fields32(ENC_UCVTF_H32_FLOAT2INT, ctx, instr); - if(!HaveFP()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==2) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->ftype==3 && !HaveFP16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->decode_fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->unsigned_ = TRUE; - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_UCVTF_H32_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==0) OK(ENC_UCVTF_S32_FLOAT2INT); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_UCVTF_D32_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_UCVTF_H64_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_UCVTF_S64_FLOAT2INT); - if(ctx->sf==1 && ctx->ftype==1) OK(ENC_UCVTF_D64_FLOAT2INT); - } - return rc; -} - -/* ucvtf_sisd.xml */ -int UCVTF_sisd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11110|ftype=xx|1|rmode=11|opcode=101|000000|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7F3FFC00)==0x1E3D0000) { - decode_fields32(ENC_UCVTF_SISD_32H, ctx, instr); - if(!HaveFPRCVT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->intsize = (0x20) << (UINT(ctx->sf)); - ctx->fltsize = (8) << (UINT((ctx->ftype)^(2))); - ctx->rounding = FPRoundingMode(ctx->FPCR); - if(ctx->sf==0 && ctx->ftype==3) OK(ENC_UCVTF_SISD_32H); - if(ctx->sf==0 && ctx->ftype==1) OK(ENC_UCVTF_SISD_32D); - if(ctx->sf==1 && ctx->ftype==3) OK(ENC_UCVTF_SISD_64H); - if(ctx->sf==1 && ctx->ftype==0) OK(ENC_UCVTF_SISD_64S); - } - return rc; -} - -/* udf_perm_undef.xml */ -int UDF_perm_undef(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* 0|00|0000|000000000|imm16=xxxxxxxxxxxxxxxx */ - if((INSWORD & 0xFFFF0000)==0x0) { - decode_fields32(ENC_UDF_ONLY_PERM_UNDEF, ctx, instr); - OK(ENC_UDF_ONLY_PERM_UNDEF); - } - return rc; -} - -/* udiv.xml */ -int UDIV(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|00001|o1=0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC00800) { - decode_fields32(ENC_UDIV_32_DP_2SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_UDIV_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_UDIV_64_DP_2SRC); - } - return rc; -} - -/* udot_advsimd_elt.xml */ -int UDOT_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|opcode=1110|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F00E000) { - decode_fields32(ENC_UDOT_ASIMDELEM_D, ctx, instr); - if(!HaveDotProd()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UDOT_ASIMDELEM_D); - } - return rc; -} - -/* udot_advsimd_vec.xml */ -int UDOT_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|0|Rm=xxxxx|1|opcode=0010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E009400) { - decode_fields32(ENC_UDOT_ASIMDSAME2_D, ctx, instr); - if(!HaveDotProd()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UDOT_ASIMDSAME2_D); - } - return rc; -} - -/* uhadd_advsimd.xml */ -int UHADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=00000|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E200400) { - decode_fields32(ENC_UHADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UHADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* uhsub_advsimd.xml */ -int UHSUB_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=00100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E202400) { - decode_fields32(ENC_UHSUB_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UHSUB_ASIMDSAME_ONLY); - } - return rc; -} - -/* umaddl.xml */ -int UMADDL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=1|01|Rm=xxxxx|o0=0|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9BA00000) { - decode_fields32(ENC_UMADDL_64WA_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - /* regular aliases */ - if(ctx->Ra==0x1f) return UMULL_UMADDL(ctx, instr); - OK(ENC_UMADDL_64WA_DP_3SRC); - } - return rc; -} - -/* umaxp_advsimd.xml */ -int UMAXP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|1010|o1=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E20A400) { - decode_fields32(ENC_UMAXP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMAXP_ASIMDSAME_ONLY); - } - return rc; -} - -/* umaxv_advsimd.xml */ -int UMAXV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=1|0|111|0|size=xx|11000|op=0|1010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E30A800) { - decode_fields32(ENC_UMAXV_ASIMDALL_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==4) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UMAXV_ASIMDALL_ONLY); - } - return rc; -} - -/* umax_advsimd.xml */ -int UMAX_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|0110|o1=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E206400) { - decode_fields32(ENC_UMAX_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMAX_ASIMDSAME_ONLY); - } - return rc; -} - -/* umax_imm.xml */ -int UMAX_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|1000111|opc=0001|imm8=xxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFC0000)==0x11C40000) { - decode_fields32(ENC_UMAX_32U_MINMAX_IMM, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = UINT(ctx->imm8); - if(ctx->sf==0) OK(ENC_UMAX_32U_MINMAX_IMM); - if(ctx->sf==1) OK(ENC_UMAX_64U_MINMAX_IMM); - } - return rc; -} - -/* umax_reg.xml */ -int UMAX_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|opcode=011001|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC06400) { - decode_fields32(ENC_UMAX_32_DP_2SRC, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_UMAX_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_UMAX_64_DP_2SRC); - } - return rc; -} - -/* uminp_advsimd.xml */ -int UMINP_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|1010|o1=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E20AC00) { - decode_fields32(ENC_UMINP_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMINP_ASIMDSAME_ONLY); - } - return rc; -} - -/* uminv_advsimd.xml */ -int UMINV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|U=1|0|111|0|size=xx|11000|op=1|1010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E31A800) { - decode_fields32(ENC_UMINV_ASIMDALL_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==4) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UMINV_ASIMDALL_ONLY); - } - return rc; -} - -/* umin_advsimd.xml */ -int UMIN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|0110|o1=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E206C00) { - decode_fields32(ENC_UMIN_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMIN_ASIMDSAME_ONLY); - } - return rc; -} - -/* umin_imm.xml */ -int UMIN_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|op=0|S=0|1000111|opc=0011|imm8=xxxxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FFC0000)==0x11CC0000) { - decode_fields32(ENC_UMIN_32U_MINMAX_IMM, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - ctx->imm = UINT(ctx->imm8); - if(ctx->sf==0) OK(ENC_UMIN_32U_MINMAX_IMM); - if(ctx->sf==1) OK(ENC_UMIN_64U_MINMAX_IMM); - } - return rc; -} - -/* umin_reg.xml */ -int UMIN_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=x|0|S=0|11010110|Rm=xxxxx|opcode=011011|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0x7FE0FC00)==0x1AC06C00) { - decode_fields32(ENC_UMIN_32_DP_2SRC, ctx, instr); - if(!HaveCSSC()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x20) << (UINT(ctx->sf)); - if(ctx->sf==0) OK(ENC_UMIN_32_DP_2SRC); - if(ctx->sf==1) OK(ENC_UMIN_64_DP_2SRC); - } - return rc; -} - -/* umlal_advsimd_elt.xml */ -int UMLAL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=0|10|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F002000) { - decode_fields32(ENC_UMLAL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMLAL_ASIMDELEM_L); - } - return rc; -} - -/* umlal_advsimd_vec.xml */ -int UMLAL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|10|o1=0|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E208000) { - decode_fields32(ENC_UMLAL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMLAL_ASIMDDIFF_L); - } - return rc; -} - -/* umlsl_advsimd_elt.xml */ -int UMLSL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|0|o2=1|10|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F006000) { - decode_fields32(ENC_UMLSL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMLSL_ASIMDELEM_L); - } - return rc; -} - -/* umlsl_advsimd_vec.xml */ -int UMLSL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|10|o1=1|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E20A000) { - decode_fields32(ENC_UMLSL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMLSL_ASIMDDIFF_L); - } - return rc; -} - -/* ummla_advsimd_vec.xml */ -int UMMLA_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=1|U=1|0|111|0|size=10|0|Rm=xxxxx|1|010|B=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6E80A400) { - decode_fields32(ENC_UMMLA_ASIMDSAME2_G, ctx, instr); - if(!HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMMLA_ASIMDSAME2_G); - } - return rc; -} - -/* umnegl_umsubl.xml */ -int UMNEGL_UMSUBL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=1|01|Rm=xxxxx|o0=1|Ra=11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9BA0FC00) { - decode_fields32(ENC_UMNEGL_UMSUBL_64WA_DP_3SRC, ctx, instr); - OK(ENC_UMNEGL_UMSUBL_64WA_DP_3SRC); - } - return rc; -} - -/* umov_advsimd.xml */ -int UMOV_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|op=0|01110000|imm5=xxxxx|0|imm4=0111|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE003C00) { - decode_fields32(ENC_UMOV_ASIMDINS_W_W, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(!(ctx->imm5&15)) { - EndOfDecode(Decode_UNDEF); - } - ctx->size = LowestSetBitNZ(SLICE(ctx->imm5,3,0)); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (ctx->size); - ctx->datasize = (0x20) << (UINT(ctx->Q)); - if(ctx->datasize==0x40 && ctx->esize<0x40) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->datasize==0x20 && ctx->esize >= 0x40) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(SLICE(ctx->imm5,4,ctx->size+1)); - ctx->idxdsize = (0x40) << (UINT(SLICE(ctx->imm5,4,4))); - /* regular aliases */ - bool encoding32 = ctx->Q==0; - bool encoding64 = ctx->Q==1 && (ctx->imm5&15)==8; - if((((ctx->imm5&7)==4) && EncodingLabeled32Bit()) || (((ctx->imm5&15)==8) && EncodingLabeled64Bit())) return MOV_UMOV_advsimd(ctx, instr); - if(ctx->Q==0) OK(ENC_UMOV_ASIMDINS_W_W); - if(ctx->Q==1 && (ctx->imm5&15)==8) OK(ENC_UMOV_ASIMDINS_X_X); - } - return rc; -} - -/* umsubl.xml */ -int UMSUBL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=1|01|Rm=xxxxx|o0=1|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9BA08000) { - decode_fields32(ENC_UMSUBL_64WA_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->a = UINT(ctx->Ra); - /* regular aliases */ - if(ctx->Ra==0x1f) return UMNEGL_UMSUBL(ctx, instr); - OK(ENC_UMSUBL_64WA_DP_3SRC); - } - return rc; -} - -/* umulh.xml */ -int UMULH(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=1|10|Rm=xxxxx|o0=0|Ra=(1)(1)(1)(1)(1)|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE08000)==0x9BC00000) { - decode_fields32(ENC_UMULH_64_DP_3SRC, ctx, instr); - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_UMULH_64_DP_3SRC); - } - return rc; -} - -/* umull_umaddl.xml */ -int UMULL_UMADDL(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit */ - /* sf=1|op54=00|1|101|1|U=1|01|Rm=xxxxx|o0=0|Ra=11111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x9BA07C00) { - decode_fields32(ENC_UMULL_UMADDL_64WA_DP_3SRC, ctx, instr); - OK(ENC_UMULL_UMADDL_64WA_DP_3SRC); - } - return rc; -} - -/* umull_advsimd_elt.xml */ -int UMULL_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|1|size=xx|L=x|M=x|Rm=xxxx|opcode=1010|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF00F400)==0x2F00A000) { - decode_fields32(ENC_UMULL_ASIMDELEM_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->idxdsize = (0x40) << (UINT(ctx->H)); - if(ctx->size==1) { - ctx->index = UINT(((ctx->H<<2)|(ctx->L<<1)|ctx->M)); - ctx->Rmhi = 0; - } - else if(ctx->size==2) { - ctx->index = UINT(((ctx->H<<1)|ctx->L)); - ctx->Rmhi = ctx->M; - } - else { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->Rmhi<<4)|ctx->Rm)); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMULL_ASIMDELEM_L); - } - return rc; -} - -/* umull_advsimd_vec.xml */ -int UMULL_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=1100|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E20C000) { - decode_fields32(ENC_UMULL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UMULL_ASIMDDIFF_L); - } - return rc; -} - -/* uqadd_advsimd.xml */ -int UQADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|1|Rm=xxxxx|opcode=00001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7E200C00) { - decode_fields32(ENC_UQADD_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = TRUE; - OK(ENC_UQADD_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=00001|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E200C00) { - decode_fields32(ENC_UQADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UQADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* uqrshl_advsimd.xml */ -int UQRSHL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|1|Rm=xxxxx|010|R=1|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7E205C00) { - decode_fields32(ENC_UQRSHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = TRUE; - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_UQRSHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|010|R=1|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E205C00) { - decode_fields32(ENC_UQRSHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = TRUE; - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UQRSHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* uqrshrn_advsimd.xml */ -int UQRSHRN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|1001|op=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F009C00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UQRSHRN_ASISDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = TRUE; - ctx->unsigned_ = TRUE; - OK(ENC_UQRSHRN_ASISDSHF_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|1001|op=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F009C00 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UQRSHRN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = TRUE; - ctx->unsigned_ = TRUE; - OK(ENC_UQRSHRN_ASIMDSHF_N); - } - return rc; -} - -/* uqshl_advsimd_imm.xml */ -int UQSHL_advsimd_imm(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|011|op=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F007400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UQSHL_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->src_unsigned = TRUE; - ctx->dst_unsigned = TRUE; - OK(ENC_UQSHL_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|011|op=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F007400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UQSHL_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->src_unsigned = TRUE; - ctx->dst_unsigned = TRUE; - OK(ENC_UQSHL_ASIMDSHF_R); - } - return rc; -} - -/* uqshl_advsimd_reg.xml */ -int UQSHL_advsimd_reg(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|1|Rm=xxxxx|010|R=0|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7E204C00) { - decode_fields32(ENC_UQSHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = TRUE; - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_UQSHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|010|R=0|S=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E204C00) { - decode_fields32(ENC_UQSHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->unsigned_ = TRUE; - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_UQSHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* uqshrn_advsimd.xml */ -int UQSHRN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh!=0000|immb=xxx|1001|op=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF80FC00)==0x7F009400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UQSHRN_ASISDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->immh==0) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->part = 0; - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = FALSE; - ctx->unsigned_ = TRUE; - OK(ENC_UQSHRN_ASISDSHF_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|1001|op=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F009400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UQSHRN_ASIMDSHF_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->round = FALSE; - ctx->unsigned_ = TRUE; - OK(ENC_UQSHRN_ASIMDSHF_N); - } - return rc; -} - -/* uqsub_advsimd.xml */ -int UQSUB_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|1|Rm=xxxxx|opcode=00101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x7E202C00) { - decode_fields32(ENC_UQSUB_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = TRUE; - OK(ENC_UQSUB_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=00101|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E202C00) { - decode_fields32(ENC_UQSUB_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UQSUB_ASIMDSAME_ONLY); - } - return rc; -} - -/* uqxtn_advsimd.xml */ -int UQXTN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|10000|opcode=10100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x7E214800) { - decode_fields32(ENC_UQXTN_ASISDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->part = 0; - ctx->elements = 1; - ctx->unsigned_ = TRUE; - OK(ENC_UQXTN_ASISDMISC_N); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|opcode=10100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E214800) { - decode_fields32(ENC_UQXTN_ASIMDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_UQXTN_ASIMDMISC_N); - } - return rc; -} - -/* urecpe_advsimd.xml */ -int URECPE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|1|sz=x|10000|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0xEA1C800) { - decode_fields32(ENC_URECPE_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_URECPE_ASIMDMISC_R); - } - return rc; -} - -/* urhadd_advsimd.xml */ -int URHADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_of_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|opcode=00010|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E201400) { - decode_fields32(ENC_URHADD_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_URHADD_ASIMDSAME_ONLY); - } - return rc; -} - -/* urshl_advsimd.xml */ -int URSHL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|1|Rm=xxxxx|010|R=1|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EE05400) { - decode_fields32(ENC_URSHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_URSHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|010|R=1|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E205400) { - decode_fields32(ENC_URSHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = TRUE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_URSHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* urshr_advsimd.xml */ -int URSHR_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh=1xxx|immb=xxx|00|o1=1|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x7F402400) { - decode_fields32(ENC_URSHR_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = TRUE; - OK(ENC_URSHR_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|00|o1=1|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F002400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_URSHR_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = TRUE; - OK(ENC_URSHR_ASIMDSHF_R); - } - return rc; -} - -/* ursqrte_advsimd.xml */ -int URSQRTE_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|1|sz=x|10000|opcode=11100|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFBFFC00)==0x2EA1C800) { - decode_fields32(ENC_URSQRTE_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - if(ctx->sz==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_URSQRTE_ASIMDMISC_R); - } - return rc; -} - -/* ursra_advsimd.xml */ -int URSRA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh=1xxx|immb=xxx|00|o1=1|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x7F403400) { - decode_fields32(ENC_URSRA_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = TRUE; - OK(ENC_URSRA_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|00|o1=1|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F003400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_URSRA_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = TRUE; - OK(ENC_URSRA_ASIMDSHF_R); - } - return rc; -} - -/* usdot_advsimd_elt.xml */ -int USDOT_advsimd_elt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|1|US=1|0|L=x|M=x|Rm=xxxx|opcode=1111|H=x|0|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFC0F400)==0xF80F000) { - decode_fields32(ENC_USDOT_ASIMDELEM_D, ctx, instr); - if(!HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(((ctx->M<<4)|ctx->Rm)); - ctx->d = UINT(ctx->Rd); - ctx->i = UINT(((ctx->H<<1)|ctx->L)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((0x20)!=0 ? ((ctx->datasize) / (0x20)) : 0); - OK(ENC_USDOT_ASIMDELEM_D); - } - return rc; -} - -/* usdot_advsimd_vec.xml */ -int USDOT_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=10|0|Rm=xxxxx|1|opcode=0011|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBFE0FC00)==0xE809C00) { - decode_fields32(ENC_USDOT_ASIMDSAME2_D, ctx, instr); - if(!HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((0x20)!=0 ? ((ctx->datasize) / (0x20)) : 0); - OK(ENC_USDOT_ASIMDSAME2_D); - } - return rc; -} - -/* ushll_advsimd.xml */ -int USHLL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|opcode=10100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F00A400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_USHLL_ASIMDSHF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(SLICE(ctx->immh,2,0))); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = UINT(((ctx->immh<<3)|ctx->immb))-ctx->esize; - ctx->unsigned_ = TRUE; - /* regular aliases */ - if(ctx->immb==0 && BitCount(ctx->immh)==1) return UXTL_USHLL_advsimd(ctx, instr); - OK(ENC_USHLL_ASIMDSHF_L); - } - return rc; -} - -/* ushl_advsimd.xml */ -int USHL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=11|1|Rm=xxxxx|010|R=0|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x7EE04400) { - decode_fields32(ENC_USHL_ASISDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->S==0 && ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - OK(ENC_USHL_ASISDSAME_ONLY); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|010|R=0|S=0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E204400) { - decode_fields32(ENC_USHL_ASIMDSAME_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->rounding = FALSE; - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_USHL_ASIMDSAME_ONLY); - } - return rc; -} - -/* ushr_advsimd.xml */ -int USHR_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh=1xxx|immb=xxx|00|o1=0|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x7F400400) { - decode_fields32(ENC_USHR_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = FALSE; - OK(ENC_USHR_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|00|o1=0|o0=0|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F000400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_USHR_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = FALSE; - OK(ENC_USHR_ASIMDSHF_R); - } - return rc; -} - -/* usmmla_advsimd_vec.xml */ -int USMMLA_advsimd_vec(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=1|U=0|0|111|0|size=10|0|Rm=xxxxx|1|010|B=1|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E80AC00) { - decode_fields32(ENC_USMMLA_ASIMDSAME2_G, ctx, instr); - if(!HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMMLA_ASIMDSAME2_G); - } - return rc; -} - -/* usqadd_advsimd.xml */ -int USQADD_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|0|size=xx|10000|opcode=00011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x7E203800) { - decode_fields32(ENC_USQADD_ASISDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->unsigned_ = TRUE; - OK(ENC_USQADD_ASISDMISC_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|0|size=xx|10000|opcode=00011|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0x2E203800) { - decode_fields32(ENC_USQADD_ASIMDMISC_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->unsigned_ = TRUE; - OK(ENC_USQADD_ASIMDMISC_R); - } - return rc; -} - -/* usra_advsimd.xml */ -int USRA_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_scalar */ - /* 01|U=1|1|111|10|immh=1xxx|immb=xxx|00|o1=0|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFC0FC00)==0x7F401400) { - decode_fields32(ENC_USRA_ASISDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->immh,3,3)!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (3); - ctx->datasize = ctx->esize; - ctx->elements = 1; - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = FALSE; - OK(ENC_USRA_ASISDSHF_R); - } - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=xxx|00|o1=0|o0=1|0|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF80FC00)==0x2F001400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_USRA_ASIMDSHF_R, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((SLICE(ctx->immh,3,3)<<1)|ctx->Q)==2) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (HighestSetBitNZ(ctx->immh)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->shift = ((ctx->esize) * (2))-UINT(((ctx->immh<<3)|ctx->immb)); - ctx->unsigned_ = TRUE; - ctx->round = FALSE; - OK(ENC_USRA_ASIMDSHF_R); - } - return rc; -} - -/* usubl_advsimd.xml */ -int USUBL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|00|o1=1|0|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E202000) { - decode_fields32(ENC_USUBL_ASIMDDIFF_L, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_USUBL_ASIMDDIFF_L); - } - return rc; -} - -/* usubw_advsimd.xml */ -int USUBW_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_three_registers_not_all_the_same_type */ - /* 0|Q=x|U=1|0|111|0|size=xx|1|Rm=xxxxx|00|o1=1|1|00|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0x2E203000) { - decode_fields32(ENC_USUBW_ASIMDDIFF_W, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_USUBW_ASIMDDIFF_W); - } - return rc; -} - -/* uxtb_ubfm.xml */ -int UXTB_UBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_zeros_to_left_and_right */ - /* sf=0|opc=10|100|110|N=0|immr=000000|imms=000111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x53001C00) { - decode_fields32(ENC_UXTB_UBFM_32M_BITFIELD, ctx, instr); - OK(ENC_UXTB_UBFM_32M_BITFIELD); - } - return rc; -} - -/* uxth_ubfm.xml */ -int UXTH_UBFM(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_with_zeros_to_left_and_right */ - /* sf=0|opc=10|100|110|N=0|immr=000000|imms=001111|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x53003C00) { - decode_fields32(ENC_UXTH_UBFM_32M_BITFIELD, ctx, instr); - OK(ENC_UXTH_UBFM_32M_BITFIELD); - } - return rc; -} - -/* uxtl_ushll_advsimd.xml */ -int UXTL_USHLL_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=1|0|111|10|immh!=0000|immb=000|opcode=10100|1|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF87FC00)==0x2F00A400 && (INSWORD & 0x780000)!=0x0) { - decode_fields32(ENC_UXTL_USHLL_ASIMDSHF_L, ctx, instr); - OK(ENC_UXTL_USHLL_ASIMDSHF_L); - } - return rc; -} - -/* uzp1_advsimd.xml */ -int UZP1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|00|111|0|size=xx|0|Rm=xxxxx|0|op=0|01|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE001800) { - decode_fields32(ENC_UZP1_ASIMDPERM_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = UINT(ctx->op); - OK(ENC_UZP1_ASIMDPERM_ONLY); - } - return rc; -} - -/* uzp2_advsimd.xml */ -int UZP2_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|00|111|0|size=xx|0|Rm=xxxxx|0|op=1|01|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE005800) { - decode_fields32(ENC_UZP2_ASIMDPERM_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = UINT(ctx->op); - OK(ENC_UZP2_ASIMDPERM_ONLY); - } - return rc; -} - -/* wfe.xml */ -int WFE(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=010|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503205F) { - decode_fields32(ENC_WFE_HI_HINTS, ctx, instr); - OK(ENC_WFE_HI_HINTS); - } - return rc; -} - -/* wfet.xml */ -int WFET(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110001|CRm=0000|op2=000|Rd=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD5031000) { - decode_fields32(ENC_WFET_ONLY_SYSTEMINSTRSWITHREG, ctx, instr); - if(!HaveWFxT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - OK(ENC_WFET_ONLY_SYSTEMINSTRSWITHREG); - } - return rc; -} - -/* wfi.xml */ -int WFI(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=011|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503207F) { - decode_fields32(ENC_WFI_HI_HINTS, ctx, instr); - OK(ENC_WFI_HI_HINTS); - } - return rc; -} - -/* wfit.xml */ -int WFIT(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110001|CRm=0000|op2=001|Rd=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0xD5031020) { - decode_fields32(ENC_WFIT_ONLY_SYSTEMINSTRSWITHREG, ctx, instr); - if(!HaveWFxT()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - OK(ENC_WFIT_ONLY_SYSTEMINSTRSWITHREG); - } - return rc; -} - -/* xaflag.xml */ -int XAFLAG(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|0100000|op1=000|0100|CRm=(0)(0)(0)(0)|op2=001|Rt=11111 */ - if((INSWORD & 0xFFFFF0FF)==0xD500403F) { - decode_fields32(ENC_XAFLAG_M_PSTATE, ctx, instr); - if(!HaveFlagM2()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_XAFLAG_M_PSTATE); - } - return rc; -} - -/* xar_advsimd.xml */ -int XAR_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 1100|111|01|00|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE00000)==0xCE800000) { - decode_fields32(ENC_XAR_VVV2_CRYPTO3_IMM6, ctx, instr); - if(!HaveSHA3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - OK(ENC_XAR_VVV2_CRYPTO3_IMM6); - } - return rc; -} - -/* xpac.xml */ -int XPAC(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_integer */ - /* sf=1|1|S=0|11010110|opcode2=00001|01000|D=x|Rn=11111|Rd=xxxxx */ - if((INSWORD & 0xFFFFFBE0)==0xDAC143E0) { - decode_fields32(ENC_XPACD_64Z_DP_1SRC, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->data = (ctx->D==1); - if(ctx->D==1) OK(ENC_XPACD_64Z_DP_1SRC); - if(ctx->D==0) OK(ENC_XPACI_64Z_DP_1SRC); - } - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=111|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD50320FF) { - decode_fields32(ENC_XPACLRI_HI_HINTS, ctx, instr); - if(!HavePAuth()) { - EndOfDecode(Decode_NOP); - } - ctx->d = 0x1e; - ctx->data = FALSE; - OK(ENC_XPACLRI_HI_HINTS); - } - return rc; -} - -/* xtn_advsimd.xml */ -int XTN_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_vector */ - /* 0|Q=x|U=0|0|111|0|size=xx|10000|opcode=10010|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF3FFC00)==0xE212800) { - decode_fields32(ENC_XTN_ASIMDMISC_N, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = 0x40; - ctx->part = UINT(ctx->Q); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - OK(ENC_XTN_ASIMDMISC_N); - } - return rc; -} - -/* yield.xml */ -int YIELD(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_system */ - /* 110|101|01000000110010|CRm=0000|op2=001|11111 */ - if((INSWORD & 0xFFFFFFFF)==0xD503203F) { - decode_fields32(ENC_YIELD_HI_HINTS, ctx, instr); - OK(ENC_YIELD_HI_HINTS); - } - return rc; -} - -/* zip1_advsimd.xml */ -int ZIP1_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|00|111|0|size=xx|0|Rm=xxxxx|0|op=0|11|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE003800) { - decode_fields32(ENC_ZIP1_ASIMDPERM_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = UINT(ctx->op); - ctx->pairs = ((2)!=0 ? ((ctx->elements) / (2)) : 0); - OK(ENC_ZIP1_ASIMDPERM_ONLY); - } - return rc; -} - -/* zip2_advsimd.xml */ -int ZIP2_advsimd(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_advanced_simd */ - /* 0|Q=x|00|111|0|size=xx|0|Rm=xxxxx|0|op=1|11|10|Rn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xBF20FC00)==0xE007800) { - decode_fields32(ENC_ZIP2_ASIMDPERM_ONLY, ctx, instr); - if(!HaveAdvSIMD()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->Q)==6) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->datasize = (0x40) << (UINT(ctx->Q)); - ctx->elements = ((ctx->esize)!=0 ? ((ctx->datasize) / (ctx->esize)) : 0); - ctx->part = UINT(ctx->op); - ctx->pairs = ((2)!=0 ? ((ctx->elements) / (2)) : 0); - OK(ENC_ZIP2_ASIMDPERM_ONLY); - } - return rc; -} - -/* abs_z_p_z.xml */ -int abs_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|0|opc=110|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x416A000) { - decode_fields32(ENC_ABS_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_ABS_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|opc=110|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x406A000) { - decode_fields32(ENC_ABS_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_ABS_Z_P_Z_Z); - } - return rc; -} - -/* adclb_z_zzz.xml */ -int adclb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|sz=x|0|Zm=xxxxx|11|010|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4500D000) { - decode_fields32(ENC_ADCLB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_ADCLB_Z_ZZZ_); - } - return rc; -} - -/* adclt_z_zzz.xml */ -int adclt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|sz=x|0|Zm=xxxxx|11|010|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4500D400) { - decode_fields32(ENC_ADCLT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_ADCLT_Z_ZZZ_); - } - return rc; -} - -/* add_mz_zzv.xml */ -int add_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|0|11|000|Zdn=xxxx|op=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A300) { - decode_fields32(ENC_ADD_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_ADD_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|0|11|000|Zdn=xxx|0|op=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120AB00) { - decode_fields32(ENC_ADD_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_ADD_MZ_ZZV_4X1); - } - return rc; -} - -/* add_z_p_zz.xml */ -int add_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|00|opc=000|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4000000) { - decode_fields32(ENC_ADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_ADD_Z_P_ZZ_); - } - return rc; -} - -/* add_z_zi.xml */ -int add_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|00|opc=000|11|sh=x|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2520C000) { - decode_fields32(ENC_ADD_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = UINT(ctx->imm8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - OK(ENC_ADD_Z_ZI_); - } - return rc; -} - -/* add_z_zz.xml */ -int add_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|000|opc=000|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4200000) { - decode_fields32(ENC_ADD_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_ADD_Z_ZZ_); - } - return rc; -} - -/* add_za_zw.xml */ -int add_za_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|00|Rv=xx|111|Zm=xxxx|0|1|S=0|off3=xxx */ - if((INSWORD & 0xFFBF9C38)==0xC1A01C10) { - decode_fields32(ENC_ADD_ZA_ZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_ADD_ZA_ZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|10|Rv=xx|111|Zm=xxx|00|1|S=0|off3=xxx */ - if((INSWORD & 0xFFBF9C78)==0xC1A11C10) { - decode_fields32(ENC_ADD_ZA_ZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_ADD_ZA_ZW_4X4); - } - return rc; -} - -/* add_za_zzv.xml */ -int add_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|1|S=0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1201810) { - decode_fields32(ENC_ADD_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_ADD_ZA_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|1|S=0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1301810) { - decode_fields32(ENC_ADD_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_ADD_ZA_ZZV_4X1); - } - return rc; -} - -/* add_za_zzw.xml */ -int add_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|110|Zn=xxxx|0|1|S=0|off3=xxx */ - if((INSWORD & 0xFFA19C38)==0xC1A01810) { - decode_fields32(ENC_ADD_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_ADD_ZA_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|110|Zn=xxx|00|1|S=0|off3=xxx */ - if((INSWORD & 0xFFA39C78)==0xC1A11810) { - decode_fields32(ENC_ADD_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_ADD_ZA_ZZW_4X4); - } - return rc; -} - -/* addha_za_pp_z.xml */ -int addha_za_pp_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|10|0000|0|1|op=0|010|00|V=0|Pm=xxx|Pn=xxx|Zn=xxxxx|0|0|0|ZAda=xx */ - if((INSWORD & 0xFFFF001C)==0xC0900000) { - decode_fields32(ENC_ADDHA_ZA_PP_Z_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->ZAda); - OK(ENC_ADDHA_ZA_PP_Z_32); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|1|op=1|010|00|V=0|Pm=xxx|Pn=xxx|Zn=xxxxx|0|0|ZAda=xxx */ - if((INSWORD & 0xFFFF0018)==0xC0D00000) { - decode_fields32(ENC_ADDHA_ZA_PP_Z_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->ZAda); - OK(ENC_ADDHA_ZA_PP_Z_64); - } - return rc; -} - -/* addhnb_z_zz.xml */ -int addhnb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=0|R=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45206000) { - decode_fields32(ENC_ADDHNB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_ADDHNB_Z_ZZ_); - } - return rc; -} - -/* addhnt_z_zz.xml */ -int addhnt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=0|R=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45206400) { - decode_fields32(ENC_ADDHNT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_ADDHNT_Z_ZZ_); - } - return rc; -} - -/* addp_z_p_zz.xml */ -int addp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|opc=00|U=1|10|1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4411A000) { - decode_fields32(ENC_ADDP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_ADDP_Z_P_ZZ_); - } - return rc; -} - -/* addpl_r_ri.xml */ -int addpl_r_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|0|op=1|1|Rn=xxxxx|0101|0|imm6=xxxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0F800)==0x4605000) { - decode_fields32(ENC_ADDPL_R_RI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Rd); - ctx->imm = SInt(ctx->imm6,6); - OK(ENC_ADDPL_R_RI_); - } - return rc; -} - -/* addpt_z_p_zz.xml */ -int addpt_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=11|0|00|opc=100|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x4C40000) { - decode_fields32(ENC_ADDPT_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() || !HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_ADDPT_Z_P_ZZ_); - } - return rc; -} - -/* addpt_z_zz.xml */ -int addpt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=11|1|Zm=xxxxx|000|opc=010|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E00800) { - decode_fields32(ENC_ADDPT_Z_ZZ_, ctx, instr); - if(!HaveSVE() || !HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_ADDPT_Z_ZZ_); - } - return rc; -} - -/* addqp_z_zz.xml */ -int addqp_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|011|110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4207800) { - decode_fields32(ENC_ADDQP_Z_ZZ_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_ADDQP_Z_ZZ_); - } - return rc; -} - -/* addqv_z_p_z.xml */ -int addqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|001|op=0|U=1|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4052000) { - decode_fields32(ENC_ADDQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = TRUE; - OK(ENC_ADDQV_Z_P_Z_); - } - return rc; -} - -/* addspl_r_ri.xml */ -int addspl_r_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 000|0010|0|0|op=1|1|Rn=xxxxx|0101|1|imm6=xxxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0F800)==0x4605800) { - decode_fields32(ENC_ADDSPL_R_RI_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Rd); - ctx->imm = SInt(ctx->imm6,6); - OK(ENC_ADDSPL_R_RI_); - } - return rc; -} - -/* addsubp_z_zz.xml */ -int addsubp_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|011|111|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4207C00) { - decode_fields32(ENC_ADDSUBP_Z_ZZ_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_ADDSUBP_Z_ZZ_); - } - return rc; -} - -/* addsvl_r_ri.xml */ -int addsvl_r_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 000|0010|0|0|op=0|1|Rn=xxxxx|0101|1|imm6=xxxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0F800)==0x4205800) { - decode_fields32(ENC_ADDSVL_R_RI_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Rd); - ctx->imm = SInt(ctx->imm6,6); - OK(ENC_ADDSVL_R_RI_); - } - return rc; -} - -/* addva_za_pp_z.xml */ -int addva_za_pp_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|10|0000|0|1|op=0|010|00|V=1|Pm=xxx|Pn=xxx|Zn=xxxxx|0|0|0|ZAda=xx */ - if((INSWORD & 0xFFFF001C)==0xC0910000) { - decode_fields32(ENC_ADDVA_ZA_PP_Z_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->ZAda); - OK(ENC_ADDVA_ZA_PP_Z_32); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|1|op=1|010|00|V=1|Pm=xxx|Pn=xxx|Zn=xxxxx|0|0|ZAda=xxx */ - if((INSWORD & 0xFFFF0018)==0xC0D10000) { - decode_fields32(ENC_ADDVA_ZA_PP_Z_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->ZAda); - OK(ENC_ADDVA_ZA_PP_Z_64); - } - return rc; -} - -/* addvl_r_ri.xml */ -int addvl_r_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|0|op=0|1|Rn=xxxxx|0101|0|imm6=xxxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFE0F800)==0x4205000) { - decode_fields32(ENC_ADDVL_R_RI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Rd); - ctx->imm = SInt(ctx->imm6,6); - OK(ENC_ADDVL_R_RI_); - } - return rc; -} - -/* adr_z_az.xml */ -int adr_z_az(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_packed_offsets */ - /* 000|0010|0|1|sz=x|1|Zm=xxxxx|1010|msz=xx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0F000)==0x4A0A000) { - decode_fields32(ENC_ADR_Z_AZ_SD_SAME_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->osize = ctx->esize; - ctx->unsigned_ = TRUE; - ctx->mbytes = (1) << (UINT(ctx->msz)); - OK(ENC_ADR_Z_AZ_SD_SAME_SCALED); - } - /* class iclass_unpacked_32_bit_signed_offsets */ - /* 000|0010|0|opc=00|1|Zm=xxxxx|1010|msz=xx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x420A000) { - decode_fields32(ENC_ADR_Z_AZ_D_S32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->osize = 0x20; - ctx->unsigned_ = FALSE; - ctx->mbytes = (1) << (UINT(ctx->msz)); - OK(ENC_ADR_Z_AZ_D_S32_SCALED); - } - /* class iclass_unpacked_32_bit_unsigned_offsets */ - /* 000|0010|0|opc=01|1|Zm=xxxxx|1010|msz=xx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x460A000) { - decode_fields32(ENC_ADR_Z_AZ_D_U32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->osize = 0x20; - ctx->unsigned_ = TRUE; - ctx->mbytes = (1) << (UINT(ctx->msz)); - OK(ENC_ADR_Z_AZ_D_U32_SCALED); - } - return rc; -} - -/* aesd_mz_zzi.xml */ -int aesd_mz_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 010|0010|1|size=00|1|i2=xx|01|op=0|111|01|o2=1|Zm=xxxxx|Zdn=xxxx|o3=0 */ - if((INSWORD & 0xFFE7FC01)==0x4522EC00) { - decode_fields32(ENC_AESD_MZ_ZZI_2X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_AESD_MZ_ZZI_2X1); - } - /* class iclass_four_registers */ - /* 010|0010|1|size=00|1|i2=xx|11|op=0|111|01|o2=1|Zm=xxxxx|Zdn=xxx|opc3=00 */ - if((INSWORD & 0xFFE7FC03)==0x4526EC00) { - decode_fields32(ENC_AESD_MZ_ZZI_4X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_AESD_MZ_ZZI_4X1); - } - return rc; -} - -/* aesd_z_zz.xml */ -int aesd_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|000|1|op=0|111|00|o2=1|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x4522E400) { - decode_fields32(ENC_AESD_Z_ZZ_, ctx, instr); - if(!HaveSVE_AES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_AESD_Z_ZZ_); - } - return rc; -} - -/* aesdimc_mz_zzi.xml */ -int aesdimc_mz_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 010|0010|1|size=00|1|i2=xx|01|op=1|111|01|o2=1|Zm=xxxxx|Zdn=xxxx|o3=0 */ - if((INSWORD & 0xFFE7FC01)==0x4523EC00) { - decode_fields32(ENC_AESDIMC_MZ_ZZI_2X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_AESDIMC_MZ_ZZI_2X1); - } - /* class iclass_four_registers */ - /* 010|0010|1|size=00|1|i2=xx|11|op=1|111|01|o2=1|Zm=xxxxx|Zdn=xxx|opc3=00 */ - if((INSWORD & 0xFFE7FC03)==0x4527EC00) { - decode_fields32(ENC_AESDIMC_MZ_ZZI_4X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_AESDIMC_MZ_ZZI_4X1); - } - return rc; -} - -/* aese_mz_zzi.xml */ -int aese_mz_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 010|0010|1|size=00|1|i2=xx|01|op=0|111|01|o2=0|Zm=xxxxx|Zdn=xxxx|o3=0 */ - if((INSWORD & 0xFFE7FC01)==0x4522E800) { - decode_fields32(ENC_AESE_MZ_ZZI_2X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_AESE_MZ_ZZI_2X1); - } - /* class iclass_four_registers */ - /* 010|0010|1|size=00|1|i2=xx|11|op=0|111|01|o2=0|Zm=xxxxx|Zdn=xxx|opc3=00 */ - if((INSWORD & 0xFFE7FC03)==0x4526E800) { - decode_fields32(ENC_AESE_MZ_ZZI_4X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_AESE_MZ_ZZI_4X1); - } - return rc; -} - -/* aese_z_zz.xml */ -int aese_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|000|1|op=0|111|00|o2=0|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x4522E000) { - decode_fields32(ENC_AESE_Z_ZZ_, ctx, instr); - if(!HaveSVE_AES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_AESE_Z_ZZ_); - } - return rc; -} - -/* aesemc_mz_zzi.xml */ -int aesemc_mz_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 010|0010|1|size=00|1|i2=xx|01|op=1|111|01|o2=0|Zm=xxxxx|Zdn=xxxx|o3=0 */ - if((INSWORD & 0xFFE7FC01)==0x4523E800) { - decode_fields32(ENC_AESEMC_MZ_ZZI_2X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_AESEMC_MZ_ZZI_2X1); - } - /* class iclass_four_registers */ - /* 010|0010|1|size=00|1|i2=xx|11|op=1|111|01|o2=0|Zm=xxxxx|Zdn=xxx|opc3=00 */ - if((INSWORD & 0xFFE7FC03)==0x4527E800) { - decode_fields32(ENC_AESEMC_MZ_ZZI_4X1, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_AESEMC_MZ_ZZI_4X1); - } - return rc; -} - -/* aesimc_z_z.xml */ -int aesimc_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|000|00|111|00|op=1|00000|Zdn=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0x4520E400) { - decode_fields32(ENC_AESIMC_Z_Z_, ctx, instr); - if(!HaveSVE_AES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT(ctx->Zdn); - OK(ENC_AESIMC_Z_Z_); - } - return rc; -} - -/* aesmc_z_z.xml */ -int aesmc_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|000|00|111|00|op=0|00000|Zdn=xxxxx */ - if((INSWORD & 0xFFFFFFE0)==0x4520E000) { - decode_fields32(ENC_AESMC_Z_Z_, ctx, instr); - if(!HaveSVE_AES()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT(ctx->Zdn); - OK(ENC_AESMC_Z_Z_); - } - return rc; -} - -/* and_p_p_pp.xml */ -int and_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25004000) { - decode_fields32(ENC_AND_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - /* regular aliases */ - if(ctx->S==0 && ctx->Pn==ctx->Pm) return mov_and_p_p_pp(ctx, instr); - OK(ENC_AND_P_P_PP_Z); - } - return rc; -} - -/* and_z_p_zz.xml */ -int and_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|11|opc=010|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41A0000) { - decode_fields32(ENC_AND_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_AND_Z_P_ZZ_); - } - return rc; -} - -/* and_z_zi.xml */ -int and_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|opc=10|00|00|imm13=xxxxxxxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5800000) { - decode_fields32(ENC_AND_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT(ctx->Zdn); - DecodeBitMasksCheckUndefined(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0)); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0),SLICE(ctx->imm13,11,6)); - ctx->imm = dbmrt.wmask; - OK(ENC_AND_Z_ZI_); - } - return rc; -} - -/* and_z_zz.xml */ -int and_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|opc=00|1|Zm=xxxxx|001|100|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4203000) { - decode_fields32(ENC_AND_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_AND_Z_ZZ_); - } - return rc; -} - -/* andqv_z_p_z.xml */ -int andqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|111|opc=10|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41E2000) { - decode_fields32(ENC_ANDQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_ANDQV_Z_P_Z_); - } - return rc; -} - -/* ands_p_p_pp.xml */ -int ands_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25404000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ANDS_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - /* regular aliases */ - if(ctx->S==1 && ctx->Pn==ctx->Pm) return movs_ands_p_p_pp(ctx, instr); - OK(ENC_ANDS_P_P_PP_Z); - } - return rc; -} - -/* andv_r_p_z.xml */ -int andv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|110|opc=10|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41A2000) { - decode_fields32(ENC_ANDV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_ANDV_R_P_Z_); - } - return rc; -} - -/* asr_z_p_zi.xml */ -int asr_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|tszh=xx|0|0|opc=00|L=0|U=0|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4008000) { - decode_fields32(ENC_ASR_Z_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_ASR_Z_P_ZI_); - } - return rc; -} - -/* asr_z_p_zw.xml */ -int asr_z_p_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|11|R=0|L=0|U=0|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4188000) { - decode_fields32(ENC_ASR_Z_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_ASR_Z_P_ZW_); - } - return rc; -} - -/* asr_z_p_zz.xml */ -int asr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|10|R=0|L=0|U=0|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4108000) { - decode_fields32(ENC_ASR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_ASR_Z_P_ZZ_); - } - return rc; -} - -/* asr_z_zi.xml */ -int asr_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|tszh=xx|1|tszl=xx|imm3=xxx|100|1|0|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4209000) { - decode_fields32(ENC_ASR_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_ASR_Z_ZI_); - } - return rc; -} - -/* asr_z_zw.xml */ -int asr_z_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|100|0|0|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4208000) { - decode_fields32(ENC_ASR_Z_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_ASR_Z_ZW_); - } - return rc; -} - -/* asrd_z_p_zi.xml */ -int asrd_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|tszh=xx|0|0|opc=01|L=0|U=0|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4048000) { - decode_fields32(ENC_ASRD_Z_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_ASRD_Z_P_ZI_); - } - return rc; -} - -/* asrr_z_p_zz.xml */ -int asrr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|10|R=1|L=0|U=0|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4148000) { - decode_fields32(ENC_ASRR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_ASRR_Z_P_ZZ_); - } - return rc; -} - -/* bcax_z_zzz.xml */ -int bcax_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|opc=01|1|Zm=xxxxx|001|11|o2=0|Zk=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4603800) { - decode_fields32(ENC_BCAX_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(ctx->Zk); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_BCAX_Z_ZZZ_); - } - return rc; -} - -/* bdep_z_zz.xml */ -int bdep_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|11|opc=01|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500B400) { - decode_fields32(ENC_BDEP_Z_ZZ_, ctx, instr); - if(!HaveSVE_BitPerm()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BDEP_Z_ZZ_); - } - return rc; -} - -/* bext_z_zz.xml */ -int bext_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|11|opc=00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500B000) { - decode_fields32(ENC_BEXT_Z_ZZ_, ctx, instr); - if(!HaveSVE_BitPerm()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BEXT_Z_ZZ_); - } - return rc; -} - -/* bf1cvt_mz2_z8.xml */ -int bf1cvt_mz2_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_bf1cvt */ - /* 1|10|0000|1|opc=01|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=0 */ - if((INSWORD & 0xFFFFFC01)==0xC166E000) { - decode_fields32(ENC_BF1CVT_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = FALSE; - OK(ENC_BF1CVT_MZ2_Z8_); - } - /* class iclass_bf2cvt */ - /* 1|10|0000|1|opc=11|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=0 */ - if((INSWORD & 0xFFFFFC01)==0xC1E6E000) { - decode_fields32(ENC_BF2CVT_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = TRUE; - OK(ENC_BF2CVT_MZ2_Z8_); - } - return rc; -} - -/* bf1cvt_z_z8.xml */ -int bf1cvt_z_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_bf1cvt */ - /* 011|0010|1|00|001|00|L=0|0011|opc=10|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65083800) { - decode_fields32(ENC_BF1CVT_Z_Z8_B2BF, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 8; - ctx->d_esize = 0x10; - ctx->issrc2 = FALSE; - OK(ENC_BF1CVT_Z_Z8_B2BF); - } - /* class iclass_bf2cvt */ - /* 011|0010|1|00|001|00|L=0|0011|opc=11|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65083C00) { - decode_fields32(ENC_BF2CVT_Z_Z8_B2BF, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 8; - ctx->d_esize = 0x10; - ctx->issrc2 = TRUE; - OK(ENC_BF2CVT_Z_Z8_B2BF); - } - return rc; -} - -/* bf1cvtl_mz2_z8.xml */ -int bf1cvtl_mz2_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_bf1cvtl */ - /* 1|10|0000|1|opc=01|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=1 */ - if((INSWORD & 0xFFFFFC01)==0xC166E001) { - decode_fields32(ENC_BF1CVTL_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = FALSE; - OK(ENC_BF1CVTL_MZ2_Z8_); - } - /* class iclass_bf2cvtl */ - /* 1|10|0000|1|opc=11|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=1 */ - if((INSWORD & 0xFFFFFC01)==0xC1E6E001) { - decode_fields32(ENC_BF2CVTL_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = TRUE; - OK(ENC_BF2CVTL_MZ2_Z8_); - } - return rc; -} - -/* bf1cvtlt_z_z8.xml */ -int bf1cvtlt_z_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_bf1cvtlt */ - /* 011|0010|1|00|001|00|L=1|0011|opc=10|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65093800) { - decode_fields32(ENC_BF1CVTLT_Z_Z8_B2BF, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->issrc2 = FALSE; - OK(ENC_BF1CVTLT_Z_Z8_B2BF); - } - /* class iclass_bf2cvtlt */ - /* 011|0010|1|00|001|00|L=1|0011|opc=11|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65093C00) { - decode_fields32(ENC_BF2CVTLT_Z_Z8_B2BF, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->issrc2 = TRUE; - OK(ENC_BF2CVTLT_Z_Z8_B2BF); - } - return rc; -} - -/* bfadd_z_p_zz.xml */ -int bfadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=0000|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65008000) { - decode_fields32(ENC_BFADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFADD_Z_P_ZZ_); - } - return rc; -} - -/* bfadd_z_zz.xml */ -int bfadd_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|Zm=xxxxx|000|opc=000|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x65000000) { - decode_fields32(ENC_BFADD_Z_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFADD_Z_ZZ_); - } - return rc; -} - -/* bfadd_za_zw.xml */ -int bfadd_za_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|00|10|00|Rv=xx|111|Zm=xxxx|0|0|S=0|off3=xxx */ - if((INSWORD & 0xFFFF9C38)==0xC1E41C00) { - decode_fields32(ENC_BFADD_ZA_ZW_2X2_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFADD_ZA_ZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|00|10|10|Rv=xx|111|Zm=xxx|00|0|S=0|off3=xxx */ - if((INSWORD & 0xFFFF9C78)==0xC1E51C00) { - decode_fields32(ENC_BFADD_ZA_ZW_4X4_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFADD_ZA_ZW_4X4_16); - } - return rc; -} - -/* bfclamp_mz_zz.xml */ -int bfclamp_mz_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxxx|110|000|Zn=xxxxx|Zd=xxxx|op=0 */ - if((INSWORD & 0xFFE0FC01)==0xC120C000) { - decode_fields32(ENC_BFCLAMP_MZ_ZZ_2, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - OK(ENC_BFCLAMP_MZ_ZZ_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxxx|110|010|Zn=xxxxx|Zd=xxx|0|op=0 */ - if((INSWORD & 0xFFE0FC03)==0xC120C800) { - decode_fields32(ENC_BFCLAMP_MZ_ZZ_4, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - OK(ENC_BFCLAMP_MZ_ZZ_4); - } - return rc; -} - -/* bfclamp_z_zz.xml */ -int bfclamp_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=00|1|Zm=xxxxx|001001|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64202400) { - decode_fields32(ENC_BFCLAMP_Z_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFCLAMP_Z_ZZ_); - } - return rc; -} - -/* bfcvt_z8_mz2.xml */ -int bfcvt_z8_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=1|1|001|00|111000|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC164E000) { - decode_fields32(ENC_BFCVT_Z8_MZ2_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFCVT_Z8_MZ2_); - } - return rc; -} - -/* bfcvt_z_mz2.xml */ -int bfcvt_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=1|1|000|00|111000|Zn=xxxx|N=0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC160E000) { - decode_fields32(ENC_BFCVT_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFCVT_Z_MZ2_); - } - return rc; -} - -/* bfcvt_z_p_z.xml */ -int bfcvt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|opc=10|0|010|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x658AA000) { - decode_fields32(ENC_BFCVT_Z_P_Z_S2BF, ctx, instr); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_BFCVT_Z_P_Z_S2BF); - } - /* class iclass_zeroing */ - /* 011|0010|0|opc=10|011|010|1|opc2=10|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x649AC000) { - decode_fields32(ENC_BFCVT_Z_P_Z_S2BFZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_BFCVT_Z_P_Z_S2BFZ); - } - return rc; -} - -/* bfcvtn_z8_mz2.xml */ -int bfcvtn_z8_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|00|001|010|0011|opc=10|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0x650A3800) { - decode_fields32(ENC_BFCVTN_Z8_MZ2_BF2B, ctx, instr); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFCVTN_Z8_MZ2_BF2B); - } - return rc; -} - -/* bfcvtn_z_mz2.xml */ -int bfcvtn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=1|1|000|00|111000|Zn=xxxx|N=1|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC160E020) { - decode_fields32(ENC_BFCVTN_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFCVTN_Z_MZ2_); - } - return rc; -} - -/* bfcvtnt_z_p_z.xml */ -int bfcvtnt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|0|opc=10|0010|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x648AA000) { - decode_fields32(ENC_BFCVTNT_Z_P_Z_S2BF, ctx, instr); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_BFCVTNT_Z_P_Z_S2BF); - } - /* class iclass_zeroing */ - /* 011|0010|0|opc=10|0000|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6482A000) { - decode_fields32(ENC_BFCVTNT_Z_P_Z_S2BFZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_BFCVTNT_Z_P_Z_S2BFZ); - } - return rc; -} - -/* bfdot_z_zzz.xml */ -int bfdot_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|0|op=1|1|Zm=xxxxx|10|0|00|o2=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64608000) { - decode_fields32(ENC_BFDOT_Z_ZZZ_, ctx, instr); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_BFDOT_Z_ZZZ_); - } - return rc; -} - -/* bfdot_z_zzzi.xml */ -int bfdot_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|0|op=1|1|i2=xx|Zm=xxx|01|0|0|opc2=00|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64604000) { - decode_fields32(ENC_BFDOT_Z_ZZZI_, ctx, instr); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(ctx->i2); - OK(ENC_BFDOT_Z_ZZZI_); - } - return rc; -} - -/* bfdot_za_zzi.xml */ -int bfdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|opc2=011|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501018) { - decode_fields32(ENC_BFDOT_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_BFDOT_ZA_ZZI_2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|opc2=011|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509018) { - decode_fields32(ENC_BFDOT_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_BFDOT_ZA_ZZI_4XI); - } - return rc; -} - -/* bfdot_za_zzv.xml */ -int bfdot_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=10|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201010) { - decode_fields32(ENC_BFDOT_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFDOT_ZA_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=10|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301010) { - decode_fields32(ENC_BFDOT_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFDOT_ZA_ZZV_4X1); - } - return rc; -} - -/* bfdot_za_zzw.xml */ -int bfdot_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|opc=01|0|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1A01010) { - decode_fields32(ENC_BFDOT_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFDOT_ZA_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|0|opc=01|0|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1A11010) { - decode_fields32(ENC_BFDOT_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFDOT_ZA_ZZW_4X4); - } - return rc; -} - -/* bfmax_mz_zzv.xml */ -int bfmax_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10100|0|01|00|op=0|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFFF0FFE1)==0xC120A100) { - decode_fields32(ENC_BFMAX_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_BFMAX_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10101|0|01|00|op=0|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFFF0FFE3)==0xC120A900) { - decode_fields32(ENC_BFMAX_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_BFMAX_MZ_ZZV_4X1); - } - return rc; -} - -/* bfmax_mz_zzw.xml */ -int bfmax_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|0101100|010|opc=00|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFFE1FFE1)==0xC120B100) { - decode_fields32(ENC_BFMAX_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_BFMAX_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxx|00101110|010|opc=00|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFFE3FFE3)==0xC120B900) { - decode_fields32(ENC_BFMAX_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_BFMAX_MZ_ZZW_4X4); - } - return rc; -} - -/* bfmax_z_p_zz.xml */ -int bfmax_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=0110|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65068000) { - decode_fields32(ENC_BFMAX_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFMAX_Z_P_ZZ_); - } - return rc; -} - -/* bfmaxnm_mz_zzv.xml */ -int bfmaxnm_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10100|0|01|00|op=1|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFFF0FFE1)==0xC120A120) { - decode_fields32(ENC_BFMAXNM_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_BFMAXNM_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10101|0|01|00|op=1|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFFF0FFE3)==0xC120A920) { - decode_fields32(ENC_BFMAXNM_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_BFMAXNM_MZ_ZZV_4X1); - } - return rc; -} - -/* bfmaxnm_mz_zzw.xml */ -int bfmaxnm_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|0101100|010|opc=01|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFFE1FFE1)==0xC120B120) { - decode_fields32(ENC_BFMAXNM_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_BFMAXNM_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxx|00101110|010|opc=01|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFFE3FFE3)==0xC120B920) { - decode_fields32(ENC_BFMAXNM_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_BFMAXNM_MZ_ZZW_4X4); - } - return rc; -} - -/* bfmaxnm_z_p_zz.xml */ -int bfmaxnm_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=0100|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65048000) { - decode_fields32(ENC_BFMAXNM_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFMAXNM_Z_P_ZZ_); - } - return rc; -} - -/* bfmin_mz_zzv.xml */ -int bfmin_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10100|0|01|00|op=0|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFFF0FFE1)==0xC120A101) { - decode_fields32(ENC_BFMIN_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_BFMIN_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10101|0|01|00|op=0|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFFF0FFE3)==0xC120A901) { - decode_fields32(ENC_BFMIN_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_BFMIN_MZ_ZZV_4X1); - } - return rc; -} - -/* bfmin_mz_zzw.xml */ -int bfmin_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|0101100|010|opc=00|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFFE1FFE1)==0xC120B101) { - decode_fields32(ENC_BFMIN_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_BFMIN_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxx|00101110|010|opc=00|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFFE3FFE3)==0xC120B901) { - decode_fields32(ENC_BFMIN_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_BFMIN_MZ_ZZW_4X4); - } - return rc; -} - -/* bfmin_z_p_zz.xml */ -int bfmin_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=0111|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65078000) { - decode_fields32(ENC_BFMIN_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFMIN_Z_P_ZZ_); - } - return rc; -} - -/* bfminnm_mz_zzv.xml */ -int bfminnm_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10100|0|01|00|op=1|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFFF0FFE1)==0xC120A121) { - decode_fields32(ENC_BFMINNM_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_BFMINNM_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10101|0|01|00|op=1|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFFF0FFE3)==0xC120A921) { - decode_fields32(ENC_BFMINNM_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_BFMINNM_MZ_ZZV_4X1); - } - return rc; -} - -/* bfminnm_mz_zzw.xml */ -int bfminnm_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|0101100|010|opc=01|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFFE1FFE1)==0xC120B121) { - decode_fields32(ENC_BFMINNM_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_BFMINNM_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxx|00101110|010|opc=01|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFFE3FFE3)==0xC120B921) { - decode_fields32(ENC_BFMINNM_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_BFMINNM_MZ_ZZW_4X4); - } - return rc; -} - -/* bfminnm_z_p_zz.xml */ -int bfminnm_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=0101|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65058000) { - decode_fields32(ENC_BFMINNM_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFMINNM_Z_P_ZZ_); - } - return rc; -} - -/* bfmla_z_p_zzz.xml */ -int bfmla_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|1|Zm=xxxxx|0|0|op=0|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x65200000) { - decode_fields32(ENC_BFMLA_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - ctx->op3_neg = FALSE; - OK(ENC_BFMLA_Z_P_ZZZ_); - } - return rc; -} - -/* bfmla_z_zzzi.xml */ -int bfmla_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|0000|o2=1|op=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x64200800) { - decode_fields32(ENC_BFMLA_Z_ZZZI_H, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - ctx->op3_neg = FALSE; - OK(ENC_BFMLA_Z_ZZZI_H); - } - return rc; -} - -/* bfmla_za_zzi.xml */ -int bfmla_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|op=1|S=0|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09030)==0xC1101020) { - decode_fields32(ENC_BFMLA_ZA_ZZI_H2XI, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_BFMLA_ZA_ZZI_H2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|0|op=1|S=0|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09070)==0xC1109020) { - decode_fields32(ENC_BFMLA_ZA_ZZI_H4XI, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_BFMLA_ZA_ZZI_H4XI); - } - return rc; -} - -/* bfmla_za_zzv.xml */ -int bfmla_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=1|10|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1601C00) { - decode_fields32(ENC_BFMLA_ZA_ZZV_2X1_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFMLA_ZA_ZZV_2X1_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=1|11|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1701C00) { - decode_fields32(ENC_BFMLA_ZA_ZZV_4X1_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFMLA_ZA_ZZV_4X1_16); - } - return rc; -} - -/* bfmla_za_zzw.xml */ -int bfmla_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|0|S=0|1|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1E01008) { - decode_fields32(ENC_BFMLA_ZA_ZZW_2X2_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFMLA_ZA_ZZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|00|S=0|1|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1E11008) { - decode_fields32(ENC_BFMLA_ZA_ZZW_4X4_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFMLA_ZA_ZZW_4X4_16); - } - return rc; -} - -/* bfmlal_za_zzi.xml */ -int bfmlal_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|op=1|S=0|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1801010) { - decode_fields32(ENC_BFMLAL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_BFMLAL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|op=1|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1901010) { - decode_fields32(ENC_BFMLAL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_BFMLAL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|op=1|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1909010) { - decode_fields32(ENC_BFMLAL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_BFMLAL_ZA_ZZI_4XI); - } - return rc; -} - -/* bfmlal_za_zzv.xml */ -int bfmlal_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|op=1|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1200C10) { - decode_fields32(ENC_BFMLAL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_BFMLAL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=1|S=0|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1200810) { - decode_fields32(ENC_BFMLAL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_BFMLAL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=1|S=0|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1300810) { - decode_fields32(ENC_BFMLAL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_BFMLAL_ZA_ZZV_4X1); - } - return rc; -} - -/* bfmlal_za_zzw.xml */ -int bfmlal_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|op=1|S=0|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1A00810) { - decode_fields32(ENC_BFMLAL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_BFMLAL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|op=1|S=0|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1A10810) { - decode_fields32(ENC_BFMLAL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_BFMLAL_ZA_ZZW_4X4); - } - return rc; -} - -/* bfmlalb_z_zzz.xml */ -int bfmlalb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|1|o2=1|1|Zm=xxxxx|10|op=0|00|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E08000) { - decode_fields32(ENC_BFMLALB_Z_ZZZ_, ctx, instr); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - OK(ENC_BFMLALB_Z_ZZZ_); - } - return rc; -} - -/* bfmlalb_z_zzzi.xml */ -int bfmlalb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|1|o2=1|1|i3h=xx|Zm=xxx|01|op=0|0|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64E04000) { - decode_fields32(ENC_BFMLALB_Z_ZZZI_, ctx, instr); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = FALSE; - OK(ENC_BFMLALB_Z_ZZZI_); - } - return rc; -} - -/* bfmlalt_z_zzz.xml */ -int bfmlalt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|1|o2=1|1|Zm=xxxxx|10|op=0|00|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E08400) { - decode_fields32(ENC_BFMLALT_Z_ZZZ_, ctx, instr); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - OK(ENC_BFMLALT_Z_ZZZ_); - } - return rc; -} - -/* bfmlalt_z_zzzi.xml */ -int bfmlalt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|1|o2=1|1|i3h=xx|Zm=xxx|01|op=0|0|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64E04400) { - decode_fields32(ENC_BFMLALT_Z_ZZZI_, ctx, instr); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = FALSE; - OK(ENC_BFMLALT_Z_ZZZI_); - } - return rc; -} - -/* bfmls_z_p_zzz.xml */ -int bfmls_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|1|Zm=xxxxx|0|0|op=1|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x65202000) { - decode_fields32(ENC_BFMLS_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - ctx->op3_neg = FALSE; - OK(ENC_BFMLS_Z_P_ZZZ_); - } - return rc; -} - -/* bfmls_z_zzzi.xml */ -int bfmls_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|0000|o2=1|op=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x64200C00) { - decode_fields32(ENC_BFMLS_Z_ZZZI_H, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - ctx->op3_neg = FALSE; - OK(ENC_BFMLS_Z_ZZZI_H); - } - return rc; -} - -/* bfmls_za_zzi.xml */ -int bfmls_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|op=1|S=1|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09030)==0xC1101030) { - decode_fields32(ENC_BFMLS_ZA_ZZI_H2XI, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_BFMLS_ZA_ZZI_H2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|0|op=1|S=1|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09070)==0xC1109030) { - decode_fields32(ENC_BFMLS_ZA_ZZI_H4XI, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_BFMLS_ZA_ZZI_H4XI); - } - return rc; -} - -/* bfmls_za_zzv.xml */ -int bfmls_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=1|10|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1601C08) { - decode_fields32(ENC_BFMLS_ZA_ZZV_2X1_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFMLS_ZA_ZZV_2X1_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=1|11|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1701C08) { - decode_fields32(ENC_BFMLS_ZA_ZZV_4X1_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFMLS_ZA_ZZV_4X1_16); - } - return rc; -} - -/* bfmls_za_zzw.xml */ -int bfmls_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|0|S=1|1|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1E01018) { - decode_fields32(ENC_BFMLS_ZA_ZZW_2X2_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFMLS_ZA_ZZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|00|S=1|1|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1E11018) { - decode_fields32(ENC_BFMLS_ZA_ZZW_4X4_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFMLS_ZA_ZZW_4X4_16); - } - return rc; -} - -/* bfmlsl_za_zzi.xml */ -int bfmlsl_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|op=1|S=1|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1801018) { - decode_fields32(ENC_BFMLSL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_BFMLSL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|op=1|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1901018) { - decode_fields32(ENC_BFMLSL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_BFMLSL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|op=1|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1909018) { - decode_fields32(ENC_BFMLSL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_BFMLSL_ZA_ZZI_4XI); - } - return rc; -} - -/* bfmlsl_za_zzv.xml */ -int bfmlsl_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|op=1|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1200C18) { - decode_fields32(ENC_BFMLSL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_BFMLSL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=1|S=1|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1200818) { - decode_fields32(ENC_BFMLSL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_BFMLSL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=1|S=1|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1300818) { - decode_fields32(ENC_BFMLSL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_BFMLSL_ZA_ZZV_4X1); - } - return rc; -} - -/* bfmlsl_za_zzw.xml */ -int bfmlsl_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|op=1|S=1|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1A00818) { - decode_fields32(ENC_BFMLSL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_BFMLSL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|op=1|S=1|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1A10818) { - decode_fields32(ENC_BFMLSL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_BFMLSL_ZA_ZZW_4X4); - } - return rc; -} - -/* bfmlslb_z_zzz.xml */ -int bfmlslb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=1|1|Zm=xxxxx|10|op=1|00|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E0A000) { - decode_fields32(ENC_BFMLSLB_Z_ZZZ_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - OK(ENC_BFMLSLB_Z_ZZZ_); - } - return rc; -} - -/* bfmlslb_z_zzzi.xml */ -int bfmlslb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=1|1|i3h=xx|Zm=xxx|01|op=1|0|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64E06000) { - decode_fields32(ENC_BFMLSLB_Z_ZZZI_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = TRUE; - OK(ENC_BFMLSLB_Z_ZZZI_); - } - return rc; -} - -/* bfmlslt_z_zzz.xml */ -int bfmlslt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=1|1|Zm=xxxxx|10|op=1|00|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E0A400) { - decode_fields32(ENC_BFMLSLT_Z_ZZZ_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - OK(ENC_BFMLSLT_Z_ZZZ_); - } - return rc; -} - -/* bfmlslt_z_zzzi.xml */ -int bfmlslt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=1|1|i3h=xx|Zm=xxx|01|op=1|0|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64E06400) { - decode_fields32(ENC_BFMLSLT_Z_ZZZI_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = TRUE; - OK(ENC_BFMLSLT_Z_ZZZI_); - } - return rc; -} - -/* bfmmla_z16_zzz.xml */ -int bfmmla_z16_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|01|op=1|1|Zm=xxxxx|111000|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E0E000) { - decode_fields32(ENC_BFMMLA_Z_ZZZ_H, ctx, instr); - if(!HaveSVE_B16MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_BFMMLA_Z_ZZZ_H); - } - return rc; -} - -/* bfmmla_z_zzz.xml */ -int bfmmla_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|opc=01|1|Zm=xxxxx|111001|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6460E400) { - decode_fields32(ENC_BFMMLA_Z_ZZZ_, ctx, instr); - if(!HaveSVE() || !HaveBF16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_BFMMLA_Z_ZZZ_); - } - return rc; -} - -/* bfmop4a_za32_zz.xml */ -int bfmop4a_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81100000) { - decode_fields32(ENC_BFMOP4A_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81000000) { - decode_fields32(ENC_BFMOP4A_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81000200) { - decode_fields32(ENC_BFMOP4A_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81100200) { - decode_fields32(ENC_BFMOP4A_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA32_ZZ_H2X2); - } - return rc; -} - -/* bfmop4a_za_zz.xml */ -int bfmop4a_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81300008) { - decode_fields32(ENC_BFMOP4A_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81200008) { - decode_fields32(ENC_BFMOP4A_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81200208) { - decode_fields32(ENC_BFMOP4A_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81300208) { - decode_fields32(ENC_BFMOP4A_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_BFMOP4A_ZA_ZZ_H2X2); - } - return rc; -} - -/* bfmop4s_za32_zz.xml */ -int bfmop4s_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81100010) { - decode_fields32(ENC_BFMOP4S_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81000010) { - decode_fields32(ENC_BFMOP4S_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81000210) { - decode_fields32(ENC_BFMOP4S_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81100210) { - decode_fields32(ENC_BFMOP4S_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA32_ZZ_H2X2); - } - return rc; -} - -/* bfmop4s_za_zz.xml */ -int bfmop4s_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81300018) { - decode_fields32(ENC_BFMOP4S_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81200018) { - decode_fields32(ENC_BFMOP4S_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81200218) { - decode_fields32(ENC_BFMOP4S_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81300218) { - decode_fields32(ENC_BFMOP4S_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_BFMOP4S_ZA_ZZ_H2X2); - } - return rc; -} - -/* bfmopa_za32_pp_zz.xml */ -int bfmopa_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|00|0000|1|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|00|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x81800000) { - decode_fields32(ENC_BFMOPA_ZA32_PP_ZZ_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BFMOPA_ZA32_PP_ZZ_); - } - return rc; -} - -/* bfmopa_za_pp_zz.xml */ -int bfmopa_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|1|10|1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|10|0|ZAda=x */ - if((INSWORD & 0xFFE0001E)==0x81A00008) { - decode_fields32(ENC_BFMOPA_ZA_PP_ZZ_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BFMOPA_ZA_PP_ZZ_16); - } - return rc; -} - -/* bfmops_za32_pp_zz.xml */ -int bfmops_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|00|0000|1|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|00|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x81800010) { - decode_fields32(ENC_BFMOPS_ZA32_PP_ZZ_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BFMOPS_ZA32_PP_ZZ_); - } - return rc; -} - -/* bfmops_za_pp_zz.xml */ -int bfmops_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|1|10|1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|10|0|ZAda=x */ - if((INSWORD & 0xFFE0001E)==0x81A00018) { - decode_fields32(ENC_BFMOPS_ZA_PP_ZZ_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BFMOPS_ZA_PP_ZZ_16); - } - return rc; -} - -/* bfmul_mz_zzv.xml */ -int bfmul_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|0|111010|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFFE1FC21)==0xC120E800) { - decode_fields32(ENC_BFMUL_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_BFMUL_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|1|111010|Zn=xxx|0|0|Zd=xxx|0|0 */ - if((INSWORD & 0xFFE1FC63)==0xC121E800) { - decode_fields32(ENC_BFMUL_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_BFMUL_MZ_ZZV_4X1); - } - return rc; -} - -/* bfmul_mz_zzw.xml */ -int bfmul_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|0|111001|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFFE1FC21)==0xC120E400) { - decode_fields32(ENC_BFMUL_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_BFMUL_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxx|01|111001|Zn=xxx|0|0|Zd=xxx|0|0 */ - if((INSWORD & 0xFFE3FC63)==0xC121E400) { - decode_fields32(ENC_BFMUL_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_BFMUL_MZ_ZZW_4X4); - } - return rc; -} - -/* bfmul_z_p_zz.xml */ -int bfmul_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=0010|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65028000) { - decode_fields32(ENC_BFMUL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFMUL_Z_P_ZZ_); - } - return rc; -} - -/* bfmul_z_zz.xml */ -int bfmul_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|Zm=xxxxx|000|opc=010|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x65000800) { - decode_fields32(ENC_BFMUL_Z_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFMUL_Z_ZZ_); - } - return rc; -} - -/* bfmul_z_zzi.xml */ -int bfmul_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|0010|o2=1|0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x64202800) { - decode_fields32(ENC_BFMUL_Z_ZZI_H, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFMUL_Z_ZZI_H); - } - return rc; -} - -/* bfscale_mz_zzv.xml */ -int bfscale_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10100|0|01|100|Zdn=xxxx|op=0 */ - if((INSWORD & 0xFFF0FFE1)==0xC120A180) { - decode_fields32(ENC_BFSCALE_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_BFSCALE_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|10|Zm=xxxx|10101|0|01|100|Zdn=xxx|0|op=0 */ - if((INSWORD & 0xFFF0FFE3)==0xC120A980) { - decode_fields32(ENC_BFSCALE_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_BFSCALE_MZ_ZZV_4X1); - } - return rc; -} - -/* bfscale_mz_zzw.xml */ -int bfscale_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxxx|0101100|011|opc=00|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFFE1FFE1)==0xC120B180) { - decode_fields32(ENC_BFSCALE_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_BFSCALE_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=00|1|Zm=xxx|00101110|011|opc=00|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFFE3FFE3)==0xC120B980) { - decode_fields32(ENC_BFSCALE_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_BFSCALE_MZ_ZZW_4X4); - } - return rc; -} - -/* bfscale_z_p_zz.xml */ -int bfscale_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=1001|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65098000) { - decode_fields32(ENC_BFSCALE_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_BFSCALE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFSCALE_Z_P_ZZ_); - } - return rc; -} - -/* bfsub_z_p_zz.xml */ -int bfsub_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|0|opc=0001|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65018000) { - decode_fields32(ENC_BFSUB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BFSUB_Z_P_ZZ_); - } - return rc; -} - -/* bfsub_z_zz.xml */ -int bfsub_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=00|0|Zm=xxxxx|000|opc=001|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x65000400) { - decode_fields32(ENC_BFSUB_Z_ZZ_, ctx, instr); - if(!HaveSVE_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BFSUB_Z_ZZ_); - } - return rc; -} - -/* bfsub_za_zw.xml */ -int bfsub_za_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|00|10|00|Rv=xx|111|Zm=xxxx|0|0|S=1|off3=xxx */ - if((INSWORD & 0xFFFF9C38)==0xC1E41C08) { - decode_fields32(ENC_BFSUB_ZA_ZW_2X2_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_BFSUB_ZA_ZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=1|1|00|10|10|Rv=xx|111|Zm=xxx|00|0|S=1|off3=xxx */ - if((INSWORD & 0xFFFF9C78)==0xC1E51C08) { - decode_fields32(ENC_BFSUB_ZA_ZW_4X4_16, ctx, instr); - if(!HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_BFSUB_ZA_ZW_4X4_16); - } - return rc; -} - -/* bftmopa_za32_zzzi.xml */ -int bftmopa_za32_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|1|01|0|Zm=xxxxx|0|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x81400000) { - decode_fields32(ENC_BFTMOPA_ZA32_ZZZI_H2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BFTMOPA_ZA32_ZZZI_H2X1); - } - return rc; -} - -/* bftmopa_za_zzzi.xml */ -int bftmopa_za_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|1|01|1|Zm=xxxxx|0|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|1|0|0|ZAda=x */ - if((INSWORD & 0xFFE0E00E)==0x81600008) { - decode_fields32(ENC_BFTMOPA_ZA_ZZZI_H2X1, ctx, instr); - if(!HaveSME_TMOP() || !HaveSME_B16B16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BFTMOPA_ZA_ZZZI_H2X1); - } - return rc; -} - -/* bfvdot_za_zzi.xml */ -int bfvdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=0|i2=xx|Zn=xxxx|opc2=011|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1500018) { - decode_fields32(ENC_BFVDOT_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_BFVDOT_ZA_ZZI_2XI); - } - return rc; -} - -/* bgrp_z_zz.xml */ -int bgrp_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|11|opc=10|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500B800) { - decode_fields32(ENC_BGRP_Z_ZZ_, ctx, instr); - if(!HaveSVE_BitPerm()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BGRP_Z_ZZ_); - } - return rc; -} - -/* bic_and_z_zi.xml */ -int bic_and_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|opc=10|00|00|imm13=xxxxxxxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5800000) { - decode_fields32(ENC_BIC_Z_ZI__AND_Z_ZI_, ctx, instr); - OK(ENC_BIC_Z_ZI__AND_Z_ZI_); - } - return rc; -} - -/* bic_p_p_pp.xml */ -int bic_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25004010) { - decode_fields32(ENC_BIC_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_BIC_P_P_PP_Z); - } - return rc; -} - -/* bic_z_p_zz.xml */ -int bic_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|11|opc=011|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41B0000) { - decode_fields32(ENC_BIC_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_BIC_Z_P_ZZ_); - } - return rc; -} - -/* bic_z_zz.xml */ -int bic_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|opc=11|1|Zm=xxxxx|001|100|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E03000) { - decode_fields32(ENC_BIC_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_BIC_Z_ZZ_); - } - return rc; -} - -/* bics_p_p_pp.xml */ -int bics_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25404010) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_BICS_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_BICS_P_P_PP_Z); - } - return rc; -} - -/* bmopa_za_pp_zz.xml */ -int bmopa_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|0|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|10|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x80800008) { - decode_fields32(ENC_BMOPA_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BMOPA_ZA_PP_ZZ_32); - } - return rc; -} - -/* bmops_za_pp_zz.xml */ -int bmops_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|0|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|10|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x80800018) { - decode_fields32(ENC_BMOPS_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_BMOPS_ZA_PP_ZZ_32); - } - return rc; -} - -/* brka_p_p_p.xml */ -int brka_p_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|B=0|S=0|01|0000|01|Pg=xxxx|0|Pn=xxxx|M=x|Pd=xxxx */ - if((INSWORD & 0xFFFFC200)==0x25104000) { - decode_fields32(ENC_BRKA_P_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Pd); - ctx->merging = (ctx->M==1); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_BRKA_P_P_P_); - } - return rc; -} - -/* brkas_p_p_p.xml */ -int brkas_p_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|B=0|S=1|01|0000|01|Pg=xxxx|0|Pn=xxxx|M=0|Pd=xxxx */ - if((INSWORD & 0xFFFFC210)==0x25504000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_BRKAS_P_P_P_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Pd); - ctx->merging = FALSE; - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_BRKAS_P_P_P_Z); - } - return rc; -} - -/* brkb_p_p_p.xml */ -int brkb_p_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|B=1|S=0|01|0000|01|Pg=xxxx|0|Pn=xxxx|M=x|Pd=xxxx */ - if((INSWORD & 0xFFFFC200)==0x25904000) { - decode_fields32(ENC_BRKB_P_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Pd); - ctx->merging = (ctx->M==1); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_BRKB_P_P_P_); - } - return rc; -} - -/* brkbs_p_p_p.xml */ -int brkbs_p_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|B=1|S=1|01|0000|01|Pg=xxxx|0|Pn=xxxx|M=0|Pd=xxxx */ - if((INSWORD & 0xFFFFC210)==0x25D04000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_BRKBS_P_P_P_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Pd); - ctx->merging = FALSE; - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_BRKBS_P_P_P_Z); - } - return rc; -} - -/* brkn_p_p_pp.xml */ -int brkn_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|0|S=0|01|1000|01|Pg=xxxx|0|Pn=xxxx|0|Pdm=xxxx */ - if((INSWORD & 0xFFFFC210)==0x25184000) { - decode_fields32(ENC_BRKN_P_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->dm = UINT(ctx->Pdm); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_BRKN_P_P_PP_); - } - return rc; -} - -/* brkns_p_p_pp.xml */ -int brkns_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|0|S=1|01|1000|01|Pg=xxxx|0|Pn=xxxx|0|Pdm=xxxx */ - if((INSWORD & 0xFFFFC210)==0x25584000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_BRKNS_P_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->dm = UINT(ctx->Pdm); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_BRKNS_P_P_PP_); - } - return rc; -} - -/* brkpa_p_p_pp.xml */ -int brkpa_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|11|Pg=xxxx|0|Pn=xxxx|B=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x2500C000) { - decode_fields32(ENC_BRKPA_P_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_BRKPA_P_P_PP_); - } - return rc; -} - -/* brkpas_p_p_pp.xml */ -int brkpas_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|00|Pm=xxxx|11|Pg=xxxx|0|Pn=xxxx|B=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x2540C000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_BRKPAS_P_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_BRKPAS_P_P_PP_); - } - return rc; -} - -/* brkpb_p_p_pp.xml */ -int brkpb_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|11|Pg=xxxx|0|Pn=xxxx|B=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x2500C010) { - decode_fields32(ENC_BRKPB_P_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_BRKPB_P_P_PP_); - } - return rc; -} - -/* brkpbs_p_p_pp.xml */ -int brkpbs_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|00|Pm=xxxx|11|Pg=xxxx|0|Pn=xxxx|B=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x2540C010) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_BRKPBS_P_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_BRKPBS_P_P_PP_); - } - return rc; -} - -/* bsl1n_z_zzz.xml */ -int bsl1n_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|opc=01|1|Zm=xxxxx|001|11|o2=1|Zk=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4603C00) { - decode_fields32(ENC_BSL1N_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(ctx->Zk); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_BSL1N_Z_ZZZ_); - } - return rc; -} - -/* bsl2n_z_zzz.xml */ -int bsl2n_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|opc=10|1|Zm=xxxxx|001|11|o2=1|Zk=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4A03C00) { - decode_fields32(ENC_BSL2N_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(ctx->Zk); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_BSL2N_Z_ZZZ_); - } - return rc; -} - -/* bsl_z_zzz.xml */ -int bsl_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|opc=00|1|Zm=xxxxx|001|11|o2=1|Zk=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4203C00) { - decode_fields32(ENC_BSL_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(ctx->Zk); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_BSL_Z_ZZZ_); - } - return rc; -} - -/* cadd_z_zz.xml */ -int cadd_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|0000|op=0|11|011|rot=x|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FF800)==0x4500D800) { - decode_fields32(ENC_CADD_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - ctx->sub_i = (ctx->rot==0); - ctx->sub_r = (ctx->rot==1); - OK(ENC_CADD_Z_ZZ_); - } - return rc; -} - -/* cdot_z_zzz.xml */ -int cdot_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|001|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20F000)==0x44001000) { - decode_fields32(ENC_CDOT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_i = (SLICE(ctx->rot,0,0)==SLICE(ctx->rot,1,1)); - OK(ENC_CDOT_Z_ZZZ_); - } - return rc; -} - -/* cdot_z_zzzi.xml */ -int cdot_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|0100|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x44A04000) { - decode_fields32(ENC_CDOT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_i = (SLICE(ctx->rot,0,0)==SLICE(ctx->rot,1,1)); - OK(ENC_CDOT_Z_ZZZI_S); - } - /* class iclass_16_bit_to_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|0100|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x44E04000) { - decode_fields32(ENC_CDOT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_i = (SLICE(ctx->rot,0,0)==SLICE(ctx->rot,1,1)); - OK(ENC_CDOT_Z_ZZZI_D); - } - return rc; -} - -/* clasta_r_p_z.xml */ -int clasta_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|1|000|B=0|10|1|Pg=xxx|Zm=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x530A000) { - decode_fields32(ENC_CLASTA_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Rdn); - ctx->m = UINT(ctx->Zm); - ctx->csize = (ctx->esize<0x40)!=0 ? 0x20 : 0x40; - ctx->isBefore = FALSE; - OK(ENC_CLASTA_R_P_Z_); - } - return rc; -} - -/* clasta_v_p_z.xml */ -int clasta_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|101|B=0|10|0|Pg=xxx|Zm=xxxxx|Vdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x52A8000) { - decode_fields32(ENC_CLASTA_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Vdn); - ctx->m = UINT(ctx->Zm); - ctx->isBefore = FALSE; - OK(ENC_CLASTA_V_P_Z_); - } - return rc; -} - -/* clasta_z_p_zz.xml */ -int clasta_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|100|B=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5288000) { - decode_fields32(ENC_CLASTA_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->isBefore = FALSE; - OK(ENC_CLASTA_Z_P_ZZ_); - } - return rc; -} - -/* clastb_r_p_z.xml */ -int clastb_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|1|000|B=1|10|1|Pg=xxx|Zm=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x531A000) { - decode_fields32(ENC_CLASTB_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Rdn); - ctx->m = UINT(ctx->Zm); - ctx->csize = (ctx->esize<0x40)!=0 ? 0x20 : 0x40; - ctx->isBefore = TRUE; - OK(ENC_CLASTB_R_P_Z_); - } - return rc; -} - -/* clastb_v_p_z.xml */ -int clastb_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|101|B=1|10|0|Pg=xxx|Zm=xxxxx|Vdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x52B8000) { - decode_fields32(ENC_CLASTB_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Vdn); - ctx->m = UINT(ctx->Zm); - ctx->isBefore = TRUE; - OK(ENC_CLASTB_V_P_Z_); - } - return rc; -} - -/* clastb_z_p_zz.xml */ -int clastb_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|100|B=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5298000) { - decode_fields32(ENC_CLASTB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->isBefore = TRUE; - OK(ENC_CLASTB_Z_P_ZZ_); - } - return rc; -} - -/* cls_z_p_z.xml */ -int cls_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|1|opc=000|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x418A000) { - decode_fields32(ENC_CLS_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_CLS_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|1|opc=000|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x408A000) { - decode_fields32(ENC_CLS_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_CLS_Z_P_Z_Z); - } - return rc; -} - -/* clz_z_p_z.xml */ -int clz_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|1|opc=001|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x419A000) { - decode_fields32(ENC_CLZ_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_CLZ_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|1|opc=001|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x409A000) { - decode_fields32(ENC_CLZ_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_CLZ_Z_P_Z_Z); - } - return rc; -} - -/* cmla_z_zzz.xml */ -int cmla_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|01|op=0|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20F000)==0x44002000) { - decode_fields32(ENC_CMLA_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - ctx->sub_i = (SLICE(ctx->rot,1,1)==1); - OK(ENC_CMLA_Z_ZZZ_); - } - return rc; -} - -/* cmla_z_zzzi.xml */ -int cmla_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|0110|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x44A06000) { - decode_fields32(ENC_CMLA_Z_ZZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - ctx->sub_i = (SLICE(ctx->rot,1,1)==1); - OK(ENC_CMLA_Z_ZZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|0110|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x44E06000) { - decode_fields32(ENC_CMLA_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - ctx->sub_i = (SLICE(ctx->rot,1,1)==1); - OK(ENC_CMLA_Z_ZZZI_S); - } - return rc; -} - -/* cmpeq_p_p_zi.xml */ -int cmpeq_p_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_equal */ - /* 001|0010|1|size=xx|0|imm5=xxxxx|op=1|0|o2=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x25008000) { - decode_fields32(ENC_CMPEQ_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_EQ; - ctx->imm = SInt(ctx->imm5,5); - ctx->unsigned_ = FALSE; - OK(ENC_CMPEQ_P_P_ZI_); - } - /* class iclass_greater_than */ - /* 001|0010|1|size=xx|0|imm5=xxxxx|op=0|0|lt=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x25000010) { - decode_fields32(ENC_CMPGT_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - ctx->imm = SInt(ctx->imm5,5); - ctx->unsigned_ = FALSE; - OK(ENC_CMPGT_P_P_ZI_); - } - /* class iclass_greater_than_or_equal */ - /* 001|0010|1|size=xx|0|imm5=xxxxx|op=0|0|lt=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x25000000) { - decode_fields32(ENC_CMPGE_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - ctx->imm = SInt(ctx->imm5,5); - ctx->unsigned_ = FALSE; - OK(ENC_CMPGE_P_P_ZI_); - } - /* class iclass_higher */ - /* 001|0010|0|size=xx|1|imm7=xxxxxxx|lt=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF202010)==0x24200010) { - decode_fields32(ENC_CMPHI_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - ctx->imm = UINT(ctx->imm7); - ctx->unsigned_ = TRUE; - OK(ENC_CMPHI_P_P_ZI_); - } - /* class iclass_higher_or_same */ - /* 001|0010|0|size=xx|1|imm7=xxxxxxx|lt=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF202010)==0x24200000) { - decode_fields32(ENC_CMPHS_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - ctx->imm = UINT(ctx->imm7); - ctx->unsigned_ = TRUE; - OK(ENC_CMPHS_P_P_ZI_); - } - /* class iclass_less_than */ - /* 001|0010|1|size=xx|0|imm5=xxxxx|op=0|0|lt=1|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x25002000) { - decode_fields32(ENC_CMPLT_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LT; - ctx->imm = SInt(ctx->imm5,5); - ctx->unsigned_ = FALSE; - OK(ENC_CMPLT_P_P_ZI_); - } - /* class iclass_less_than_or_equal */ - /* 001|0010|1|size=xx|0|imm5=xxxxx|op=0|0|lt=1|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x25002010) { - decode_fields32(ENC_CMPLE_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LE; - ctx->imm = SInt(ctx->imm5,5); - ctx->unsigned_ = FALSE; - OK(ENC_CMPLE_P_P_ZI_); - } - /* class iclass_lower */ - /* 001|0010|0|size=xx|1|imm7=xxxxxxx|lt=1|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF202010)==0x24202000) { - decode_fields32(ENC_CMPLO_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LT; - ctx->imm = UINT(ctx->imm7); - ctx->unsigned_ = TRUE; - OK(ENC_CMPLO_P_P_ZI_); - } - /* class iclass_lower_or_same */ - /* 001|0010|0|size=xx|1|imm7=xxxxxxx|lt=1|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF202010)==0x24202010) { - decode_fields32(ENC_CMPLS_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LE; - ctx->imm = UINT(ctx->imm7); - ctx->unsigned_ = TRUE; - OK(ENC_CMPLS_P_P_ZI_); - } - /* class iclass_not_equal */ - /* 001|0010|1|size=xx|0|imm5=xxxxx|op=1|0|o2=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x25008010) { - decode_fields32(ENC_CMPNE_P_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_NE; - ctx->imm = SInt(ctx->imm5,5); - ctx->unsigned_ = FALSE; - OK(ENC_CMPNE_P_P_ZI_); - } - return rc; -} - -/* cmpeq_p_p_zw.xml */ -int cmpeq_p_p_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=0|0|o2=1|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24002000) { - decode_fields32(ENC_CMPEQ_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_EQ; - ctx->unsigned_ = FALSE; - OK(ENC_CMPEQ_P_P_ZW_); - } - /* class iclass_greater_than */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=0|1|lt=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24004010) { - decode_fields32(ENC_CMPGT_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - ctx->unsigned_ = FALSE; - OK(ENC_CMPGT_P_P_ZW_); - } - /* class iclass_greater_than_or_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=0|1|lt=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24004000) { - decode_fields32(ENC_CMPGE_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - ctx->unsigned_ = FALSE; - OK(ENC_CMPGE_P_P_ZW_); - } - /* class iclass_higher */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=1|1|lt=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x2400C010) { - decode_fields32(ENC_CMPHI_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - ctx->unsigned_ = TRUE; - OK(ENC_CMPHI_P_P_ZW_); - } - /* class iclass_higher_or_same */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=1|1|lt=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x2400C000) { - decode_fields32(ENC_CMPHS_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - ctx->unsigned_ = TRUE; - OK(ENC_CMPHS_P_P_ZW_); - } - /* class iclass_less_than */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=0|1|lt=1|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24006000) { - decode_fields32(ENC_CMPLT_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LT; - ctx->unsigned_ = FALSE; - OK(ENC_CMPLT_P_P_ZW_); - } - /* class iclass_less_than_or_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=0|1|lt=1|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24006010) { - decode_fields32(ENC_CMPLE_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LE; - ctx->unsigned_ = FALSE; - OK(ENC_CMPLE_P_P_ZW_); - } - /* class iclass_lower */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=1|1|lt=1|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x2400E000) { - decode_fields32(ENC_CMPLO_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LT; - ctx->unsigned_ = TRUE; - OK(ENC_CMPLO_P_P_ZW_); - } - /* class iclass_lower_or_same */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|U=1|1|lt=1|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x2400E010) { - decode_fields32(ENC_CMPLS_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_LE; - ctx->unsigned_ = TRUE; - OK(ENC_CMPLS_P_P_ZW_); - } - /* class iclass_not_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=0|0|o2=1|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24002010) { - decode_fields32(ENC_CMPNE_P_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_NE; - ctx->unsigned_ = FALSE; - OK(ENC_CMPNE_P_P_ZW_); - } - return rc; -} - -/* cmpeq_p_p_zz.xml */ -int cmpeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=1|0|o2=1|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x2400A000) { - decode_fields32(ENC_CMPEQ_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_EQ; - ctx->unsigned_ = FALSE; - OK(ENC_CMPEQ_P_P_ZZ_); - } - /* class iclass_greater_than */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=1|0|o2=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24008010) { - decode_fields32(ENC_CMPGT_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - ctx->unsigned_ = FALSE; - OK(ENC_CMPGT_P_P_ZZ_); - } - /* class iclass_greater_than_or_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=1|0|o2=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24008000) { - decode_fields32(ENC_CMPGE_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - ctx->unsigned_ = FALSE; - OK(ENC_CMPGE_P_P_ZZ_); - } - /* class iclass_higher */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=0|0|o2=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24000010) { - decode_fields32(ENC_CMPHI_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - ctx->unsigned_ = TRUE; - OK(ENC_CMPHI_P_P_ZZ_); - } - /* class iclass_higher_or_same */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=0|0|o2=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24000000) { - decode_fields32(ENC_CMPHS_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - ctx->unsigned_ = TRUE; - OK(ENC_CMPHS_P_P_ZZ_); - } - /* class iclass_not_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=1|0|o2=1|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x2400A010) { - decode_fields32(ENC_CMPNE_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_NE; - ctx->unsigned_ = FALSE; - OK(ENC_CMPNE_P_P_ZZ_); - } - return rc; -} - -/* cmple_cmpeq_p_p_zz.xml */ -int cmple_cmpeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_greater_than_or_equal */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=1|0|o2=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24008000) { - decode_fields32(ENC_CMPLE_P_P_ZZ__CMPGE_P_P_ZZ_, ctx, instr); - OK(ENC_CMPLE_P_P_ZZ__CMPGE_P_P_ZZ_); - } - return rc; -} - -/* cmplo_cmpeq_p_p_zz.xml */ -int cmplo_cmpeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_higher */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=0|0|o2=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24000010) { - decode_fields32(ENC_CMPLO_P_P_ZZ__CMPHI_P_P_ZZ_, ctx, instr); - OK(ENC_CMPLO_P_P_ZZ__CMPHI_P_P_ZZ_); - } - return rc; -} - -/* cmpls_cmpeq_p_p_zz.xml */ -int cmpls_cmpeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_higher_or_same */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=0|0|o2=0|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24000000) { - decode_fields32(ENC_CMPLS_P_P_ZZ__CMPHS_P_P_ZZ_, ctx, instr); - OK(ENC_CMPLS_P_P_ZZ__CMPHS_P_P_ZZ_); - } - return rc; -} - -/* cmplt_cmpeq_p_p_zz.xml */ -int cmplt_cmpeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_greater_than */ - /* 001|0010|0|size=xx|0|Zm=xxxxx|op=1|0|o2=0|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x24008010) { - decode_fields32(ENC_CMPLT_P_P_ZZ__CMPGT_P_P_ZZ_, ctx, instr); - OK(ENC_CMPLT_P_P_ZZ__CMPGT_P_P_ZZ_); - } - return rc; -} - -/* cnot_z_p_z.xml */ -int cnot_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|1|opc=011|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41BA000) { - decode_fields32(ENC_CNOT_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_CNOT_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|1|opc=011|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40BA000) { - decode_fields32(ENC_CNOT_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_CNOT_Z_P_Z_Z); - } - return rc; -} - -/* cnt_z_p_z.xml */ -int cnt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|1|opc=010|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41AA000) { - decode_fields32(ENC_CNT_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_CNT_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|1|opc=010|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40AA000) { - decode_fields32(ENC_CNT_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_CNT_Z_P_Z_Z); - } - return rc; -} - -/* cntb_r_s.xml */ -int cntb_r_s(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte */ - /* 000|0010|0|size=00|1|0|imm4=xxxx|11|100|op=0|pattern=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x420E000) { - decode_fields32(ENC_CNTB_R_S_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->d = UINT(ctx->Rd); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_CNTB_R_S_); - } - /* class iclass_doubleword */ - /* 000|0010|0|size=11|1|0|imm4=xxxx|11|100|op=0|pattern=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0E000) { - decode_fields32(ENC_CNTD_R_S_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->d = UINT(ctx->Rd); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_CNTD_R_S_); - } - /* class iclass_halfword */ - /* 000|0010|0|size=01|1|0|imm4=xxxx|11|100|op=0|pattern=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460E000) { - decode_fields32(ENC_CNTH_R_S_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->d = UINT(ctx->Rd); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_CNTH_R_S_); - } - /* class iclass_word */ - /* 000|0010|0|size=10|1|0|imm4=xxxx|11|100|op=0|pattern=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0E000) { - decode_fields32(ENC_CNTW_R_S_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->d = UINT(ctx->Rd); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_CNTW_R_S_); - } - return rc; -} - -/* cntp_r_p_p.xml */ -int cntp_r_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|100|opc=000|10|Pg=xxxx|0|Pn=xxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FC200)==0x25208000) { - decode_fields32(ENC_CNTP_R_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Rd); - OK(ENC_CNTP_R_P_P_); - } - return rc; -} - -/* cntp_r_pn.xml */ -int cntp_r_pn(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|100|opc=000|10|000|vl=x|1|PNn=xxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FFA00)==0x25208200) { - decode_fields32(ENC_CNTP_R_PN_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->PNn); - ctx->d = UINT(ctx->Rd); - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_CNTP_R_PN_); - } - return rc; -} - -/* compact_z_p_z.xml */ -int compact_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte_and_halfword */ - /* 000|0010|1|0|sz=x|1|0|000|1|10|0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFBFE000)==0x5218000) { - decode_fields32(ENC_COMPACT_Z_P_Z_S, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_COMPACT_Z_P_Z_S); - } - /* class iclass_word_and_doubleword */ - /* 000|0010|1|1|sz=x|1|0|000|1|10|0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFBFE000)==0x5A18000) { - decode_fields32(ENC_COMPACT_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_COMPACT_Z_P_Z_); - } - return rc; -} - -/* cpy_z_o_i.xml */ -int cpy_z_o_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|01|Pg=xxxx|0|M=0|sh=x|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF30C000)==0x5100000) { - decode_fields32(ENC_CPY_Z_O_I_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - ctx->imm = SInt(ctx->imm8,8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - /* unconditional alias */ - if(mov_cpy_z_o_i(ctx, instr)==0) return 0; - OK(ENC_CPY_Z_O_I_); - } - return rc; -} - -/* cpy_z_p_i.xml */ -int cpy_z_p_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|01|Pg=xxxx|0|M=1|sh=x|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF30C000)==0x5104000) { - decode_fields32(ENC_CPY_Z_P_I_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - ctx->imm = SInt(ctx->imm8,8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - /* unconditional alias */ - if(mov_cpy_z_p_i(ctx, instr)==0) return 0; - OK(ENC_CPY_Z_P_I_); - } - return rc; -} - -/* cpy_z_p_r.xml */ -int cpy_z_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|100|0|10|1|Pg=xxx|Rn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x528A000) { - decode_fields32(ENC_CPY_Z_P_R_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Zd); - /* unconditional alias */ - if(mov_cpy_z_p_r(ctx, instr)==0) return 0; - OK(ENC_CPY_Z_P_R_); - } - return rc; -} - -/* cpy_z_p_v.xml */ -int cpy_z_p_v(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|000|0|10|0|Pg=xxx|Vn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5208000) { - decode_fields32(ENC_CPY_Z_P_V_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Vn); - ctx->d = UINT(ctx->Zd); - /* unconditional alias */ - if(mov_cpy_z_p_v(ctx, instr)==0) return 0; - OK(ENC_CPY_Z_P_V_); - } - return rc; -} - -/* ctermeq_rr.xml */ -int ctermeq_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_equal */ - /* 001|0010|1|op=1|sz=x|1|Rm=xxxxx|00|10|00|Rn=xxxxx|ne=0|0000 */ - if((INSWORD & 0xFFA0FC1F)==0x25A02000) { - decode_fields32(ENC_CTERMEQ_RR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->cmp_op = Cmp_EQ; - OK(ENC_CTERMEQ_RR_); - } - /* class iclass_not_equal */ - /* 001|0010|1|op=1|sz=x|1|Rm=xxxxx|00|10|00|Rn=xxxxx|ne=1|0000 */ - if((INSWORD & 0xFFA0FC1F)==0x25A02010) { - decode_fields32(ENC_CTERMNE_RR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->cmp_op = Cmp_NE; - OK(ENC_CTERMNE_RR_); - } - return rc; -} - -/* decb_r_rs.xml */ -int decb_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte */ - /* 000|0010|0|size=00|1|1|imm4=xxxx|11|100|D=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x430E400) { - decode_fields32(ENC_DECB_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_DECB_R_RS_); - } - /* class iclass_doubleword */ - /* 000|0010|0|size=11|1|1|imm4=xxxx|11|100|D=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0E400) { - decode_fields32(ENC_DECD_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_DECD_R_RS_); - } - /* class iclass_halfword */ - /* 000|0010|0|size=01|1|1|imm4=xxxx|11|100|D=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470E400) { - decode_fields32(ENC_DECH_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_DECH_R_RS_); - } - /* class iclass_word */ - /* 000|0010|0|size=10|1|1|imm4=xxxx|11|100|D=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0E400) { - decode_fields32(ENC_DECW_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_DECW_R_RS_); - } - return rc; -} - -/* decd_z_zs.xml */ -int decd_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_doubleword */ - /* 000|0010|0|size=11|1|1|imm4=xxxx|11|000|D=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0C400) { - decode_fields32(ENC_DECD_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_DECD_Z_ZS_); - } - /* class iclass_halfword */ - /* 000|0010|0|size=01|1|1|imm4=xxxx|11|000|D=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470C400) { - decode_fields32(ENC_DECH_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_DECH_Z_ZS_); - } - /* class iclass_word */ - /* 000|0010|0|size=10|1|1|imm4=xxxx|11|000|D=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0C400) { - decode_fields32(ENC_DECW_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_DECW_Z_ZS_); - } - return rc; -} - -/* decp_r_p_r.xml */ -int decp_r_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|1|op=0|D=1|1000|1|opc2=00|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252D8800) { - decode_fields32(ENC_DECP_R_P_R_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - OK(ENC_DECP_R_P_R_); - } - return rc; -} - -/* decp_z_p_z.xml */ -int decp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|1|op=0|D=1|1000|0|opc2=00|Pm=xxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252D8000) { - decode_fields32(ENC_DECP_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_DECP_Z_P_Z_); - } - return rc; -} - -/* dup_z_i.xml */ -int dup_z_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|11|opc=00|0|11|sh=x|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2538C000) { - decode_fields32(ENC_DUP_Z_I_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(ctx->Zd); - ctx->imm = SInt(ctx->imm8,8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - /* unconditional alias */ - if(mov_dup_z_i(ctx, instr)==0) return 0; - OK(ENC_DUP_Z_I_); - } - return rc; -} - -/* dup_z_r.xml */ -int dup_z_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|00|000|001110|Rn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5203800) { - decode_fields32(ENC_DUP_Z_R_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Zd); - /* unconditional alias */ - if(mov_dup_z_r(ctx, instr)==0) return 0; - OK(ENC_DUP_Z_R_); - } - return rc; -} - -/* dup_z_zi.xml */ -int dup_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|imm2=xx|1|tsz=xxxxx|001000|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5202000) { - decode_fields32(ENC_DUP_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsz==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->lsb = LowestSetBit(ctx->tsz); - ctx->esize = (8) << (ctx->lsb); - ctx->imm = ((ctx->imm2<<5)|ctx->tsz); - ctx->index = UINT(SLICE(ctx->imm,6,(ctx->lsb+1))); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - /* regular aliases */ - if((BitCount(((ctx->imm2<<5)|ctx->tsz))==1) || (BitCount(((ctx->imm2<<5)|ctx->tsz))>1)) return mov_dup_z_zi(ctx, instr); - OK(ENC_DUP_Z_ZI_); - } - return rc; -} - -/* dupm_z_i.xml */ -int dupm_z_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|11|00|00|imm13=xxxxxxxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5C00000) { - decode_fields32(ENC_DUPM_Z_I_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->d = UINT(ctx->Zd); - DecodeBitMasksCheckUndefined(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0)); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0),SLICE(ctx->imm13,11,6)); - ctx->imm = dbmrt.wmask; - /* regular aliases */ - if(SVEMoveMaskPreferred(ctx->imm13)) return mov_dupm_z_i(ctx, instr); - OK(ENC_DUPM_Z_I_); - } - return rc; -} - -/* dupq_z_zi.xml */ -int dupq_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|1|00|1|i1=x|tsz=xxxx|001001|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5202400) { - decode_fields32(ENC_DUPQ_Z_ZI_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsz==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->lsb = LowestSetBit(ctx->tsz); - ctx->esize = (8) << (ctx->lsb); - ctx->imm = ((ctx->i1<<4)|ctx->tsz); - ctx->index = UINT(SLICE(ctx->imm,4,(ctx->lsb+1))); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_DUPQ_Z_ZI_); - } - return rc; -} - -/* eon_eor_z_zi.xml */ -int eon_eor_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|opc=01|00|00|imm13=xxxxxxxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5400000) { - decode_fields32(ENC_EON_Z_ZI__EOR_Z_ZI_, ctx, instr); - OK(ENC_EON_Z_ZI__EOR_Z_ZI_); - } - return rc; -} - -/* eor3_z_zzz.xml */ -int eor3_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|opc=00|1|Zm=xxxxx|001|11|o2=0|Zk=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4203800) { - decode_fields32(ENC_EOR3_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(ctx->Zk); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_EOR3_Z_ZZZ_); - } - return rc; -} - -/* eor_p_p_pp.xml */ -int eor_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25004200) { - decode_fields32(ENC_EOR_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - /* regular aliases */ - if(ctx->Pm==ctx->Pg) return not_eor_p_p_pp(ctx, instr); - OK(ENC_EOR_P_P_PP_Z); - } - return rc; -} - -/* eor_z_p_zz.xml */ -int eor_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|11|opc=001|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4190000) { - decode_fields32(ENC_EOR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_EOR_Z_P_ZZ_); - } - return rc; -} - -/* eor_z_zi.xml */ -int eor_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|opc=01|00|00|imm13=xxxxxxxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5400000) { - decode_fields32(ENC_EOR_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT(ctx->Zdn); - DecodeBitMasksCheckUndefined(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0)); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0),SLICE(ctx->imm13,11,6)); - ctx->imm = dbmrt.wmask; - OK(ENC_EOR_Z_ZI_); - } - return rc; -} - -/* eor_z_zz.xml */ -int eor_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|opc=10|1|Zm=xxxxx|001|100|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4A03000) { - decode_fields32(ENC_EOR_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_EOR_Z_ZZ_); - } - return rc; -} - -/* eorbt_z_zz.xml */ -int eorbt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|010|tb=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45009000) { - decode_fields32(ENC_EORBT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 0; - ctx->sel2 = 1; - OK(ENC_EORBT_Z_ZZ_); - } - return rc; -} - -/* eorqv_z_p_z.xml */ -int eorqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|111|opc=01|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41D2000) { - decode_fields32(ENC_EORQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_EORQV_Z_P_Z_); - } - return rc; -} - -/* eors_p_p_pp.xml */ -int eors_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25404200) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_EORS_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - /* regular aliases */ - if(ctx->Pm==ctx->Pg) return nots_eors_p_p_pp(ctx, instr); - OK(ENC_EORS_P_P_PP_Z); - } - return rc; -} - -/* eortb_z_zz.xml */ -int eortb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|010|tb=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45009400) { - decode_fields32(ENC_EORTB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 1; - ctx->sel2 = 0; - OK(ENC_EORTB_Z_ZZ_); - } - return rc; -} - -/* eorv_r_p_z.xml */ -int eorv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|110|opc=01|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4192000) { - decode_fields32(ENC_EORV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_EORV_R_P_Z_); - } - return rc; -} - -/* expand_z_p_z.xml */ -int expand_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|1|size=xx|1|1|000|1|10|0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5318000) { - decode_fields32(ENC_EXPAND_Z_P_Z_, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_EXPAND_Z_P_Z_); - } - return rc; -} - -/* ext_z_zi.xml */ -int ext_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_constructive */ - /* 000|0010|10|1|1|imm8h=xxxxx|000|imm8l=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x5600000) { - decode_fields32(ENC_EXT_Z_ZI_CON, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dst = UINT(ctx->Zd); - ctx->s1 = UINT(ctx->Zn); - ctx->s2 = ((ctx->s1+1)) % 32; - ctx->position = (UINT(((ctx->imm8h<<3)|ctx->imm8l))) * (8); - OK(ENC_EXT_Z_ZI_CON); - } - /* class iclass_destructive */ - /* 000|0010|10|0|1|imm8h=xxxxx|000|imm8l=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x5200000) { - decode_fields32(ENC_EXT_Z_ZI_DES, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dst = UINT(ctx->Zdn); - ctx->s1 = ctx->dst; - ctx->s2 = UINT(ctx->Zm); - ctx->position = (UINT(((ctx->imm8h<<3)|ctx->imm8l))) * (8); - OK(ENC_EXT_Z_ZI_DES); - } - return rc; -} - -/* extq_z_zi.xml */ -int extq_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|1|01|1|0|imm4=xxxx|001001|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x5602400) { - decode_fields32(ENC_EXTQ_Z_ZI_DES, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->position = (UINT(ctx->imm4)) << (3); - OK(ENC_EXTQ_Z_ZI_DES); - } - return rc; -} - -/* f1cvt_mz2_z8.xml */ -int f1cvt_mz2_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_f1cvt */ - /* 1|10|0000|1|opc=00|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=0 */ - if((INSWORD & 0xFFFFFC01)==0xC126E000) { - decode_fields32(ENC_F1CVT_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = FALSE; - OK(ENC_F1CVT_MZ2_Z8_); - } - /* class iclass_f2cvt */ - /* 1|10|0000|1|opc=10|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=0 */ - if((INSWORD & 0xFFFFFC01)==0xC1A6E000) { - decode_fields32(ENC_F2CVT_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = TRUE; - OK(ENC_F2CVT_MZ2_Z8_); - } - return rc; -} - -/* f1cvt_z_z8.xml */ -int f1cvt_z_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_f1cvt */ - /* 011|0010|1|00|001|00|L=0|0011|opc=00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65083000) { - decode_fields32(ENC_F1CVT_Z_Z8_B2H, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 8; - ctx->d_esize = 0x10; - ctx->issrc2 = FALSE; - OK(ENC_F1CVT_Z_Z8_B2H); - } - /* class iclass_f2cvt */ - /* 011|0010|1|00|001|00|L=0|0011|opc=01|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65083400) { - decode_fields32(ENC_F2CVT_Z_Z8_B2H, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 8; - ctx->d_esize = 0x10; - ctx->issrc2 = TRUE; - OK(ENC_F2CVT_Z_Z8_B2H); - } - return rc; -} - -/* f1cvtl_mz2_z8.xml */ -int f1cvtl_mz2_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_f1cvtl */ - /* 1|10|0000|1|opc=00|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=1 */ - if((INSWORD & 0xFFFFFC01)==0xC126E001) { - decode_fields32(ENC_F1CVTL_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = FALSE; - OK(ENC_F1CVTL_MZ2_Z8_); - } - /* class iclass_f2cvtl */ - /* 1|10|0000|1|opc=10|1|001|10|111000|Zn=xxxxx|Zd=xxxx|L=1 */ - if((INSWORD & 0xFFFFFC01)==0xC1A6E001) { - decode_fields32(ENC_F2CVTL_MZ2_Z8_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->issrc2 = TRUE; - OK(ENC_F2CVTL_MZ2_Z8_); - } - return rc; -} - -/* f1cvtlt_z_z8.xml */ -int f1cvtlt_z_z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_f1cvtlt */ - /* 011|0010|1|00|001|00|L=1|0011|opc=00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65093000) { - decode_fields32(ENC_F1CVTLT_Z_Z8_B2H, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->issrc2 = FALSE; - OK(ENC_F1CVTLT_Z_Z8_B2H); - } - /* class iclass_f2cvtlt */ - /* 011|0010|1|00|001|00|L=1|0011|opc=01|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x65093400) { - decode_fields32(ENC_F2CVTLT_Z_Z8_B2H, ctx, instr); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->issrc2 = TRUE; - OK(ENC_F2CVTLT_Z_Z8_B2H); - } - return rc; -} - -/* fabd_z_p_zz.xml */ -int fabd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|0|opc=1000|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65088000) { - decode_fields32(ENC_FABD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FABD_Z_P_ZZ_); - } - return rc; -} - -/* fabs_z_p_z.xml */ -int fabs_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|1|opc=100|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41CA000) { - decode_fields32(ENC_FABS_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FABS_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|1|opc=100|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40CA000) { - decode_fields32(ENC_FABS_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FABS_Z_P_Z_Z); - } - return rc; -} - -/* facge_p_p_zz.xml */ -int facge_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_greater_than */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=1|1|o2=1|Pg=xxx|Zn=xxxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x6500E010) { - decode_fields32(ENC_FACGT_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - OK(ENC_FACGT_P_P_ZZ_); - } - /* class iclass_greater_than_or_equal */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=1|1|o2=0|Pg=xxx|Zn=xxxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x6500C010) { - decode_fields32(ENC_FACGE_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - OK(ENC_FACGE_P_P_ZZ_); - } - return rc; -} - -/* facle_facge_p_p_zz.xml */ -int facle_facge_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_greater_than_or_equal */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=1|1|o2=0|Pg=xxx|Zn=xxxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x6500C010) { - decode_fields32(ENC_FACLE_P_P_ZZ__FACGE_P_P_ZZ_, ctx, instr); - OK(ENC_FACLE_P_P_ZZ__FACGE_P_P_ZZ_); - } - return rc; -} - -/* faclt_facge_p_p_zz.xml */ -int faclt_facge_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_greater_than */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=1|1|o2=1|Pg=xxx|Zn=xxxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x6500E010) { - decode_fields32(ENC_FACLT_P_P_ZZ__FACGT_P_P_ZZ_, ctx, instr); - OK(ENC_FACLT_P_P_ZZ__FACGT_P_P_ZZ_); - } - return rc; -} - -/* fadd_z_p_zs.xml */ -int fadd_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=000|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x65188000) { - decode_fields32(ENC_FADD_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? FPPointFive(0,ctx->esize) : FPOne(0,ctx->esize); - OK(ENC_FADD_Z_P_ZS_); - } - return rc; -} - -/* fadd_z_p_zz.xml */ -int fadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=0000|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65008000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FADD_Z_P_ZZ_); - } - return rc; -} - -/* fadd_z_zz.xml */ -int fadd_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|Zm=xxxxx|000|opc=000|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x65000000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FADD_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FADD_Z_ZZ_); - } - return rc; -} - -/* fadd_za_zw.xml */ -int fadd_za_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|00|Rv=xx|111|Zm=xxxx|0|0|S=0|off3=xxx */ - if((INSWORD & 0xFFBF9C38)==0xC1A01C00) { - decode_fields32(ENC_FADD_ZA_ZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FADD_ZA_ZW_2X2); - } - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|00|10|00|Rv=xx|111|Zm=xxxx|0|0|S=0|off3=xxx */ - if((INSWORD & 0xFFFF9C38)==0xC1A41C00) { - decode_fields32(ENC_FADD_ZA_ZW_2X2_16, ctx, instr); - if(!HaveSME_F16F16() && !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FADD_ZA_ZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|10|Rv=xx|111|Zm=xxx|00|0|S=0|off3=xxx */ - if((INSWORD & 0xFFBF9C78)==0xC1A11C00) { - decode_fields32(ENC_FADD_ZA_ZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FADD_ZA_ZW_4X4); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|00|10|10|Rv=xx|111|Zm=xxx|00|0|S=0|off3=xxx */ - if((INSWORD & 0xFFFF9C78)==0xC1A51C00) { - decode_fields32(ENC_FADD_ZA_ZW_4X4_16, ctx, instr); - if(!HaveSME_F16F16() && !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FADD_ZA_ZW_4X4_16); - } - return rc; -} - -/* fadda_v_p_z.xml */ -int fadda_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|011|0|opc=00|001|Pg=xxx|Zm=xxxxx|Vdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65182000) { - decode_fields32(ENC_FADDA_V_P_Z_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Vdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FADDA_V_P_Z_); - } - return rc; -} - -/* faddp_z_p_zz.xml */ -int faddp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=000|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x64108000) { - decode_fields32(ENC_FADDP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_FADDP_Z_P_ZZ_); - } - return rc; -} - -/* faddqv_z_p_z.xml */ -int faddqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=000|101|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6410A000) { - decode_fields32(ENC_FADDQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FADDQV_Z_P_Z_); - } - return rc; -} - -/* faddv_v_p_z.xml */ -int faddv_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|000|opc=000|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65002000) { - decode_fields32(ENC_FADDV_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FADDV_V_P_Z_); - } - return rc; -} - -/* famax_mz_zzw.xml */ -int famax_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|010|opc=10|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B140) { - decode_fields32(ENC_FAMAX_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FAMAX_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|010|opc=10|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120B940) { - decode_fields32(ENC_FAMAX_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FAMAX_MZ_ZZW_4X4); - } - return rc; -} - -/* famax_z_p_zz.xml */ -int famax_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|0|0|opc=1110|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x650E8000) { - decode_fields32(ENC_FAMAX_Z_P_ZZ_, ctx, instr); - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FAMAX_Z_P_ZZ_); - } - return rc; -} - -/* famin_mz_zzw.xml */ -int famin_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|010|opc=10|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFF21FFE1)==0xC120B141) { - decode_fields32(ENC_FAMIN_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FAMIN_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|010|opc=10|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFF23FFE3)==0xC120B941) { - decode_fields32(ENC_FAMIN_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveFAMINMAX()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FAMIN_MZ_ZZW_4X4); - } - return rc; -} - -/* famin_z_p_zz.xml */ -int famin_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|0|0|opc=1111|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x650F8000) { - decode_fields32(ENC_FAMIN_Z_P_ZZ_, ctx, instr); - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FAMIN_Z_P_ZZ_); - } - return rc; -} - -/* fcadd_z_p_zz.xml */ -int fcadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|size=xx|00000|rot=x|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3EE000)==0x64008000) { - decode_fields32(ENC_FCADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->sub_i = (ctx->rot==0); - ctx->sub_r = (ctx->rot==1); - OK(ENC_FCADD_Z_P_ZZ_); - } - return rc; -} - -/* fclamp_mz_zz.xml */ -int fclamp_mz_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxxx|110|000|Zn=xxxxx|Zd=xxxx|op=0 */ - if((INSWORD & 0xFF20FC01)==0xC120C000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FCLAMP_MZ_ZZ_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - OK(ENC_FCLAMP_MZ_ZZ_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxxx|110|010|Zn=xxxxx|Zd=xxx|0|op=0 */ - if((INSWORD & 0xFF20FC03)==0xC120C800 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FCLAMP_MZ_ZZ_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - OK(ENC_FCLAMP_MZ_ZZ_4); - } - return rc; -} - -/* fclamp_z_zz.xml */ -int fclamp_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size!=00|1|Zm=xxxxx|001001|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x64202400 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FCLAMP_Z_ZZ_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCLAMP_Z_ZZ_); - } - return rc; -} - -/* fcmeq_p_p_z0.xml */ -int fcmeq_p_p_z0(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_equal */ - /* 011|0010|1|size=xx|010|0|eq=1|lt=0|001|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF3FE010)==0x65122000) { - decode_fields32(ENC_FCMEQ_P_P_Z0_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->op = Cmp_EQ; - OK(ENC_FCMEQ_P_P_Z0_); - } - /* class iclass_greater_than */ - /* 011|0010|1|size=xx|010|0|eq=0|lt=0|001|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF3FE010)==0x65102010) { - decode_fields32(ENC_FCMGT_P_P_Z0_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->op = Cmp_GT; - OK(ENC_FCMGT_P_P_Z0_); - } - /* class iclass_greater_than_or_equal */ - /* 011|0010|1|size=xx|010|0|eq=0|lt=0|001|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF3FE010)==0x65102000) { - decode_fields32(ENC_FCMGE_P_P_Z0_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->op = Cmp_GE; - OK(ENC_FCMGE_P_P_Z0_); - } - /* class iclass_less_than */ - /* 011|0010|1|size=xx|010|0|eq=0|lt=1|001|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF3FE010)==0x65112000) { - decode_fields32(ENC_FCMLT_P_P_Z0_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->op = Cmp_LT; - OK(ENC_FCMLT_P_P_Z0_); - } - /* class iclass_less_than_or_equal */ - /* 011|0010|1|size=xx|010|0|eq=0|lt=1|001|Pg=xxx|Zn=xxxxx|ne=1|Pd=xxxx */ - if((INSWORD & 0xFF3FE010)==0x65112010) { - decode_fields32(ENC_FCMLE_P_P_Z0_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->op = Cmp_LE; - OK(ENC_FCMLE_P_P_Z0_); - } - /* class iclass_not_equal */ - /* 011|0010|1|size=xx|010|0|eq=1|lt=1|001|Pg=xxx|Zn=xxxxx|ne=0|Pd=xxxx */ - if((INSWORD & 0xFF3FE010)==0x65132000) { - decode_fields32(ENC_FCMNE_P_P_Z0_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->op = Cmp_NE; - OK(ENC_FCMNE_P_P_Z0_); - } - return rc; -} - -/* fcmeq_p_p_zz.xml */ -int fcmeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_equal */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=0|1|cmph=1|Pg=xxx|Zn=xxxxx|cmpl=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x65006000) { - decode_fields32(ENC_FCMEQ_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_EQ; - OK(ENC_FCMEQ_P_P_ZZ_); - } - /* class iclass_greater_than */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=0|1|cmph=0|Pg=xxx|Zn=xxxxx|cmpl=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x65004010) { - decode_fields32(ENC_FCMGT_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GT; - OK(ENC_FCMGT_P_P_ZZ_); - } - /* class iclass_greater_than_or_equal */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=0|1|cmph=0|Pg=xxx|Zn=xxxxx|cmpl=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x65004000) { - decode_fields32(ENC_FCMGE_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_GE; - OK(ENC_FCMGE_P_P_ZZ_); - } - /* class iclass_not_equal */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=0|1|cmph=1|Pg=xxx|Zn=xxxxx|cmpl=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x65006010) { - decode_fields32(ENC_FCMNE_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_NE; - OK(ENC_FCMNE_P_P_ZZ_); - } - /* class iclass_unordered */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=1|1|o2=0|Pg=xxx|Zn=xxxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x6500C000) { - decode_fields32(ENC_FCMUO_P_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Pd); - ctx->cmp_op = Cmp_UN; - OK(ENC_FCMUO_P_P_ZZ_); - } - return rc; -} - -/* fcmla_z_p_zzz.xml */ -int fcmla_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|0|size=xx|0|Zm=xxxxx|0|rot=xx|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF208000)==0x64000000) { - decode_fields32(ENC_FCMLA_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->neg_i = (SLICE(ctx->rot,1,1)==1); - ctx->neg_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - OK(ENC_FCMLA_Z_P_ZZZ_); - } - return rc; -} - -/* fcmla_z_zzzi.xml */ -int fcmla_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 011|0010|0|size=10|1|i2=xx|Zm=xxx|0001|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x64A01000) { - decode_fields32(ENC_FCMLA_Z_ZZZI_H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->neg_i = (SLICE(ctx->rot,1,1)==1); - ctx->neg_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - OK(ENC_FCMLA_Z_ZZZI_H); - } - /* class iclass_single_precision */ - /* 011|0010|0|size=11|1|i1=x|Zm=xxxx|0001|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x64E01000) { - decode_fields32(ENC_FCMLA_Z_ZZZI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->neg_i = (SLICE(ctx->rot,1,1)==1); - ctx->neg_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - OK(ENC_FCMLA_Z_ZZZI_S); - } - return rc; -} - -/* fcmle_fcmeq_p_p_zz.xml */ -int fcmle_fcmeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_greater_than_or_equal */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=0|1|cmph=0|Pg=xxx|Zn=xxxxx|cmpl=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x65004000) { - decode_fields32(ENC_FCMLE_P_P_ZZ__FCMGE_P_P_ZZ_, ctx, instr); - OK(ENC_FCMLE_P_P_ZZ__FCMGE_P_P_ZZ_); - } - return rc; -} - -/* fcmlt_fcmeq_p_p_zz.xml */ -int fcmlt_fcmeq_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_greater_than */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|op=0|1|cmph=0|Pg=xxx|Zn=xxxxx|cmpl=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x65004010) { - decode_fields32(ENC_FCMLT_P_P_ZZ__FCMGT_P_P_ZZ_, ctx, instr); - OK(ENC_FCMLT_P_P_ZZ__FCMGT_P_P_ZZ_); - } - return rc; -} - -/* fcpy_z_p_i.xml */ -int fcpy_z_p_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|01|Pg=xxxx|110|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF30E000)==0x510C000) { - decode_fields32(ENC_FCPY_Z_P_I_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Zd); - ctx->imm = VFPExpandImm(ctx->imm8,8); - /* unconditional alias */ - if(fmov_fcpy_z_p_i(ctx, instr)==0) return 0; - OK(ENC_FCPY_Z_P_I_); - } - return rc; -} - -/* fcvt_mz2_z.xml */ -int fcvt_mz2_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|10|1|000|00|111000|Zn=xxxxx|Zd=xxxx|L=0 */ - if((INSWORD & 0xFFFFFC01)==0xC1A0E000) { - decode_fields32(ENC_FCVT_MZ2_Z_, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - OK(ENC_FCVT_MZ2_Z_); - } - return rc; -} - -/* fcvt_z8_mz2.xml */ -int fcvt_z8_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=0|1|001|00|111000|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC124E000) { - decode_fields32(ENC_FCVT_Z8_MZ2_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVT_Z8_MZ2_); - } - return rc; -} - -/* fcvt_z8_mz4.xml */ -int fcvt_z8_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|00|1|101|00|111000|Zn=xxx|0|N=0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC60)==0xC134E000) { - decode_fields32(ENC_FCVT_Z8_MZ4_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVT_Z8_MZ4_); - } - return rc; -} - -/* fcvt_z_mz2.xml */ -int fcvt_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=0|1|000|00|111000|Zn=xxxx|N=0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC120E000) { - decode_fields32(ENC_FCVT_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVT_Z_MZ2_); - } - return rc; -} - -/* fcvt_z_p_z.xml */ -int fcvt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision_to_single_precision_merging */ - /* 011|0010|1|opc=10|0|010|opc2=01|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6589A000) { - decode_fields32(ENC_FCVT_Z_P_Z_H2S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x20; - ctx->merging = TRUE; - OK(ENC_FCVT_Z_P_Z_H2S); - } - /* class iclass_half_precision_to_single_precision_zeroing */ - /* 011|0010|0|opc=10|011|010|1|opc2=01|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x649AA000) { - decode_fields32(ENC_FCVT_Z_P_Z_H2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x20; - ctx->merging = FALSE; - OK(ENC_FCVT_Z_P_Z_H2SZ); - } - /* class iclass_half_precision_to_double_precision_merging */ - /* 011|0010|1|opc=11|0|010|opc2=01|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65C9A000) { - decode_fields32(ENC_FCVT_Z_P_Z_H2D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x40; - ctx->merging = TRUE; - OK(ENC_FCVT_Z_P_Z_H2D); - } - /* class iclass_half_precision_to_double_precision_zeroing */ - /* 011|0010|0|opc=11|011|010|1|opc2=01|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DAA000) { - decode_fields32(ENC_FCVT_Z_P_Z_H2DZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x40; - ctx->merging = FALSE; - OK(ENC_FCVT_Z_P_Z_H2DZ); - } - /* class iclass_single_precision_to_half_precision_merging */ - /* 011|0010|1|opc=10|0|010|opc2=00|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6588A000) { - decode_fields32(ENC_FCVT_Z_P_Z_S2H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x10; - ctx->merging = TRUE; - OK(ENC_FCVT_Z_P_Z_S2H); - } - /* class iclass_single_precision_to_half_precision_zeroing */ - /* 011|0010|0|opc=10|011|010|1|opc2=00|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x649A8000) { - decode_fields32(ENC_FCVT_Z_P_Z_S2HZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x10; - ctx->merging = FALSE; - OK(ENC_FCVT_Z_P_Z_S2HZ); - } - /* class iclass_single_precision_to_double_precision_merging */ - /* 011|0010|1|opc=11|0|010|opc2=11|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65CBA000) { - decode_fields32(ENC_FCVT_Z_P_Z_S2D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->merging = TRUE; - OK(ENC_FCVT_Z_P_Z_S2D); - } - /* class iclass_single_precision_to_double_precision_zeroing */ - /* 011|0010|0|opc=11|011|010|1|opc2=11|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DAE000) { - decode_fields32(ENC_FCVT_Z_P_Z_S2DZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->merging = FALSE; - OK(ENC_FCVT_Z_P_Z_S2DZ); - } - /* class iclass_double_precision_to_half_precision_merging */ - /* 011|0010|1|opc=11|0|010|opc2=00|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65C8A000) { - decode_fields32(ENC_FCVT_Z_P_Z_D2H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x10; - ctx->merging = TRUE; - OK(ENC_FCVT_Z_P_Z_D2H); - } - /* class iclass_double_precision_to_half_precision_zeroing */ - /* 011|0010|0|opc=11|011|010|1|opc2=00|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DA8000) { - decode_fields32(ENC_FCVT_Z_P_Z_D2HZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x10; - ctx->merging = FALSE; - OK(ENC_FCVT_Z_P_Z_D2HZ); - } - /* class iclass_double_precision_to_single_precision_merging */ - /* 011|0010|1|opc=11|0|010|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65CAA000) { - decode_fields32(ENC_FCVT_Z_P_Z_D2S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->merging = TRUE; - OK(ENC_FCVT_Z_P_Z_D2S); - } - /* class iclass_double_precision_to_single_precision_zeroing */ - /* 011|0010|0|opc=11|011|010|1|opc2=10|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DAC000) { - decode_fields32(ENC_FCVT_Z_P_Z_D2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->merging = FALSE; - OK(ENC_FCVT_Z_P_Z_D2SZ); - } - return rc; -} - -/* fcvtl_mz2_z.xml */ -int fcvtl_mz2_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|10|1|000|00|111000|Zn=xxxxx|Zd=xxxx|L=1 */ - if((INSWORD & 0xFFFFFC01)==0xC1A0E001) { - decode_fields32(ENC_FCVTL_MZ2_Z_, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - OK(ENC_FCVTL_MZ2_Z_); - } - return rc; -} - -/* fcvtlt_z_p_z.xml */ -int fcvtlt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision_to_single_precision_merging */ - /* 011|0010|0|opc=10|0010|opc2=01|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6489A000) { - decode_fields32(ENC_FCVTLT_Z_P_Z_H2S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FCVTLT_Z_P_Z_H2S); - } - /* class iclass_half_precision_to_single_precision_zeroing */ - /* 011|0010|0|opc=10|0000|opc2=01|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6481A000) { - decode_fields32(ENC_FCVTLT_Z_P_Z_H2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FCVTLT_Z_P_Z_H2SZ); - } - /* class iclass_single_precision_to_double_precision_merging */ - /* 011|0010|0|opc=11|0010|opc2=11|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64CBA000) { - decode_fields32(ENC_FCVTLT_Z_P_Z_S2D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FCVTLT_Z_P_Z_S2D); - } - /* class iclass_single_precision_to_double_precision_zeroing */ - /* 011|0010|0|opc=11|0000|opc2=11|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64C3A000) { - decode_fields32(ENC_FCVTLT_Z_P_Z_S2DZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FCVTLT_Z_P_Z_S2DZ); - } - return rc; -} - -/* fcvtn_z8_mz2.xml */ -int fcvtn_z8_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|00|001|010|0011|opc=00|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0x650A3000) { - decode_fields32(ENC_FCVTN_Z8_MZ2_H2B, ctx, instr); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVTN_Z8_MZ2_H2B); - } - return rc; -} - -/* fcvtn_z8_mz4.xml */ -int fcvtn_z8_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|00|1|101|00|111000|Zn=xxx|0|N=1|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC60)==0xC134E020) { - decode_fields32(ENC_FCVTN_Z8_MZ4_, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVTN_Z8_MZ4_); - } - return rc; -} - -/* fcvtn_z_mz2.xml */ -int fcvtn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=0|1|000|00|111000|Zn=xxxx|N=1|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC120E020) { - decode_fields32(ENC_FCVTN_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVTN_Z_MZ2_); - } - return rc; -} - -/* fcvtnb_z8_mz2.xml */ -int fcvtnb_z8_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|00|001|010|0011|T=0|1|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0x650A3400) { - decode_fields32(ENC_FCVTNB_Z8_MZ2_S2B, ctx, instr); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVTNB_Z8_MZ2_S2B); - } - return rc; -} - -/* fcvtnt_z8_mz2.xml */ -int fcvtnt_z8_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|00|001|010|0011|T=1|1|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0x650A3C00) { - decode_fields32(ENC_FCVTNT_Z8_MZ2_S2B, ctx, instr); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_FCVTNT_Z8_MZ2_S2B); - } - return rc; -} - -/* fcvtnt_z_p_z.xml */ -int fcvtnt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_precision_to_half_precision_merging */ - /* 011|0010|0|opc=10|0010|opc2=00|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6488A000) { - decode_fields32(ENC_FCVTNT_Z_P_Z_S2H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FCVTNT_Z_P_Z_S2H); - } - /* class iclass_single_precision_to_half_precision_zeroing */ - /* 011|0010|0|opc=10|0000|opc2=00|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6480A000) { - decode_fields32(ENC_FCVTNT_Z_P_Z_S2HZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FCVTNT_Z_P_Z_S2HZ); - } - /* class iclass_double_precision_to_single_precision_merging */ - /* 011|0010|0|opc=11|0010|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64CAA000) { - decode_fields32(ENC_FCVTNT_Z_P_Z_D2S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FCVTNT_Z_P_Z_D2S); - } - /* class iclass_double_precision_to_single_precision_zeroing */ - /* 011|0010|0|opc=11|0000|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64C2A000) { - decode_fields32(ENC_FCVTNT_Z_P_Z_D2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FCVTNT_Z_P_Z_D2SZ); - } - return rc; -} - -/* fcvtx_z_p_z.xml */ -int fcvtx_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_double_precision_to_single_precision_merging */ - /* 011|0010|1|opc=00|0|010|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x650AA000) { - decode_fields32(ENC_FCVTX_Z_P_Z_D2S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->merging = TRUE; - OK(ENC_FCVTX_Z_P_Z_D2S); - } - /* class iclass_double_precision_to_single_precision_zeroing */ - /* 011|0010|0|opc=00|011|010|1|opc2=10|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x641AC000) { - decode_fields32(ENC_FCVTX_Z_P_Z_D2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->merging = FALSE; - OK(ENC_FCVTX_Z_P_Z_D2SZ); - } - return rc; -} - -/* fcvtxnt_z_p_z.xml */ -int fcvtxnt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_double_precision_to_single_precision_merging */ - /* 011|0010|0|opc=00|0010|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x640AA000) { - decode_fields32(ENC_FCVTXNT_Z_P_Z_D2S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FCVTXNT_Z_P_Z_D2S); - } - /* class iclass_double_precision_to_single_precision_zeroing */ - /* 011|0010|0|opc=00|0000|opc2=10|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6402A000) { - decode_fields32(ENC_FCVTXNT_Z_P_Z_D2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FCVTXNT_Z_P_Z_D2SZ); - } - return rc; -} - -/* fcvtzs_mz_z.xml */ -int fcvtzs_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|00|1|000|01|111000|Zn=xxxx|U=0|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC121E000) { - decode_fields32(ENC_FCVTZS_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZS_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|00|1|100|01|111000|Zn=xxx|0|U=0|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC131E000) { - decode_fields32(ENC_FCVTZS_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZS_MZ_Z_4); - } - return rc; -} - -/* fcvtzs_z_p_z.xml */ -int fcvtzs_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision_to_16_bit_merging */ - /* 011|0010|1|opc=01|0|11|opc2=01|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x655AA000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_FP162H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZS_Z_P_Z_FP162H); - } - /* class iclass_half_precision_to_16_bit_zeroing */ - /* 011|0010|0|opc=01|011|11|o2=0|1|o3=1|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645EC000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_FP162HZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZS_Z_P_Z_FP162HZ); - } - /* class iclass_half_precision_to_32_bit_merging */ - /* 011|0010|1|opc=01|0|11|opc2=10|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x655CA000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_FP162W, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZS_Z_P_Z_FP162W); - } - /* class iclass_half_precision_to_32_bit_zeroing */ - /* 011|0010|0|opc=01|011|11|o2=1|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645F8000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_FP162WZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZS_Z_P_Z_FP162WZ); - } - /* class iclass_half_precision_to_64_bit_merging */ - /* 011|0010|1|opc=01|0|11|opc2=11|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x655EA000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_FP162X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZS_Z_P_Z_FP162X); - } - /* class iclass_half_precision_to_64_bit_zeroing */ - /* 011|0010|0|opc=01|011|11|o2=1|1|o3=1|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645FC000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_FP162XZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZS_Z_P_Z_FP162XZ); - } - /* class iclass_single_precision_to_32_bit_merging */ - /* 011|0010|1|opc=10|0|11|opc2=10|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x659CA000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_S2W, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZS_Z_P_Z_S2W); - } - /* class iclass_single_precision_to_32_bit_zeroing */ - /* 011|0010|0|opc=10|011|11|o2=1|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x649F8000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_S2WZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZS_Z_P_Z_S2WZ); - } - /* class iclass_single_precision_to_64_bit_merging */ - /* 011|0010|1|opc=11|0|11|opc2=10|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65DCA000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_S2X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZS_Z_P_Z_S2X); - } - /* class iclass_single_precision_to_64_bit_zeroing */ - /* 011|0010|0|opc=11|011|11|o2=1|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DF8000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_S2XZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZS_Z_P_Z_S2XZ); - } - /* class iclass_double_precision_to_32_bit_merging */ - /* 011|0010|1|opc=11|0|11|opc2=00|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D8A000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_D2W, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZS_Z_P_Z_D2W); - } - /* class iclass_double_precision_to_32_bit_zeroing */ - /* 011|0010|0|opc=11|011|11|o2=0|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DE8000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_D2WZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZS_Z_P_Z_D2WZ); - } - /* class iclass_double_precision_to_64_bit_merging */ - /* 011|0010|1|opc=11|0|11|opc2=11|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65DEA000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_D2X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZS_Z_P_Z_D2X); - } - /* class iclass_double_precision_to_64_bit_zeroing */ - /* 011|0010|0|opc=11|011|11|o2=1|1|o3=1|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DFC000) { - decode_fields32(ENC_FCVTZS_Z_P_Z_D2XZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZS_Z_P_Z_D2XZ); - } - return rc; -} - -/* fcvtzsn_z_mz2.xml */ -int fcvtzsn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|001|101|0011|0|U=0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC20)==0x650D3000) { - decode_fields32(ENC_FCVTZSN_Z_MZ2_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZSN_Z_MZ2_); - } - return rc; -} - -/* fcvtzu_mz_z.xml */ -int fcvtzu_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|00|1|000|01|111000|Zn=xxxx|U=1|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC121E020) { - decode_fields32(ENC_FCVTZU_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZU_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|00|1|100|01|111000|Zn=xxx|0|U=1|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC131E020) { - decode_fields32(ENC_FCVTZU_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZU_MZ_Z_4); - } - return rc; -} - -/* fcvtzu_z_p_z.xml */ -int fcvtzu_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision_to_16_bit_merging */ - /* 011|0010|1|opc=01|0|11|opc2=01|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x655BA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_FP162H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZU_Z_P_Z_FP162H); - } - /* class iclass_half_precision_to_16_bit_zeroing */ - /* 011|0010|0|opc=01|011|11|o2=0|1|o3=1|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645EE000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_FP162HZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZU_Z_P_Z_FP162HZ); - } - /* class iclass_half_precision_to_32_bit_merging */ - /* 011|0010|1|opc=01|0|11|opc2=10|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x655DA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_FP162W, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZU_Z_P_Z_FP162W); - } - /* class iclass_half_precision_to_32_bit_zeroing */ - /* 011|0010|0|opc=01|011|11|o2=1|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645FA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_FP162WZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZU_Z_P_Z_FP162WZ); - } - /* class iclass_half_precision_to_64_bit_merging */ - /* 011|0010|1|opc=01|0|11|opc2=11|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x655FA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_FP162X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZU_Z_P_Z_FP162X); - } - /* class iclass_half_precision_to_64_bit_zeroing */ - /* 011|0010|0|opc=01|011|11|o2=1|1|o3=1|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645FE000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_FP162XZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZU_Z_P_Z_FP162XZ); - } - /* class iclass_single_precision_to_32_bit_merging */ - /* 011|0010|1|opc=10|0|11|opc2=10|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x659DA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_S2W, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZU_Z_P_Z_S2W); - } - /* class iclass_single_precision_to_32_bit_zeroing */ - /* 011|0010|0|opc=10|011|11|o2=1|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x649FA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_S2WZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZU_Z_P_Z_S2WZ); - } - /* class iclass_single_precision_to_64_bit_merging */ - /* 011|0010|1|opc=11|0|11|opc2=10|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65DDA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_S2X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZU_Z_P_Z_S2X); - } - /* class iclass_single_precision_to_64_bit_zeroing */ - /* 011|0010|0|opc=11|011|11|o2=1|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DFA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_S2XZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZU_Z_P_Z_S2XZ); - } - /* class iclass_double_precision_to_32_bit_merging */ - /* 011|0010|1|opc=11|0|11|opc2=00|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D9A000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_D2W, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZU_Z_P_Z_D2W); - } - /* class iclass_double_precision_to_32_bit_zeroing */ - /* 011|0010|0|opc=11|011|11|o2=0|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DEA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_D2WZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZU_Z_P_Z_D2WZ); - } - /* class iclass_double_precision_to_64_bit_merging */ - /* 011|0010|1|opc=11|0|11|opc2=11|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65DFA000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_D2X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FCVTZU_Z_P_Z_D2X); - } - /* class iclass_double_precision_to_64_bit_zeroing */ - /* 011|0010|0|opc=11|011|11|o2=1|1|o3=1|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DFE000) { - decode_fields32(ENC_FCVTZU_Z_P_Z_D2XZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FCVTZU_Z_P_Z_D2XZ); - } - return rc; -} - -/* fcvtzun_z_mz2.xml */ -int fcvtzun_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|001|101|0011|0|U=1|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC20)==0x650D3400) { - decode_fields32(ENC_FCVTZUN_Z_MZ2_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->rounding = FPRounding_ZERO; - OK(ENC_FCVTZUN_Z_MZ2_); - } - return rc; -} - -/* fdiv_z_p_zz.xml */ -int fdiv_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|0|opc=1101|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x650D8000) { - decode_fields32(ENC_FDIV_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FDIV_Z_P_ZZ_); - } - return rc; -} - -/* fdivr_z_p_zz.xml */ -int fdivr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|0|opc=1100|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x650C8000) { - decode_fields32(ENC_FDIVR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FDIVR_Z_P_ZZ_); - } - return rc; -} - -/* fdot_z32_zz8z8.xml */ -int fdot_z32_zz8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|op=1|1|Zm=xxxxx|10|0|00|o2=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64608400) { - decode_fields32(ENC_FDOT_Z32_ZZ8Z8_, ctx, instr); - if(!HaveSVE2FP8DOT4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FDOT_Z32_ZZ8Z8_); - } - return rc; -} - -/* fdot_z32_zz8z8i.xml */ -int fdot_z32_zz8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|op=1|1|i2=xx|Zm=xxx|01|0|0|opc2=01|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64604400) { - decode_fields32(ENC_FDOT_Z32_ZZ8Z8I_, ctx, instr); - if(!HaveSVE2FP8DOT4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(ctx->i2); - OK(ENC_FDOT_Z32_ZZ8Z8I_); - } - return rc; -} - -/* fdot_z_zz8z8.xml */ -int fdot_z_zz8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|op=0|1|Zm=xxxxx|10|0|00|o2=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64208400) { - decode_fields32(ENC_FDOT_Z_ZZ8Z8_, ctx, instr); - if(!HaveSVE2FP8DOT2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FDOT_Z_ZZ8Z8_); - } - return rc; -} - -/* fdot_z_zz8z8i.xml */ -int fdot_z_zz8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|op=0|1|i3h=xx|Zm=xxx|01|0|0|i3l=x|1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64204400) { - decode_fields32(ENC_FDOT_Z_ZZ8Z8I_, ctx, instr); - if(!HaveSVE2FP8DOT2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - OK(ENC_FDOT_Z_ZZ8Z8I_); - } - return rc; -} - -/* fdot_z_zzz.xml */ -int fdot_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|op=0|1|Zm=xxxxx|10|0|00|o2=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64208000) { - decode_fields32(ENC_FDOT_Z_ZZZ_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FDOT_Z_ZZZ_); - } - return rc; -} - -/* fdot_z_zzzi.xml */ -int fdot_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|op=0|1|i2=xx|Zm=xxx|01|0|0|opc2=00|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64204000) { - decode_fields32(ENC_FDOT_Z_ZZZI_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(ctx->i2); - OK(ENC_FDOT_Z_ZZZI_); - } - return rc; -} - -/* fdot_za32_z8z8i.xml */ -int fdot_za32_z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=0|i2=xx|Zn=xxxx|opc2=111|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1500038) { - decode_fields32(ENC_FDOT_ZA32_Z8Z8I_2XI, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_FDOT_ZA32_Z8Z8I_2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=0|i2=xx|Zn=xxx|0|opc2=001|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1508008) { - decode_fields32(ENC_FDOT_ZA32_Z8Z8I_4XI, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_FDOT_ZA32_Z8Z8I_4XI); - } - return rc; -} - -/* fdot_za32_z8z8v.xml */ -int fdot_za32_z8z8v(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=11|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201018) { - decode_fields32(ENC_FDOT_ZA32_Z8Z8V_2X1, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FDOT_ZA32_Z8Z8V_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=11|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301018) { - decode_fields32(ENC_FDOT_ZA32_Z8Z8V_4X1, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FDOT_ZA32_Z8Z8V_4X1); - } - return rc; -} - -/* fdot_za32_z8z8w.xml */ -int fdot_za32_z8z8w(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|opc=11|0|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1A01030) { - decode_fields32(ENC_FDOT_ZA32_Z8Z8W_2X2, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FDOT_ZA32_Z8Z8W_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|0|opc=11|0|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1A11030) { - decode_fields32(ENC_FDOT_ZA32_Z8Z8W_4X4, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FDOT_ZA32_Z8Z8W_4X4); - } - return rc; -} - -/* fdot_za_z8z8i.xml */ -int fdot_za_z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|op=0|i3h=xx|Zn=xxxx|1|0|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09030)==0xC1D00020) { - decode_fields32(ENC_FDOT_ZA_Z8Z8I_2XI, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_FDOT_ZA_Z8Z8I_2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|100|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09070)==0xC1109040) { - decode_fields32(ENC_FDOT_ZA_Z8Z8I_4XI, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_FDOT_ZA_Z8Z8I_4XI); - } - return rc; -} - -/* fdot_za_z8z8v.xml */ -int fdot_za_z8z8v(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=01|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201008) { - decode_fields32(ENC_FDOT_ZA_Z8Z8V_2X1, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FDOT_ZA_Z8Z8V_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=01|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301008) { - decode_fields32(ENC_FDOT_ZA_Z8Z8V_4X1, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FDOT_ZA_Z8Z8V_4X1); - } - return rc; -} - -/* fdot_za_z8z8w.xml */ -int fdot_za_z8z8w(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|opc=10|0|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1A01020) { - decode_fields32(ENC_FDOT_ZA_Z8Z8W_2X2, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FDOT_ZA_Z8Z8W_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|0|opc=10|0|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1A11020) { - decode_fields32(ENC_FDOT_ZA_Z8Z8W_4X4, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FDOT_ZA_Z8Z8W_4X4); - } - return rc; -} - -/* fdot_za_zzi.xml */ -int fdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|opc2=001|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501008) { - decode_fields32(ENC_FDOT_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_FDOT_ZA_ZZI_2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|opc2=001|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509008) { - decode_fields32(ENC_FDOT_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_FDOT_ZA_ZZI_4XI); - } - return rc; -} - -/* fdot_za_zzv.xml */ -int fdot_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=00|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201000) { - decode_fields32(ENC_FDOT_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FDOT_ZA_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|100|Zn=xxxxx|opc=00|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301000) { - decode_fields32(ENC_FDOT_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FDOT_ZA_ZZV_4X1); - } - return rc; -} - -/* fdot_za_zzw.xml */ -int fdot_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|opc=00|0|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1A01000) { - decode_fields32(ENC_FDOT_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FDOT_ZA_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|0|opc=00|0|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1A11000) { - decode_fields32(ENC_FDOT_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FDOT_ZA_ZZW_4X4); - } - return rc; -} - -/* fdup_z_i.xml */ -int fdup_z_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|11|opc=00|1|11|o2=0|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x2539C000) { - decode_fields32(ENC_FDUP_Z_I_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(ctx->Zd); - ctx->imm = VFPExpandImm(ctx->imm8,8); - /* unconditional alias */ - if(fmov_fdup_z_i(ctx, instr)==0) return 0; - OK(ENC_FDUP_Z_I_); - } - return rc; -} - -/* fexpa_z_z.xml */ -int fexpa_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|opc=00000|1011|10|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x420B800) { - decode_fields32(ENC_FEXPA_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSSVE_FEXPA()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_FEXPA_Z_Z_); - } - return rc; -} - -/* firstp_r_p_p.xml */ -int firstp_r_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|100|opc=001|10|Pg=xxxx|0|Pn=xxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FC200)==0x25218000) { - decode_fields32(ENC_FIRSTP_R_P_P_, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Rd); - OK(ENC_FIRSTP_R_P_P_); - } - return rc; -} - -/* flogb_z_p_z.xml */ -int flogb_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|opc=00|0|11|size=xx|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFF9E000)==0x6518A000) { - decode_fields32(ENC_FLOGB_Z_P_Z_M, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FLOGB_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 011|0010|0|opc=00|011|11|o2=0|1|size=xx|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF8000)==0x641E8000) { - decode_fields32(ENC_FLOGB_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FLOGB_Z_P_Z_Z); - } - return rc; -} - -/* fmad_z_p_zzz.xml */ -int fmad_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|1|Za=xxxxx|1|N=0|op=0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF20E000)==0x65208000) { - decode_fields32(ENC_FMAD_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->a = UINT(ctx->Za); - ctx->op1_neg = FALSE; - ctx->op3_neg = FALSE; - OK(ENC_FMAD_Z_P_ZZZ_); - } - return rc; -} - -/* fmax_mz_zzv.xml */ -int fmax_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10100|0|01|00|op=0|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A100 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAX_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_FMAX_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10101|0|01|00|op=0|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120A900 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAX_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_FMAX_MZ_ZZV_4X1); - } - return rc; -} - -/* fmax_mz_zzw.xml */ -int fmax_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|0101100|010|opc=00|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B100 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAX_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FMAX_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxx|00101110|010|opc=00|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120B900 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAX_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FMAX_MZ_ZZW_4X4); - } - return rc; -} - -/* fmax_z_p_zs.xml */ -int fmax_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=110|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x651E8000) { - decode_fields32(ENC_FMAX_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? 0 : FPOne(0,ctx->esize); - OK(ENC_FMAX_Z_P_ZS_); - } - return rc; -} - -/* fmax_z_p_zz.xml */ -int fmax_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=0110|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65068000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAX_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FMAX_Z_P_ZZ_); - } - return rc; -} - -/* fmaxnm_mz_zzv.xml */ -int fmaxnm_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10100|0|01|00|op=1|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A120 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAXNM_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_FMAXNM_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10101|0|01|00|op=1|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120A920 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAXNM_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_FMAXNM_MZ_ZZV_4X1); - } - return rc; -} - -/* fmaxnm_mz_zzw.xml */ -int fmaxnm_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|0101100|010|opc=01|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B120 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAXNM_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FMAXNM_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxx|00101110|010|opc=01|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120B920 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAXNM_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FMAXNM_MZ_ZZW_4X4); - } - return rc; -} - -/* fmaxnm_z_p_zs.xml */ -int fmaxnm_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=100|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x651C8000) { - decode_fields32(ENC_FMAXNM_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? 0 : FPOne(0,ctx->esize); - OK(ENC_FMAXNM_Z_P_ZS_); - } - return rc; -} - -/* fmaxnm_z_p_zz.xml */ -int fmaxnm_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=0100|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65048000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMAXNM_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FMAXNM_Z_P_ZZ_); - } - return rc; -} - -/* fmaxnmp_z_p_zz.xml */ -int fmaxnmp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=100|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x64148000) { - decode_fields32(ENC_FMAXNMP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_FMAXNMP_Z_P_ZZ_); - } - return rc; -} - -/* fmaxnmqv_z_p_z.xml */ -int fmaxnmqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=100|101|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6414A000) { - decode_fields32(ENC_FMAXNMQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMAXNMQV_Z_P_Z_); - } - return rc; -} - -/* fmaxnmv_v_p_z.xml */ -int fmaxnmv_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|000|opc=100|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65042000) { - decode_fields32(ENC_FMAXNMV_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMAXNMV_V_P_Z_); - } - return rc; -} - -/* fmaxp_z_p_zz.xml */ -int fmaxp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=110|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x64168000) { - decode_fields32(ENC_FMAXP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_FMAXP_Z_P_ZZ_); - } - return rc; -} - -/* fmaxqv_z_p_z.xml */ -int fmaxqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=110|101|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6416A000) { - decode_fields32(ENC_FMAXQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMAXQV_Z_P_Z_); - } - return rc; -} - -/* fmaxv_v_p_z.xml */ -int fmaxv_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|000|opc=110|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65062000) { - decode_fields32(ENC_FMAXV_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMAXV_V_P_Z_); - } - return rc; -} - -/* fmin_mz_zzv.xml */ -int fmin_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10100|0|01|00|op=0|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFF30FFE1)==0xC120A101 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMIN_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_FMIN_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10101|0|01|00|op=0|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFF30FFE3)==0xC120A901 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMIN_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_FMIN_MZ_ZZV_4X1); - } - return rc; -} - -/* fmin_mz_zzw.xml */ -int fmin_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|0101100|010|opc=00|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFF21FFE1)==0xC120B101 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMIN_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FMIN_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxx|00101110|010|opc=00|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFF23FFE3)==0xC120B901 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMIN_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FMIN_MZ_ZZW_4X4); - } - return rc; -} - -/* fmin_z_p_zs.xml */ -int fmin_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=111|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x651F8000) { - decode_fields32(ENC_FMIN_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? 0 : FPOne(0,ctx->esize); - OK(ENC_FMIN_Z_P_ZS_); - } - return rc; -} - -/* fmin_z_p_zz.xml */ -int fmin_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=0111|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65078000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMIN_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FMIN_Z_P_ZZ_); - } - return rc; -} - -/* fminnm_mz_zzv.xml */ -int fminnm_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10100|0|01|00|op=1|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFF30FFE1)==0xC120A121 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMINNM_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_FMINNM_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10101|0|01|00|op=1|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFF30FFE3)==0xC120A921 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMINNM_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_FMINNM_MZ_ZZV_4X1); - } - return rc; -} - -/* fminnm_mz_zzw.xml */ -int fminnm_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|0101100|010|opc=01|Zdn=xxxx|o2=1 */ - if((INSWORD & 0xFF21FFE1)==0xC120B121 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMINNM_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FMINNM_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxx|00101110|010|opc=01|Zdn=xxx|0|o2=1 */ - if((INSWORD & 0xFF23FFE3)==0xC120B921 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMINNM_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FMINNM_MZ_ZZW_4X4); - } - return rc; -} - -/* fminnm_z_p_zs.xml */ -int fminnm_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=101|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x651D8000) { - decode_fields32(ENC_FMINNM_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? 0 : FPOne(0,ctx->esize); - OK(ENC_FMINNM_Z_P_ZS_); - } - return rc; -} - -/* fminnm_z_p_zz.xml */ -int fminnm_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=0101|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65058000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMINNM_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FMINNM_Z_P_ZZ_); - } - return rc; -} - -/* fminnmp_z_p_zz.xml */ -int fminnmp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=101|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x64158000) { - decode_fields32(ENC_FMINNMP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_FMINNMP_Z_P_ZZ_); - } - return rc; -} - -/* fminnmqv_z_p_z.xml */ -int fminnmqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=101|101|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6415A000) { - decode_fields32(ENC_FMINNMQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMINNMQV_Z_P_Z_); - } - return rc; -} - -/* fminnmv_v_p_z.xml */ -int fminnmv_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|000|opc=101|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65052000) { - decode_fields32(ENC_FMINNMV_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMINNMV_V_P_Z_); - } - return rc; -} - -/* fminp_z_p_zz.xml */ -int fminp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=111|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x64178000) { - decode_fields32(ENC_FMINP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_FMINP_Z_P_ZZ_); - } - return rc; -} - -/* fminqv_z_p_z.xml */ -int fminqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|size=xx|010|opc=111|101|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6417A000) { - decode_fields32(ENC_FMINQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMINQV_Z_P_Z_); - } - return rc; -} - -/* fminv_v_p_z.xml */ -int fminv_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|000|opc=111|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65072000) { - decode_fields32(ENC_FMINV_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_FMINV_V_P_Z_); - } - return rc; -} - -/* fmla_z_p_zzz.xml */ -int fmla_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|1|Zm=xxxxx|0|N=0|op=0|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20E000)==0x65200000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMLA_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - ctx->op3_neg = FALSE; - OK(ENC_FMLA_Z_P_ZZZ_); - } - return rc; -} - -/* fmla_z_zzzi.xml */ -int fmla_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 011|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|0000|o2=0|op=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x64200000) { - decode_fields32(ENC_FMLA_Z_ZZZI_H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - ctx->op3_neg = FALSE; - OK(ENC_FMLA_Z_ZZZI_H); - } - /* class iclass_single_precision */ - /* 011|0010|0|size=10|1|i2=xx|Zm=xxx|0000|o2=0|op=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A00000) { - decode_fields32(ENC_FMLA_Z_ZZZI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - ctx->op3_neg = FALSE; - OK(ENC_FMLA_Z_ZZZI_S); - } - /* class iclass_double_precision */ - /* 011|0010|0|size=11|1|i1=x|Zm=xxxx|0000|o2=0|op=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E00000) { - decode_fields32(ENC_FMLA_Z_ZZZI_D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - ctx->op3_neg = FALSE; - OK(ENC_FMLA_Z_ZZZI_D); - } - return rc; -} - -/* fmla_za_zzi.xml */ -int fmla_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|op=0|S=0|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09030)==0xC1101000) { - decode_fields32(ENC_FMLA_ZA_ZZI_H2XI, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_FMLA_ZA_ZZI_H2XI); - } - /* class iclass_two_za_single_vectors_of_single_precision_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=0|i2=xx|Zn=xxxx|0|S=0|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1500000) { - decode_fields32(ENC_FMLA_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_FMLA_ZA_ZZI_S2XI); - } - /* class iclass_two_za_single_vectors_of_double_precision_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|00|i1=x|Zn=xxxx|0|S=0|0|off3=xxx */ - if((INSWORD & 0xFFF09838)==0xC1D00000) { - decode_fields32(ENC_FMLA_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_F64F64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 2; - OK(ENC_FMLA_ZA_ZZI_D2XI); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|0|op=0|S=0|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09070)==0xC1109000) { - decode_fields32(ENC_FMLA_ZA_ZZI_H4XI, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_FMLA_ZA_ZZI_H4XI); - } - /* class iclass_four_za_single_vectors_of_single_precision_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=0|i2=xx|Zn=xxx|0|0|S=0|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1508000) { - decode_fields32(ENC_FMLA_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_FMLA_ZA_ZZI_S4XI); - } - /* class iclass_four_za_single_vectors_of_double_precision_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|0|op=0|i1=x|Zn=xxx|00|S=0|0|off3=xxx */ - if((INSWORD & 0xFFF09878)==0xC1D08000) { - decode_fields32(ENC_FMLA_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_F64F64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 4; - OK(ENC_FMLA_ZA_ZZI_D4XI); - } - return rc; -} - -/* fmla_za_zzv.xml */ -int fmla_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|0|S=0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1201800) { - decode_fields32(ENC_FMLA_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLA_ZA_ZZV_2X1); - } - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|10|sz=0|10|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201C00) { - decode_fields32(ENC_FMLA_ZA_ZZV_2X1_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLA_ZA_ZZV_2X1_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|0|S=0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1301800) { - decode_fields32(ENC_FMLA_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLA_ZA_ZZV_4X1); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|10|sz=0|11|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301C00) { - decode_fields32(ENC_FMLA_ZA_ZZV_4X1_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLA_ZA_ZZV_4X1_16); - } - return rc; -} - -/* fmla_za_zzw.xml */ -int fmla_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|110|Zn=xxxx|0|0|S=0|off3=xxx */ - if((INSWORD & 0xFFA19C38)==0xC1A01800) { - decode_fields32(ENC_FMLA_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLA_ZA_ZZW_2X2); - } - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|0|S=0|1|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1A01008) { - decode_fields32(ENC_FMLA_ZA_ZZW_2X2_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLA_ZA_ZZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|110|Zn=xxx|00|0|S=0|off3=xxx */ - if((INSWORD & 0xFFA39C78)==0xC1A11800) { - decode_fields32(ENC_FMLA_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLA_ZA_ZZW_4X4); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|00|S=0|1|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1A11008) { - decode_fields32(ENC_FMLA_ZA_ZZW_4X4_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLA_ZA_ZZW_4X4_16); - } - return rc; -} - -/* fmlal_za_z8z8i.xml */ -int fmlal_za_z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|11|00|Zm=xxxx|i4A=x|Rv=xx|0|i4B=xx|Zn=xxxxx|0|i4C=x|off3=xxx */ - if((INSWORD & 0xFFF01010)==0xC1C00000) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8I_1, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i4A<<3)|(ctx->i4B<<1)|ctx->i4C)); - ctx->nreg = 1; - OK(ENC_FMLAL_ZA_Z8Z8I_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|1|i4h=xx|Zn=xxxx|1|1|i4l=xx|off2=xx */ - if((INSWORD & 0xFFF09030)==0xC1901030) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8I_2XI, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_FMLAL_ZA_Z8Z8I_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|1|i4h=xx|Zn=xxx|010|i4l=xx|off2=xx */ - if((INSWORD & 0xFFF09070)==0xC1909020) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8I_4XI, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_FMLAL_ZA_Z8Z8I_4XI); - } - return rc; -} - -/* fmlal_za_z8z8v.xml */ -int fmlal_za_z8z8v(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|00|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1300C00) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8V_1, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_FMLAL_ZA_Z8Z8V_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=0|S=0|o2=1|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1200804) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8V_2X1, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_FMLAL_ZA_Z8Z8V_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=0|S=0|o2=1|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1300804) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8V_4X1, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_FMLAL_ZA_Z8Z8V_4X1); - } - return rc; -} - -/* fmlal_za_z8z8w.xml */ -int fmlal_za_z8z8w(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|1|000|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1A00820) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8W_2X2, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_FMLAL_ZA_Z8Z8W_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|01|000|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1A10820) { - decode_fields32(ENC_FMLAL_ZA_Z8Z8W_4X4, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_FMLAL_ZA_Z8Z8W_4X4); - } - return rc; -} - -/* fmlal_za_zzi.xml */ -int fmlal_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|op=0|S=0|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1801000) { - decode_fields32(ENC_FMLAL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_FMLAL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|op=0|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1901000) { - decode_fields32(ENC_FMLAL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_FMLAL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|op=0|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1909000) { - decode_fields32(ENC_FMLAL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_FMLAL_ZA_ZZI_4XI); - } - return rc; -} - -/* fmlal_za_zzv.xml */ -int fmlal_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|op=0|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1200C00) { - decode_fields32(ENC_FMLAL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_FMLAL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=0|S=0|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1200800) { - decode_fields32(ENC_FMLAL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_FMLAL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=0|S=0|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1300800) { - decode_fields32(ENC_FMLAL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_FMLAL_ZA_ZZV_4X1); - } - return rc; -} - -/* fmlal_za_zzw.xml */ -int fmlal_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|op=0|S=0|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1A00800) { - decode_fields32(ENC_FMLAL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_FMLAL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|op=0|S=0|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1A10800) { - decode_fields32(ENC_FMLAL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_FMLAL_ZA_ZZW_4X4); - } - return rc; -} - -/* fmlalb_z_z8z8z8.xml */ -int fmlalb_z_z8z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|01|Zm=xxxxx|10|0|T=0|10|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A08800) { - decode_fields32(ENC_FMLALB_Z_Z8Z8Z8_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMLALB_Z_Z8Z8Z8_); - } - return rc; -} - -/* fmlalb_z_z8z8z8i.xml */ -int fmlalb_z_z8z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|T=0|01|i4h=xx|Zm=xxx|0101|i4l=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x64205000) { - decode_fields32(ENC_FMLALB_Z_Z8Z8Z8I_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - OK(ENC_FMLALB_Z_Z8Z8Z8I_); - } - return rc; -} - -/* fmlalb_z_zzz.xml */ -int fmlalb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=0|1|Zm=xxxxx|10|op=0|00|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A08000) { - decode_fields32(ENC_FMLALB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - OK(ENC_FMLALB_Z_ZZZ_); - } - return rc; -} - -/* fmlalb_z_zzzi.xml */ -int fmlalb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_precision */ - /* 011|0010|0|1|o2=0|1|i3h=xx|Zm=xxx|01|op=0|0|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64A04000) { - decode_fields32(ENC_FMLALB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = FALSE; - OK(ENC_FMLALB_Z_ZZZI_S); - } - return rc; -} - -/* fmlall_za32_z8z8i.xml */ -int fmlall_za32_z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|1|01|00|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|000|off2=xx */ - if((INSWORD & 0xFFF0001C)==0xC1400000) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8I_1, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i4h<<3)|ctx->i4l)); - ctx->nreg = 1; - OK(ENC_FMLALL_ZA32_Z8Z8I_1); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|0|i4h=xx|Zn=xxxx|1|00|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09038)==0xC1900020) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8I_2XI, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_FMLALL_ZA32_Z8Z8I_2XI); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|0|i4h=xx|Zn=xxx|100|0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09078)==0xC1108040) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8I_4XI, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_FMLALL_ZA32_Z8Z8I_4XI); - } - return rc; -} - -/* fmlall_za32_z8z8v.xml */ -int fmlall_za32_z8z8v(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|001|Zn=xxxxx|000|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1300400) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8V_1, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->nreg = 1; - OK(ENC_FMLALL_ZA32_Z8Z8V_1); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|000|1|o1=x */ - if((INSWORD & 0xFFF09C1E)==0xC1200002) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8V_2X1, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_FMLALL_ZA32_Z8Z8V_2X1); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|000|1|o1=x */ - if((INSWORD & 0xFFF09C1E)==0xC1300002) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8V_4X1, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_FMLALL_ZA32_Z8Z8V_4X1); - } - return rc; -} - -/* fmlall_za32_z8z8w.xml */ -int fmlall_za32_z8z8w(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|000|Zn=xxxx|1|000|0|o1=x */ - if((INSWORD & 0xFFE19C3E)==0xC1A00020) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8W_2X2, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_FMLALL_ZA32_Z8Z8W_2X2); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|000|Zn=xxx|01|000|0|o1=x */ - if((INSWORD & 0xFFE39C7E)==0xC1A10020) { - decode_fields32(ENC_FMLALL_ZA32_Z8Z8W_4X4, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_FMLALL_ZA32_Z8Z8W_4X4); - } - return rc; -} - -/* fmlallbb_z32_z8z8z8.xml */ -int fmlallbb_z32_z8z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|01|Zm=xxxxx|10|TT=00|10|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64208800) { - decode_fields32(ENC_FMLALLBB_Z32_Z8Z8Z8_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMLALLBB_Z32_Z8Z8Z8_); - } - return rc; -} - -/* fmlallbb_z32_z8z8z8i.xml */ -int fmlallbb_z32_z8z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|TT=00|1|i4h=xx|Zm=xxx|1100|i4l=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x6420C000) { - decode_fields32(ENC_FMLALLBB_Z32_Z8Z8Z8I_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - OK(ENC_FMLALLBB_Z32_Z8Z8Z8I_); - } - return rc; -} - -/* fmlallbt_z32_z8z8z8.xml */ -int fmlallbt_z32_z8z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|01|Zm=xxxxx|10|TT=01|10|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64209800) { - decode_fields32(ENC_FMLALLBT_Z32_Z8Z8Z8_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMLALLBT_Z32_Z8Z8Z8_); - } - return rc; -} - -/* fmlallbt_z32_z8z8z8i.xml */ -int fmlallbt_z32_z8z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|TT=01|1|i4h=xx|Zm=xxx|1100|i4l=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x6460C000) { - decode_fields32(ENC_FMLALLBT_Z32_Z8Z8Z8I_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - OK(ENC_FMLALLBT_Z32_Z8Z8Z8I_); - } - return rc; -} - -/* fmlalltb_z32_z8z8z8.xml */ -int fmlalltb_z32_z8z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|01|Zm=xxxxx|10|TT=10|10|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6420A800) { - decode_fields32(ENC_FMLALLTB_Z32_Z8Z8Z8_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMLALLTB_Z32_Z8Z8Z8_); - } - return rc; -} - -/* fmlalltb_z32_z8z8z8i.xml */ -int fmlalltb_z32_z8z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|TT=10|1|i4h=xx|Zm=xxx|1100|i4l=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x64A0C000) { - decode_fields32(ENC_FMLALLTB_Z32_Z8Z8Z8I_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - OK(ENC_FMLALLTB_Z32_Z8Z8Z8I_); - } - return rc; -} - -/* fmlalltt_z32_z8z8z8.xml */ -int fmlalltt_z32_z8z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|0|01|Zm=xxxxx|10|TT=11|10|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6420B800) { - decode_fields32(ENC_FMLALLTT_Z32_Z8Z8Z8_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMLALLTT_Z32_Z8Z8Z8_); - } - return rc; -} - -/* fmlalltt_z32_z8z8z8i.xml */ -int fmlalltt_z32_z8z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|TT=11|1|i4h=xx|Zm=xxx|1100|i4l=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x64E0C000) { - decode_fields32(ENC_FMLALLTT_Z32_Z8Z8Z8I_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - OK(ENC_FMLALLTT_Z32_Z8Z8Z8I_); - } - return rc; -} - -/* fmlalt_z_z8z8z8.xml */ -int fmlalt_z_z8z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|01|Zm=xxxxx|10|0|T=1|10|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A09800) { - decode_fields32(ENC_FMLALT_Z_Z8Z8Z8_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMLALT_Z_Z8Z8Z8_); - } - return rc; -} - -/* fmlalt_z_z8z8z8i.xml */ -int fmlalt_z_z8z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|T=1|01|i4h=xx|Zm=xxx|0101|i4l=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x64A05000) { - decode_fields32(ENC_FMLALT_Z_Z8Z8Z8I_, ctx, instr); - if(!HaveSVE2FP8FMA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - OK(ENC_FMLALT_Z_Z8Z8Z8I_); - } - return rc; -} - -/* fmlalt_z_zzz.xml */ -int fmlalt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=0|1|Zm=xxxxx|10|op=0|00|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A08400) { - decode_fields32(ENC_FMLALT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - OK(ENC_FMLALT_Z_ZZZ_); - } - return rc; -} - -/* fmlalt_z_zzzi.xml */ -int fmlalt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_precision */ - /* 011|0010|0|1|o2=0|1|i3h=xx|Zm=xxx|01|op=0|0|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64A04400) { - decode_fields32(ENC_FMLALT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = FALSE; - OK(ENC_FMLALT_Z_ZZZI_S); - } - return rc; -} - -/* fmls_z_p_zzz.xml */ -int fmls_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|1|Zm=xxxxx|0|N=0|op=1|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20E000)==0x65202000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMLS_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - ctx->op3_neg = FALSE; - OK(ENC_FMLS_Z_P_ZZZ_); - } - return rc; -} - -/* fmls_z_zzzi.xml */ -int fmls_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 011|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|0000|o2=0|op=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x64200400) { - decode_fields32(ENC_FMLS_Z_ZZZI_H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - ctx->op3_neg = FALSE; - OK(ENC_FMLS_Z_ZZZI_H); - } - /* class iclass_single_precision */ - /* 011|0010|0|size=10|1|i2=xx|Zm=xxx|0000|o2=0|op=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A00400) { - decode_fields32(ENC_FMLS_Z_ZZZI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - ctx->op3_neg = FALSE; - OK(ENC_FMLS_Z_ZZZI_S); - } - /* class iclass_double_precision */ - /* 011|0010|0|size=11|1|i1=x|Zm=xxxx|0000|o2=0|op=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E00400) { - decode_fields32(ENC_FMLS_Z_ZZZI_D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - ctx->op3_neg = FALSE; - OK(ENC_FMLS_Z_ZZZI_D); - } - return rc; -} - -/* fmls_za_zzi.xml */ -int fmls_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|op=0|S=1|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09030)==0xC1101010) { - decode_fields32(ENC_FMLS_ZA_ZZI_H2XI, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_FMLS_ZA_ZZI_H2XI); - } - /* class iclass_two_za_single_vectors_of_single_precision_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=0|i2=xx|Zn=xxxx|0|S=1|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1500010) { - decode_fields32(ENC_FMLS_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_FMLS_ZA_ZZI_S2XI); - } - /* class iclass_two_za_single_vectors_of_double_precision_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|00|i1=x|Zn=xxxx|0|S=1|0|off3=xxx */ - if((INSWORD & 0xFFF09838)==0xC1D00010) { - decode_fields32(ENC_FMLS_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_F64F64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 2; - OK(ENC_FMLS_ZA_ZZI_D2XI); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|0|op=0|S=1|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09070)==0xC1109010) { - decode_fields32(ENC_FMLS_ZA_ZZI_H4XI, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_FMLS_ZA_ZZI_H4XI); - } - /* class iclass_four_za_single_vectors_of_single_precision_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=0|i2=xx|Zn=xxx|0|0|S=1|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1508010) { - decode_fields32(ENC_FMLS_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_FMLS_ZA_ZZI_S4XI); - } - /* class iclass_four_za_single_vectors_of_double_precision_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|0|op=0|i1=x|Zn=xxx|00|S=1|0|off3=xxx */ - if((INSWORD & 0xFFF09878)==0xC1D08010) { - decode_fields32(ENC_FMLS_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_F64F64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 4; - OK(ENC_FMLS_ZA_ZZI_D4XI); - } - return rc; -} - -/* fmls_za_zzv.xml */ -int fmls_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|0|S=1|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1201808) { - decode_fields32(ENC_FMLS_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLS_ZA_ZZV_2X1); - } - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|10|sz=0|10|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201C08) { - decode_fields32(ENC_FMLS_ZA_ZZV_2X1_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLS_ZA_ZZV_2X1_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|0|S=1|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1301808) { - decode_fields32(ENC_FMLS_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLS_ZA_ZZV_4X1); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|10|sz=0|11|Zm=xxxx|0|Rv=xx|111|Zn=xxxxx|0|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301C08) { - decode_fields32(ENC_FMLS_ZA_ZZV_4X1_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLS_ZA_ZZV_4X1_16); - } - return rc; -} - -/* fmls_za_zzw.xml */ -int fmls_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|110|Zn=xxxx|0|0|S=1|off3=xxx */ - if((INSWORD & 0xFFA19C38)==0xC1A01808) { - decode_fields32(ENC_FMLS_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLS_ZA_ZZW_2X2); - } - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|Zm=xxxx|00|Rv=xx|100|Zn=xxxx|0|S=1|1|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1A01018) { - decode_fields32(ENC_FMLS_ZA_ZZW_2X2_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FMLS_ZA_ZZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|110|Zn=xxx|00|0|S=1|off3=xxx */ - if((INSWORD & 0xFFA39C78)==0xC1A11808) { - decode_fields32(ENC_FMLS_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLS_ZA_ZZW_4X4); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|Zm=xxx|0|10|Rv=xx|100|Zn=xxx|00|S=1|1|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1A11018) { - decode_fields32(ENC_FMLS_ZA_ZZW_4X4_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FMLS_ZA_ZZW_4X4_16); - } - return rc; -} - -/* fmlsl_za_zzi.xml */ -int fmlsl_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|op=0|S=1|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1801008) { - decode_fields32(ENC_FMLSL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_FMLSL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|op=0|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1901008) { - decode_fields32(ENC_FMLSL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_FMLSL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|op=0|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1909008) { - decode_fields32(ENC_FMLSL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_FMLSL_ZA_ZZI_4XI); - } - return rc; -} - -/* fmlsl_za_zzv.xml */ -int fmlsl_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|op=0|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1200C08) { - decode_fields32(ENC_FMLSL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_FMLSL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=0|S=1|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1200808) { - decode_fields32(ENC_FMLSL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_FMLSL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|op=0|S=1|o2=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1300808) { - decode_fields32(ENC_FMLSL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_FMLSL_ZA_ZZV_4X1); - } - return rc; -} - -/* fmlsl_za_zzw.xml */ -int fmlsl_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|op=0|S=1|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1A00808) { - decode_fields32(ENC_FMLSL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_FMLSL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|op=0|S=1|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1A10808) { - decode_fields32(ENC_FMLSL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_FMLSL_ZA_ZZW_4X4); - } - return rc; -} - -/* fmlslb_z_zzz.xml */ -int fmlslb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=0|1|Zm=xxxxx|10|op=1|00|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A0A000) { - decode_fields32(ENC_FMLSLB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - OK(ENC_FMLSLB_Z_ZZZ_); - } - return rc; -} - -/* fmlslb_z_zzzi.xml */ -int fmlslb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_precision */ - /* 011|0010|0|1|o2=0|1|i3h=xx|Zm=xxx|01|op=1|0|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64A06000) { - decode_fields32(ENC_FMLSLB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = TRUE; - OK(ENC_FMLSLB_Z_ZZZI_S); - } - return rc; -} - -/* fmlslt_z_zzz.xml */ -int fmlslt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|1|o2=0|1|Zm=xxxxx|10|op=1|00|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A0A400) { - decode_fields32(ENC_FMLSLT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - OK(ENC_FMLSLT_Z_ZZZ_); - } - return rc; -} - -/* fmlslt_z_zzzi.xml */ -int fmlslt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_precision */ - /* 011|0010|0|1|o2=0|1|i3h=xx|Zm=xxx|01|op=1|0|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x64A06400) { - decode_fields32(ENC_FMLSLT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->op1_neg = TRUE; - OK(ENC_FMLSLT_Z_ZZZI_S); - } - return rc; -} - -/* fmmla_z16_zz8z8.xml */ -int fmmla_z16_zz8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|00|op=1|1|Zm=xxxxx|111000|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6460E000) { - decode_fields32(ENC_FMMLA_Z16_ZZ8Z8_, ctx, instr); - if(!HaveSVE2() || !HaveF8F16MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMMLA_Z16_ZZ8Z8_); - } - return rc; -} - -/* fmmla_z32_zz8z8.xml */ -int fmmla_z32_zz8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|00|op=0|1|Zm=xxxxx|111000|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6420E000) { - decode_fields32(ENC_FMMLA_Z32_ZZ8Z8_, ctx, instr); - if(!HaveSVE2() || !HaveF8F32MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMMLA_Z32_ZZ8Z8_); - } - return rc; -} - -/* fmmla_z32_zzz.xml */ -int fmmla_z32_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|0|opc=00|1|Zm=xxxxx|111001|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x6420E400) { - decode_fields32(ENC_FMMLA_Z32_ZZZ_H, ctx, instr); - if(!HaveSVE_F16F32MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMMLA_Z32_ZZZ_H); - } - return rc; -} - -/* fmmla_z_zzz.xml */ -int fmmla_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 011|0010|01|op=0|1|Zm=xxxxx|111000|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A0E000) { - decode_fields32(ENC_FMMLA_Z_ZZZ_H, ctx, instr); - if(!HaveSVE2p2() || !HaveF16MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMMLA_Z_ZZZ_H); - } - /* class iclass_32_bit_element */ - /* 011|0010|0|opc=10|1|Zm=xxxxx|111001|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A0E400) { - decode_fields32(ENC_FMMLA_Z_ZZZ_S, ctx, instr); - if(!HaveF32MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMMLA_Z_ZZZ_S); - } - /* class iclass_64_bit_element */ - /* 011|0010|0|opc=11|1|Zm=xxxxx|111001|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E0E400) { - decode_fields32(ENC_FMMLA_Z_ZZZ_D, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_FMMLA_Z_ZZZ_D); - } - return rc; -} - -/* fmop4a_za16_z8z8.xml */ -int fmop4a_za16_z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|0|00|1|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|01|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x80300008) { - decode_fields32(ENC_FMOP4A_ZA16_Z8Z8_B1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA16_Z8Z8_B1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|0|00|1|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|01|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x80200008) { - decode_fields32(ENC_FMOP4A_ZA16_Z8Z8_B1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA16_Z8Z8_B1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|0|00|1|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|01|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x80200208) { - decode_fields32(ENC_FMOP4A_ZA16_Z8Z8_B2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA16_Z8Z8_B2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|0|00|1|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|01|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x80300208) { - decode_fields32(ENC_FMOP4A_ZA16_Z8Z8_B2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA16_Z8Z8_B2X2); - } - return rc; -} - -/* fmop4a_za32_z8z8.xml */ -int fmop4a_za32_z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|0|00|1|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|00|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80300000) { - decode_fields32(ENC_FMOP4A_ZA32_Z8Z8_B1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA32_Z8Z8_B1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|0|00|1|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|00|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80200000) { - decode_fields32(ENC_FMOP4A_ZA32_Z8Z8_B1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA32_Z8Z8_B1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|0|00|1|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|00|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80200200) { - decode_fields32(ENC_FMOP4A_ZA32_Z8Z8_B2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA32_Z8Z8_B2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|0|00|1|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|00|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80300200) { - decode_fields32(ENC_FMOP4A_ZA32_Z8Z8_B2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOP4A_ZA32_Z8Z8_B2X2); - } - return rc; -} - -/* fmop4a_za32_zz.xml */ -int fmop4a_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81300000) { - decode_fields32(ENC_FMOP4A_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81200000) { - decode_fields32(ENC_FMOP4A_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81200200) { - decode_fields32(ENC_FMOP4A_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81300200) { - decode_fields32(ENC_FMOP4A_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA32_ZZ_H2X2); - } - return rc; -} - -/* fmop4a_za_zz.xml */ -int fmop4a_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision_single_and_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81100008) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_H1X2); - } - /* class iclass_half_precision_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81000008) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_H1X1); - } - /* class iclass_half_precision_multiple_and_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81000208) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_H2X1); - } - /* class iclass_half_precision_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81100208) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_H2X2); - } - /* class iclass_single_precision_single_and_multiple_vectors */ - /* 1|00|0000|0|00|0|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80100000) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_S1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_S1X2); - } - /* class iclass_single_precision_single_vectors */ - /* 1|00|0000|0|00|0|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80000000) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_S1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_S1X1); - } - /* class iclass_single_precision_multiple_and_single_vectors */ - /* 1|00|0000|0|00|0|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80000200) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_S2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_S2X1); - } - /* class iclass_single_precision_multiple_vectors */ - /* 1|00|0000|0|00|0|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80100200) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_S2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_S2X2); - } - /* class iclass_double_precision_single_and_multiple_vectors */ - /* 1|0|0|0000|0|11|0|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80D00008) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_D1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_D1X2); - } - /* class iclass_double_precision_single_vectors */ - /* 1|0|0|0000|0|11|0|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80C00008) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_D1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_D1X1); - } - /* class iclass_double_precision_multiple_and_single_vectors */ - /* 1|0|0|0000|0|11|0|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80C00208) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_D2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_D2X1); - } - /* class iclass_double_precision_multiple_vectors */ - /* 1|0|0|0000|0|11|0|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80D00208) { - decode_fields32(ENC_FMOP4A_ZA_ZZ_D2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - OK(ENC_FMOP4A_ZA_ZZ_D2X2); - } - return rc; -} - -/* fmop4s_za32_zz.xml */ -int fmop4s_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81300010) { - decode_fields32(ENC_FMOP4S_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81200010) { - decode_fields32(ENC_FMOP4S_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|1|00|1|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81200210) { - decode_fields32(ENC_FMOP4S_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|1|00|1|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81300210) { - decode_fields32(ENC_FMOP4S_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA32_ZZ_H2X2); - } - return rc; -} - -/* fmop4s_za_zz.xml */ -int fmop4s_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision_single_and_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81100018) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_H1X2); - } - /* class iclass_half_precision_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81000018) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_H1X1); - } - /* class iclass_half_precision_multiple_and_single_vectors */ - /* 1|00|0000|1|00|0|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81000218) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_H2X1); - } - /* class iclass_half_precision_multiple_vectors */ - /* 1|00|0000|1|00|0|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|1|0|0|ZAda=x */ - if((INSWORD & 0xFFF1FE3E)==0x81100218) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_H2X2); - } - /* class iclass_single_precision_single_and_multiple_vectors */ - /* 1|00|0000|0|00|0|M=1|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80100010) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_S1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_S1X2); - } - /* class iclass_single_precision_single_vectors */ - /* 1|00|0000|0|00|0|M=0|Zm=xxx|0|0|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80000010) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_S1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_S1X1); - } - /* class iclass_single_precision_multiple_and_single_vectors */ - /* 1|00|0000|0|00|0|M=0|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80000210) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_S2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_S2X1); - } - /* class iclass_single_precision_multiple_vectors */ - /* 1|00|0000|0|00|0|M=1|Zm=xxx|0|0|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80100210) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_S2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_S2X2); - } - /* class iclass_double_precision_single_and_multiple_vectors */ - /* 1|0|0|0000|0|11|0|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80D00018) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_D1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_D1X2); - } - /* class iclass_double_precision_single_vectors */ - /* 1|0|0|0000|0|11|0|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80C00018) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_D1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_D1X1); - } - /* class iclass_double_precision_multiple_and_single_vectors */ - /* 1|0|0|0000|0|11|0|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80C00218) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_D2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_D2X1); - } - /* class iclass_double_precision_multiple_vectors */ - /* 1|0|0|0000|0|11|0|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0x80D00218) { - decode_fields32(ENC_FMOP4S_ZA_ZZ_D2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - OK(ENC_FMOP4S_ZA_ZZ_D2X2); - } - return rc; -} - -/* fmopa_za16_pp_z8z8.xml */ -int fmopa_za16_pp_z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|0|10|1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|0|10|0|ZAda=x */ - if((INSWORD & 0xFFE0001E)==0x80A00008) { - decode_fields32(ENC_FMOPA_ZA16_PP_Z8Z8_8, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPA_ZA16_PP_Z8Z8_8); - } - return rc; -} - -/* fmopa_za32_pp_z8z8.xml */ -int fmopa_za32_pp_z8z8(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|0|10|1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|0|00|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x80A00000) { - decode_fields32(ENC_FMOPA_ZA32_PP_Z8Z8_8, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPA_ZA32_PP_Z8Z8_8); - } - return rc; -} - -/* fmopa_za32_pp_zz.xml */ -int fmopa_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|00|0000|1|10|1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|00|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x81A00000) { - decode_fields32(ENC_FMOPA_ZA32_PP_ZZ_16, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPA_ZA32_PP_ZZ_16); - } - return rc; -} - -/* fmopa_za_pp_zz.xml */ -int fmopa_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 1|00|0000|1|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|10|0|ZAda=x */ - if((INSWORD & 0xFFE0001E)==0x81800008) { - decode_fields32(ENC_FMOPA_ZA_PP_ZZ_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPA_ZA_PP_ZZ_16); - } - /* class iclass_single_precision */ - /* 1|00|0000|0|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|00|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x80800000) { - decode_fields32(ENC_FMOPA_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPA_ZA_PP_ZZ_32); - } - /* class iclass_double_precision */ - /* 1|0|0|0000|0|11|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0x80C00000) { - decode_fields32(ENC_FMOPA_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPA_ZA_PP_ZZ_64); - } - return rc; -} - -/* fmops_za32_pp_zz.xml */ -int fmops_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|00|0000|1|10|1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|00|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x81A00010) { - decode_fields32(ENC_FMOPS_ZA32_PP_ZZ_16, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPS_ZA32_PP_ZZ_16); - } - return rc; -} - -/* fmops_za_pp_zz.xml */ -int fmops_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 1|00|0000|1|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|10|0|ZAda=x */ - if((INSWORD & 0xFFE0001E)==0x81800018) { - decode_fields32(ENC_FMOPS_ZA_PP_ZZ_16, ctx, instr); - if(!HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPS_ZA_PP_ZZ_16); - } - /* class iclass_single_precision */ - /* 1|00|0000|0|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|00|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0x80800010) { - decode_fields32(ENC_FMOPS_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPS_ZA_PP_ZZ_32); - } - /* class iclass_double_precision */ - /* 1|0|0|0000|0|11|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0x80C00010) { - decode_fields32(ENC_FMOPS_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FMOPS_ZA_PP_ZZ_64); - } - return rc; -} - -/* fmov_cpy_z_p_i.xml */ -int fmov_cpy_z_p_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|01|Pg=xxxx|0|M=1|sh=0|imm8=00000000|Zd=xxxxx */ - if((INSWORD & 0xFF30FFE0)==0x5104000) { - decode_fields32(ENC_FMOV_Z_P_0__CPY_Z_P_I_, ctx, instr); - OK(ENC_FMOV_Z_P_0__CPY_Z_P_I_); - } - return rc; -} - -/* fmov_dup_z_i.xml */ -int fmov_dup_z_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|11|opc=00|0|11|sh=0|imm8=00000000|Zd=xxxxx */ - if((INSWORD & 0xFF3FFFE0)==0x2538C000) { - decode_fields32(ENC_FMOV_Z_0__DUP_Z_I_, ctx, instr); - OK(ENC_FMOV_Z_0__DUP_Z_I_); - } - return rc; -} - -/* fmov_fcpy_z_p_i.xml */ -int fmov_fcpy_z_p_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|01|Pg=xxxx|110|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF30E000)==0x510C000) { - decode_fields32(ENC_FMOV_Z_P_I__FCPY_Z_P_I_, ctx, instr); - OK(ENC_FMOV_Z_P_I__FCPY_Z_P_I_); - } - return rc; -} - -/* fmov_fdup_z_i.xml */ -int fmov_fdup_z_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|11|opc=00|1|11|o2=0|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x2539C000) { - decode_fields32(ENC_FMOV_Z_I__FDUP_Z_I_, ctx, instr); - OK(ENC_FMOV_Z_I__FDUP_Z_I_); - } - return rc; -} - -/* fmsb_z_p_zzz.xml */ -int fmsb_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|1|Za=xxxxx|1|N=0|op=1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF20E000)==0x6520A000) { - decode_fields32(ENC_FMSB_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->a = UINT(ctx->Za); - ctx->op1_neg = TRUE; - ctx->op3_neg = FALSE; - OK(ENC_FMSB_Z_P_ZZZ_); - } - return rc; -} - -/* fmul_mz_zzv.xml */ -int fmul_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|0|111010|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFF21FC21)==0xC120E800 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMUL_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_FMUL_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|1|111010|Zn=xxx|0|0|Zd=xxx|0|0 */ - if((INSWORD & 0xFF21FC63)==0xC121E800 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMUL_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_FMUL_MZ_ZZV_4X1); - } - return rc; -} - -/* fmul_mz_zzw.xml */ -int fmul_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|0|111001|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFF21FC21)==0xC120E400 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMUL_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FMUL_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxx|01|111001|Zn=xxx|0|0|Zd=xxx|0|0 */ - if((INSWORD & 0xFF23FC63)==0xC121E400 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMUL_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FMUL_MZ_ZZW_4X4); - } - return rc; -} - -/* fmul_z_p_zs.xml */ -int fmul_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=010|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x651A8000) { - decode_fields32(ENC_FMUL_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? FPPointFive(0,ctx->esize) : FPTwo(0,ctx->esize); - OK(ENC_FMUL_Z_P_ZS_); - } - return rc; -} - -/* fmul_z_p_zz.xml */ -int fmul_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=0010|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65028000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMUL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FMUL_Z_P_ZZ_); - } - return rc; -} - -/* fmul_z_zz.xml */ -int fmul_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|Zm=xxxxx|000|opc=010|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x65000800 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FMUL_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FMUL_Z_ZZ_); - } - return rc; -} - -/* fmul_z_zzi.xml */ -int fmul_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 011|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|0010|o2=0|0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x64202000) { - decode_fields32(ENC_FMUL_Z_ZZI_H, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FMUL_Z_ZZI_H); - } - /* class iclass_single_precision */ - /* 011|0010|0|size=10|1|i2=xx|Zm=xxx|0010|o2=0|0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64A02000) { - decode_fields32(ENC_FMUL_Z_ZZI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FMUL_Z_ZZI_S); - } - /* class iclass_double_precision */ - /* 011|0010|0|size=11|1|i1=x|Zm=xxxx|0010|o2=0|0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x64E02000) { - decode_fields32(ENC_FMUL_Z_ZZI_D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FMUL_Z_ZZI_D); - } - return rc; -} - -/* fmulx_z_p_zz.xml */ -int fmulx_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|0|opc=1010|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x650A8000) { - decode_fields32(ENC_FMULX_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FMULX_Z_P_ZZ_); - } - return rc; -} - -/* fneg_z_p_z.xml */ -int fneg_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|1|opc=101|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41DA000) { - decode_fields32(ENC_FNEG_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FNEG_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|1|opc=101|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40DA000) { - decode_fields32(ENC_FNEG_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FNEG_Z_P_Z_Z); - } - return rc; -} - -/* fnmad_z_p_zzz.xml */ -int fnmad_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|1|Za=xxxxx|1|N=1|op=0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF20E000)==0x6520C000) { - decode_fields32(ENC_FNMAD_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->a = UINT(ctx->Za); - ctx->op1_neg = TRUE; - ctx->op3_neg = TRUE; - OK(ENC_FNMAD_Z_P_ZZZ_); - } - return rc; -} - -/* fnmla_z_p_zzz.xml */ -int fnmla_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|1|Zm=xxxxx|0|N=1|op=0|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20E000)==0x65204000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FNMLA_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = TRUE; - ctx->op3_neg = TRUE; - OK(ENC_FNMLA_Z_P_ZZZ_); - } - return rc; -} - -/* fnmls_z_p_zzz.xml */ -int fnmls_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|1|Zm=xxxxx|0|N=1|op=1|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20E000)==0x65206000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FNMLS_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_neg = FALSE; - ctx->op3_neg = TRUE; - OK(ENC_FNMLS_Z_P_ZZZ_); - } - return rc; -} - -/* fnmsb_z_p_zzz.xml */ -int fnmsb_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|1|Za=xxxxx|1|N=1|op=1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF20E000)==0x6520E000) { - decode_fields32(ENC_FNMSB_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->a = UINT(ctx->Za); - ctx->op1_neg = FALSE; - ctx->op3_neg = TRUE; - OK(ENC_FNMSB_Z_P_ZZZ_); - } - return rc; -} - -/* frecpe_z_z.xml */ -int frecpe_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|001|11|op=0|0011|00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x650E3000) { - decode_fields32(ENC_FRECPE_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_FRECPE_Z_Z_); - } - return rc; -} - -/* frecps_z_zz.xml */ -int frecps_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|000|opc=110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x65001800) { - decode_fields32(ENC_FRECPS_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FRECPS_Z_ZZ_); - } - return rc; -} - -/* frecpx_z_p_z.xml */ -int frecpx_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|size=xx|0|011|opc=00|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x650CA000) { - decode_fields32(ENC_FRECPX_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FRECPX_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 011|0010|0|size=xx|011|011|1|opc=00|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x641B8000) { - decode_fields32(ENC_FRECPX_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FRECPX_Z_P_Z_Z); - } - return rc; -} - -/* frint32x_z_p_z.xml */ -int frint32x_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|opc=00|0|10|0|sz=x|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFDE000)==0x6511A000) { - decode_fields32(ENC_FRINT32X_Z_P_Z_M, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x20; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_FRINT32X_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 011|0010|0|opc=00|011|10|o2=0|1|sz=x|U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFA000)==0x641CA000) { - decode_fields32(ENC_FRINT32X_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x20; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_FRINT32X_Z_P_Z_Z); - } - return rc; -} - -/* frint32z_z_p_z.xml */ -int frint32z_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|opc=00|0|10|0|sz=x|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFDE000)==0x6510A000) { - decode_fields32(ENC_FRINT32Z_Z_P_Z_M, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x20; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FRINT32Z_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 011|0010|0|opc=00|011|10|o2=0|1|sz=x|U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFA000)==0x641C8000) { - decode_fields32(ENC_FRINT32Z_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x20; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FRINT32Z_Z_P_Z_Z); - } - return rc; -} - -/* frint64x_z_p_z.xml */ -int frint64x_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|opc=00|0|10|1|sz=x|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFDE000)==0x6515A000) { - decode_fields32(ENC_FRINT64X_Z_P_Z_M, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x40; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_FRINT64X_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 011|0010|0|opc=00|011|10|o2=1|1|sz=x|U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFA000)==0x641DA000) { - decode_fields32(ENC_FRINT64X_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x40; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_FRINT64X_Z_P_Z_Z); - } - return rc; -} - -/* frint64z_z_p_z.xml */ -int frint64z_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|opc=00|0|10|1|sz=x|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFDE000)==0x6514A000) { - decode_fields32(ENC_FRINT64Z_Z_P_Z_M, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x40; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FRINT64Z_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 011|0010|0|opc=00|011|10|o2=1|1|sz=x|U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFA000)==0x641D8000) { - decode_fields32(ENC_FRINT64Z_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->intsize = 0x40; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FRINT64Z_Z_P_Z_Z); - } - return rc; -} - -/* frinta_mz_z.xml */ -int frinta_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=10|1|01|opc=100|111000|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC1ACE000) { - decode_fields32(ENC_FRINTA_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEAWAY; - OK(ENC_FRINTA_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=10|1|11|opc=100|111000|Zn=xxx|00|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC1BCE000) { - decode_fields32(ENC_FRINTA_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEAWAY; - OK(ENC_FRINTA_MZ_Z_4); - } - return rc; -} - -/* frinta_z_p_z.xml */ -int frinta_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_current_mode_signalling_inexact_merging */ - /* 011|0010|1|size=xx|0|00|opc=110|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6506A000) { - decode_fields32(ENC_FRINTX_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_FRINTX_Z_P_Z_M); - } - /* class iclass_current_mode_signalling_inexact_zeroing */ - /* 011|0010|0|size=xx|011|00|op=1|1|opc2=10|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6419C000) { - decode_fields32(ENC_FRINTX_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_FRINTX_Z_P_Z_Z); - } - /* class iclass_current_mode_merging */ - /* 011|0010|1|size=xx|0|00|opc=111|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6507A000) { - decode_fields32(ENC_FRINTI_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_FRINTI_Z_P_Z_M); - } - /* class iclass_current_mode_zeroing */ - /* 011|0010|0|size=xx|011|00|op=1|1|opc2=11|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6419E000) { - decode_fields32(ENC_FRINTI_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_FRINTI_Z_P_Z_Z); - } - /* class iclass_nearest_with_ties_to_away_merging */ - /* 011|0010|1|size=xx|0|00|opc=100|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6504A000) { - decode_fields32(ENC_FRINTA_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEAWAY; - ctx->merging = TRUE; - OK(ENC_FRINTA_Z_P_Z_M); - } - /* class iclass_nearest_with_ties_to_away_zeroing */ - /* 011|0010|0|size=xx|011|00|op=1|1|opc2=00|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x64198000) { - decode_fields32(ENC_FRINTA_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEAWAY; - ctx->merging = FALSE; - OK(ENC_FRINTA_Z_P_Z_Z); - } - /* class iclass_nearest_with_ties_to_even_merging */ - /* 011|0010|1|size=xx|0|00|opc=000|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6500A000) { - decode_fields32(ENC_FRINTN_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEEVEN; - ctx->merging = TRUE; - OK(ENC_FRINTN_Z_P_Z_M); - } - /* class iclass_nearest_with_ties_to_even_zeroing */ - /* 011|0010|0|size=xx|011|00|op=0|1|opc2=00|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x64188000) { - decode_fields32(ENC_FRINTN_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEEVEN; - ctx->merging = FALSE; - OK(ENC_FRINTN_Z_P_Z_Z); - } - /* class iclass_toward_zero_merging */ - /* 011|0010|1|size=xx|0|00|opc=011|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6503A000) { - decode_fields32(ENC_FRINTZ_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = TRUE; - OK(ENC_FRINTZ_Z_P_Z_M); - } - /* class iclass_toward_zero_zeroing */ - /* 011|0010|0|size=xx|011|00|op=0|1|opc2=11|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6418E000) { - decode_fields32(ENC_FRINTZ_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_ZERO; - ctx->merging = FALSE; - OK(ENC_FRINTZ_Z_P_Z_Z); - } - /* class iclass_toward_minus_infinity_merging */ - /* 011|0010|1|size=xx|0|00|opc=010|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6502A000) { - decode_fields32(ENC_FRINTM_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_NEGINF; - ctx->merging = TRUE; - OK(ENC_FRINTM_Z_P_Z_M); - } - /* class iclass_toward_minus_infinity_zeroing */ - /* 011|0010|0|size=xx|011|00|op=0|1|opc2=10|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6418C000) { - decode_fields32(ENC_FRINTM_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_NEGINF; - ctx->merging = FALSE; - OK(ENC_FRINTM_Z_P_Z_Z); - } - /* class iclass_toward_plus_infinity_merging */ - /* 011|0010|1|size=xx|0|00|opc=001|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6501A000) { - decode_fields32(ENC_FRINTP_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_POSINF; - ctx->merging = TRUE; - OK(ENC_FRINTP_Z_P_Z_M); - } - /* class iclass_toward_plus_infinity_zeroing */ - /* 011|0010|0|size=xx|011|00|op=0|1|opc2=01|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x6418A000) { - decode_fields32(ENC_FRINTP_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->exact = FALSE; - ctx->rounding = FPRounding_POSINF; - ctx->merging = FALSE; - OK(ENC_FRINTP_Z_P_Z_Z); - } - return rc; -} - -/* frintm_mz_z.xml */ -int frintm_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=10|1|01|opc=010|111000|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC1AAE000) { - decode_fields32(ENC_FRINTM_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->exact = FALSE; - ctx->rounding = FPRounding_NEGINF; - OK(ENC_FRINTM_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=10|1|11|opc=010|111000|Zn=xxx|00|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC1BAE000) { - decode_fields32(ENC_FRINTM_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->exact = FALSE; - ctx->rounding = FPRounding_NEGINF; - OK(ENC_FRINTM_MZ_Z_4); - } - return rc; -} - -/* frintn_mz_z.xml */ -int frintn_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=10|1|01|opc=000|111000|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC1A8E000) { - decode_fields32(ENC_FRINTN_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEEVEN; - OK(ENC_FRINTN_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=10|1|11|opc=000|111000|Zn=xxx|00|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC1B8E000) { - decode_fields32(ENC_FRINTN_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->exact = FALSE; - ctx->rounding = FPRounding_TIEEVEN; - OK(ENC_FRINTN_MZ_Z_4); - } - return rc; -} - -/* frintp_mz_z.xml */ -int frintp_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=10|1|01|opc=001|111000|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC1A9E000) { - decode_fields32(ENC_FRINTP_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->exact = FALSE; - ctx->rounding = FPRounding_POSINF; - OK(ENC_FRINTP_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=10|1|11|opc=001|111000|Zn=xxx|00|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC1B9E000) { - decode_fields32(ENC_FRINTP_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->exact = FALSE; - ctx->rounding = FPRounding_POSINF; - OK(ENC_FRINTP_MZ_Z_4); - } - return rc; -} - -/* frsqrte_z_z.xml */ -int frsqrte_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|001|11|op=1|0011|00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x650F3000) { - decode_fields32(ENC_FRSQRTE_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_FRSQRTE_Z_Z_); - } - return rc; -} - -/* frsqrts_z_zz.xml */ -int frsqrts_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|000|opc=111|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x65001C00) { - decode_fields32(ENC_FRSQRTS_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FRSQRTS_Z_ZZ_); - } - return rc; -} - -/* fscale_mz_zzv.xml */ -int fscale_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10100|0|01|100|Zdn=xxxx|op=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A180 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FSCALE_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_FSCALE_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|10|Zm=xxxx|10101|0|01|100|Zdn=xxx|0|op=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120A980 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FSCALE_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_FSCALE_MZ_ZZV_4X1); - } - return rc; -} - -/* fscale_mz_zzw.xml */ -int fscale_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxxx|0101100|011|opc=00|Zdn=xxxx|o2=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B180 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FSCALE_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_FSCALE_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size!=00|1|Zm=xxx|00101110|011|opc=00|Zdn=xxx|0|o2=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120B980 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FSCALE_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2() || !HaveFP8()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_FSCALE_MZ_ZZW_4X4); - } - return rc; -} - -/* fscale_z_p_zz.xml */ -int fscale_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=1001|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65098000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FSCALE_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FSCALE_Z_P_ZZ_); - } - return rc; -} - -/* fsqrt_z_p_z.xml */ -int fsqrt_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 011|0010|1|size=xx|0|011|opc=01|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x650DA000) { - decode_fields32(ENC_FSQRT_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_FSQRT_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 011|0010|0|size=xx|011|011|1|opc=01|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x641BA000) { - decode_fields32(ENC_FSQRT_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_FSQRT_Z_P_Z_Z); - } - return rc; -} - -/* fsub_z_p_zs.xml */ -int fsub_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=001|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x65198000) { - decode_fields32(ENC_FSUB_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? FPPointFive(0,ctx->esize) : FPOne(0,ctx->esize); - OK(ENC_FSUB_Z_P_ZS_); - } - return rc; -} - -/* fsub_z_p_zz.xml */ -int fsub_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|0|opc=0001|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65018000 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FSUB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FSUB_Z_P_ZZ_); - } - return rc; -} - -/* fsub_z_zz.xml */ -int fsub_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size!=00|0|Zm=xxxxx|000|opc=001|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x65000400 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_FSUB_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FSUB_Z_ZZ_); - } - return rc; -} - -/* fsub_za_zw.xml */ -int fsub_za_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|00|Rv=xx|111|Zm=xxxx|0|0|S=1|off3=xxx */ - if((INSWORD & 0xFFBF9C38)==0xC1A01C08) { - decode_fields32(ENC_FSUB_ZA_ZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FSUB_ZA_ZW_2X2); - } - /* class iclass_two_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|00|10|00|Rv=xx|111|Zm=xxxx|0|0|S=1|off3=xxx */ - if((INSWORD & 0xFFFF9C38)==0xC1A41C08) { - decode_fields32(ENC_FSUB_ZA_ZW_2X2_16, ctx, instr); - if(!HaveSME_F16F16() && !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_FSUB_ZA_ZW_2X2_16); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|10|Rv=xx|111|Zm=xxx|00|0|S=1|off3=xxx */ - if((INSWORD & 0xFFBF9C78)==0xC1A11C08) { - decode_fields32(ENC_FSUB_ZA_ZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_F64F64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FSUB_ZA_ZW_4X4); - } - /* class iclass_four_za_single_vectors_of_half_precision_elements */ - /* 1|10|0000|11|sz=0|1|00|10|10|Rv=xx|111|Zm=xxx|00|0|S=1|off3=xxx */ - if((INSWORD & 0xFFFF9C78)==0xC1A51C08) { - decode_fields32(ENC_FSUB_ZA_ZW_4X4_16, ctx, instr); - if(!HaveSME_F16F16() && !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x10; - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_FSUB_ZA_ZW_4X4_16); - } - return rc; -} - -/* fsubr_z_p_zs.xml */ -int fsubr_z_p_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|11|opc=011|100|Pg=xxx|0000|i1=x|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE3C0)==0x651B8000) { - decode_fields32(ENC_FSUBR_Z_P_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = (ctx->i1==0)!=0 ? FPPointFive(0,ctx->esize) : FPOne(0,ctx->esize); - OK(ENC_FSUBR_Z_P_ZS_); - } - return rc; -} - -/* fsubr_z_p_zz.xml */ -int fsubr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|0|opc=0011|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x65038000) { - decode_fields32(ENC_FSUBR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_FSUBR_Z_P_ZZ_); - } - return rc; -} - -/* ftmad_z_zzi.xml */ -int ftmad_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|10|imm3=xxx|100|000|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF38FC00)==0x65108000) { - decode_fields32(ENC_FTMAD_Z_ZZI_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->imm = UINT(ctx->imm3); - OK(ENC_FTMAD_Z_ZZI_); - } - return rc; -} - -/* ftmopa_za16_z8z8zi.xml */ -int ftmopa_za16_z8z8zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|0|01|1|Zm=xxxxx|0|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|1|0|0|ZAda=x */ - if((INSWORD & 0xFFE0E00E)==0x80600008) { - decode_fields32(ENC_FTMOPA_ZA16_Z8Z8ZI_B2X1, ctx, instr); - if(!HaveSME_TMOP() || !HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FTMOPA_ZA16_Z8Z8ZI_B2X1); - } - return rc; -} - -/* ftmopa_za32_z8z8zi.xml */ -int ftmopa_za32_z8z8zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|0|01|1|Zm=xxxxx|0|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x80600000) { - decode_fields32(ENC_FTMOPA_ZA32_Z8Z8ZI_B2X1, ctx, instr); - if(!HaveSME_TMOP() || !HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FTMOPA_ZA32_Z8Z8ZI_B2X1); - } - return rc; -} - -/* ftmopa_za32_zzzi.xml */ -int ftmopa_za32_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|1|01|1|Zm=xxxxx|0|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x81600000) { - decode_fields32(ENC_FTMOPA_ZA32_ZZZI_H2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - OK(ENC_FTMOPA_ZA32_ZZZI_H2X1); - } - return rc; -} - -/* ftmopa_za_zzzi.xml */ -int ftmopa_za_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_half_precision */ - /* 1|00|0000|1|01|0|Zm=xxxxx|0|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|1|0|0|ZAda=x */ - if((INSWORD & 0xFFE0E00E)==0x81400008) { - decode_fields32(ENC_FTMOPA_ZA_ZZZI_H2X1, ctx, instr); - if(!HaveSME_TMOP() || !HaveSME_F16F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->esize = 0x10; - OK(ENC_FTMOPA_ZA_ZZZI_H2X1); - } - /* class iclass_single_precision */ - /* 1|00|0000|0|01|0|Zm=xxxxx|0|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x80400000) { - decode_fields32(ENC_FTMOPA_ZA_ZZZI_S2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->esize = 0x20; - OK(ENC_FTMOPA_ZA_ZZZI_S2X1); - } - return rc; -} - -/* ftsmul_z_zz.xml */ -int ftsmul_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 011|0010|1|size=xx|0|Zm=xxxxx|000|opc=011|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x65000C00) { - decode_fields32(ENC_FTSMUL_Z_ZZ_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FTSMUL_Z_ZZ_); - } - return rc; -} - -/* ftssel_z_zz.xml */ -int ftssel_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|1011|0|op=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x420B000) { - decode_fields32(ENC_FTSSEL_Z_ZZ_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_FTSSEL_Z_ZZ_); - } - return rc; -} - -/* fvdot_za_z8z8i.xml */ -int fvdot_za_z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|op=1|i3h=xx|Zn=xxxx|1|0|i3l=x|off3=xxx */ - if((INSWORD & 0xFFF09030)==0xC1D01020) { - decode_fields32(ENC_FVDOT_ZA_Z8Z8I_2XI, ctx, instr); - if(!HaveSME_F8F16()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - OK(ENC_FVDOT_ZA_Z8Z8I_2XI); - } - return rc; -} - -/* fvdot_za_zzi.xml */ -int fvdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=0|i2=xx|Zn=xxxx|opc2=001|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1500008) { - decode_fields32(ENC_FVDOT_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_FVDOT_ZA_ZZI_2XI); - } - return rc; -} - -/* fvdotb_za32_z8z8i.xml */ -int fvdotb_za32_z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|01|i2h=x|Zn=xxxx|0|T=0|i2l=x|off3=xxx */ - if((INSWORD & 0xFFF09830)==0xC1D00800) { - decode_fields32(ENC_FVDOTB_ZA32_Z8Z8I_2XI, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - OK(ENC_FVDOTB_ZA32_Z8Z8I_2XI); - } - return rc; -} - -/* fvdott_za32_z8z8i.xml */ -int fvdott_za32_z8z8i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|01|i2h=x|Zn=xxxx|0|T=1|i2l=x|off3=xxx */ - if((INSWORD & 0xFFF09830)==0xC1D00810) { - decode_fields32(ENC_FVDOTT_ZA32_Z8Z8I_2XI, ctx, instr); - if(!HaveSME_F8F32()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - OK(ENC_FVDOTT_ZA32_Z8Z8I_2XI); - } - return rc; -} - -/* histcnt_z_p_zz.xml */ -int histcnt_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|110|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20E000)==0x4520C000) { - decode_fields32(ENC_HISTCNT_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Zd); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - OK(ENC_HISTCNT_Z_P_ZZ_); - } - return rc; -} - -/* histseg_z_zz.xml */ -int histseg_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|101|000|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4520A000) { - decode_fields32(ENC_HISTSEG_Z_ZZ_, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->d = UINT(ctx->Zd); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - OK(ENC_HISTSEG_Z_ZZ_); - } - return rc; -} - -/* incb_r_rs.xml */ -int incb_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte */ - /* 000|0010|0|size=00|1|1|imm4=xxxx|11|100|D=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x430E000) { - decode_fields32(ENC_INCB_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_INCB_R_RS_); - } - /* class iclass_doubleword */ - /* 000|0010|0|size=11|1|1|imm4=xxxx|11|100|D=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0E000) { - decode_fields32(ENC_INCD_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_INCD_R_RS_); - } - /* class iclass_halfword */ - /* 000|0010|0|size=01|1|1|imm4=xxxx|11|100|D=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470E000) { - decode_fields32(ENC_INCH_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_INCH_R_RS_); - } - /* class iclass_word */ - /* 000|0010|0|size=10|1|1|imm4=xxxx|11|100|D=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0E000) { - decode_fields32(ENC_INCW_R_RS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_INCW_R_RS_); - } - return rc; -} - -/* incd_z_zs.xml */ -int incd_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_doubleword */ - /* 000|0010|0|size=11|1|1|imm4=xxxx|11|000|D=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0C000) { - decode_fields32(ENC_INCD_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_INCD_Z_ZS_); - } - /* class iclass_halfword */ - /* 000|0010|0|size=01|1|1|imm4=xxxx|11|000|D=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470C000) { - decode_fields32(ENC_INCH_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_INCH_Z_ZS_); - } - /* class iclass_word */ - /* 000|0010|0|size=10|1|1|imm4=xxxx|11|000|D=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0C000) { - decode_fields32(ENC_INCW_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - OK(ENC_INCW_Z_ZS_); - } - return rc; -} - -/* incp_r_p_r.xml */ -int incp_r_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|1|op=0|D=0|1000|1|opc2=00|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252C8800) { - decode_fields32(ENC_INCP_R_P_R_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - OK(ENC_INCP_R_P_R_); - } - return rc; -} - -/* incp_z_p_z.xml */ -int incp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|1|op=0|D=0|1000|0|opc2=00|Pm=xxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252C8000) { - decode_fields32(ENC_INCP_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_INCP_Z_P_Z_); - } - return rc; -} - -/* index_z_ii.xml */ -int index_z_ii(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|imm5b=xxxxx|0100|00|imm5=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4204000) { - decode_fields32(ENC_INDEX_Z_II_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(ctx->Zd); - ctx->imm1 = SInt(ctx->imm5,5); - ctx->imm2 = SInt(ctx->imm5b,5); - OK(ENC_INDEX_Z_II_); - } - return rc; -} - -/* index_z_ir.xml */ -int index_z_ir(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Rm=xxxxx|0100|10|imm5=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4204800) { - decode_fields32(ENC_INDEX_Z_IR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Zd); - ctx->imm = SInt(ctx->imm5,5); - OK(ENC_INDEX_Z_IR_); - } - return rc; -} - -/* index_z_ri.xml */ -int index_z_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|imm5=xxxxx|0100|01|Rn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4204400) { - decode_fields32(ENC_INDEX_Z_RI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Rn); - ctx->d = UINT(ctx->Zd); - ctx->imm = SInt(ctx->imm5,5); - OK(ENC_INDEX_Z_RI_); - } - return rc; -} - -/* index_z_rr.xml */ -int index_z_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Rm=xxxxx|0100|11|Rn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4204C00) { - decode_fields32(ENC_INDEX_Z_RR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Zd); - OK(ENC_INDEX_Z_RR_); - } - return rc; -} - -/* insr_z_r.xml */ -int insr_z_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|00|100|001110|Rm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5243800) { - decode_fields32(ENC_INSR_Z_R_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Rm); - OK(ENC_INSR_Z_R_); - } - return rc; -} - -/* insr_z_v.xml */ -int insr_z_v(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|10|100|001110|Vm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5343800) { - decode_fields32(ENC_INSR_Z_V_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Vm); - OK(ENC_INSR_Z_V_); - } - return rc; -} - -/* lasta_r_p_z.xml */ -int lasta_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|000|B=0|10|1|Pg=xxx|Zn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x520A000) { - decode_fields32(ENC_LASTA_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (ctx->esize<0x40)!=0 ? 0x20 : 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Rd); - ctx->isBefore = FALSE; - OK(ENC_LASTA_R_P_Z_); - } - return rc; -} - -/* lasta_v_p_z.xml */ -int lasta_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|001|B=0|10|0|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5228000) { - decode_fields32(ENC_LASTA_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->isBefore = FALSE; - OK(ENC_LASTA_V_P_Z_); - } - return rc; -} - -/* lastb_r_p_z.xml */ -int lastb_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|000|B=1|10|1|Pg=xxx|Zn=xxxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x521A000) { - decode_fields32(ENC_LASTB_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (ctx->esize<0x40)!=0 ? 0x20 : 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Rd); - ctx->isBefore = TRUE; - OK(ENC_LASTB_R_P_Z_); - } - return rc; -} - -/* lastb_v_p_z.xml */ -int lastb_v_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|001|B=1|10|0|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5238000) { - decode_fields32(ENC_LASTB_V_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->isBefore = TRUE; - OK(ENC_LASTB_V_P_Z_); - } - return rc; -} - -/* lastp_r_p_p.xml */ -int lastp_r_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|100|opc=010|10|Pg=xxxx|0|Pn=xxxx|Rd=xxxxx */ - if((INSWORD & 0xFF3FC200)==0x25228000) { - decode_fields32(ENC_LASTP_R_P_P_, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Rd); - OK(ENC_LASTP_R_P_P_); - } - return rc; -} - -/* ld1b_mz_p_bi.xml */ -int ld1b_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0400000) { - decode_fields32(ENC_LD1B_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA0408000) { - decode_fields32(ENC_LD1B_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_MZ_P_BI_4); - } - return rc; -} - -/* ld1b_mz_p_br.xml */ -int ld1b_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0000000) { - decode_fields32(ENC_LD1B_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - OK(ENC_LD1B_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA0008000) { - decode_fields32(ENC_LD1B_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - OK(ENC_LD1B_MZ_P_BR_4); - } - return rc; -} - -/* ld1b_mzx_p_bi.xml */ -int ld1b_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1400000) { - decode_fields32(ENC_LD1B_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA1408000) { - decode_fields32(ENC_LD1B_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_MZX_P_BI_4X4); - } - return rc; -} - -/* ld1b_mzx_p_br.xml */ -int ld1b_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1000000) { - decode_fields32(ENC_LD1B_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_LD1B_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA1008000) { - decode_fields32(ENC_LD1B_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_LD1B_MZX_P_BR_4X4); - } - return rc; -} - -/* ld1b_z_p_ai.xml */ -int ld1b_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=00|01|imm5=xxxxx|1|U=1|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8420C000) { - decode_fields32(ENC_LD1B_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1B_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=00|01|imm5=xxxxx|1|U=1|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC420C000) { - decode_fields32(ENC_LD1B_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1B_Z_P_AI_D); - } - return rc; -} - -/* ld1b_z_p_bi.xml */ -int ld1b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_element */ - /* 101|0010|dtype=0000|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA400A000) { - decode_fields32(ENC_LD1B_Z_P_BI_U8, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_Z_P_BI_U8); - } - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0001|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA420A000) { - decode_fields32(ENC_LD1B_Z_P_BI_U16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_Z_P_BI_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0010|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA440A000) { - decode_fields32(ENC_LD1B_Z_P_BI_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0011|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA460A000) { - decode_fields32(ENC_LD1B_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1B_Z_P_BI_U64); - } - return rc; -} - -/* ld1b_z_p_br.xml */ -int ld1b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_element */ - /* 101|0010|dtype=0000|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4004000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1B_Z_P_BR_U8, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LD1B_Z_P_BR_U8); - } - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0001|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4204000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1B_Z_P_BR_U16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LD1B_Z_P_BR_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0010|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4404000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1B_Z_P_BR_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LD1B_Z_P_BR_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0011|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4604000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1B_Z_P_BR_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LD1B_Z_P_BR_U64); - } - return rc; -} - -/* ld1b_z_p_bz.xml */ -int ld1b_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=00|xs=x|0|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4004000) { - decode_fields32(ENC_LD1B_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1B_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=00|xs=x|0|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84004000) { - decode_fields32(ENC_LD1B_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1B_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=00|10|Zm=xxxxx|1|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC440C000) { - decode_fields32(ENC_LD1B_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LD1B_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ld1b_za_p_rrr.xml */ -int ld1b_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=00|0|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|off4=xxxx */ - if((INSWORD & 0xFFE00010)==0xE0000000) { - decode_fields32(ENC_LD1B_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = 0; - ctx->offset = UINT(ctx->off4); - ctx->esize = 8; - ctx->vertical = ctx->V==1; - OK(ENC_LD1B_ZA_P_RRR_); - } - return rc; -} - -/* ld1d_mz_p_bi.xml */ -int ld1d_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0406000) { - decode_fields32(ENC_LD1D_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1D_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA040E000) { - decode_fields32(ENC_LD1D_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1D_MZ_P_BI_4); - } - return rc; -} - -/* ld1d_mz_p_br.xml */ -int ld1d_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0006000) { - decode_fields32(ENC_LD1D_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - OK(ENC_LD1D_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA000E000) { - decode_fields32(ENC_LD1D_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - OK(ENC_LD1D_MZ_P_BR_4); - } - return rc; -} - -/* ld1d_mzx_p_bi.xml */ -int ld1d_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1406000) { - decode_fields32(ENC_LD1D_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1D_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA140E000) { - decode_fields32(ENC_LD1D_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1D_MZX_P_BI_4X4); - } - return rc; -} - -/* ld1d_mzx_p_br.xml */ -int ld1d_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1006000) { - decode_fields32(ENC_LD1D_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_LD1D_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA100E000) { - decode_fields32(ENC_LD1D_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_LD1D_MZX_P_BR_4X4); - } - return rc; -} - -/* ld1d_z_p_ai.xml */ -int ld1d_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 110|0010|msz=11|01|imm5=xxxxx|1|U=1|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5A0C000) { - decode_fields32(ENC_LD1D_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1D_Z_P_AI_D); - } - return rc; -} - -/* ld1d_z_p_bi.xml */ -int ld1d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1111|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5E0A000) { - decode_fields32(ENC_LD1D_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1D_Z_P_BI_U64); - } - /* class iclass_128_bit_element */ - /* 101|0010|dtype=11|00|1|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5902000) { - decode_fields32(ENC_LD1D_Z_P_BI_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1D_Z_P_BI_U128); - } - return rc; -} - -/* ld1d_z_p_br.xml */ -int ld1d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1111|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5E04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1D_Z_P_BR_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - OK(ENC_LD1D_Z_P_BR_U64); - } - /* class iclass_128_bit_element */ - /* 101|0010|dtype=11|00|Rm!=11111|100|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5808000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1D_Z_P_BR_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - OK(ENC_LD1D_Z_P_BR_U128); - } - return rc; -} - -/* ld1d_z_p_bz.xml */ -int ld1d_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=11|xs=x|1|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5A04000) { - decode_fields32(ENC_LD1D_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 3; - OK(ENC_LD1D_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=11|xs=x|0|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5804000) { - decode_fields32(ENC_LD1D_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1D_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=11|11|Zm=xxxxx|1|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5E0C000) { - decode_fields32(ENC_LD1D_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 3; - OK(ENC_LD1D_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=11|10|Zm=xxxxx|1|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5C0C000) { - decode_fields32(ENC_LD1D_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LD1D_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ld1d_za_p_rrr.xml */ -int ld1d_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=11|0|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=xxx|o1=x */ - if((INSWORD & 0xFFE00010)==0xE0C00000) { - decode_fields32(ENC_LD1D_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = UINT(ctx->o1); - ctx->esize = 0x40; - ctx->vertical = ctx->V==1; - OK(ENC_LD1D_ZA_P_RRR_); - } - return rc; -} - -/* ld1h_mz_p_bi.xml */ -int ld1h_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0402000) { - decode_fields32(ENC_LD1H_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1H_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA040A000) { - decode_fields32(ENC_LD1H_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1H_MZ_P_BI_4); - } - return rc; -} - -/* ld1h_mz_p_br.xml */ -int ld1h_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0002000) { - decode_fields32(ENC_LD1H_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - OK(ENC_LD1H_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA000A000) { - decode_fields32(ENC_LD1H_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - OK(ENC_LD1H_MZ_P_BR_4); - } - return rc; -} - -/* ld1h_mzx_p_bi.xml */ -int ld1h_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1402000) { - decode_fields32(ENC_LD1H_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1H_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA140A000) { - decode_fields32(ENC_LD1H_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1H_MZX_P_BI_4X4); - } - return rc; -} - -/* ld1h_mzx_p_br.xml */ -int ld1h_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1002000) { - decode_fields32(ENC_LD1H_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_LD1H_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA100A000) { - decode_fields32(ENC_LD1H_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_LD1H_MZX_P_BR_4X4); - } - return rc; -} - -/* ld1h_z_p_ai.xml */ -int ld1h_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=01|01|imm5=xxxxx|1|U=1|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x84A0C000) { - decode_fields32(ENC_LD1H_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1H_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=01|01|imm5=xxxxx|1|U=1|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4A0C000) { - decode_fields32(ENC_LD1H_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1H_Z_P_AI_D); - } - return rc; -} - -/* ld1h_z_p_bi.xml */ -int ld1h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0101|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4A0A000) { - decode_fields32(ENC_LD1H_Z_P_BI_U16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1H_Z_P_BI_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0110|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4C0A000) { - decode_fields32(ENC_LD1H_Z_P_BI_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1H_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0111|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4E0A000) { - decode_fields32(ENC_LD1H_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1H_Z_P_BI_U64); - } - return rc; -} - -/* ld1h_z_p_br.xml */ -int ld1h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0101|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4A04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1H_Z_P_BR_U16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LD1H_Z_P_BR_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0110|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4C04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1H_Z_P_BR_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LD1H_Z_P_BR_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0111|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4E04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1H_Z_P_BR_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LD1H_Z_P_BR_U64); - } - return rc; -} - -/* ld1h_z_p_bz.xml */ -int ld1h_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|01|xs=x|1|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84A04000) { - decode_fields32(ENC_LD1H_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LD1H_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=01|xs=x|1|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4A04000) { - decode_fields32(ENC_LD1H_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LD1H_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=01|xs=x|0|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4804000) { - decode_fields32(ENC_LD1H_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1H_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=01|xs=x|0|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84804000) { - decode_fields32(ENC_LD1H_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1H_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=01|11|Zm=xxxxx|1|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4E0C000) { - decode_fields32(ENC_LD1H_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 1; - OK(ENC_LD1H_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=01|10|Zm=xxxxx|1|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4C0C000) { - decode_fields32(ENC_LD1H_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LD1H_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ld1h_za_p_rrr.xml */ -int ld1h_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=01|0|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=x|off3=xxx */ - if((INSWORD & 0xFFE00010)==0xE0400000) { - decode_fields32(ENC_LD1H_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = UINT(ctx->off3); - ctx->esize = 0x10; - ctx->vertical = ctx->V==1; - OK(ENC_LD1H_ZA_P_RRR_); - } - return rc; -} - -/* ld1q_z_p_ar.xml */ -int ld1q_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 110|0010|00|00|Rm=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC400A000) { - decode_fields32(ENC_LD1Q_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - OK(ENC_LD1Q_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ld1q_za_p_rrr.xml */ -int ld1q_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|1110|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=xxxx */ - if((INSWORD & 0xFFE00010)==0xE1C00000) { - decode_fields32(ENC_LD1Q_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = 0; - ctx->esize = 0x80; - ctx->vertical = ctx->V==1; - OK(ENC_LD1Q_ZA_P_RRR_); - } - return rc; -} - -/* ld1rb_z_p_bi.xml */ -int ld1rb_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_element */ - /* 100|0010|dtypeh=00|1|imm6=xxxxxx|1|dtypel=00|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x84408000) { - decode_fields32(ENC_LD1RB_Z_P_BI_U8, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RB_Z_P_BI_U8); - } - /* class iclass_16_bit_element */ - /* 100|0010|dtypeh=00|1|imm6=xxxxxx|1|dtypel=01|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x8440A000) { - decode_fields32(ENC_LD1RB_Z_P_BI_U16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RB_Z_P_BI_U16); - } - /* class iclass_32_bit_element */ - /* 100|0010|dtypeh=00|1|imm6=xxxxxx|1|dtypel=10|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x8440C000) { - decode_fields32(ENC_LD1RB_Z_P_BI_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RB_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 100|0010|dtypeh=00|1|imm6=xxxxxx|1|dtypel=11|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x8440E000) { - decode_fields32(ENC_LD1RB_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RB_Z_P_BI_U64); - } - return rc; -} - -/* ld1rd_z_p_bi.xml */ -int ld1rd_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|dtypeh=11|1|imm6=xxxxxx|1|dtypel=11|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x85C0E000) { - decode_fields32(ENC_LD1RD_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RD_Z_P_BI_U64); - } - return rc; -} - -/* ld1rh_z_p_bi.xml */ -int ld1rh_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 100|0010|dtypeh=01|1|imm6=xxxxxx|1|dtypel=01|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x84C0A000) { - decode_fields32(ENC_LD1RH_Z_P_BI_U16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RH_Z_P_BI_U16); - } - /* class iclass_32_bit_element */ - /* 100|0010|dtypeh=01|1|imm6=xxxxxx|1|dtypel=10|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x84C0C000) { - decode_fields32(ENC_LD1RH_Z_P_BI_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RH_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 100|0010|dtypeh=01|1|imm6=xxxxxx|1|dtypel=11|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x84C0E000) { - decode_fields32(ENC_LD1RH_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RH_Z_P_BI_U64); - } - return rc; -} - -/* ld1rob_z_p_bi.xml */ -int ld1rob_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|ssz=01|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4202000) { - decode_fields32(ENC_LD1ROB_Z_P_BI_U8, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1ROB_Z_P_BI_U8); - } - return rc; -} - -/* ld1rob_z_p_br.xml */ -int ld1rob_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|ssz=01|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4200000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1ROB_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - OK(ENC_LD1ROB_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1rod_z_p_bi.xml */ -int ld1rod_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|ssz=01|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5A02000) { - decode_fields32(ENC_LD1ROD_Z_P_BI_U64, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1ROD_Z_P_BI_U64); - } - return rc; -} - -/* ld1rod_z_p_br.xml */ -int ld1rod_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|ssz=01|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5A00000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1ROD_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - OK(ENC_LD1ROD_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1roh_z_p_bi.xml */ -int ld1roh_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|ssz=01|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4A02000) { - decode_fields32(ENC_LD1ROH_Z_P_BI_U16, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1ROH_Z_P_BI_U16); - } - return rc; -} - -/* ld1roh_z_p_br.xml */ -int ld1roh_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|ssz=01|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4A00000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1ROH_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - OK(ENC_LD1ROH_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1row_z_p_bi.xml */ -int ld1row_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|ssz=01|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5202000) { - decode_fields32(ENC_LD1ROW_Z_P_BI_U32, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1ROW_Z_P_BI_U32); - } - return rc; -} - -/* ld1row_z_p_br.xml */ -int ld1row_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|ssz=01|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5200000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1ROW_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - OK(ENC_LD1ROW_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1rqb_z_p_bi.xml */ -int ld1rqb_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|ssz=00|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4002000) { - decode_fields32(ENC_LD1RQB_Z_P_BI_U8, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1RQB_Z_P_BI_U8); - } - return rc; -} - -/* ld1rqb_z_p_br.xml */ -int ld1rqb_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|ssz=00|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4000000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1RQB_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - OK(ENC_LD1RQB_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1rqd_z_p_bi.xml */ -int ld1rqd_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|ssz=00|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5802000) { - decode_fields32(ENC_LD1RQD_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1RQD_Z_P_BI_U64); - } - return rc; -} - -/* ld1rqd_z_p_br.xml */ -int ld1rqd_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|ssz=00|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5800000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1RQD_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - OK(ENC_LD1RQD_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1rqh_z_p_bi.xml */ -int ld1rqh_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|ssz=00|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4802000) { - decode_fields32(ENC_LD1RQH_Z_P_BI_U16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1RQH_Z_P_BI_U16); - } - return rc; -} - -/* ld1rqh_z_p_br.xml */ -int ld1rqh_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|ssz=00|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4800000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1RQH_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - OK(ENC_LD1RQH_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1rqw_z_p_bi.xml */ -int ld1rqw_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|ssz=00|0|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5002000) { - decode_fields32(ENC_LD1RQW_Z_P_BI_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1RQW_Z_P_BI_U32); - } - return rc; -} - -/* ld1rqw_z_p_br.xml */ -int ld1rqw_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|ssz=00|Rm!=11111|000|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5000000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1RQW_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - OK(ENC_LD1RQW_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld1rsb_z_p_bi.xml */ -int ld1rsb_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 100|0010|dtypeh=11|1|imm6=xxxxxx|1|dtypel=10|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x85C0C000) { - decode_fields32(ENC_LD1RSB_Z_P_BI_S16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RSB_Z_P_BI_S16); - } - /* class iclass_32_bit_element */ - /* 100|0010|dtypeh=11|1|imm6=xxxxxx|1|dtypel=01|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x85C0A000) { - decode_fields32(ENC_LD1RSB_Z_P_BI_S32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RSB_Z_P_BI_S32); - } - /* class iclass_64_bit_element */ - /* 100|0010|dtypeh=11|1|imm6=xxxxxx|1|dtypel=00|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x85C08000) { - decode_fields32(ENC_LD1RSB_Z_P_BI_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RSB_Z_P_BI_S64); - } - return rc; -} - -/* ld1rsh_z_p_bi.xml */ -int ld1rsh_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|dtypeh=10|1|imm6=xxxxxx|1|dtypel=01|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x8540A000) { - decode_fields32(ENC_LD1RSH_Z_P_BI_S32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RSH_Z_P_BI_S32); - } - /* class iclass_64_bit_element */ - /* 100|0010|dtypeh=10|1|imm6=xxxxxx|1|dtypel=00|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x85408000) { - decode_fields32(ENC_LD1RSH_Z_P_BI_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RSH_Z_P_BI_S64); - } - return rc; -} - -/* ld1rsw_z_p_bi.xml */ -int ld1rsw_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|dtypeh=01|1|imm6=xxxxxx|1|dtypel=00|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x84C08000) { - decode_fields32(ENC_LD1RSW_Z_P_BI_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RSW_Z_P_BI_S64); - } - return rc; -} - -/* ld1rw_z_p_bi.xml */ -int ld1rw_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|dtypeh=10|1|imm6=xxxxxx|1|dtypel=10|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x8540C000) { - decode_fields32(ENC_LD1RW_Z_P_BI_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RW_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 100|0010|dtypeh=10|1|imm6=xxxxxx|1|dtypel=11|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x8540E000) { - decode_fields32(ENC_LD1RW_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm6); - OK(ENC_LD1RW_Z_P_BI_U64); - } - return rc; -} - -/* ld1sb_z_p_ai.xml */ -int ld1sb_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=00|01|imm5=xxxxx|1|U=0|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x84208000) { - decode_fields32(ENC_LD1SB_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1SB_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=00|01|imm5=xxxxx|1|U=0|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4208000) { - decode_fields32(ENC_LD1SB_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1SB_Z_P_AI_D); - } - return rc; -} - -/* ld1sb_z_p_bi.xml */ -int ld1sb_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=1110|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5C0A000) { - decode_fields32(ENC_LD1SB_Z_P_BI_S16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1SB_Z_P_BI_S16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1101|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5A0A000) { - decode_fields32(ENC_LD1SB_Z_P_BI_S32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1SB_Z_P_BI_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1100|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA580A000) { - decode_fields32(ENC_LD1SB_Z_P_BI_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1SB_Z_P_BI_S64); - } - return rc; -} - -/* ld1sb_z_p_br.xml */ -int ld1sb_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=1110|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5C04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1SB_Z_P_BR_S16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LD1SB_Z_P_BR_S16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1101|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5A04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1SB_Z_P_BR_S32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LD1SB_Z_P_BR_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1100|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5804000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1SB_Z_P_BR_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LD1SB_Z_P_BR_S64); - } - return rc; -} - -/* ld1sb_z_p_bz.xml */ -int ld1sb_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=00|xs=x|0|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4000000) { - decode_fields32(ENC_LD1SB_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1SB_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=00|xs=x|0|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84000000) { - decode_fields32(ENC_LD1SB_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1SB_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=00|10|Zm=xxxxx|1|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4408000) { - decode_fields32(ENC_LD1SB_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LD1SB_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ld1sh_z_p_ai.xml */ -int ld1sh_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=01|01|imm5=xxxxx|1|U=0|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x84A08000) { - decode_fields32(ENC_LD1SH_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1SH_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=01|01|imm5=xxxxx|1|U=0|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4A08000) { - decode_fields32(ENC_LD1SH_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1SH_Z_P_AI_D); - } - return rc; -} - -/* ld1sh_z_p_bi.xml */ -int ld1sh_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1001|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA520A000) { - decode_fields32(ENC_LD1SH_Z_P_BI_S32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1SH_Z_P_BI_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1000|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA500A000) { - decode_fields32(ENC_LD1SH_Z_P_BI_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1SH_Z_P_BI_S64); - } - return rc; -} - -/* ld1sh_z_p_br.xml */ -int ld1sh_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1001|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5204000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1SH_Z_P_BR_S32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - OK(ENC_LD1SH_Z_P_BR_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1000|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5004000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1SH_Z_P_BR_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - OK(ENC_LD1SH_Z_P_BR_S64); - } - return rc; -} - -/* ld1sh_z_p_bz.xml */ -int ld1sh_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|01|xs=x|1|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84A00000) { - decode_fields32(ENC_LD1SH_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LD1SH_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=01|xs=x|1|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4A00000) { - decode_fields32(ENC_LD1SH_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LD1SH_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=01|xs=x|0|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4800000) { - decode_fields32(ENC_LD1SH_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1SH_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=01|xs=x|0|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84800000) { - decode_fields32(ENC_LD1SH_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1SH_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=01|11|Zm=xxxxx|1|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4E08000) { - decode_fields32(ENC_LD1SH_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 1; - OK(ENC_LD1SH_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=01|10|Zm=xxxxx|1|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4C08000) { - decode_fields32(ENC_LD1SH_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LD1SH_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ld1sw_z_p_ai.xml */ -int ld1sw_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 110|0010|msz=10|01|imm5=xxxxx|1|U=0|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5208000) { - decode_fields32(ENC_LD1SW_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1SW_Z_P_AI_D); - } - return rc; -} - -/* ld1sw_z_p_bi.xml */ -int ld1sw_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|dtype=0100|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA480A000) { - decode_fields32(ENC_LD1SW_Z_P_BI_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1SW_Z_P_BI_S64); - } - return rc; -} - -/* ld1sw_z_p_br.xml */ -int ld1sw_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|dtype=0100|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4804000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1SW_Z_P_BR_S64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - OK(ENC_LD1SW_Z_P_BR_S64); - } - return rc; -} - -/* ld1sw_z_p_bz.xml */ -int ld1sw_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=10|xs=x|1|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5200000) { - decode_fields32(ENC_LD1SW_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_LD1SW_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=10|xs=x|0|Zm=xxxxx|0|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5000000) { - decode_fields32(ENC_LD1SW_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1SW_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=10|11|Zm=xxxxx|1|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5608000) { - decode_fields32(ENC_LD1SW_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 2; - OK(ENC_LD1SW_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=10|10|Zm=xxxxx|1|U=0|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5408000) { - decode_fields32(ENC_LD1SW_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LD1SW_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ld1w_mz_p_bi.xml */ -int ld1w_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0404000) { - decode_fields32(ENC_LD1W_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1W_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA040C000) { - decode_fields32(ENC_LD1W_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1W_MZ_P_BI_4); - } - return rc; -} - -/* ld1w_mz_p_br.xml */ -int ld1w_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0004000) { - decode_fields32(ENC_LD1W_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - OK(ENC_LD1W_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA000C000) { - decode_fields32(ENC_LD1W_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - OK(ENC_LD1W_MZ_P_BR_4); - } - return rc; -} - -/* ld1w_mzx_p_bi.xml */ -int ld1w_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1404000) { - decode_fields32(ENC_LD1W_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1W_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA140C000) { - decode_fields32(ENC_LD1W_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1W_MZX_P_BI_4X4); - } - return rc; -} - -/* ld1w_mzx_p_br.xml */ -int ld1w_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1004000) { - decode_fields32(ENC_LD1W_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_LD1W_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA100C000) { - decode_fields32(ENC_LD1W_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_LD1W_MZX_P_BR_4X4); - } - return rc; -} - -/* ld1w_z_p_ai.xml */ -int ld1w_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=10|01|imm5=xxxxx|1|U=1|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8520C000) { - decode_fields32(ENC_LD1W_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1W_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=10|01|imm5=xxxxx|1|U=1|ff=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC520C000) { - decode_fields32(ENC_LD1W_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LD1W_Z_P_AI_D); - } - return rc; -} - -/* ld1w_z_p_bi.xml */ -int ld1w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1010|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA540A000) { - decode_fields32(ENC_LD1W_Z_P_BI_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1W_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1011|0|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA560A000) { - decode_fields32(ENC_LD1W_Z_P_BI_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1W_Z_P_BI_U64); - } - /* class iclass_128_bit_element */ - /* 101|0010|dtype=10|00|1|imm4=xxxx|001|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5102000) { - decode_fields32(ENC_LD1W_Z_P_BI_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LD1W_Z_P_BI_U128); - } - return rc; -} - -/* ld1w_z_p_br.xml */ -int ld1w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1010|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5404000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1W_Z_P_BR_U32, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - OK(ENC_LD1W_Z_P_BR_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1011|Rm!=11111|010|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5604000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1W_Z_P_BR_U64, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - OK(ENC_LD1W_Z_P_BR_U64); - } - /* class iclass_128_bit_element */ - /* 101|0010|dtype=10|00|Rm!=11111|100|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5008000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD1W_Z_P_BR_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - OK(ENC_LD1W_Z_P_BR_U128); - } - return rc; -} - -/* ld1w_z_p_bz.xml */ -int ld1w_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|10|xs=x|1|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x85204000) { - decode_fields32(ENC_LD1W_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_LD1W_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=10|xs=x|1|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5204000) { - decode_fields32(ENC_LD1W_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_LD1W_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=10|xs=x|0|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5004000) { - decode_fields32(ENC_LD1W_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1W_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=10|xs=x|0|Zm=xxxxx|0|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x85004000) { - decode_fields32(ENC_LD1W_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LD1W_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=10|11|Zm=xxxxx|1|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC560C000) { - decode_fields32(ENC_LD1W_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 2; - OK(ENC_LD1W_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=10|10|Zm=xxxxx|1|U=1|ff=0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC540C000) { - decode_fields32(ENC_LD1W_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LD1W_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ld1w_za_p_rrr.xml */ -int ld1w_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=10|0|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=xx|off2=xx */ - if((INSWORD & 0xFFE00010)==0xE0800000) { - decode_fields32(ENC_LD1W_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = UINT(ctx->off2); - ctx->esize = 0x20; - ctx->vertical = ctx->V==1; - OK(ENC_LD1W_ZA_P_RRR_); - } - return rc; -} - -/* ld2b_z_p_bi.xml */ -int ld2b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|opc=01|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA420E000) { - decode_fields32(ENC_LD2B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_LD2B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld2b_z_p_br.xml */ -int ld2b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|opc=01|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA420C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD2B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->nreg = 2; - OK(ENC_LD2B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld2d_z_p_bi.xml */ -int ld2d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|opc=01|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5A0E000) { - decode_fields32(ENC_LD2D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_LD2D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld2d_z_p_br.xml */ -int ld2d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|opc=01|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5A0C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD2D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->nreg = 2; - OK(ENC_LD2D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld2h_z_p_bi.xml */ -int ld2h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|opc=01|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4A0E000) { - decode_fields32(ENC_LD2H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_LD2H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld2h_z_p_br.xml */ -int ld2h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|opc=01|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4A0C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD2H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->nreg = 2; - OK(ENC_LD2H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld2q_z_p_bi.xml */ -int ld2q_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 101|0010|num=01|00|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA490E000) { - decode_fields32(ENC_LD2Q_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_LD2Q_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld2q_z_p_br.xml */ -int ld2q_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 101|0010|num=01|01|Rm!=11111|100|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4A08000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD2Q_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->nreg = 2; - OK(ENC_LD2Q_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld2w_z_p_bi.xml */ -int ld2w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|opc=01|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA520E000) { - decode_fields32(ENC_LD2W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_LD2W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld2w_z_p_br.xml */ -int ld2w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|opc=01|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA520C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD2W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->nreg = 2; - OK(ENC_LD2W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld3b_z_p_bi.xml */ -int ld3b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|opc=10|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA440E000) { - decode_fields32(ENC_LD3B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_LD3B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld3b_z_p_br.xml */ -int ld3b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|opc=10|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA440C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD3B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->nreg = 3; - OK(ENC_LD3B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld3d_z_p_bi.xml */ -int ld3d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|opc=10|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5C0E000) { - decode_fields32(ENC_LD3D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_LD3D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld3d_z_p_br.xml */ -int ld3d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|opc=10|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5C0C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD3D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->nreg = 3; - OK(ENC_LD3D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld3h_z_p_bi.xml */ -int ld3h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|opc=10|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4C0E000) { - decode_fields32(ENC_LD3H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_LD3H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld3h_z_p_br.xml */ -int ld3h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|opc=10|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4C0C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD3H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->nreg = 3; - OK(ENC_LD3H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld3q_z_p_bi.xml */ -int ld3q_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 101|0010|num=10|00|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA510E000) { - decode_fields32(ENC_LD3Q_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_LD3Q_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld3q_z_p_br.xml */ -int ld3q_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 101|0010|num=10|01|Rm!=11111|100|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5208000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD3Q_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->nreg = 3; - OK(ENC_LD3Q_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld3w_z_p_bi.xml */ -int ld3w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|opc=10|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA540E000) { - decode_fields32(ENC_LD3W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_LD3W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld3w_z_p_br.xml */ -int ld3w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|opc=10|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA540C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD3W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->nreg = 3; - OK(ENC_LD3W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld4b_z_p_bi.xml */ -int ld4b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|opc=11|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA460E000) { - decode_fields32(ENC_LD4B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_LD4B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld4b_z_p_br.xml */ -int ld4b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|opc=11|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA460C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD4B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->nreg = 4; - OK(ENC_LD4B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld4d_z_p_bi.xml */ -int ld4d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|opc=11|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5E0E000) { - decode_fields32(ENC_LD4D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_LD4D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld4d_z_p_br.xml */ -int ld4d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|opc=11|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5E0C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD4D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->nreg = 4; - OK(ENC_LD4D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld4h_z_p_bi.xml */ -int ld4h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|opc=11|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4E0E000) { - decode_fields32(ENC_LD4H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_LD4H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld4h_z_p_br.xml */ -int ld4h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|opc=11|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4E0C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD4H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->nreg = 4; - OK(ENC_LD4H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld4q_z_p_bi.xml */ -int ld4q_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 101|0010|num=11|00|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA590E000) { - decode_fields32(ENC_LD4Q_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_LD4Q_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld4q_z_p_br.xml */ -int ld4q_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 101|0010|num=11|01|Rm!=11111|100|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5A08000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD4Q_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->nreg = 4; - OK(ENC_LD4Q_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ld4w_z_p_bi.xml */ -int ld4w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|opc=11|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA560E000) { - decode_fields32(ENC_LD4W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_LD4W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ld4w_z_p_br.xml */ -int ld4w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|opc=11|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA560C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LD4W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->nreg = 4; - OK(ENC_LD4W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ldff1b_z_p_ai.xml */ -int ldff1b_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=00|01|imm5=xxxxx|1|U=1|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8420E000) { - decode_fields32(ENC_LDFF1B_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1B_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=00|01|imm5=xxxxx|1|U=1|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC420E000) { - decode_fields32(ENC_LDFF1B_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1B_Z_P_AI_D); - } - return rc; -} - -/* ldff1b_z_p_br.xml */ -int ldff1b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_element */ - /* 101|0010|dtype=0000|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4006000) { - decode_fields32(ENC_LDFF1B_Z_P_BR_U8, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1B_Z_P_BR_U8); - } - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0001|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4206000) { - decode_fields32(ENC_LDFF1B_Z_P_BR_U16, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1B_Z_P_BR_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0010|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4406000) { - decode_fields32(ENC_LDFF1B_Z_P_BR_U32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1B_Z_P_BR_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0011|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4606000) { - decode_fields32(ENC_LDFF1B_Z_P_BR_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1B_Z_P_BR_U64); - } - return rc; -} - -/* ldff1b_z_p_bz.xml */ -int ldff1b_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=00|xs=x|0|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4006000) { - decode_fields32(ENC_LDFF1B_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1B_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=00|xs=x|0|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84006000) { - decode_fields32(ENC_LDFF1B_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1B_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=00|10|Zm=xxxxx|1|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC440E000) { - decode_fields32(ENC_LDFF1B_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LDFF1B_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ldff1d_z_p_ai.xml */ -int ldff1d_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 110|0010|msz=11|01|imm5=xxxxx|1|U=1|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5A0E000) { - decode_fields32(ENC_LDFF1D_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1D_Z_P_AI_D); - } - return rc; -} - -/* ldff1d_z_p_br.xml */ -int ldff1d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|dtype=1111|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5E06000) { - decode_fields32(ENC_LDFF1D_Z_P_BR_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1D_Z_P_BR_U64); - } - return rc; -} - -/* ldff1d_z_p_bz.xml */ -int ldff1d_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=11|xs=x|1|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5A06000) { - decode_fields32(ENC_LDFF1D_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 3; - OK(ENC_LDFF1D_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=11|xs=x|0|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5806000) { - decode_fields32(ENC_LDFF1D_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1D_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=11|11|Zm=xxxxx|1|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5E0E000) { - decode_fields32(ENC_LDFF1D_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 3; - OK(ENC_LDFF1D_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=11|10|Zm=xxxxx|1|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5C0E000) { - decode_fields32(ENC_LDFF1D_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LDFF1D_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ldff1h_z_p_ai.xml */ -int ldff1h_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=01|01|imm5=xxxxx|1|U=1|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x84A0E000) { - decode_fields32(ENC_LDFF1H_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1H_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=01|01|imm5=xxxxx|1|U=1|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4A0E000) { - decode_fields32(ENC_LDFF1H_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1H_Z_P_AI_D); - } - return rc; -} - -/* ldff1h_z_p_br.xml */ -int ldff1h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0101|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4A06000) { - decode_fields32(ENC_LDFF1H_Z_P_BR_U16, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1H_Z_P_BR_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0110|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4C06000) { - decode_fields32(ENC_LDFF1H_Z_P_BR_U32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1H_Z_P_BR_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0111|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4E06000) { - decode_fields32(ENC_LDFF1H_Z_P_BR_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1H_Z_P_BR_U64); - } - return rc; -} - -/* ldff1h_z_p_bz.xml */ -int ldff1h_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|01|xs=x|1|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84A06000) { - decode_fields32(ENC_LDFF1H_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LDFF1H_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=01|xs=x|1|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4A06000) { - decode_fields32(ENC_LDFF1H_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LDFF1H_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=01|xs=x|0|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4806000) { - decode_fields32(ENC_LDFF1H_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1H_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=01|xs=x|0|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84806000) { - decode_fields32(ENC_LDFF1H_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1H_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=01|11|Zm=xxxxx|1|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4E0E000) { - decode_fields32(ENC_LDFF1H_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 1; - OK(ENC_LDFF1H_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=01|10|Zm=xxxxx|1|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4C0E000) { - decode_fields32(ENC_LDFF1H_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LDFF1H_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ldff1sb_z_p_ai.xml */ -int ldff1sb_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=00|01|imm5=xxxxx|1|U=0|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8420A000) { - decode_fields32(ENC_LDFF1SB_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1SB_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=00|01|imm5=xxxxx|1|U=0|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC420A000) { - decode_fields32(ENC_LDFF1SB_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1SB_Z_P_AI_D); - } - return rc; -} - -/* ldff1sb_z_p_br.xml */ -int ldff1sb_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=1110|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5C06000) { - decode_fields32(ENC_LDFF1SB_Z_P_BR_S16, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LDFF1SB_Z_P_BR_S16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1101|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5A06000) { - decode_fields32(ENC_LDFF1SB_Z_P_BR_S32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LDFF1SB_Z_P_BR_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1100|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5806000) { - decode_fields32(ENC_LDFF1SB_Z_P_BR_S64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LDFF1SB_Z_P_BR_S64); - } - return rc; -} - -/* ldff1sb_z_p_bz.xml */ -int ldff1sb_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=00|xs=x|0|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4002000) { - decode_fields32(ENC_LDFF1SB_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1SB_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=00|xs=x|0|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84002000) { - decode_fields32(ENC_LDFF1SB_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1SB_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=00|10|Zm=xxxxx|1|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC440A000) { - decode_fields32(ENC_LDFF1SB_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LDFF1SB_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ldff1sh_z_p_ai.xml */ -int ldff1sh_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=01|01|imm5=xxxxx|1|U=0|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x84A0A000) { - decode_fields32(ENC_LDFF1SH_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1SH_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=01|01|imm5=xxxxx|1|U=0|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4A0A000) { - decode_fields32(ENC_LDFF1SH_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1SH_Z_P_AI_D); - } - return rc; -} - -/* ldff1sh_z_p_br.xml */ -int ldff1sh_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1001|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5206000) { - decode_fields32(ENC_LDFF1SH_Z_P_BR_S32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - OK(ENC_LDFF1SH_Z_P_BR_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1000|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5006000) { - decode_fields32(ENC_LDFF1SH_Z_P_BR_S64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - OK(ENC_LDFF1SH_Z_P_BR_S64); - } - return rc; -} - -/* ldff1sh_z_p_bz.xml */ -int ldff1sh_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|01|xs=x|1|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84A02000) { - decode_fields32(ENC_LDFF1SH_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LDFF1SH_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=01|xs=x|1|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4A02000) { - decode_fields32(ENC_LDFF1SH_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_LDFF1SH_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=01|xs=x|0|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC4802000) { - decode_fields32(ENC_LDFF1SH_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1SH_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=01|xs=x|0|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x84802000) { - decode_fields32(ENC_LDFF1SH_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1SH_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=01|11|Zm=xxxxx|1|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4E0A000) { - decode_fields32(ENC_LDFF1SH_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 1; - OK(ENC_LDFF1SH_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=01|10|Zm=xxxxx|1|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4C0A000) { - decode_fields32(ENC_LDFF1SH_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LDFF1SH_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ldff1sw_z_p_ai.xml */ -int ldff1sw_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 110|0010|msz=10|01|imm5=xxxxx|1|U=0|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC520A000) { - decode_fields32(ENC_LDFF1SW_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1SW_Z_P_AI_D); - } - return rc; -} - -/* ldff1sw_z_p_br.xml */ -int ldff1sw_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|dtype=0100|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA4806000) { - decode_fields32(ENC_LDFF1SW_Z_P_BR_S64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - OK(ENC_LDFF1SW_Z_P_BR_S64); - } - return rc; -} - -/* ldff1sw_z_p_bz.xml */ -int ldff1sw_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=10|xs=x|1|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5202000) { - decode_fields32(ENC_LDFF1SW_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_LDFF1SW_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=10|xs=x|0|Zm=xxxxx|0|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5002000) { - decode_fields32(ENC_LDFF1SW_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1SW_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=10|11|Zm=xxxxx|1|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC560A000) { - decode_fields32(ENC_LDFF1SW_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 2; - OK(ENC_LDFF1SW_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=10|10|Zm=xxxxx|1|U=0|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC540A000) { - decode_fields32(ENC_LDFF1SW_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = FALSE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LDFF1SW_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ldff1w_z_p_ai.xml */ -int ldff1w_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=10|01|imm5=xxxxx|1|U=1|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8520E000) { - decode_fields32(ENC_LDFF1W_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1W_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=10|01|imm5=xxxxx|1|U=1|ff=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC520E000) { - decode_fields32(ENC_LDFF1W_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = UINT(ctx->imm5); - OK(ENC_LDFF1W_Z_P_AI_D); - } - return rc; -} - -/* ldff1w_z_p_br.xml */ -int ldff1w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1010|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5406000) { - decode_fields32(ENC_LDFF1W_Z_P_BR_U32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1W_Z_P_BR_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1011|Rm=xxxxx|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA5606000) { - decode_fields32(ENC_LDFF1W_Z_P_BR_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - OK(ENC_LDFF1W_Z_P_BR_U64); - } - return rc; -} - -/* ldff1w_z_p_bz.xml */ -int ldff1w_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|10|xs=x|1|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x85206000) { - decode_fields32(ENC_LDFF1W_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_LDFF1W_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|opc=10|xs=x|1|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5206000) { - decode_fields32(ENC_LDFF1W_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_LDFF1W_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 110|0010|msz=10|xs=x|0|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0xC5006000) { - decode_fields32(ENC_LDFF1W_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1W_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|opc=10|xs=x|0|Zm=xxxxx|0|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFA0E000)==0x85006000) { - decode_fields32(ENC_LDFF1W_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_LDFF1W_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|opc=10|11|Zm=xxxxx|1|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC560E000) { - decode_fields32(ENC_LDFF1W_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 2; - OK(ENC_LDFF1W_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=10|10|Zm=xxxxx|1|U=1|ff=1|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC540E000) { - decode_fields32(ENC_LDFF1W_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->unsigned_ = TRUE; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_LDFF1W_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* ldnf1b_z_p_bi.xml */ -int ldnf1b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_element */ - /* 101|0010|dtype=0000|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA410A000) { - decode_fields32(ENC_LDNF1B_Z_P_BI_U8, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1B_Z_P_BI_U8); - } - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0001|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA430A000) { - decode_fields32(ENC_LDNF1B_Z_P_BI_U16, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1B_Z_P_BI_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0010|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA450A000) { - decode_fields32(ENC_LDNF1B_Z_P_BI_U32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1B_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0011|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA470A000) { - decode_fields32(ENC_LDNF1B_Z_P_BI_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1B_Z_P_BI_U64); - } - return rc; -} - -/* ldnf1d_z_p_bi.xml */ -int ldnf1d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|dtype=1111|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5F0A000) { - decode_fields32(ENC_LDNF1D_Z_P_BI_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1D_Z_P_BI_U64); - } - return rc; -} - -/* ldnf1h_z_p_bi.xml */ -int ldnf1h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=0101|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4B0A000) { - decode_fields32(ENC_LDNF1H_Z_P_BI_U16, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1H_Z_P_BI_U16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=0110|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4D0A000) { - decode_fields32(ENC_LDNF1H_Z_P_BI_U32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1H_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=0111|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA4F0A000) { - decode_fields32(ENC_LDNF1H_Z_P_BI_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1H_Z_P_BI_U64); - } - return rc; -} - -/* ldnf1sb_z_p_bi.xml */ -int ldnf1sb_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_element */ - /* 101|0010|dtype=1110|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5D0A000) { - decode_fields32(ENC_LDNF1SB_Z_P_BI_S16, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1SB_Z_P_BI_S16); - } - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1101|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA5B0A000) { - decode_fields32(ENC_LDNF1SB_Z_P_BI_S32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1SB_Z_P_BI_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1100|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA590A000) { - decode_fields32(ENC_LDNF1SB_Z_P_BI_S64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1SB_Z_P_BI_S64); - } - return rc; -} - -/* ldnf1sh_z_p_bi.xml */ -int ldnf1sh_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1001|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA530A000) { - decode_fields32(ENC_LDNF1SH_Z_P_BI_S32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1SH_Z_P_BI_S32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1000|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA510A000) { - decode_fields32(ENC_LDNF1SH_Z_P_BI_S64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1SH_Z_P_BI_S64); - } - return rc; -} - -/* ldnf1sw_z_p_bi.xml */ -int ldnf1sw_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|dtype=0100|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA490A000) { - decode_fields32(ENC_LDNF1SW_Z_P_BI_S64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1SW_Z_P_BI_S64); - } - return rc; -} - -/* ldnf1w_z_p_bi.xml */ -int ldnf1w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 101|0010|dtype=1010|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA550A000) { - decode_fields32(ENC_LDNF1W_Z_P_BI_U32, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1W_Z_P_BI_U32); - } - /* class iclass_64_bit_element */ - /* 101|0010|dtype=1011|1|imm4=xxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA570A000) { - decode_fields32(ENC_LDNF1W_Z_P_BI_U64, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNF1W_Z_P_BI_U64); - } - return rc; -} - -/* ldnt1b_mz_p_bi.xml */ -int ldnt1b_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0400001) { - decode_fields32(ENC_LDNT1B_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1B_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA0408001) { - decode_fields32(ENC_LDNT1B_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1B_MZ_P_BI_4); - } - return rc; -} - -/* ldnt1b_mz_p_br.xml */ -int ldnt1b_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0000001) { - decode_fields32(ENC_LDNT1B_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - OK(ENC_LDNT1B_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA0008001) { - decode_fields32(ENC_LDNT1B_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - OK(ENC_LDNT1B_MZ_P_BR_4); - } - return rc; -} - -/* ldnt1b_mzx_p_bi.xml */ -int ldnt1b_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1400008) { - decode_fields32(ENC_LDNT1B_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1B_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA1408008) { - decode_fields32(ENC_LDNT1B_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1B_MZX_P_BI_4X4); - } - return rc; -} - -/* ldnt1b_mzx_p_br.xml */ -int ldnt1b_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1000008) { - decode_fields32(ENC_LDNT1B_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_LDNT1B_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA1008008) { - decode_fields32(ENC_LDNT1B_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_LDNT1B_MZX_P_BR_4X4); - } - return rc; -} - -/* ldnt1b_z_p_ar.xml */ -int ldnt1b_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|msz=00|00|Rm=xxxxx|10|U=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8400A000) { - decode_fields32(ENC_LDNT1B_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LDNT1B_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=00|00|Rm=xxxxx|1|U=1|0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC400C000) { - decode_fields32(ENC_LDNT1B_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = TRUE; - OK(ENC_LDNT1B_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ldnt1b_z_p_bi.xml */ -int ldnt1b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|00|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA400E000) { - decode_fields32(ENC_LDNT1B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ldnt1b_z_p_br.xml */ -int ldnt1b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=00|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA400C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LDNT1B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - OK(ENC_LDNT1B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ldnt1d_mz_p_bi.xml */ -int ldnt1d_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0406001) { - decode_fields32(ENC_LDNT1D_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1D_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA040E001) { - decode_fields32(ENC_LDNT1D_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1D_MZ_P_BI_4); - } - return rc; -} - -/* ldnt1d_mz_p_br.xml */ -int ldnt1d_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0006001) { - decode_fields32(ENC_LDNT1D_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - OK(ENC_LDNT1D_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA000E001) { - decode_fields32(ENC_LDNT1D_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - OK(ENC_LDNT1D_MZ_P_BR_4); - } - return rc; -} - -/* ldnt1d_mzx_p_bi.xml */ -int ldnt1d_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1406008) { - decode_fields32(ENC_LDNT1D_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1D_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA140E008) { - decode_fields32(ENC_LDNT1D_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1D_MZX_P_BI_4X4); - } - return rc; -} - -/* ldnt1d_mzx_p_br.xml */ -int ldnt1d_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1006008) { - decode_fields32(ENC_LDNT1D_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_LDNT1D_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA100E008) { - decode_fields32(ENC_LDNT1D_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_LDNT1D_MZX_P_BR_4X4); - } - return rc; -} - -/* ldnt1d_z_p_ar.xml */ -int ldnt1d_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 110|0010|msz=11|00|Rm=xxxxx|1|U=1|0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC580C000) { - decode_fields32(ENC_LDNT1D_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->unsigned_ = TRUE; - OK(ENC_LDNT1D_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ldnt1d_z_p_bi.xml */ -int ldnt1d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|00|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA580E000) { - decode_fields32(ENC_LDNT1D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ldnt1d_z_p_br.xml */ -int ldnt1d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=11|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA580C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LDNT1D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - OK(ENC_LDNT1D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ldnt1h_mz_p_bi.xml */ -int ldnt1h_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0402001) { - decode_fields32(ENC_LDNT1H_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1H_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA040A001) { - decode_fields32(ENC_LDNT1H_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1H_MZ_P_BI_4); - } - return rc; -} - -/* ldnt1h_mz_p_br.xml */ -int ldnt1h_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0002001) { - decode_fields32(ENC_LDNT1H_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - OK(ENC_LDNT1H_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA000A001) { - decode_fields32(ENC_LDNT1H_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - OK(ENC_LDNT1H_MZ_P_BR_4); - } - return rc; -} - -/* ldnt1h_mzx_p_bi.xml */ -int ldnt1h_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1402008) { - decode_fields32(ENC_LDNT1H_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1H_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA140A008) { - decode_fields32(ENC_LDNT1H_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1H_MZX_P_BI_4X4); - } - return rc; -} - -/* ldnt1h_mzx_p_br.xml */ -int ldnt1h_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1002008) { - decode_fields32(ENC_LDNT1H_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_LDNT1H_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA100A008) { - decode_fields32(ENC_LDNT1H_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_LDNT1H_MZX_P_BR_4X4); - } - return rc; -} - -/* ldnt1h_z_p_ar.xml */ -int ldnt1h_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|msz=01|00|Rm=xxxxx|10|U=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8480A000) { - decode_fields32(ENC_LDNT1H_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LDNT1H_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=01|00|Rm=xxxxx|1|U=1|0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC480C000) { - decode_fields32(ENC_LDNT1H_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = TRUE; - OK(ENC_LDNT1H_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ldnt1h_z_p_bi.xml */ -int ldnt1h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|00|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA480E000) { - decode_fields32(ENC_LDNT1H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ldnt1h_z_p_br.xml */ -int ldnt1h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=01|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA480C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LDNT1H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - OK(ENC_LDNT1H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ldnt1sb_z_p_ar.xml */ -int ldnt1sb_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|msz=00|00|Rm=xxxxx|10|U=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x84008000) { - decode_fields32(ENC_LDNT1SB_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LDNT1SB_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=00|00|Rm=xxxxx|1|U=0|0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4008000) { - decode_fields32(ENC_LDNT1SB_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->unsigned_ = FALSE; - OK(ENC_LDNT1SB_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ldnt1sh_z_p_ar.xml */ -int ldnt1sh_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|msz=01|00|Rm=xxxxx|10|U=0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x84808000) { - decode_fields32(ENC_LDNT1SH_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - OK(ENC_LDNT1SH_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=01|00|Rm=xxxxx|1|U=0|0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC4808000) { - decode_fields32(ENC_LDNT1SH_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->unsigned_ = FALSE; - OK(ENC_LDNT1SH_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ldnt1sw_z_p_ar.xml */ -int ldnt1sw_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 110|0010|msz=10|00|Rm=xxxxx|1|U=0|0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC5008000) { - decode_fields32(ENC_LDNT1SW_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = FALSE; - OK(ENC_LDNT1SW_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ldnt1w_mz_p_bi.xml */ -int ldnt1w_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|100|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0404001) { - decode_fields32(ENC_LDNT1W_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1W_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|100|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA040C001) { - decode_fields32(ENC_LDNT1W_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1W_MZ_P_BI_4); - } - return rc; -} - -/* ldnt1w_mz_p_br.xml */ -int ldnt1w_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0004001) { - decode_fields32(ENC_LDNT1W_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - OK(ENC_LDNT1W_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|00|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA000C001) { - decode_fields32(ENC_LDNT1W_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - OK(ENC_LDNT1W_MZ_P_BR_4); - } - return rc; -} - -/* ldnt1w_mzx_p_bi.xml */ -int ldnt1w_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|100|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1404008) { - decode_fields32(ENC_LDNT1W_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1W_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|100|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA140C008) { - decode_fields32(ENC_LDNT1W_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1W_MZX_P_BI_4X4); - } - return rc; -} - -/* ldnt1w_mzx_p_br.xml */ -int ldnt1w_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1004008) { - decode_fields32(ENC_LDNT1W_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_LDNT1W_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|00|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA100C008) { - decode_fields32(ENC_LDNT1W_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_LDNT1W_MZX_P_BR_4X4); - } - return rc; -} - -/* ldnt1w_z_p_ar.xml */ -int ldnt1w_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 100|0010|msz=10|00|Rm=xxxxx|10|U=1|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0x8500A000) { - decode_fields32(ENC_LDNT1W_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - OK(ENC_LDNT1W_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 110|0010|msz=10|00|Rm=xxxxx|1|U=1|0|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xC500C000) { - decode_fields32(ENC_LDNT1W_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->unsigned_ = TRUE; - OK(ENC_LDNT1W_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* ldnt1w_z_p_bi.xml */ -int ldnt1w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|00|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xA500E000) { - decode_fields32(ENC_LDNT1W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_LDNT1W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* ldnt1w_z_p_br.xml */ -int ldnt1w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 101|0010|msz=10|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xA500C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_LDNT1W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - OK(ENC_LDNT1W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* ldr_p_bi.xml */ -int ldr_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|11|0|imm9h=xxxxxx|000|imm9l=xxx|Rn=xxxxx|0|Pt=xxxx */ - if((INSWORD & 0xFFC0E010)==0x85800000) { - decode_fields32(ENC_LDR_P_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Pt); - ctx->n = UINT(ctx->Rn); - ctx->imm = SInt(((ctx->imm9h<<3)|ctx->imm9l),9); - OK(ENC_LDR_P_BI_); - } - return rc; -} - -/* ldr_z_bi.xml */ -int ldr_z_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|11|0|imm9h=xxxxxx|010|imm9l=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0x85804000) { - decode_fields32(ENC_LDR_Z_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->imm = SInt(((ctx->imm9h<<3)|ctx->imm9l),9); - OK(ENC_LDR_Z_BI_); - } - return rc; -} - -/* ldr_za_ri.xml */ -int ldr_za_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|100|op=0|00000|0|Rv=xx|000|Rn=xxxxx|0|off4=xxxx */ - if((INSWORD & 0xFFFF9C10)==0xE1000000) { - decode_fields32(ENC_LDR_ZA_RI_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->v = UINT(((3<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off4); - OK(ENC_LDR_ZA_RI_); - } - return rc; -} - -/* ldr_zt_br.xml */ -int ldr_zt_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|11|0000|100|opc=011111|1|00000|Rn=xxxxx|000|opc2=00 */ - if((INSWORD & 0xFFFFFC1F)==0xE11F8000) { - decode_fields32(ENC_LDR_ZT_BR_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - OK(ENC_LDR_ZT_BR_); - } - return rc; -} - -/* lsl_z_p_zi.xml */ -int lsl_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|tszh=xx|0|0|opc=00|L=1|U=1|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4038000) { - decode_fields32(ENC_LSL_Z_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_LSL_Z_P_ZI_); - } - return rc; -} - -/* lsl_z_p_zw.xml */ -int lsl_z_p_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|11|R=0|L=1|U=1|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41B8000) { - decode_fields32(ENC_LSL_Z_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_LSL_Z_P_ZW_); - } - return rc; -} - -/* lsl_z_p_zz.xml */ -int lsl_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|10|R=0|L=1|U=1|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4138000) { - decode_fields32(ENC_LSL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_LSL_Z_P_ZZ_); - } - return rc; -} - -/* lsl_z_zi.xml */ -int lsl_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|tszh=xx|1|tszl=xx|imm3=xxx|100|1|opc=11|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4209C00) { - decode_fields32(ENC_LSL_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_LSL_Z_ZI_); - } - return rc; -} - -/* lsl_z_zw.xml */ -int lsl_z_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|100|0|opc=11|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4208C00) { - decode_fields32(ENC_LSL_Z_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_LSL_Z_ZW_); - } - return rc; -} - -/* lslr_z_p_zz.xml */ -int lslr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|10|R=1|L=1|U=1|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4178000) { - decode_fields32(ENC_LSLR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_LSLR_Z_P_ZZ_); - } - return rc; -} - -/* lsr_z_p_zi.xml */ -int lsr_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|tszh=xx|0|0|opc=00|L=0|U=1|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4018000) { - decode_fields32(ENC_LSR_Z_P_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_LSR_Z_P_ZI_); - } - return rc; -} - -/* lsr_z_p_zw.xml */ -int lsr_z_p_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|11|R=0|L=0|U=1|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4198000) { - decode_fields32(ENC_LSR_Z_P_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_LSR_Z_P_ZW_); - } - return rc; -} - -/* lsr_z_p_zz.xml */ -int lsr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|10|R=0|L=0|U=1|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4118000) { - decode_fields32(ENC_LSR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_LSR_Z_P_ZZ_); - } - return rc; -} - -/* lsr_z_zi.xml */ -int lsr_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|tszh=xx|1|tszl=xx|imm3=xxx|100|1|0|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4209400) { - decode_fields32(ENC_LSR_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_LSR_Z_ZI_); - } - return rc; -} - -/* lsr_z_zw.xml */ -int lsr_z_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|100|0|0|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4208400) { - decode_fields32(ENC_LSR_Z_ZW_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_LSR_Z_ZW_); - } - return rc; -} - -/* lsrr_z_p_zz.xml */ -int lsrr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|10|R=1|L=0|U=1|100|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4158000) { - decode_fields32(ENC_LSRR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_LSRR_Z_P_ZZ_); - } - return rc; -} - -/* luti2_mz2_ztz.xml */ -int luti2_mz2_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_consecutive */ - /* 1|10|0000|01|0|001|1|i3=xxx|1|size=xx|opc2=00|Zn=xxxxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFC4C01)==0xC08C4000) { - decode_fields32(ENC_LUTI2_MZ2_ZTZ_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 2; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 1; - ctx->d = UINT((ctx->Zd<<1)); - ctx->imm = UINT(ctx->i3); - ctx->nreg = 2; - OK(ENC_LUTI2_MZ2_ZTZ_1); - } - /* class iclass_strided */ - /* 1|10|0000|010011|1|i3=xxx|1|size=xx|opc2=00|Zn=xxxxx|D=x|0|Zd=xxx */ - if((INSWORD & 0xFFFC4C08)==0xC09C4000) { - decode_fields32(ENC_LUTI2_MZ2_ZTZ_8, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==2 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 2; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 8; - ctx->d = UINT(((ctx->D<<4)|ctx->Zd)); - ctx->imm = UINT(ctx->i3); - ctx->nreg = 2; - OK(ENC_LUTI2_MZ2_ZTZ_8); - } - return rc; -} - -/* luti2_mz4_ztz.xml */ -int luti2_mz4_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_consecutive */ - /* 1|10|0000|01|0|001|1|i2=xx|10|size=xx|opc2=00|Zn=xxxxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFCCC03)==0xC08C8000) { - decode_fields32(ENC_LUTI2_MZ4_ZTZ_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 2; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 1; - ctx->d = UINT((ctx->Zd<<2)); - ctx->imm = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_LUTI2_MZ4_ZTZ_1); - } - /* class iclass_strided */ - /* 1|10|0000|010011|1|i2=xx|10|size=xx|opc2=00|Zn=xxxxx|D=x|00|Zd=xx */ - if((INSWORD & 0xFFFCCC0C)==0xC09C8000) { - decode_fields32(ENC_LUTI2_MZ4_ZTZ_4, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==2 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 2; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 4; - ctx->d = UINT(((ctx->D<<4)|ctx->Zd)); - ctx->imm = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_LUTI2_MZ4_ZTZ_4); - } - return rc; -} - -/* luti2_z_ztz.xml */ -int luti2_z_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|01|1|001|1|i4=xxxx|size=xx|opc2=00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFC0C00)==0xC0CC0000) { - decode_fields32(ENC_LUTI2_Z_ZTZ_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 2; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->imm = UINT(ctx->i4); - ctx->nreg = 1; - OK(ENC_LUTI2_Z_ZTZ_); - } - return rc; -} - -/* luti2_z_zz.xml */ -int luti2_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte */ - /* 010|0010|1|i2=xx|1|Zm=xxxxx|101|100|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4520B000) { - decode_fields32(ENC_LUTI2_Z_ZZ_8, ctx, instr); - ctx->isize = 2; - ctx->esize = 8; - ctx->m = UINT(ctx->Zm); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->part = UINT(ctx->i2); - OK(ENC_LUTI2_Z_ZZ_8); - } - /* class iclass_halfword */ - /* 010|0010|1|i3h=xx|1|Zm=xxxxx|101|i3l=x|10|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20EC00)==0x4520A800) { - decode_fields32(ENC_LUTI2_Z_ZZ_16, ctx, instr); - ctx->isize = 2; - ctx->esize = 0x10; - ctx->m = UINT(ctx->Zm); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->part = UINT(((ctx->i3h<<1)|ctx->i3l)); - OK(ENC_LUTI2_Z_ZZ_16); - } - return rc; -} - -/* luti4_mz2_ztz.xml */ -int luti4_mz2_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_consecutive */ - /* 1|10|0000|01|0|001|01|i2=xx|1|size=xx|opc2=00|Zn=xxxxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFE4C01)==0xC08A4000) { - decode_fields32(ENC_LUTI4_MZ2_ZTZ_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 4; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 1; - ctx->d = UINT((ctx->Zd<<1)); - ctx->imm = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_LUTI4_MZ2_ZTZ_1); - } - /* class iclass_strided */ - /* 1|10|0000|010011|01|i2=xx|1|size=xx|opc2=00|Zn=xxxxx|D=x|0|Zd=xxx */ - if((INSWORD & 0xFFFE4C08)==0xC09A4000) { - decode_fields32(ENC_LUTI4_MZ2_ZTZ_8, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==2 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 4; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 8; - ctx->d = UINT(((ctx->D<<4)|ctx->Zd)); - ctx->imm = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_LUTI4_MZ2_ZTZ_8); - } - return rc; -} - -/* luti4_mz4_ztmz2.xml */ -int luti4_mz4_ztmz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_consecutive */ - /* 1|10|0000|01|0|001|01100|size=xx|opc=00|Zn=xxxx|0|Zd=xxx|00 */ - if((INSWORD & 0xFFFFCC23)==0xC08B0000) { - decode_fields32(ENC_LUTI4_MZ4_ZTMZ2_1, ctx, instr); - if(!HaveSME_LUTv2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 4; - ctx->n = UINT((ctx->Zn<<1)); - ctx->dstride = 1; - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - OK(ENC_LUTI4_MZ4_ZTMZ2_1); - } - /* class iclass_strided */ - /* 1|10|0000|010011|011|00|size=xx|opc=00|Zn=xxxx|0|D=x|00|Zd=xx */ - if((INSWORD & 0xFFFFCC2C)==0xC09B0000) { - decode_fields32(ENC_LUTI4_MZ4_ZTMZ2_4, ctx, instr); - if(!HaveSME2p1() || !HaveSME_LUTv2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 4; - ctx->n = UINT((ctx->Zn<<1)); - ctx->dstride = 4; - ctx->d = UINT(((ctx->D<<4)|ctx->Zd)); - ctx->nreg = 4; - OK(ENC_LUTI4_MZ4_ZTMZ2_4); - } - return rc; -} - -/* luti4_mz4_ztz.xml */ -int luti4_mz4_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_consecutive */ - /* 1|10|0000|01|0|001|01|i1=x|10|size=xx|opc2=00|Zn=xxxxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFECC03)==0xC08A8000) { - decode_fields32(ENC_LUTI4_MZ4_ZTZ_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0 || ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 4; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 1; - ctx->d = UINT((ctx->Zd<<2)); - ctx->imm = UINT(ctx->i1); - ctx->nreg = 4; - OK(ENC_LUTI4_MZ4_ZTZ_1); - } - /* class iclass_strided */ - /* 1|10|0000|010011|01|i1=x|10|size=xx|opc2=00|Zn=xxxxx|D=x|00|Zd=xx */ - if((INSWORD & 0xFFFECC0C)==0xC09A8000) { - decode_fields32(ENC_LUTI4_MZ4_ZTZ_4, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 4; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 4; - ctx->d = UINT(((ctx->D<<4)|ctx->Zd)); - ctx->imm = UINT(ctx->i1); - ctx->nreg = 4; - OK(ENC_LUTI4_MZ4_ZTZ_4); - } - return rc; -} - -/* luti4_z_ztz.xml */ -int luti4_z_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|01|1|001|01|i3=xxx|size=xx|opc2=00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFE0C00)==0xC0CA0000) { - decode_fields32(ENC_LUTI4_Z_ZTZ_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->isize = 4; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->imm = UINT(ctx->i3); - ctx->nreg = 1; - OK(ENC_LUTI4_Z_ZTZ_); - } - return rc; -} - -/* luti4_z_zz.xml */ -int luti4_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte_single_register_table */ - /* 010|0010|1|i1=x|1|1|Zm=xxxxx|101|001|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF60FC00)==0x4560A400) { - decode_fields32(ENC_LUTI4_Z_ZZ_8, ctx, instr); - ctx->isize = 4; - ctx->esize = 8; - ctx->ntblr = 1; - ctx->m = UINT(ctx->Zm); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->part = UINT(ctx->i1); - OK(ENC_LUTI4_Z_ZZ_8); - } - /* class iclass_halfword_two_register_table */ - /* 010|0010|1|i2=xx|1|Zm=xxxxx|101|1|op=0|1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4520B400) { - decode_fields32(ENC_LUTI4_Z_ZZ_2X16, ctx, instr); - ctx->isize = 4; - ctx->esize = 0x10; - ctx->ntblr = 2; - ctx->m = UINT(ctx->Zm); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->part = UINT(ctx->i2); - OK(ENC_LUTI4_Z_ZZ_2X16); - } - /* class iclass_halfword_single_register_table */ - /* 010|0010|1|i2=xx|1|Zm=xxxxx|101|1|op=1|1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4520BC00) { - decode_fields32(ENC_LUTI4_Z_ZZ_1X16, ctx, instr); - if(MaxImplementedAnyVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->isize = 4; - ctx->esize = 0x10; - ctx->ntblr = 1; - ctx->m = UINT(ctx->Zm); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->part = UINT(ctx->i2); - OK(ENC_LUTI4_Z_ZZ_1X16); - } - return rc; -} - -/* luti6_mz4_zmz2.xml */ -int luti6_mz4_zmz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_consecutive */ - /* 1|10|0000|10|i1=x|1|Zm=xxxxx|1111|01|Zn=xxxxx|Zd=xxx|00 */ - if((INSWORD & 0xFFA0FC03)==0xC120F400) { - decode_fields32(ENC_LUTI6_MZ4_ZMZ2_1, ctx, instr); - if(!HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedAnyVL()<0x200) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->isize = 6; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->dstride = 1; - ctx->d = UINT((ctx->Zd<<2)); - ctx->select = UINT(ctx->i1); - OK(ENC_LUTI6_MZ4_ZMZ2_1); - } - /* class iclass_strided */ - /* 1|10|0000|10|i1=x|1|Zm=xxxxx|1111|11|Zn=xxxxx|D=x|00|Zd=xx */ - if((INSWORD & 0xFFA0FC0C)==0xC120FC00) { - decode_fields32(ENC_LUTI6_MZ4_ZMZ2_4, ctx, instr); - if(!HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedAnyVL()<0x200) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->isize = 6; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->dstride = 4; - ctx->d = UINT(((ctx->D<<4)|ctx->Zd)); - ctx->select = UINT(ctx->i1); - OK(ENC_LUTI6_MZ4_ZMZ2_4); - } - return rc; -} - -/* luti6_mz4_ztz.xml */ -int luti6_mz4_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_consecutive */ - /* 1|10|0000|01|0|001|01000|size=00|opc=00|Zn=xxx|0|0|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC08A0000) { - decode_fields32(ENC_LUTI6_MZ4_ZTMZ3_1, ctx, instr); - if(!HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->isize = 6; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 1; - ctx->d = UINT((ctx->Zd<<2)); - OK(ENC_LUTI6_MZ4_ZTMZ3_1); - } - /* class iclass_strided */ - /* 1|10|0000|010011|010|00|size=00|opc=00|Zn=xxx|0|0|D=x|00|Zd=xx */ - if((INSWORD & 0xFFFFFC6C)==0xC09A0000) { - decode_fields32(ENC_LUTI6_MZ4_ZTMZ3_4, ctx, instr); - if(!HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->isize = 6; - ctx->n = UINT(ctx->Zn); - ctx->dstride = 4; - ctx->d = UINT(((ctx->D<<4)|ctx->Zd)); - OK(ENC_LUTI6_MZ4_ZTMZ3_4); - } - return rc; -} - -/* luti6_z_z2zz.xml */ -int luti6_z_z2zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|i1=x|1|1|Zm=xxxxx|101|011|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF60FC00)==0x4560AC00) { - decode_fields32(ENC_LUTI6_Z_ZZZ_16, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedAnyVL()<0x200) { - EndOfDecode(Decode_UNDEF); - } - ctx->isize = 6; - ctx->esize = 0x10; - ctx->m = UINT(ctx->Zm); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->part = UINT(ctx->i1); - OK(ENC_LUTI6_Z_ZZZ_16); - } - return rc; -} - -/* luti6_z_ztz.xml */ -int luti6_z_ztz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|01|1|001|opc=00001|size=00|opc2=00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0xC0C84000) { - decode_fields32(ENC_LUTI6_Z_ZTZ_, ctx, instr); - if(!HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->isize = 6; - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_LUTI6_Z_ZTZ_); - } - return rc; -} - -/* luti6_z_zzz.xml */ -int luti6_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|0|1|Zm=xxxxx|101|011|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4520AC00) { - decode_fields32(ENC_LUTI6_Z_ZZZ_8, ctx, instr); - if(!HaveSVE2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedAnyVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->isize = 6; - ctx->esize = 8; - ctx->m = UINT(ctx->Zm); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_LUTI6_Z_ZZZ_8); - } - return rc; -} - -/* mad_z_p_zzz.xml */ -int mad_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|Zm=xxxxx|1|1|op=0|Pg=xxx|Za=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF20E000)==0x400C000) { - decode_fields32(ENC_MAD_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->a = UINT(ctx->Za); - ctx->sub_op = FALSE; - OK(ENC_MAD_Z_P_ZZZ_); - } - return rc; -} - -/* madpt_z_zzz.xml */ -int madpt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|opc=11|0|Zm=xxxxx|1101|o2=1|0|Za=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44C0D800) { - decode_fields32(ENC_MADPT_Z_ZZZ_, ctx, instr); - if(!HaveSVE() || !HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->a = UINT(ctx->Za); - OK(ENC_MADPT_Z_ZZZ_); - } - return rc; -} - -/* match_p_p_zz.xml */ -int match_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|100|Pg=xxx|Zn=xxxxx|op=0|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x45208000) { - decode_fields32(ENC_MATCH_P_P_ZZ_, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size&2)==2)) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Pd); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - OK(ENC_MATCH_P_P_ZZ_); - } - return rc; -} - -/* mla_z_p_zzz.xml */ -int mla_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|Zm=xxxxx|0|1|op=0|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20E000)==0x4004000) { - decode_fields32(ENC_MLA_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sub_op = FALSE; - OK(ENC_MLA_Z_P_ZZZ_); - } - return rc; -} - -/* mla_z_zzzi.xml */ -int mla_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|00001|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44200800) { - decode_fields32(ENC_MLA_Z_ZZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_MLA_Z_ZZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00001|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A00800) { - decode_fields32(ENC_MLA_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_MLA_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|00001|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E00800) { - decode_fields32(ENC_MLA_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_MLA_Z_ZZZI_D); - } - return rc; -} - -/* mlapt_z_zzz.xml */ -int mlapt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|opc=11|0|Zm=xxxxx|1101|o2=0|0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44C0D000) { - decode_fields32(ENC_MLAPT_Z_ZZZ_, ctx, instr); - if(!HaveSVE() || !HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_MLAPT_Z_ZZZ_); - } - return rc; -} - -/* mls_z_p_zzz.xml */ -int mls_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|Zm=xxxxx|0|1|op=1|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20E000)==0x4006000) { - decode_fields32(ENC_MLS_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sub_op = TRUE; - OK(ENC_MLS_Z_P_ZZZ_); - } - return rc; -} - -/* mls_z_zzzi.xml */ -int mls_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|00001|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44200C00) { - decode_fields32(ENC_MLS_Z_ZZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_MLS_Z_ZZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00001|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A00C00) { - decode_fields32(ENC_MLS_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_MLS_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|00001|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E00C00) { - decode_fields32(ENC_MLS_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_MLS_Z_ZZZI_D); - } - return rc; -} - -/* mov_and_p_p_pp.xml */ -int mov_and_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25004000) { - decode_fields32(ENC_MOVZ_P_P_P__AND_P_P_PP_Z, ctx, instr); - OK(ENC_MOVZ_P_P_P__AND_P_P_PP_Z); - } - return rc; -} - -/* mov_cpy_z_o_i.xml */ -int mov_cpy_z_o_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|01|Pg=xxxx|0|M=0|sh=x|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF30C000)==0x5100000) { - decode_fields32(ENC_MOV_Z_O_I__CPY_Z_O_I_, ctx, instr); - OK(ENC_MOV_Z_O_I__CPY_Z_O_I_); - } - return rc; -} - -/* mov_cpy_z_p_i.xml */ -int mov_cpy_z_p_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|01|Pg=xxxx|0|M=1|sh=x|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF30C000)==0x5104000) { - decode_fields32(ENC_MOV_Z_P_I__CPY_Z_P_I_, ctx, instr); - OK(ENC_MOV_Z_P_I__CPY_Z_P_I_); - } - return rc; -} - -/* mov_cpy_z_p_r.xml */ -int mov_cpy_z_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|100|0|10|1|Pg=xxx|Rn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x528A000) { - decode_fields32(ENC_MOV_Z_P_R__CPY_Z_P_R_, ctx, instr); - OK(ENC_MOV_Z_P_R__CPY_Z_P_R_); - } - return rc; -} - -/* mov_cpy_z_p_v.xml */ -int mov_cpy_z_p_v(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|0|000|0|10|0|Pg=xxx|Vn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5208000) { - decode_fields32(ENC_MOV_Z_P_V__CPY_Z_P_V_, ctx, instr); - OK(ENC_MOV_Z_P_V__CPY_Z_P_V_); - } - return rc; -} - -/* mov_dup_z_i.xml */ -int mov_dup_z_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|11|opc=00|0|11|sh=x|imm8=xxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2538C000) { - decode_fields32(ENC_MOV_Z_I__DUP_Z_I_, ctx, instr); - OK(ENC_MOV_Z_I__DUP_Z_I_); - } - return rc; -} - -/* mov_dup_z_r.xml */ -int mov_dup_z_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|00|000|001110|Rn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5203800) { - decode_fields32(ENC_MOV_Z_R__DUP_Z_R_, ctx, instr); - OK(ENC_MOV_Z_R__DUP_Z_R_); - } - return rc; -} - -/* mov_dup_z_zi.xml */ -int mov_dup_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 00000101|imm2=xx|1|tsz=xxxxx|001000|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5202000) { - decode_fields32(ENC_MOV_Z_V__DUP_Z_ZI_, ctx, instr); - OK(ENC_MOV_Z_V__DUP_Z_ZI_); - OK(ENC_MOV_Z_ZI__DUP_Z_ZI_); - } - return rc; -} - -/* mov_dupm_z_i.xml */ -int mov_dupm_z_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|11|00|00|imm13=xxxxxxxxxxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5C00000) { - decode_fields32(ENC_MOV_Z_M__DUPM_Z_I_, ctx, instr); - OK(ENC_MOV_Z_M__DUPM_Z_I_); - } - return rc; -} - -/* mov_mova_mz2_za.xml */ -int mov_mova_mz2_za(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|1|0|V=x|Rs=xx|000|00|off3=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0060000) { - decode_fields32(ENC_MOV_MZ2_ZA_B1_MOVA_MZ2_ZA_B1, ctx, instr); - OK(ENC_MOV_MZ2_ZA_B1_MOVA_MZ2_ZA_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|1|0|V=x|Rs=xx|000|00|ZAn=x|off2=xx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0460000) { - decode_fields32(ENC_MOV_MZ2_ZA_H1_MOVA_MZ2_ZA_H1, ctx, instr); - OK(ENC_MOV_MZ2_ZA_H1_MOVA_MZ2_ZA_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|1|0|V=x|Rs=xx|000|00|ZAn=xx|o1=x|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0860000) { - decode_fields32(ENC_MOV_MZ2_ZA_W1_MOVA_MZ2_ZA_W1, ctx, instr); - OK(ENC_MOV_MZ2_ZA_W1_MOVA_MZ2_ZA_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|1|0|V=x|Rs=xx|000|00|ZAn=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0C60000) { - decode_fields32(ENC_MOV_MZ2_ZA_D1_MOVA_MZ2_ZA_D1, ctx, instr); - OK(ENC_MOV_MZ2_ZA_D1_MOVA_MZ2_ZA_D1); - } - return rc; -} - -/* mov_mova_mz4_za.xml */ -int mov_mova_mz4_za(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|1|0|V=x|Rs=xx|001|00|0|off2=xx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0060400) { - decode_fields32(ENC_MOV_MZ4_ZA_B1_MOVA_MZ4_ZA_B1, ctx, instr); - OK(ENC_MOV_MZ4_ZA_B1_MOVA_MZ4_ZA_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|1|0|V=x|Rs=xx|001|00|0|ZAn=x|o1=x|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0460400) { - decode_fields32(ENC_MOV_MZ4_ZA_H1_MOVA_MZ4_ZA_H1, ctx, instr); - OK(ENC_MOV_MZ4_ZA_H1_MOVA_MZ4_ZA_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|1|0|V=x|Rs=xx|001|00|0|ZAn=xx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0860400) { - decode_fields32(ENC_MOV_MZ4_ZA_W1_MOVA_MZ4_ZA_W1, ctx, instr); - OK(ENC_MOV_MZ4_ZA_W1_MOVA_MZ4_ZA_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|1|0|V=x|Rs=xx|001|00|ZAn=xxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F03)==0xC0C60400) { - decode_fields32(ENC_MOV_MZ4_ZA_D1_MOVA_MZ4_ZA_D1, ctx, instr); - OK(ENC_MOV_MZ4_ZA_D1_MOVA_MZ4_ZA_D1); - } - return rc; -} - -/* mov_mova_mz_za2.xml */ -int mov_mova_mz_za2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|1|00|Rv=xx|010|00|off3=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF9F01)==0xC0060800) { - decode_fields32(ENC_MOV_MZ_ZA2_1_MOVA_MZ_ZA2_1, ctx, instr); - OK(ENC_MOV_MZ_ZA2_1_MOVA_MZ_ZA2_1); - } - return rc; -} - -/* mov_mova_mz_za4.xml */ -int mov_mova_mz_za4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|1|00|Rv=xx|011|00|off3=xxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF9F03)==0xC0060C00) { - decode_fields32(ENC_MOV_MZ_ZA4_1_MOVA_MZ_ZA4_1, ctx, instr); - OK(ENC_MOV_MZ_ZA4_1_MOVA_MZ_ZA4_1); - } - return rc; -} - -/* mov_mova_z_p_rza.xml */ -int mov_mova_z_p_rza(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|off4=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0020000) { - decode_fields32(ENC_MOV_Z_P_RZA_B_MOVA_Z_P_RZA_B, ctx, instr); - OK(ENC_MOV_Z_P_RZA_B_MOVA_Z_P_RZA_B); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|ZAn=x|off3=xxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0420000) { - decode_fields32(ENC_MOV_Z_P_RZA_H_MOVA_Z_P_RZA_H, ctx, instr); - OK(ENC_MOV_Z_P_RZA_H_MOVA_Z_P_RZA_H); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|ZAn=xx|off2=xx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0820000) { - decode_fields32(ENC_MOV_Z_P_RZA_W_MOVA_Z_P_RZA_W, ctx, instr); - OK(ENC_MOV_Z_P_RZA_W_MOVA_Z_P_RZA_W); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|ZAn=xxx|o1=x|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0C20000) { - decode_fields32(ENC_MOV_Z_P_RZA_D_MOVA_Z_P_RZA_D, ctx, instr); - OK(ENC_MOV_Z_P_RZA_D_MOVA_Z_P_RZA_D); - } - /* class iclass_128_bit */ - /* 1|10|0000|0|size=11|000|0|1|Q=1|V=x|Rs=xx|Pg=xxx|0|ZAn=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0C30000) { - decode_fields32(ENC_MOV_Z_P_RZA_Q_MOVA_Z_P_RZA_Q, ctx, instr); - OK(ENC_MOV_Z_P_RZA_Q_MOVA_Z_P_RZA_Q); - } - return rc; -} - -/* mov_mova_za2_z.xml */ -int mov_mova_za2_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|off3=xxx */ - if((INSWORD & 0xFFFF1C38)==0xC0040000) { - decode_fields32(ENC_MOV_ZA2_Z_B1_MOVA_ZA2_Z_B1, ctx, instr); - OK(ENC_MOV_ZA2_Z_B1_MOVA_ZA2_Z_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|ZAd=x|off2=xx */ - if((INSWORD & 0xFFFF1C38)==0xC0440000) { - decode_fields32(ENC_MOV_ZA2_Z_H1_MOVA_ZA2_Z_H1, ctx, instr); - OK(ENC_MOV_ZA2_Z_H1_MOVA_ZA2_Z_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|ZAd=xx|o1=x */ - if((INSWORD & 0xFFFF1C38)==0xC0840000) { - decode_fields32(ENC_MOV_ZA2_Z_W1_MOVA_ZA2_Z_W1, ctx, instr); - OK(ENC_MOV_ZA2_Z_W1_MOVA_ZA2_Z_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|ZAd=xxx */ - if((INSWORD & 0xFFFF1C38)==0xC0C40000) { - decode_fields32(ENC_MOV_ZA2_Z_D1_MOVA_ZA2_Z_D1, ctx, instr); - OK(ENC_MOV_ZA2_Z_D1_MOVA_ZA2_Z_D1); - } - return rc; -} - -/* mov_mova_za4_z.xml */ -int mov_mova_za4_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|0|off2=xx */ - if((INSWORD & 0xFFFF1C7C)==0xC0040400) { - decode_fields32(ENC_MOV_ZA4_Z_B1_MOVA_ZA4_Z_B1, ctx, instr); - OK(ENC_MOV_ZA4_Z_B1_MOVA_ZA4_Z_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|0|ZAd=x|o1=x */ - if((INSWORD & 0xFFFF1C7C)==0xC0440400) { - decode_fields32(ENC_MOV_ZA4_Z_H1_MOVA_ZA4_Z_H1, ctx, instr); - OK(ENC_MOV_ZA4_Z_H1_MOVA_ZA4_Z_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|0|ZAd=xx */ - if((INSWORD & 0xFFFF1C7C)==0xC0840400) { - decode_fields32(ENC_MOV_ZA4_Z_W1_MOVA_ZA4_Z_W1, ctx, instr); - OK(ENC_MOV_ZA4_Z_W1_MOVA_ZA4_Z_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|ZAd=xxx */ - if((INSWORD & 0xFFFF1C78)==0xC0C40400) { - decode_fields32(ENC_MOV_ZA4_Z_D1_MOVA_ZA4_Z_D1, ctx, instr); - OK(ENC_MOV_ZA4_Z_D1_MOVA_ZA4_Z_D1); - } - return rc; -} - -/* mov_mova_za_mz2.xml */ -int mov_mova_za_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|0|00|Rv=xx|010|Zn=xxxx|0|0|0|off3=xxx */ - if((INSWORD & 0xFFFF9C38)==0xC0040800) { - decode_fields32(ENC_MOV_ZA_MZ2_1_MOVA_ZA_MZ2_1, ctx, instr); - OK(ENC_MOV_ZA_MZ2_1_MOVA_ZA_MZ2_1); - } - return rc; -} - -/* mov_mova_za_mz4.xml */ -int mov_mova_za_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|0|00|Rv=xx|011|Zn=xxx|00|0|0|off3=xxx */ - if((INSWORD & 0xFFFF9C78)==0xC0040C00) { - decode_fields32(ENC_MOV_ZA_MZ4_1_MOVA_ZA_MZ4_1, ctx, instr); - OK(ENC_MOV_ZA_MZ4_1_MOVA_ZA_MZ4_1); - } - return rc; -} - -/* mov_mova_za_p_rz.xml */ -int mov_mova_za_p_rz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|off4=xxxx */ - if((INSWORD & 0xFFFF0010)==0xC0000000) { - decode_fields32(ENC_MOV_ZA_P_RZ_B_MOVA_ZA_P_RZ_B, ctx, instr); - OK(ENC_MOV_ZA_P_RZ_B_MOVA_ZA_P_RZ_B); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=x|off3=xxx */ - if((INSWORD & 0xFFFF0010)==0xC0400000) { - decode_fields32(ENC_MOV_ZA_P_RZ_H_MOVA_ZA_P_RZ_H, ctx, instr); - OK(ENC_MOV_ZA_P_RZ_H_MOVA_ZA_P_RZ_H); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=xx|off2=xx */ - if((INSWORD & 0xFFFF0010)==0xC0800000) { - decode_fields32(ENC_MOV_ZA_P_RZ_W_MOVA_ZA_P_RZ_W, ctx, instr); - OK(ENC_MOV_ZA_P_RZ_W_MOVA_ZA_P_RZ_W); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=xxx|o1=x */ - if((INSWORD & 0xFFFF0010)==0xC0C00000) { - decode_fields32(ENC_MOV_ZA_P_RZ_D_MOVA_ZA_P_RZ_D, ctx, instr); - OK(ENC_MOV_ZA_P_RZ_D_MOVA_ZA_P_RZ_D); - } - /* class iclass_128_bit */ - /* 1|10|0000|0|size=11|000|0|0|Q=1|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=xxxx */ - if((INSWORD & 0xFFFF0010)==0xC0C10000) { - decode_fields32(ENC_MOV_ZA_P_RZ_Q_MOVA_ZA_P_RZ_Q, ctx, instr); - OK(ENC_MOV_ZA_P_RZ_Q_MOVA_ZA_P_RZ_Q); - } - return rc; -} - -/* mov_orr_p_p_pp.xml */ -int mov_orr_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25804000) { - decode_fields32(ENC_MOV_P_P__ORR_P_P_PP_Z, ctx, instr); - OK(ENC_MOV_P_P__ORR_P_P_PP_Z); - } - return rc; -} - -/* mov_orr_z_zz.xml */ -int mov_orr_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|opc=01|1|Zm=xxxxx|001|100|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4603000) { - decode_fields32(ENC_MOV_Z_Z__ORR_Z_ZZ_, ctx, instr); - OK(ENC_MOV_Z_Z__ORR_Z_ZZ_); - } - return rc; -} - -/* mov_sel_p_p_pp.xml */ -int mov_sel_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25004210) { - decode_fields32(ENC_MOVM_P_P_P__SEL_P_P_PP_, ctx, instr); - OK(ENC_MOVM_P_P_P__SEL_P_P_PP_); - } - return rc; -} - -/* mov_sel_z_p_zz.xml */ -int mov_sel_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|11|Pv=xxxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20C000)==0x520C000) { - decode_fields32(ENC_MOV_Z_P_Z__SEL_Z_P_ZZ_, ctx, instr); - OK(ENC_MOV_Z_P_Z__SEL_Z_P_ZZ_); - } - return rc; -} - -/* mova_mz2_za.xml */ -int mova_mz2_za(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|1|0|V=x|Rs=xx|000|00|off3=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0060000) { - decode_fields32(ENC_MOVA_MZ2_ZA_B1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 8; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = 0; - ctx->offset = UINT((ctx->off3<<1)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz2_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ2_ZA_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|1|0|V=x|Rs=xx|000|00|ZAn=x|off2=xx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0460000) { - decode_fields32(ENC_MOVA_MZ2_ZA_H1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x10; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT((ctx->off2<<1)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz2_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ2_ZA_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|1|0|V=x|Rs=xx|000|00|ZAn=xx|o1=x|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0860000) { - decode_fields32(ENC_MOVA_MZ2_ZA_W1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x20; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT((ctx->o1<<1)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz2_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ2_ZA_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|1|0|V=x|Rs=xx|000|00|ZAn=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0C60000) { - decode_fields32(ENC_MOVA_MZ2_ZA_D1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x40; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz2_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ2_ZA_D1); - } - return rc; -} - -/* mova_mz4_za.xml */ -int mova_mz4_za(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|1|0|V=x|Rs=xx|001|00|0|off2=xx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0060400) { - decode_fields32(ENC_MOVA_MZ4_ZA_B1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 8; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = 0; - ctx->offset = UINT((ctx->off2<<2)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz4_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ4_ZA_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|1|0|V=x|Rs=xx|001|00|0|ZAn=x|o1=x|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0460400) { - decode_fields32(ENC_MOVA_MZ4_ZA_H1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x10; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT((ctx->o1<<2)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz4_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ4_ZA_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|1|0|V=x|Rs=xx|001|00|0|ZAn=xx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0860400) { - decode_fields32(ENC_MOVA_MZ4_ZA_W1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x20; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz4_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ4_ZA_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|1|0|V=x|Rs=xx|001|00|ZAn=xxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F03)==0xC0C60400) { - decode_fields32(ENC_MOVA_MZ4_ZA_D1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedSVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x40; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_mz4_za(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ4_ZA_D1); - } - return rc; -} - -/* mova_mz_za2.xml */ -int mova_mz_za2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|1|00|Rv=xx|010|00|off3=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF9F01)==0xC0060800) { - decode_fields32(ENC_MOVA_MZ_ZA2_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - /* unconditional alias */ - if(mov_mova_mz_za2(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ_ZA2_1); - } - return rc; -} - -/* mova_mz_za4.xml */ -int mova_mz_za4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|1|00|Rv=xx|011|00|off3=xxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF9F03)==0xC0060C00) { - decode_fields32(ENC_MOVA_MZ_ZA4_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - /* unconditional alias */ - if(mov_mova_mz_za4(ctx, instr)==0) return 0; - OK(ENC_MOVA_MZ_ZA4_1); - } - return rc; -} - -/* mova_z_p_rza.xml */ -int mova_z_p_rza(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|off4=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0020000) { - decode_fields32(ENC_MOVA_Z_P_RZA_B, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = 0; - ctx->offset = UINT(ctx->off4); - ctx->esize = 8; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_z_p_rza(ctx, instr)==0) return 0; - OK(ENC_MOVA_Z_P_RZA_B); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|ZAn=x|off3=xxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0420000) { - decode_fields32(ENC_MOVA_Z_P_RZA_H, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT(ctx->off3); - ctx->esize = 0x10; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_z_p_rza(ctx, instr)==0) return 0; - OK(ENC_MOVA_Z_P_RZA_H); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|ZAn=xx|off2=xx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0820000) { - decode_fields32(ENC_MOVA_Z_P_RZA_W, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT(ctx->off2); - ctx->esize = 0x20; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_z_p_rza(ctx, instr)==0) return 0; - OK(ENC_MOVA_Z_P_RZA_W); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|0|1|Q=0|V=x|Rs=xx|Pg=xxx|0|ZAn=xxx|o1=x|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0C20000) { - decode_fields32(ENC_MOVA_Z_P_RZA_D, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT(ctx->o1); - ctx->esize = 0x40; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_z_p_rza(ctx, instr)==0) return 0; - OK(ENC_MOVA_Z_P_RZA_D); - } - /* class iclass_128_bit */ - /* 1|10|0000|0|size=11|000|0|1|Q=1|V=x|Rs=xx|Pg=xxx|0|ZAn=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF0200)==0xC0C30000) { - decode_fields32(ENC_MOVA_Z_P_RZA_Q, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->esize = 0x80; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_z_p_rza(ctx, instr)==0) return 0; - OK(ENC_MOVA_Z_P_RZA_Q); - } - return rc; -} - -/* mova_za2_z.xml */ -int mova_za2_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|off3=xxx */ - if((INSWORD & 0xFFFF1C38)==0xC0040000) { - decode_fields32(ENC_MOVA_ZA2_Z_B1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 8; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = 0; - ctx->offset = UINT((ctx->off3<<1)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za2_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA2_Z_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|ZAd=x|off2=xx */ - if((INSWORD & 0xFFFF1C38)==0xC0440000) { - decode_fields32(ENC_MOVA_ZA2_Z_H1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->ZAd); - ctx->offset = UINT((ctx->off2<<1)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za2_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA2_Z_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|ZAd=xx|o1=x */ - if((INSWORD & 0xFFFF1C38)==0xC0840000) { - decode_fields32(ENC_MOVA_ZA2_Z_W1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->ZAd); - ctx->offset = UINT((ctx->o1<<1)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za2_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA2_Z_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|0|0|V=x|Rs=xx|000|Zn=xxxx|0|0|0|ZAd=xxx */ - if((INSWORD & 0xFFFF1C38)==0xC0C40000) { - decode_fields32(ENC_MOVA_ZA2_Z_D1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->ZAd); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za2_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA2_Z_D1); - } - return rc; -} - -/* mova_za4_z.xml */ -int mova_za4_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|0|off2=xx */ - if((INSWORD & 0xFFFF1C7C)==0xC0040400) { - decode_fields32(ENC_MOVA_ZA4_Z_B1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 8; - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = 0; - ctx->offset = UINT((ctx->off2<<2)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za4_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA4_Z_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|0|ZAd=x|o1=x */ - if((INSWORD & 0xFFFF1C7C)==0xC0440400) { - decode_fields32(ENC_MOVA_ZA4_Z_H1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->ZAd); - ctx->offset = UINT((ctx->o1<<2)); - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za4_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA4_Z_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|0|ZAd=xx */ - if((INSWORD & 0xFFFF1C7C)==0xC0840400) { - decode_fields32(ENC_MOVA_ZA4_Z_W1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->ZAd); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za4_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA4_Z_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|0|0|V=x|Rs=xx|001|Zn=xxx|00|0|0|ZAd=xxx */ - if((INSWORD & 0xFFFF1C78)==0xC0C40400) { - decode_fields32(ENC_MOVA_ZA4_Z_D1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedSVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->ZAd); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za4_z(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA4_Z_D1); - } - return rc; -} - -/* mova_za_mz2.xml */ -int mova_za_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|0|00|Rv=xx|010|Zn=xxxx|0|0|0|off3=xxx */ - if((INSWORD & 0xFFFF9C38)==0xC0040800) { - decode_fields32(ENC_MOVA_ZA_MZ2_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->n = UINT((ctx->Zn<<1)); - ctx->nreg = 2; - /* unconditional alias */ - if(mov_mova_za_mz2(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA_MZ2_1); - } - return rc; -} - -/* mova_za_mz4.xml */ -int mova_za_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|0|00|Rv=xx|011|Zn=xxx|00|0|0|off3=xxx */ - if((INSWORD & 0xFFFF9C78)==0xC0040C00) { - decode_fields32(ENC_MOVA_ZA_MZ4_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->n = UINT((ctx->Zn<<2)); - ctx->nreg = 4; - /* unconditional alias */ - if(mov_mova_za_mz4(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA_MZ4_1); - } - return rc; -} - -/* mova_za_p_rz.xml */ -int mova_za_p_rz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|off4=xxxx */ - if((INSWORD & 0xFFFF0010)==0xC0000000) { - decode_fields32(ENC_MOVA_ZA_P_RZ_B, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->Zn); - ctx->d = 0; - ctx->offset = UINT(ctx->off4); - ctx->esize = 8; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za_p_rz(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA_P_RZ_B); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=x|off3=xxx */ - if((INSWORD & 0xFFFF0010)==0xC0400000) { - decode_fields32(ENC_MOVA_ZA_P_RZ_H, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->ZAd); - ctx->offset = UINT(ctx->off3); - ctx->esize = 0x10; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za_p_rz(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA_P_RZ_H); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=xx|off2=xx */ - if((INSWORD & 0xFFFF0010)==0xC0800000) { - decode_fields32(ENC_MOVA_ZA_P_RZ_W, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->ZAd); - ctx->offset = UINT(ctx->off2); - ctx->esize = 0x20; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za_p_rz(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA_P_RZ_W); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|0|0|Q=0|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=xxx|o1=x */ - if((INSWORD & 0xFFFF0010)==0xC0C00000) { - decode_fields32(ENC_MOVA_ZA_P_RZ_D, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->ZAd); - ctx->offset = UINT(ctx->o1); - ctx->esize = 0x40; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za_p_rz(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA_P_RZ_D); - } - /* class iclass_128_bit */ - /* 1|10|0000|0|size=11|000|0|0|Q=1|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|0|ZAd=xxxx */ - if((INSWORD & 0xFFFF0010)==0xC0C10000) { - decode_fields32(ENC_MOVA_ZA_P_RZ_Q, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->ZAd); - ctx->offset = 0; - ctx->esize = 0x80; - ctx->vertical = ctx->V==1; - /* unconditional alias */ - if(mov_mova_za_p_rz(ctx, instr)==0) return 0; - OK(ENC_MOVA_ZA_P_RZ_Q); - } - return rc; -} - -/* movaz_mz2_za.xml */ -int movaz_mz2_za(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|1|0|V=x|Rs=xx|000|10|off3=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0060200) { - decode_fields32(ENC_MOVAZ_MZ2_ZA_B1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 8; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = 0; - ctx->offset = UINT((ctx->off3<<1)); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ2_ZA_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|1|0|V=x|Rs=xx|000|10|ZAn=x|off2=xx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0460200) { - decode_fields32(ENC_MOVAZ_MZ2_ZA_H1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x10; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT((ctx->off2<<1)); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ2_ZA_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|1|0|V=x|Rs=xx|000|10|ZAn=xx|o1=x|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0860200) { - decode_fields32(ENC_MOVAZ_MZ2_ZA_W1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x20; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT((ctx->o1<<1)); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ2_ZA_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|1|0|V=x|Rs=xx|000|10|ZAn=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF1F01)==0xC0C60200) { - decode_fields32(ENC_MOVAZ_MZ2_ZA_D1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 2; - ctx->esize = 0x40; - ctx->d = UINT((ctx->Zd<<1)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ2_ZA_D1); - } - return rc; -} - -/* movaz_mz4_za.xml */ -int movaz_mz4_za(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|1|1|0|V=x|Rs=xx|001|10|0|off2=xx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0060600) { - decode_fields32(ENC_MOVAZ_MZ4_ZA_B1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 8; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = 0; - ctx->offset = UINT((ctx->off2<<2)); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ4_ZA_B1); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|1|1|0|V=x|Rs=xx|001|10|0|ZAn=x|o1=x|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0460600) { - decode_fields32(ENC_MOVAZ_MZ4_ZA_H1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x10; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT((ctx->o1<<2)); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ4_ZA_H1); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|1|1|0|V=x|Rs=xx|001|10|0|ZAn=xx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F83)==0xC0860600) { - decode_fields32(ENC_MOVAZ_MZ4_ZA_W1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x20; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ4_ZA_W1); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|1|1|0|V=x|Rs=xx|001|10|ZAn=xxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF1F03)==0xC0C60600) { - decode_fields32(ENC_MOVAZ_MZ4_ZA_D1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedSVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->nreg = 4; - ctx->esize = 0x40; - ctx->d = UINT((ctx->Zd<<2)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_MZ4_ZA_D1); - } - return rc; -} - -/* movaz_mz_za2.xml */ -int movaz_mz_za2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|1|00|Rv=xx|010|10|off3=xxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFFF9F01)==0xC0060A00) { - decode_fields32(ENC_MOVAZ_MZ_ZA2_1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - OK(ENC_MOVAZ_MZ_ZA2_1); - } - return rc; -} - -/* movaz_mz_za4.xml */ -int movaz_mz_za4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0|00|000|1|1|00|Rv=xx|011|10|off3=xxx|Zd=xxx|00 */ - if((INSWORD & 0xFFFF9F03)==0xC0060E00) { - decode_fields32(ENC_MOVAZ_MZ_ZA4_1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - OK(ENC_MOVAZ_MZ_ZA4_1); - } - return rc; -} - -/* movaz_z_rza.xml */ -int movaz_z_rza(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 1|10|0000|0|size=00|000|0|1|Q=0|V=x|Rs=xx|000|1|off4=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF1E00)==0xC0020200) { - decode_fields32(ENC_MOVAZ_Z_RZA_B, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = 0; - ctx->offset = UINT(ctx->off4); - ctx->esize = 8; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_Z_RZA_B); - } - /* class iclass_16_bit */ - /* 1|10|0000|0|size=01|000|0|1|Q=0|V=x|Rs=xx|000|1|ZAn=x|off3=xxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF1E00)==0xC0420200) { - decode_fields32(ENC_MOVAZ_Z_RZA_H, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT(ctx->off3); - ctx->esize = 0x10; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_Z_RZA_H); - } - /* class iclass_32_bit */ - /* 1|10|0000|0|size=10|000|0|1|Q=0|V=x|Rs=xx|000|1|ZAn=xx|off2=xx|Zd=xxxxx */ - if((INSWORD & 0xFFFF1E00)==0xC0820200) { - decode_fields32(ENC_MOVAZ_Z_RZA_W, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT(ctx->off2); - ctx->esize = 0x20; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_Z_RZA_W); - } - /* class iclass_64_bit */ - /* 1|10|0000|0|size=11|000|0|1|Q=0|V=x|Rs=xx|000|1|ZAn=xxx|o1=x|Zd=xxxxx */ - if((INSWORD & 0xFFFF1E00)==0xC0C20200) { - decode_fields32(ENC_MOVAZ_Z_RZA_D, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = UINT(ctx->o1); - ctx->esize = 0x40; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_Z_RZA_D); - } - /* class iclass_128_bit */ - /* 1|10|0000|0|size=11|000|0|1|Q=1|V=x|Rs=xx|000|1|ZAn=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFF1E00)==0xC0C30200) { - decode_fields32(ENC_MOVAZ_Z_RZA_Q, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->n = UINT(ctx->ZAn); - ctx->offset = 0; - ctx->esize = 0x80; - ctx->d = UINT(ctx->Zd); - ctx->vertical = ctx->V==1; - OK(ENC_MOVAZ_Z_RZA_Q); - } - return rc; -} - -/* movprfx_z_p_z.xml */ -int movprfx_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|10|opc=00|M=x|001|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3EE000)==0x4102000) { - decode_fields32(ENC_MOVPRFX_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = (ctx->M==1); - OK(ENC_MOVPRFX_Z_P_Z_); - } - return rc; -} - -/* movprfx_z_z.xml */ -int movprfx_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|opc=00|1|opc2=00000|1011|11|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x420BC00) { - decode_fields32(ENC_MOVPRFX_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_MOVPRFX_Z_Z_); - } - return rc; -} - -/* movs_ands_p_p_pp.xml */ -int movs_ands_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25404000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_MOVZS_P_P_P__ANDS_P_P_PP_Z, ctx, instr); - OK(ENC_MOVZS_P_P_P__ANDS_P_P_PP_Z); - } - return rc; -} - -/* movs_orrs_p_p_pp.xml */ -int movs_orrs_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25C04000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_MOVS_P_P__ORRS_P_P_PP_Z, ctx, instr); - OK(ENC_MOVS_P_P__ORRS_P_P_PP_Z); - } - return rc; -} - -/* movt_r_zt.xml */ -int movt_r_zt(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0010011|0|00|off3=xxx|opc=0011111|Rt=xxxxx */ - if((INSWORD & 0xFFFF8FE0)==0xC04C03E0) { - decode_fields32(ENC_MOVT_R_ZT_, ctx, instr); - /* if(!HaveSME2() || !Halted()) { EndOfDecode(Decode_UNDEF); } */ - ctx->t = UINT(ctx->Rt); - ctx->offset = UINT(ctx->off3); - OK(ENC_MOVT_R_ZT_); - } - return rc; -} - -/* movt_zt_r.xml */ -int movt_zt_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0010011|1|00|off3=xxx|opc=0011111|Rt=xxxxx */ - if((INSWORD & 0xFFFF8FE0)==0xC04E03E0) { - decode_fields32(ENC_MOVT_ZT_R_, ctx, instr); - /* if(!HaveSME2() || !Halted()) { EndOfDecode(Decode_UNDEF); } */ - ctx->t = UINT(ctx->Rt); - ctx->offset = UINT(ctx->off3); - OK(ENC_MOVT_ZT_R_); - } - return rc; -} - -/* movt_zt_z.xml */ -int movt_zt_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0010011|1|10|0|off2=xx|opc=0011111|Zt=xxxxx */ - if((INSWORD & 0xFFFFCFE0)==0xC04F03E0) { - decode_fields32(ENC_MOVT_ZT_Z_, ctx, instr); - if(!HaveSME_LUTv2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->imm = UINT(ctx->off2); - OK(ENC_MOVT_ZT_Z_); - } - return rc; -} - -/* msb_z_p_zzz.xml */ -int msb_z_p_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|Zm=xxxxx|1|1|op=1|Pg=xxx|Za=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF20E000)==0x400E000) { - decode_fields32(ENC_MSB_Z_P_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - ctx->a = UINT(ctx->Za); - ctx->sub_op = TRUE; - OK(ENC_MSB_Z_P_ZZZ_); - } - return rc; -} - -/* mul_z_p_zz.xml */ -int mul_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|100|H=0|U=0|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4100000) { - decode_fields32(ENC_MUL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_MUL_Z_P_ZZ_); - } - return rc; -} - -/* mul_z_zi.xml */ -int mul_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|10|opc=000|11|o2=0|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x2530C000) { - decode_fields32(ENC_MUL_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = SInt(ctx->imm8,8); - OK(ENC_MUL_Z_ZI_); - } - return rc; -} - -/* mul_z_zz.xml */ -int mul_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|011|0|opc=00|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4206000) { - decode_fields32(ENC_MUL_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_MUL_Z_ZZ_); - } - return rc; -} - -/* mul_z_zzi.xml */ -int mul_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|111110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4420F800) { - decode_fields32(ENC_MUL_Z_ZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_MUL_Z_ZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|111110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A0F800) { - decode_fields32(ENC_MUL_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_MUL_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|111110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E0F800) { - decode_fields32(ENC_MUL_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_MUL_Z_ZZI_D); - } - return rc; -} - -/* nand_p_p_pp.xml */ -int nand_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25804210) { - decode_fields32(ENC_NAND_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_NAND_P_P_PP_Z); - } - return rc; -} - -/* nands_p_p_pp.xml */ -int nands_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25C04210) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_NANDS_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_NANDS_P_P_PP_Z); - } - return rc; -} - -/* nbsl_z_zzz.xml */ -int nbsl_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|opc=11|1|Zm=xxxxx|001|11|o2=1|Zk=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E03C00) { - decode_fields32(ENC_NBSL_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(ctx->Zk); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_NBSL_Z_ZZZ_); - } - return rc; -} - -/* neg_z_p_z.xml */ -int neg_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|0|opc=111|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x417A000) { - decode_fields32(ENC_NEG_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_NEG_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|opc=111|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x407A000) { - decode_fields32(ENC_NEG_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_NEG_Z_P_Z_Z); - } - return rc; -} - -/* nmatch_p_p_zz.xml */ -int nmatch_p_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|100|Pg=xxx|Zn=xxxxx|op=1|Pd=xxxx */ - if((INSWORD & 0xFF20E010)==0x45208010) { - decode_fields32(ENC_NMATCH_P_P_ZZ_, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size&2)==2)) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Pd); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - OK(ENC_NMATCH_P_P_ZZ_); - } - return rc; -} - -/* nor_p_p_pp.xml */ -int nor_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25804200) { - decode_fields32(ENC_NOR_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_NOR_P_P_PP_Z); - } - return rc; -} - -/* nors_p_p_pp.xml */ -int nors_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25C04200) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_NORS_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_NORS_P_P_PP_Z); - } - return rc; -} - -/* not_eor_p_p_pp.xml */ -int not_eor_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25004200) { - decode_fields32(ENC_NOT_P_P_P_Z_EOR_P_P_PP_Z, ctx, instr); - OK(ENC_NOT_P_P_P_Z_EOR_P_P_PP_Z); - } - return rc; -} - -/* not_z_p_z.xml */ -int not_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|0|size=xx|0|M=1|1|opc=110|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41EA000) { - decode_fields32(ENC_NOT_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_NOT_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|0|size=xx|0|M=0|1|opc=110|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40EA000) { - decode_fields32(ENC_NOT_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_NOT_Z_P_Z_Z); - } - return rc; -} - -/* nots_eors_p_p_pp.xml */ -int nots_eors_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25404200) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_NOTS_P_P_P_Z_EORS_P_P_PP_Z, ctx, instr); - OK(ENC_NOTS_P_P_P_Z_EORS_P_P_PP_Z); - } - return rc; -} - -/* orn_orr_z_zi.xml */ -int orn_orr_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|opc=00|00|00|imm13=xxxxxxxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5000000) { - decode_fields32(ENC_ORN_Z_ZI__ORR_Z_ZI_, ctx, instr); - OK(ENC_ORN_Z_ZI__ORR_Z_ZI_); - } - return rc; -} - -/* orn_p_p_pp.xml */ -int orn_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25804010) { - decode_fields32(ENC_ORN_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_ORN_P_P_PP_Z); - } - return rc; -} - -/* orns_p_p_pp.xml */ -int orns_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25C04010) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ORNS_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_ORNS_P_P_PP_Z); - } - return rc; -} - -/* orqv_z_p_z.xml */ -int orqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|111|opc=00|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x41C2000) { - decode_fields32(ENC_ORQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_ORQV_Z_P_Z_); - } - return rc; -} - -/* orr_p_p_pp.xml */ -int orr_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25804000) { - decode_fields32(ENC_ORR_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - /* regular aliases */ - if(ctx->S==0 && ctx->Pn==ctx->Pm && ctx->Pm==ctx->Pg) return mov_orr_p_p_pp(ctx, instr); - OK(ENC_ORR_P_P_PP_Z); - } - return rc; -} - -/* orr_z_p_zz.xml */ -int orr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|11|opc=000|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4180000) { - decode_fields32(ENC_ORR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_ORR_Z_P_ZZ_); - } - return rc; -} - -/* orr_z_zi.xml */ -int orr_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|opc=00|00|00|imm13=xxxxxxxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFC0000)==0x5000000) { - decode_fields32(ENC_ORR_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->dn = UINT(ctx->Zdn); - DecodeBitMasksCheckUndefined(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0)); - DecodeBitMasks_ReturnType dbmrt = DecodeBitMasks(SLICE(ctx->imm13,12,12),SLICE(ctx->imm13,5,0),SLICE(ctx->imm13,11,6)); - ctx->imm = dbmrt.wmask; - OK(ENC_ORR_Z_ZI_); - } - return rc; -} - -/* orr_z_zz.xml */ -int orr_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|opc=01|1|Zm=xxxxx|001|100|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4603000) { - decode_fields32(ENC_ORR_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - /* regular aliases */ - if(ctx->Zn==ctx->Zm) return mov_orr_z_zz(ctx, instr); - OK(ENC_ORR_Z_ZZ_); - } - return rc; -} - -/* orrs_p_p_pp.xml */ -int orrs_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=1|S=1|00|Pm=xxxx|01|Pg=xxxx|o2=0|Pn=xxxx|o3=0|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25C04000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_ORRS_P_P_PP_Z, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - /* regular aliases */ - if(ctx->S==1 && ctx->Pn==ctx->Pm && ctx->Pm==ctx->Pg) return movs_orrs_p_p_pp(ctx, instr); - OK(ENC_ORRS_P_P_PP_Z); - } - return rc; -} - -/* orv_r_p_z.xml */ -int orv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|110|opc=00|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4182000) { - decode_fields32(ENC_ORV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_ORV_R_P_Z_); - } - return rc; -} - -/* pext_pn_rr.xml */ -int pext_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|00000|01|110|0|imm2=xx|PNn=xxx|1|Pd=xxxx */ - if((INSWORD & 0xFF3FFC10)==0x25207010) { - decode_fields32(ENC_PEXT_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(((1<<3)|ctx->PNn)); - ctx->d = UINT(ctx->Pd); - ctx->part = UINT(ctx->imm2); - OK(ENC_PEXT_PN_RR_); - } - return rc; -} - -/* pext_pp_rr.xml */ -int pext_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|00000|01|110|10|i1=x|PNn=xxx|1|Pd=xxxx */ - if((INSWORD & 0xFF3FFE10)==0x25207410) { - decode_fields32(ENC_PEXT_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(((1<<3)|ctx->PNn)); - ctx->d0 = UINT(ctx->Pd); - ctx->d1 = ((UINT(ctx->Pd)+1)) % 16; - ctx->part = UINT(ctx->i1); - OK(ENC_PEXT_PP_RR_); - } - return rc; -} - -/* pfalse_p.xml */ -int pfalse_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|op=0|S=0|01|1000|11|100|10|0000|0|Pd=xxxx */ - if((INSWORD & 0xFFFFFFF0)==0x2518E400) { - decode_fields32(ENC_PFALSE_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Pd); - OK(ENC_PFALSE_P_); - } - return rc; -} - -/* pfirst_p_p_p.xml */ -int pfirst_p_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|op=0|S=1|01|1000|11|000|00|Pg=xxxx|0|Pdn=xxxx */ - if((INSWORD & 0xFFFFFE10)==0x2558C000) { - decode_fields32(ENC_PFIRST_P_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Pdn); - OK(ENC_PFIRST_P_P_P_); - } - return rc; -} - -/* pmlal_mz_zzzw.xml */ -int pmlal_mz_zzzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|Zm=xxxxx|111|111|Zn=xxxxx|Zda=xxxx|0 */ - if((INSWORD & 0xFFE0FC01)==0x4520FC00) { - decode_fields32(ENC_PMLAL_MZ_ZZZW_1X2, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT((ctx->Zda<<1)); - OK(ENC_PMLAL_MZ_ZZZW_1X2); - } - return rc; -} - -/* pmov_p_zi.xml */ -int pmov_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte */ - /* 000|0010|1|opc=00|1|01|opc2=01|0|001110|Zn=xxxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFFFFC10)==0x52A3800) { - decode_fields32(ENC_PMOV_P_ZI_B, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->esize = 8; - ctx->imm = 0; - OK(ENC_PMOV_P_ZI_B); - } - /* class iclass_doubleword */ - /* 000|0010|1|1|i3h=x|1|01|i3l=xx|0|001110|Zn=xxxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFB9FC10)==0x5A83800) { - decode_fields32(ENC_PMOV_P_ZI_D, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->esize = 0x40; - ctx->imm = UINT(((ctx->i3h<<2)|ctx->i3l)); - OK(ENC_PMOV_P_ZI_D); - } - /* class iclass_halfword */ - /* 000|0010|1|opc=00|1|01|1|i1=x|0|001110|Zn=xxxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFFDFC10)==0x52C3800) { - decode_fields32(ENC_PMOV_P_ZI_H, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->esize = 0x10; - ctx->imm = UINT(ctx->i1); - OK(ENC_PMOV_P_ZI_H); - } - /* class iclass_word */ - /* 000|0010|1|opc=01|1|01|i2=xx|0|001110|Zn=xxxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFF9FC10)==0x5683800) { - decode_fields32(ENC_PMOV_P_ZI_S, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Pd); - ctx->esize = 0x20; - ctx->imm = UINT(ctx->i2); - OK(ENC_PMOV_P_ZI_S); - } - return rc; -} - -/* pmov_z_pi.xml */ -int pmov_z_pi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte */ - /* 000|0010|1|opc=00|1|01|opc2=01|1|001110|0|Pn=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFFE00)==0x52B3800) { - decode_fields32(ENC_PMOV_Z_PI_B, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Zd); - ctx->esize = 8; - ctx->imm = 0; - OK(ENC_PMOV_Z_PI_B); - } - /* class iclass_doubleword */ - /* 000|0010|1|1|i3h=x|1|01|i3l=xx|1|001110|0|Pn=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFB9FE00)==0x5A93800) { - decode_fields32(ENC_PMOV_Z_PI_D, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Zd); - ctx->esize = 0x40; - ctx->imm = UINT(((ctx->i3h<<2)|ctx->i3l)); - OK(ENC_PMOV_Z_PI_D); - } - /* class iclass_halfword */ - /* 000|0010|1|opc=00|1|01|1|i1=x|1|001110|0|Pn=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFDFE00)==0x52D3800) { - decode_fields32(ENC_PMOV_Z_PI_H, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Zd); - ctx->esize = 0x10; - ctx->imm = UINT(ctx->i1); - OK(ENC_PMOV_Z_PI_H); - } - /* class iclass_word */ - /* 000|0010|1|opc=01|1|01|i2=xx|1|001110|0|Pn=xxxx|Zd=xxxxx */ - if((INSWORD & 0xFFF9FE00)==0x5693800) { - decode_fields32(ENC_PMOV_Z_PI_S, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Zd); - ctx->esize = 0x20; - ctx->imm = UINT(ctx->i2); - OK(ENC_PMOV_Z_PI_S); - } - return rc; -} - -/* pmul_z_zz.xml */ -int pmul_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=00|1|Zm=xxxxx|011|0|opc=01|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4206400) { - decode_fields32(ENC_PMUL_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_PMUL_Z_ZZ_); - } - return rc; -} - -/* pmull_mz_zzw.xml */ -int pmull_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|Zm=xxxxx|111|110|Zn=xxxxx|Zd=xxxx|0 */ - if((INSWORD & 0xFFE0FC01)==0x4520F800) { - decode_fields32(ENC_PMULL_MZ_ZZW_1X2, ctx, instr); - if(!HaveSVE_AES2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - OK(ENC_PMULL_MZ_ZZW_1X2); - } - return rc; -} - -/* pmullb_z_zz.xml */ -int pmullb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_or_64_bit_elements */ - /* 010|0010|1|size!=00|0|Zm=xxxxx|0|11|op=0|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45006800 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_PMULLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_PMULLB_Z_ZZ_); - } - /* class iclass_128_bit_element */ - /* 010|0010|1|size=00|0|Zm=xxxxx|0|11|op=0|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x45006800) { - decode_fields32(ENC_PMULLB_Z_ZZ_Q, ctx, instr); - if(!HaveSVE_PMULL128()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_PMULLB_Z_ZZ_Q); - } - return rc; -} - -/* pmullt_z_zz.xml */ -int pmullt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_or_64_bit_elements */ - /* 010|0010|1|size!=00|0|Zm=xxxxx|0|11|op=0|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45006C00 && (INSWORD & 0xC00000)!=0x0) { - decode_fields32(ENC_PMULLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(SLICE(ctx->size,0,0)==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_PMULLT_Z_ZZ_); - } - /* class iclass_128_bit_element */ - /* 010|0010|1|size=00|0|Zm=xxxxx|0|11|op=0|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x45006C00) { - decode_fields32(ENC_PMULLT_Z_ZZ_Q, ctx, instr); - if(!HaveSVE_PMULL128()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_PMULLT_Z_ZZ_Q); - } - return rc; -} - -/* pnext_p_p_p.xml */ -int pnext_p_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|01|1001|11|000|10|Pv=xxxx|0|Pdn=xxxx */ - if((INSWORD & 0xFF3FFE10)==0x2519C400) { - decode_fields32(ENC_PNEXT_P_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->v = UINT(ctx->Pv); - ctx->dn = UINT(ctx->Pdn); - OK(ENC_PNEXT_P_P_P_); - } - return rc; -} - -/* prfb_i_p_ai.xml */ -int prfb_i_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=00|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8400E000) { - decode_fields32(ENC_PRFB_I_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 0; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFB_I_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=00|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC400E000) { - decode_fields32(ENC_PRFB_I_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 0; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFB_I_P_AI_D); - } - return rc; -} - -/* prfb_i_p_bi.xml */ -int prfb_i_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|11|1|imm6=xxxxxx|0|msz=00|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFC0E010)==0x85C00000) { - decode_fields32(ENC_PRFB_I_P_BI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 0; - ctx->offset = SInt(ctx->imm6,6); - OK(ENC_PRFB_I_P_BI_S); - } - return rc; -} - -/* prfb_i_p_br.xml */ -int prfb_i_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|msz=00|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8400C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_PRFB_I_P_BR_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 0; - OK(ENC_PRFB_I_P_BR_S); - } - return rc; -} - -/* prfb_i_p_bz.xml */ -int prfb_i_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|00|xs=x|1|Zm=xxxxx|0|msz=00|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0x84200000) { - decode_fields32(ENC_PRFB_I_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 0; - OK(ENC_PRFB_I_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|00|xs=x|1|Zm=xxxxx|0|msz=00|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0xC4200000) { - decode_fields32(ENC_PRFB_I_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 0; - OK(ENC_PRFB_I_P_BZ_D_X32_SCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|00|11|Zm=xxxxx|1|msz=00|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC4608000) { - decode_fields32(ENC_PRFB_I_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_PRFB_I_P_BZ_D_64_SCALED); - } - return rc; -} - -/* prfd_i_p_ai.xml */ -int prfd_i_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=11|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8580E000) { - decode_fields32(ENC_PRFD_I_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 3; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFD_I_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=11|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC580E000) { - decode_fields32(ENC_PRFD_I_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 3; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFD_I_P_AI_D); - } - return rc; -} - -/* prfd_i_p_bi.xml */ -int prfd_i_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|11|1|imm6=xxxxxx|0|msz=11|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFC0E010)==0x85C06000) { - decode_fields32(ENC_PRFD_I_P_BI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 3; - ctx->offset = SInt(ctx->imm6,6); - OK(ENC_PRFD_I_P_BI_S); - } - return rc; -} - -/* prfd_i_p_br.xml */ -int prfd_i_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|msz=11|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8580C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_PRFD_I_P_BR_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 3; - OK(ENC_PRFD_I_P_BR_S); - } - return rc; -} - -/* prfd_i_p_bz.xml */ -int prfd_i_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|00|xs=x|1|Zm=xxxxx|0|msz=11|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0x84206000) { - decode_fields32(ENC_PRFD_I_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 3; - OK(ENC_PRFD_I_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|00|xs=x|1|Zm=xxxxx|0|msz=11|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0xC4206000) { - decode_fields32(ENC_PRFD_I_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 3; - OK(ENC_PRFD_I_P_BZ_D_X32_SCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|00|11|Zm=xxxxx|1|msz=11|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC460E000) { - decode_fields32(ENC_PRFD_I_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 3; - OK(ENC_PRFD_I_P_BZ_D_64_SCALED); - } - return rc; -} - -/* prfh_i_p_ai.xml */ -int prfh_i_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=01|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8480E000) { - decode_fields32(ENC_PRFH_I_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 1; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFH_I_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=01|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC480E000) { - decode_fields32(ENC_PRFH_I_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 1; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFH_I_P_AI_D); - } - return rc; -} - -/* prfh_i_p_bi.xml */ -int prfh_i_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|11|1|imm6=xxxxxx|0|msz=01|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFC0E010)==0x85C02000) { - decode_fields32(ENC_PRFH_I_P_BI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 1; - ctx->offset = SInt(ctx->imm6,6); - OK(ENC_PRFH_I_P_BI_S); - } - return rc; -} - -/* prfh_i_p_br.xml */ -int prfh_i_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|msz=01|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8480C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_PRFH_I_P_BR_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 1; - OK(ENC_PRFH_I_P_BR_S); - } - return rc; -} - -/* prfh_i_p_bz.xml */ -int prfh_i_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|00|xs=x|1|Zm=xxxxx|0|msz=01|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0x84202000) { - decode_fields32(ENC_PRFH_I_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 1; - OK(ENC_PRFH_I_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|00|xs=x|1|Zm=xxxxx|0|msz=01|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0xC4202000) { - decode_fields32(ENC_PRFH_I_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 1; - OK(ENC_PRFH_I_P_BZ_D_X32_SCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|00|11|Zm=xxxxx|1|msz=01|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC460A000) { - decode_fields32(ENC_PRFH_I_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 1; - OK(ENC_PRFH_I_P_BZ_D_64_SCALED); - } - return rc; -} - -/* prfw_i_p_ai.xml */ -int prfw_i_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 100|0010|msz=10|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8500E000) { - decode_fields32(ENC_PRFW_I_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 2; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFW_I_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 110|0010|msz=10|00|imm5=xxxxx|111|Pg=xxx|Zn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC500E000) { - decode_fields32(ENC_PRFW_I_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 2; - ctx->offset = UINT(ctx->imm5); - OK(ENC_PRFW_I_P_AI_D); - } - return rc; -} - -/* prfw_i_p_bi.xml */ -int prfw_i_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|11|1|imm6=xxxxxx|0|msz=10|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFC0E010)==0x85C04000) { - decode_fields32(ENC_PRFW_I_P_BI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 2; - ctx->offset = SInt(ctx->imm6,6); - OK(ENC_PRFW_I_P_BI_S); - } - return rc; -} - -/* prfw_i_p_br.xml */ -int prfw_i_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 100|0010|msz=10|00|Rm!=11111|110|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0x8500C000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_PRFW_I_P_BR_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->scale = 2; - OK(ENC_PRFW_I_P_BR_S); - } - return rc; -} - -/* prfw_i_p_bz.xml */ -int prfw_i_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 100|0010|00|xs=x|1|Zm=xxxxx|0|msz=10|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0x84204000) { - decode_fields32(ENC_PRFW_I_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 2; - OK(ENC_PRFW_I_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 110|0010|00|xs=x|1|Zm=xxxxx|0|msz=10|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFA0E010)==0xC4204000) { - decode_fields32(ENC_PRFW_I_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x20; - ctx->offs_unsigned = (ctx->xs==0); - ctx->scale = 2; - OK(ENC_PRFW_I_P_BZ_D_X32_SCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 110|0010|00|11|Zm=xxxxx|1|msz=10|Pg=xxx|Rn=xxxxx|0|prfop=xxxx */ - if((INSWORD & 0xFFE0E010)==0xC460C000) { - decode_fields32(ENC_PRFW_I_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->level = UINT(SLICE(ctx->prfop,2,1)); - ctx->stream = (SLICE(ctx->prfop,0,0)==1); - ctx->pref_hint = (SLICE(ctx->prfop,3,3)==0)!=0 ? Prefetch_READ : Prefetch_WRITE; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 2; - OK(ENC_PRFW_I_P_BZ_D_64_SCALED); - } - return rc; -} - -/* psel_p_ppi.xml */ -int psel_p_ppi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|i1=x|tszh=x|1|tszl=xxx|Rv=xx|01|Pn=xxxx|S=0|Pm=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF20C210)==0x25204000) { - decode_fields32(ENC_PSEL_P_PPI_, ctx, instr); - if(!HaveSME() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->imm5 = ((ctx->i1<<4)|(ctx->tszh<<3)|ctx->tszl); - if(!((ctx->tszh<<3)|ctx->tszl)) { - EndOfDecode(Decode_UNDEF); - } - else if(((ctx->tszh<<3)|ctx->tszl)==8) { - ctx->esize = 0x40; - ctx->imm = UINT(SLICE(ctx->imm5,4,4)); - } - else if((((ctx->tszh<<3)|ctx->tszl)&7)==4) { - ctx->esize = 0x20; - ctx->imm = UINT(SLICE(ctx->imm5,4,3)); - } - else if((((ctx->tszh<<3)|ctx->tszl)&3)==2) { - ctx->esize = 0x10; - ctx->imm = UINT(SLICE(ctx->imm5,4,2)); - } - else if(((ctx->tszh<<3)|ctx->tszl)&1) { - ctx->esize = 8; - ctx->imm = UINT(SLICE(ctx->imm5,4,1)); - } - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->v = UINT(((3<<2)|ctx->Rv)); - OK(ENC_PSEL_P_PPI_); - } - return rc; -} - -/* ptest_p_p.xml */ -int ptest_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|op=0|S=1|01|0000|11|Pg=xxxx|0|Pn=xxxx|0|opc2=0000 */ - if((INSWORD & 0xFFFFC21F)==0x2550C000) { - decode_fields32(ENC_PTEST__P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - OK(ENC_PTEST__P_P_); - } - return rc; -} - -/* ptrue_p_s.xml */ -int ptrue_p_s(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|size=xx|01|100|S=0|11|100|0|pattern=xxxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF3FFC10)==0x2518E000) { - decode_fields32(ENC_PTRUE_P_S_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - ctx->pat = ctx->pattern; - OK(ENC_PTRUE_P_S_); - } - return rc; -} - -/* ptrue_pn_i.xml */ -int ptrue_pn_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|00000|01|111|000000|1|0|PNd=xxx */ - if((INSWORD & 0xFF3FFFF8)==0x25207810) { - decode_fields32(ENC_PTRUE_PN_I_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(((1<<3)|ctx->PNd)); - OK(ENC_PTRUE_PN_I_); - } - return rc; -} - -/* ptrues_p_s.xml */ -int ptrues_p_s(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|size=xx|01|100|S=1|11|100|0|pattern=xxxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF3FFC10)==0x2519E000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_PTRUES_P_S_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - ctx->pat = ctx->pattern; - OK(ENC_PTRUES_P_S_); - } - return rc; -} - -/* punpkhi_p_p.xml */ -int punpkhi_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_high_half */ - /* 000|0010|1|00|1|1000|H=1|010|0000|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFFFFE10)==0x5314000) { - decode_fields32(ENC_PUNPKHI_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Pd); - ctx->hi = TRUE; - OK(ENC_PUNPKHI_P_P_); - } - /* class iclass_low_half */ - /* 000|0010|1|00|1|1000|H=0|010|0000|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFFFFE10)==0x5304000) { - decode_fields32(ENC_PUNPKLO_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Pd); - ctx->hi = FALSE; - OK(ENC_PUNPKLO_P_P_); - } - return rc; -} - -/* raddhnb_z_zz.xml */ -int raddhnb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=0|R=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45206800) { - decode_fields32(ENC_RADDHNB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_RADDHNB_Z_ZZ_); - } - return rc; -} - -/* raddhnt_z_zz.xml */ -int raddhnt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=0|R=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45206C00) { - decode_fields32(ENC_RADDHNT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_RADDHNT_Z_ZZ_); - } - return rc; -} - -/* rax1_z_zz.xml */ -int rax1_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|Zm=xxxxx|111|10|op=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4520F400) { - decode_fields32(ENC_RAX1_Z_ZZ_, ctx, instr); - if(!HaveSVE_SHA3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_RAX1_Z_ZZ_); - } - return rc; -} - -/* rbit_z_p_z.xml */ -int rbit_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|1|size=xx|1|0|01|opc=11|10|Z=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5278000) { - decode_fields32(ENC_RBIT_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_RBIT_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|1|size=xx|1|0|01|opc=11|10|Z=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x527A000) { - decode_fields32(ENC_RBIT_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_RBIT_Z_P_Z_Z); - } - return rc; -} - -/* rdffr_p_f.xml */ -int rdffr_p_f(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|op=0|S=0|01|1001|11|110|00|0000|0|Pd=xxxx */ - if((INSWORD & 0xFFFFFFF0)==0x2519F000) { - decode_fields32(ENC_RDFFR_P_F_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Pd); - OK(ENC_RDFFR_P_F_); - } - return rc; -} - -/* rdffr_p_p_f.xml */ -int rdffr_p_p_f(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_not_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=0|01|1000|11|110|00|Pg=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFFFFE10)==0x2518F000) { - decode_fields32(ENC_RDFFR_P_P_F_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Pd); - ctx->setflags = FALSE; - instr->setflags = FLAGEFFECT_NONE; - OK(ENC_RDFFR_P_P_F_); - } - return rc; -} - -/* rdffrs_p_p_f.xml */ -int rdffrs_p_p_f(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_setting_the_condition_flags */ - /* 001|0010|1|op=0|S=1|01|1000|11|110|00|Pg=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFFFFFE10)==0x2558F000) { - /* instruction class always sets flags */ - instr->setflags = FLAGEFFECT_SETS_NORMAL; - - decode_fields32(ENC_RDFFRS_P_P_F_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->d = UINT(ctx->Pd); - ctx->setflags = TRUE; - instr->setflags = FLAGEFFECT_SETS; - OK(ENC_RDFFRS_P_P_F_); - } - return rc; -} - -/* rdsvl_r_i.xml */ -int rdsvl_r_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 000|0010|0|1|op=0|1|opc2=11111|0101|1|imm6=xxxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFF800)==0x4BF5800) { - decode_fields32(ENC_RDSVL_R_I_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->imm = SInt(ctx->imm6,6); - OK(ENC_RDSVL_R_I_); - } - return rc; -} - -/* rdvl_r_i.xml */ -int rdvl_r_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|1|op=0|1|opc2=11111|0101|0|imm6=xxxxxx|Rd=xxxxx */ - if((INSWORD & 0xFFFFF800)==0x4BF5000) { - decode_fields32(ENC_RDVL_R_I_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->d = UINT(ctx->Rd); - ctx->imm = SInt(ctx->imm6,6); - OK(ENC_RDVL_R_I_); - } - return rc; -} - -/* rev_p_p.xml */ -int rev_p_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|10100|010|0000|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF3FFE10)==0x5344000) { - decode_fields32(ENC_REV_P_P_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Pn); - ctx->d = UINT(ctx->Pd); - OK(ENC_REV_P_P_); - } - return rc; -} - -/* rev_z_z.xml */ -int rev_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|11|000|001110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5383800) { - decode_fields32(ENC_REV_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_REV_Z_Z_); - } - return rc; -} - -/* revb_z_z.xml */ -int revb_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte_merging */ - /* 000|0010|1|size=xx|1|0|01|opc=00|10|Z=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5248000) { - decode_fields32(ENC_REVB_Z_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 8; - ctx->merging = TRUE; - OK(ENC_REVB_Z_Z_M); - } - /* class iclass_byte_zeroing */ - /* 000|0010|1|size=xx|1|0|01|opc=00|10|Z=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x524A000) { - decode_fields32(ENC_REVB_Z_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 8; - ctx->merging = FALSE; - OK(ENC_REVB_Z_Z_Z); - } - /* class iclass_halfword_merging */ - /* 000|0010|1|size=xx|1|0|01|opc=01|10|Z=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5258000) { - decode_fields32(ENC_REVH_Z_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 0x10; - ctx->merging = TRUE; - OK(ENC_REVH_Z_Z_M); - } - /* class iclass_halfword_zeroing */ - /* 000|0010|1|size=xx|1|0|01|opc=01|10|Z=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x525A000) { - decode_fields32(ENC_REVH_Z_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 0x10; - ctx->merging = FALSE; - OK(ENC_REVH_Z_Z_Z); - } - /* class iclass_word_merging */ - /* 000|0010|1|size=xx|1|0|01|opc=10|10|Z=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x5268000) { - decode_fields32(ENC_REVW_Z_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 0x20; - ctx->merging = TRUE; - OK(ENC_REVW_Z_Z_M); - } - /* class iclass_word_zeroing */ - /* 000|0010|1|size=xx|1|0|01|opc=10|10|Z=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x526A000) { - decode_fields32(ENC_REVW_Z_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 0x20; - ctx->merging = FALSE; - OK(ENC_REVW_Z_Z_Z); - } - return rc; -} - -/* revd_z_p_z.xml */ -int revd_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 000|0010|1|size=00|1|0|111|0|10|Z=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x52E8000) { - decode_fields32(ENC_REVD_Z_P_Z_M, ctx, instr); - if(!HaveSME() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 0x40; - ctx->merging = TRUE; - OK(ENC_REVD_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 000|0010|1|size=00|1|0|111|0|10|Z=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x52EA000) { - decode_fields32(ENC_REVD_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->swsize = 0x40; - ctx->merging = FALSE; - OK(ENC_REVD_Z_P_Z_Z); - } - return rc; -} - -/* rshrnb_z_zi.xml */ -int rshrnb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=1|R=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45201800) { - decode_fields32(ENC_RSHRNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_RSHRNB_Z_ZI_); - } - return rc; -} - -/* rshrnt_z_zi.xml */ -int rshrnt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=1|R=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45201C00) { - decode_fields32(ENC_RSHRNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_RSHRNT_Z_ZI_); - } - return rc; -} - -/* rsubhnb_z_zz.xml */ -int rsubhnb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=1|R=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45207800) { - decode_fields32(ENC_RSUBHNB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_RSUBHNB_Z_ZZ_); - } - return rc; -} - -/* rsubhnt_z_zz.xml */ -int rsubhnt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=1|R=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45207C00) { - decode_fields32(ENC_RSUBHNT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_RSUBHNT_Z_ZZ_); - } - return rc; -} - -/* saba_z_zzz.xml */ -int saba_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|11|111|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500F800) { - decode_fields32(ENC_SABA_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->unsigned_ = FALSE; - OK(ENC_SABA_Z_ZZZ_); - } - return rc; -} - -/* sabal_z_zzz.xml */ -int sabal_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|1101|U=0|1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400D400) { - decode_fields32(ENC_SABAL_Z_ZZ_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SABAL_Z_ZZ_); - } - return rc; -} - -/* sabalb_z_zzz.xml */ -int sabalb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|11|00|U=0|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500C000) { - decode_fields32(ENC_SABALB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SABALB_Z_ZZZ_); - } - return rc; -} - -/* sabalt_z_zzz.xml */ -int sabalt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|11|00|U=0|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500C400) { - decode_fields32(ENC_SABALT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SABALT_Z_ZZZ_); - } - return rc; -} - -/* sabd_z_p_zz.xml */ -int sabd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|01|opc=10|U=0|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40C0000) { - decode_fields32(ENC_SABD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SABD_Z_P_ZZ_); - } - return rc; -} - -/* sabdlb_z_zz.xml */ -int sabdlb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=1|S=1|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45003000) { - decode_fields32(ENC_SABDLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SABDLB_Z_ZZ_); - } - return rc; -} - -/* sabdlt_z_zz.xml */ -int sabdlt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=1|S=1|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45003400) { - decode_fields32(ENC_SABDLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SABDLT_Z_ZZ_); - } - return rc; -} - -/* sadalp_z_p_z.xml */ -int sadalp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0010|U=0|10|1|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4404A000) { - decode_fields32(ENC_SADALP_Z_P_Z_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->Zda); - OK(ENC_SADALP_Z_P_Z_); - } - return rc; -} - -/* saddlb_z_zz.xml */ -int saddlb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=0|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45000000) { - decode_fields32(ENC_SADDLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 0; - ctx->sel2 = 0; - ctx->unsigned_ = FALSE; - OK(ENC_SADDLB_Z_ZZ_); - } - return rc; -} - -/* saddlbt_z_zz.xml */ -int saddlbt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|00|S=0|tb=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45008000) { - decode_fields32(ENC_SADDLBT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 0; - ctx->sel2 = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SADDLBT_Z_ZZ_); - } - return rc; -} - -/* saddlt_z_zz.xml */ -int saddlt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=0|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45000400) { - decode_fields32(ENC_SADDLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 1; - ctx->sel2 = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SADDLT_Z_ZZ_); - } - return rc; -} - -/* saddv_r_p_z.xml */ -int saddv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|000|op=0|U=0|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4002000) { - decode_fields32(ENC_SADDV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_SADDV_R_P_Z_); - } - return rc; -} - -/* saddwb_z_zz.xml */ -int saddwb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=0|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45004000) { - decode_fields32(ENC_SADDWB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SADDWB_Z_ZZ_); - } - return rc; -} - -/* saddwt_z_zz.xml */ -int saddwt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=0|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45004400) { - decode_fields32(ENC_SADDWT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SADDWT_Z_ZZ_); - } - return rc; -} - -/* sbclb_z_zzz.xml */ -int sbclb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|1|sz=x|0|Zm=xxxxx|11|010|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4580D000) { - decode_fields32(ENC_SBCLB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SBCLB_Z_ZZZ_); - } - return rc; -} - -/* sbclt_z_zzz.xml */ -int sbclt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|1|sz=x|0|Zm=xxxxx|11|010|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4580D400) { - decode_fields32(ENC_SBCLT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SBCLT_Z_ZZZ_); - } - return rc; -} - -/* sclamp_mz_zz.xml */ -int sclamp_mz_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxxx|110|001|Zn=xxxxx|Zd=xxxx|U=0 */ - if((INSWORD & 0xFF20FC01)==0xC120C400) { - decode_fields32(ENC_SCLAMP_MZ_ZZ_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - OK(ENC_SCLAMP_MZ_ZZ_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxxx|110|011|Zn=xxxxx|Zd=xxx|0|U=0 */ - if((INSWORD & 0xFF20FC03)==0xC120CC00) { - decode_fields32(ENC_SCLAMP_MZ_ZZ_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - OK(ENC_SCLAMP_MZ_ZZ_4); - } - return rc; -} - -/* sclamp_z_zz.xml */ -int sclamp_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|11000|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400C000) { - decode_fields32(ENC_SCLAMP_Z_ZZ_, ctx, instr); - if(!HaveSME() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SCLAMP_Z_ZZ_); - } - return rc; -} - -/* scvtf_mz_z.xml */ -int scvtf_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|00|1|000|10|111000|Zn=xxxx|U=0|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC122E000) { - decode_fields32(ENC_SCVTF_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_SCVTF_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|00|1|100|10|111000|Zn=xxx|0|U=0|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC132E000) { - decode_fields32(ENC_SCVTF_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_SCVTF_MZ_Z_4); - } - return rc; -} - -/* scvtf_z_p_z.xml */ -int scvtf_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_to_half_precision_merging */ - /* 011|0010|1|opc=01|0|10|opc2=01|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6552A000) { - decode_fields32(ENC_SCVTF_Z_P_Z_H2FP16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_SCVTF_Z_P_Z_H2FP16); - } - /* class iclass_16_bit_to_half_precision_zeroing */ - /* 011|0010|0|opc=01|011|10|o2=0|1|o3=1|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645CC000) { - decode_fields32(ENC_SCVTF_Z_P_Z_H2FP16Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_SCVTF_Z_P_Z_H2FP16Z); - } - /* class iclass_32_bit_to_half_precision_merging */ - /* 011|0010|1|opc=01|0|10|opc2=10|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6554A000) { - decode_fields32(ENC_SCVTF_Z_P_Z_W2FP16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_SCVTF_Z_P_Z_W2FP16); - } - /* class iclass_32_bit_to_half_precision_zeroing */ - /* 011|0010|0|opc=01|011|10|o2=1|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645D8000) { - decode_fields32(ENC_SCVTF_Z_P_Z_W2FP16Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_SCVTF_Z_P_Z_W2FP16Z); - } - /* class iclass_32_bit_to_single_precision_merging */ - /* 011|0010|1|opc=10|0|10|opc2=10|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6594A000) { - decode_fields32(ENC_SCVTF_Z_P_Z_W2S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_SCVTF_Z_P_Z_W2S); - } - /* class iclass_32_bit_to_single_precision_zeroing */ - /* 011|0010|0|opc=10|011|10|o2=1|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x649D8000) { - decode_fields32(ENC_SCVTF_Z_P_Z_W2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_SCVTF_Z_P_Z_W2SZ); - } - /* class iclass_32_bit_to_double_precision_merging */ - /* 011|0010|1|opc=11|0|10|opc2=00|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D0A000) { - decode_fields32(ENC_SCVTF_Z_P_Z_W2D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_SCVTF_Z_P_Z_W2D); - } - /* class iclass_32_bit_to_double_precision_zeroing */ - /* 011|0010|0|opc=11|011|10|o2=0|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DC8000) { - decode_fields32(ENC_SCVTF_Z_P_Z_W2DZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_SCVTF_Z_P_Z_W2DZ); - } - /* class iclass_64_bit_to_half_precision_merging */ - /* 011|0010|1|opc=01|0|10|opc2=11|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6556A000) { - decode_fields32(ENC_SCVTF_Z_P_Z_X2FP16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_SCVTF_Z_P_Z_X2FP16); - } - /* class iclass_64_bit_to_half_precision_zeroing */ - /* 011|0010|0|opc=01|011|10|o2=1|1|o3=1|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645DC000) { - decode_fields32(ENC_SCVTF_Z_P_Z_X2FP16Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x10; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_SCVTF_Z_P_Z_X2FP16Z); - } - /* class iclass_64_bit_to_single_precision_merging */ - /* 011|0010|1|opc=11|0|10|opc2=10|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D4A000) { - decode_fields32(ENC_SCVTF_Z_P_Z_X2S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_SCVTF_Z_P_Z_X2S); - } - /* class iclass_64_bit_to_single_precision_zeroing */ - /* 011|0010|0|opc=11|011|10|o2=1|1|o3=0|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DD8000) { - decode_fields32(ENC_SCVTF_Z_P_Z_X2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_SCVTF_Z_P_Z_X2SZ); - } - /* class iclass_64_bit_to_double_precision_merging */ - /* 011|0010|1|opc=11|0|10|opc2=11|int_U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D6A000) { - decode_fields32(ENC_SCVTF_Z_P_Z_X2D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_SCVTF_Z_P_Z_X2D); - } - /* class iclass_64_bit_to_double_precision_zeroing */ - /* 011|0010|0|opc=11|011|10|o2=1|1|o3=1|int_U=0|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DDC000) { - decode_fields32(ENC_SCVTF_Z_P_Z_X2DZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_SCVTF_Z_P_Z_X2DZ); - } - return rc; -} - -/* scvtf_z_z.xml */ -int scvtf_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|001|100|0011|0|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x650C3000) { - decode_fields32(ENC_SCVTF_Z_Z_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_SCVTF_Z_Z_); - } - return rc; -} - -/* scvtflt_z_z.xml */ -int scvtflt_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|001|100|0011|1|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x650C3800) { - decode_fields32(ENC_SCVTFLT_Z_Z_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_SCVTFLT_Z_Z_); - } - return rc; -} - -/* sdiv_z_p_zz.xml */ -int sdiv_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|101|R=0|U=0|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4140000) { - decode_fields32(ENC_SDIV_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SDIV_Z_P_ZZ_); - } - return rc; -} - -/* sdivr_z_p_zz.xml */ -int sdivr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|101|R=1|U=0|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4160000) { - decode_fields32(ENC_SDIVR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SDIVR_Z_P_ZZ_); - } - return rc; -} - -/* sdot_z32_zzz.xml */ -int sdot_z32_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_16_bit */ - /* 010|0010|0|size=01|0|Zm=xxxxx|0|0000|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44400000) { - decode_fields32(ENC_SDOT_Z16_ZZZ_H, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SDOT_Z16_ZZZ_H); - } - /* class iclass_16_bit_to_32_bit */ - /* 010|0010|0000|Zm=xxxxx|11001|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4400C800) { - decode_fields32(ENC_SDOT_Z32_ZZZ_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SDOT_Z32_ZZZ_); - } - return rc; -} - -/* sdot_z32_zzzi.xml */ -int sdot_z32_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|00000|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44200000) { - decode_fields32(ENC_SDOT_Z16_ZZZI_H, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SDOT_Z16_ZZZI_H); - } - /* class iclass_16_bit_to_32_bit */ - /* 010|0010|0100|i2=xx|Zm=xxx|11001|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4480C800) { - decode_fields32(ENC_SDOT_Z32_ZZZI_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SDOT_Z32_ZZZI_); - } - return rc; -} - -/* sdot_z_zzz.xml */ -int sdot_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|0|size=1x|0|Zm=xxxxx|0|0000|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44800000) { - decode_fields32(ENC_SDOT_Z_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SDOT_Z_ZZZ_); - } - return rc; -} - -/* sdot_z_zzzi.xml */ -int sdot_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00000|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A00000) { - decode_fields32(ENC_SDOT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SDOT_Z_ZZZI_S); - } - /* class iclass_16_bit_to_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|00000|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E00000) { - decode_fields32(ENC_SDOT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SDOT_Z_ZZZI_D); - } - return rc; -} - -/* sdot_za32_zzi.xml */ -int sdot_za32_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|0|U=0|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501000) { - decode_fields32(ENC_SDOT_ZA32_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_SDOT_ZA32_ZZI_2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|0|U=0|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509000) { - decode_fields32(ENC_SDOT_ZA32_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_SDOT_ZA32_ZZI_4XI); - } - return rc; -} - -/* sdot_za32_zzv.xml */ -int sdot_za32_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1601408) { - decode_fields32(ENC_SDOT_ZA32_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SDOT_ZA32_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|1|11|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1701408) { - decode_fields32(ENC_SDOT_ZA32_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SDOT_ZA32_ZZV_4X1); - } - return rc; -} - -/* sdot_za32_zzw.xml */ -int sdot_za32_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|1|1|Zm=xxxx|00|Rv=xx|101|Zn=xxxx|0|U=0|1|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1E01408) { - decode_fields32(ENC_SDOT_ZA32_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SDOT_ZA32_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|1|1|Zm=xxx|0|10|Rv=xx|101|Zn=xxx|00|U=0|1|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1E11408) { - decode_fields32(ENC_SDOT_ZA32_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SDOT_ZA32_ZZW_4X4); - } - return rc; -} - -/* sdot_za_zzi.xml */ -int sdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors_of_32_bit_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|1|U=0|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501020) { - decode_fields32(ENC_SDOT_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_SDOT_ZA_ZZI_S2XI); - } - /* class iclass_two_za_single_vectors_of_64_bit_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|00|i1=x|Zn=xxxx|0|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09838)==0xC1D00008) { - decode_fields32(ENC_SDOT_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 2; - OK(ENC_SDOT_ZA_ZZI_D2XI); - } - /* class iclass_four_za_single_vectors_of_32_bit_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|1|U=0|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509020) { - decode_fields32(ENC_SDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_SDOT_ZA_ZZI_S4XI); - } - /* class iclass_four_za_single_vectors_of_64_bit_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|0|op=0|i1=x|Zn=xxx|00|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09878)==0xC1D08008) { - decode_fields32(ENC_SDOT_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 4; - OK(ENC_SDOT_ZA_ZZI_D4XI); - } - return rc; -} - -/* sdot_za_zzv.xml */ -int sdot_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=0|0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1201400) { - decode_fields32(ENC_SDOT_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SDOT_ZA_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=0|0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1301400) { - decode_fields32(ENC_SDOT_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SDOT_ZA_ZZV_4X1); - } - return rc; -} - -/* sdot_za_zzw.xml */ -int sdot_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|101|Zn=xxxx|0|U=0|0|off3=xxx */ - if((INSWORD & 0xFFA19C38)==0xC1A01400) { - decode_fields32(ENC_SDOT_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SDOT_ZA_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|101|Zn=xxx|00|U=0|0|off3=xxx */ - if((INSWORD & 0xFFA39C78)==0xC1A11400) { - decode_fields32(ENC_SDOT_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SDOT_ZA_ZZW_4X4); - } - return rc; -} - -/* sel_mz_p_zz.xml */ -int sel_mz_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0|100|PNg=xxx|Zn=xxxx|0|Zd=xxxx|0 */ - if((INSWORD & 0xFF21E021)==0xC1208000) { - decode_fields32(ENC_SEL_MZ_P_ZZ_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - OK(ENC_SEL_MZ_P_ZZ_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|01|100|PNg=xxx|Zn=xxx|00|Zd=xxx|00 */ - if((INSWORD & 0xFF23E063)==0xC1218000) { - decode_fields32(ENC_SEL_MZ_P_ZZ_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - OK(ENC_SEL_MZ_P_ZZ_4); - } - return rc; -} - -/* sel_p_p_pp.xml */ -int sel_p_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|op=0|S=0|00|Pm=xxxx|01|Pg=xxxx|o2=1|Pn=xxxx|o3=1|Pd=xxxx */ - if((INSWORD & 0xFFF0C210)==0x25004210) { - decode_fields32(ENC_SEL_P_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - /* regular aliases */ - if(ctx->Pd==ctx->Pm) return mov_sel_p_p_pp(ctx, instr); - OK(ENC_SEL_P_P_PP_); - } - return rc; -} - -/* sel_z_p_zz.xml */ -int sel_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|11|Pv=xxxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20C000)==0x520C000) { - decode_fields32(ENC_SEL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->v = UINT(ctx->Pv); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - /* regular aliases */ - if(ctx->Zd==ctx->Zm) return mov_sel_z_p_zz(ctx, instr); - OK(ENC_SEL_Z_P_ZZ_); - } - return rc; -} - -/* setffr_f.xml */ -int setffr_f(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|opc=00|101|1|00|1001|000|0000|00000 */ - if((INSWORD & 0xFFFFFFFF)==0x252C9000) { - decode_fields32(ENC_SETFFR_F_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_SETFFR_F_); - } - return rc; -} - -/* shadd_z_p_zz.xml */ -int shadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=0|S=0|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44108000) { - decode_fields32(ENC_SHADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SHADD_Z_P_ZZ_); - } - return rc; -} - -/* shared_pseudocode.xml */ -int shared_pseudocode(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - return rc; -} - -/* shrnb_z_zi.xml */ -int shrnb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=1|R=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45201000) { - decode_fields32(ENC_SHRNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SHRNB_Z_ZI_); - } - return rc; -} - -/* shrnt_z_zi.xml */ -int shrnt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=1|R=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45201400) { - decode_fields32(ENC_SHRNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SHRNT_Z_ZI_); - } - return rc; -} - -/* shsub_z_p_zz.xml */ -int shsub_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=0|S=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44128000) { - decode_fields32(ENC_SHSUB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SHSUB_Z_P_ZZ_); - } - return rc; -} - -/* shsubr_z_p_zz.xml */ -int shsubr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=1|S=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44168000) { - decode_fields32(ENC_SHSUBR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SHSUBR_Z_P_ZZ_); - } - return rc; -} - -/* sli_z_zzi.xml */ -int sli_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|tszh=xx|0|tszl=xx|imm3=xxx|11|110|op=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500F400) { - decode_fields32(ENC_SLI_Z_ZZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_SLI_Z_ZZI_); - } - return rc; -} - -/* sm4e_z_zz.xml */ -int sm4e_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|000|1|op=1|111|00|o2=0|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFFC00)==0x4523E000) { - decode_fields32(ENC_SM4E_Z_ZZ_, ctx, instr); - if(!HaveSVE_SM4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SM4E_Z_ZZ_); - } - return rc; -} - -/* sm4ekey_z_zz.xml */ -int sm4ekey_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=00|1|Zm=xxxxx|111|10|op=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4520F000) { - decode_fields32(ENC_SM4EKEY_Z_ZZ_, ctx, instr); - if(!HaveSVE_SM4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SM4EKEY_Z_ZZ_); - } - return rc; -} - -/* smax_mz_zzv.xml */ -int smax_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|0|00|00|op=0|Zdn=xxxx|U=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A000) { - decode_fields32(ENC_SMAX_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - ctx->unsigned_ = FALSE; - OK(ENC_SMAX_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|0|00|00|op=0|Zdn=xxx|0|U=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120A800) { - decode_fields32(ENC_SMAX_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - ctx->unsigned_ = FALSE; - OK(ENC_SMAX_MZ_ZZV_4X1); - } - return rc; -} - -/* smax_mz_zzw.xml */ -int smax_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|000|opc=00|Zdn=xxxx|U=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B000) { - decode_fields32(ENC_SMAX_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - ctx->unsigned_ = FALSE; - OK(ENC_SMAX_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|000|opc=00|Zdn=xxx|0|U=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120B800) { - decode_fields32(ENC_SMAX_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - ctx->unsigned_ = FALSE; - OK(ENC_SMAX_MZ_ZZW_4X4); - } - return rc; -} - -/* smax_z_p_zz.xml */ -int smax_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|01|opc=00|U=0|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4080000) { - decode_fields32(ENC_SMAX_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SMAX_Z_P_ZZ_); - } - return rc; -} - -/* smax_z_zi.xml */ -int smax_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|01|00|U=0|11|o2=0|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x2528C000) { - decode_fields32(ENC_SMAX_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = FALSE; - ctx->imm = (ctx->unsigned_)!=0 ? UINT(ctx->imm8) : SInt(ctx->imm8,8); - OK(ENC_SMAX_Z_ZI_); - } - return rc; -} - -/* smaxp_z_p_zz.xml */ -int smaxp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|opc=10|U=0|10|1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4414A000) { - decode_fields32(ENC_SMAXP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SMAXP_Z_P_ZZ_); - } - return rc; -} - -/* smaxqv_z_p_z.xml */ -int smaxqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|011|op=0|U=0|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40C2000) { - decode_fields32(ENC_SMAXQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = FALSE; - OK(ENC_SMAXQV_Z_P_Z_); - } - return rc; -} - -/* smaxv_r_p_z.xml */ -int smaxv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|010|op=0|U=0|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4082000) { - decode_fields32(ENC_SMAXV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = FALSE; - OK(ENC_SMAXV_R_P_Z_); - } - return rc; -} - -/* smin_mz_zzv.xml */ -int smin_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|0|00|00|op=1|Zdn=xxxx|U=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A020) { - decode_fields32(ENC_SMIN_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - ctx->unsigned_ = FALSE; - OK(ENC_SMIN_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|0|00|00|op=1|Zdn=xxx|0|U=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120A820) { - decode_fields32(ENC_SMIN_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - ctx->unsigned_ = FALSE; - OK(ENC_SMIN_MZ_ZZV_4X1); - } - return rc; -} - -/* smin_mz_zzw.xml */ -int smin_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|000|opc=01|Zdn=xxxx|U=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B020) { - decode_fields32(ENC_SMIN_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - ctx->unsigned_ = FALSE; - OK(ENC_SMIN_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|000|opc=01|Zdn=xxx|0|U=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120B820) { - decode_fields32(ENC_SMIN_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - ctx->unsigned_ = FALSE; - OK(ENC_SMIN_MZ_ZZW_4X4); - } - return rc; -} - -/* smin_z_p_zz.xml */ -int smin_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|01|opc=01|U=0|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40A0000) { - decode_fields32(ENC_SMIN_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SMIN_Z_P_ZZ_); - } - return rc; -} - -/* smin_z_zi.xml */ -int smin_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|01|01|U=0|11|o2=0|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x252AC000) { - decode_fields32(ENC_SMIN_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = FALSE; - ctx->imm = (ctx->unsigned_)!=0 ? UINT(ctx->imm8) : SInt(ctx->imm8,8); - OK(ENC_SMIN_Z_ZI_); - } - return rc; -} - -/* sminp_z_p_zz.xml */ -int sminp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|opc=11|U=0|10|1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4416A000) { - decode_fields32(ENC_SMINP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SMINP_Z_P_ZZ_); - } - return rc; -} - -/* sminqv_z_p_z.xml */ -int sminqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|011|op=1|U=0|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40E2000) { - decode_fields32(ENC_SMINQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = FALSE; - OK(ENC_SMINQV_Z_P_Z_); - } - return rc; -} - -/* sminv_r_p_z.xml */ -int sminv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|010|op=1|U=0|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40A2000) { - decode_fields32(ENC_SMINV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = FALSE; - OK(ENC_SMINV_R_P_Z_); - } - return rc; -} - -/* smlal_za_zzi.xml */ -int smlal_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|11|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|U=0|S=0|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1C01000) { - decode_fields32(ENC_SMLAL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_SMLAL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|U=0|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1D01000) { - decode_fields32(ENC_SMLAL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_SMLAL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|U=0|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1D09000) { - decode_fields32(ENC_SMLAL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_SMLAL_ZA_ZZI_4XI); - } - return rc; -} - -/* smlal_za_zzv.xml */ -int smlal_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|U=0|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1600C00) { - decode_fields32(ENC_SMLAL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_SMLAL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=0|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1600800) { - decode_fields32(ENC_SMLAL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_SMLAL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|1|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=0|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1700800) { - decode_fields32(ENC_SMLAL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_SMLAL_ZA_ZZV_4X1); - } - return rc; -} - -/* smlal_za_zzw.xml */ -int smlal_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|U=0|S=0|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1E00800) { - decode_fields32(ENC_SMLAL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_SMLAL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|U=0|S=0|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1E10800) { - decode_fields32(ENC_SMLAL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_SMLAL_ZA_ZZW_4X4); - } - return rc; -} - -/* smlalb_z_zzz.xml */ -int smlalb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=0|U=0|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44004000) { - decode_fields32(ENC_SMLALB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SMLALB_Z_ZZZ_); - } - return rc; -} - -/* smlalb_z_zzzi.xml */ -int smlalb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=0|U=0|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A08000) { - decode_fields32(ENC_SMLALB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SMLALB_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=0|U=0|i2l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E08000) { - decode_fields32(ENC_SMLALB_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SMLALB_Z_ZZZI_D); - } - return rc; -} - -/* smlall_za_zzi.xml */ -int smlall_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector_of_32_bit_elements */ - /* 1|10|0000|1|00|00|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|U=0|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFF0001C)==0xC1000000) { - decode_fields32(ENC_SMLALL_ZA_ZZI_S, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i4h<<3)|ctx->i4l)); - ctx->nreg = 1; - OK(ENC_SMLALL_ZA_ZZI_S); - } - /* class iclass_one_za_quad_vector_of_64_bit_elements */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|0|i3l=xx|Zn=xxxxx|U=0|S=0|0|off2=xx */ - if((INSWORD & 0xFFF0101C)==0xC1800000) { - decode_fields32(ENC_SMLALL_ZA_ZZI_D, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_SMLALL_ZA_ZZI_D); - } - /* class iclass_two_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|0|i4h=xx|Zn=xxxx|op=0|U=0|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09038)==0xC1100000) { - decode_fields32(ENC_SMLALL_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_SMLALL_ZA_ZZI_S2XI); - } - /* class iclass_two_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|00|i3h=x|Zn=xxxx|0|U=0|S=0|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09838)==0xC1900000) { - decode_fields32(ENC_SMLALL_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_SMLALL_ZA_ZZI_D2XI); - } - /* class iclass_four_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|0|i4h=xx|Zn=xxx|0|op=0|U=0|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09078)==0xC1108000) { - decode_fields32(ENC_SMLALL_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_SMLALL_ZA_ZZI_S4XI); - } - /* class iclass_four_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|00|i3h=x|Zn=xxx|00|U=0|S=0|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09878)==0xC1908000) { - decode_fields32(ENC_SMLALL_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_SMLALL_ZA_ZZI_D4XI); - } - return rc; -} - -/* smlall_za_zzv.xml */ -int smlall_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|001|Zn=xxxxx|U=0|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFB09C1C)==0xC1200400) { - decode_fields32(ENC_SMLALL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->nreg = 1; - OK(ENC_SMLALL_ZA_ZZV_1); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=0|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1200000) { - decode_fields32(ENC_SMLALL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_SMLALL_ZA_ZZV_2X1); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=0|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1300000) { - decode_fields32(ENC_SMLALL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_SMLALL_ZA_ZZV_4X1); - } - return rc; -} - -/* smlall_za_zzw.xml */ -int smlall_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|000|Zn=xxxx|0|U=0|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFA19C3E)==0xC1A00000) { - decode_fields32(ENC_SMLALL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_SMLALL_ZA_ZZW_2X2); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|000|Zn=xxx|00|U=0|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFA39C7E)==0xC1A10000) { - decode_fields32(ENC_SMLALL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_SMLALL_ZA_ZZW_4X4); - } - return rc; -} - -/* smlalt_z_zzz.xml */ -int smlalt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=0|U=0|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44004400) { - decode_fields32(ENC_SMLALT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SMLALT_Z_ZZZ_); - } - return rc; -} - -/* smlalt_z_zzzi.xml */ -int smlalt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=0|U=0|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A08400) { - decode_fields32(ENC_SMLALT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SMLALT_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=0|U=0|i2l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E08400) { - decode_fields32(ENC_SMLALT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SMLALT_Z_ZZZI_D); - } - return rc; -} - -/* smlsl_za_zzi.xml */ -int smlsl_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|11|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|U=0|S=1|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1C01008) { - decode_fields32(ENC_SMLSL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_SMLSL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|U=0|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1D01008) { - decode_fields32(ENC_SMLSL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_SMLSL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|U=0|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1D09008) { - decode_fields32(ENC_SMLSL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_SMLSL_ZA_ZZI_4XI); - } - return rc; -} - -/* smlsl_za_zzv.xml */ -int smlsl_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|U=0|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1600C08) { - decode_fields32(ENC_SMLSL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_SMLSL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=0|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1600808) { - decode_fields32(ENC_SMLSL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_SMLSL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|1|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=0|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1700808) { - decode_fields32(ENC_SMLSL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_SMLSL_ZA_ZZV_4X1); - } - return rc; -} - -/* smlsl_za_zzw.xml */ -int smlsl_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|U=0|S=1|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1E00808) { - decode_fields32(ENC_SMLSL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_SMLSL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|U=0|S=1|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1E10808) { - decode_fields32(ENC_SMLSL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_SMLSL_ZA_ZZW_4X4); - } - return rc; -} - -/* smlslb_z_zzz.xml */ -int smlslb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=1|U=0|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44005000) { - decode_fields32(ENC_SMLSLB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SMLSLB_Z_ZZZ_); - } - return rc; -} - -/* smlslb_z_zzzi.xml */ -int smlslb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=1|U=0|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0A000) { - decode_fields32(ENC_SMLSLB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SMLSLB_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=1|U=0|i2l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0A000) { - decode_fields32(ENC_SMLSLB_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SMLSLB_Z_ZZZI_D); - } - return rc; -} - -/* smlsll_za_zzi.xml */ -int smlsll_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector_of_32_bit_elements */ - /* 1|10|0000|1|00|00|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|U=0|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFF0001C)==0xC1000008) { - decode_fields32(ENC_SMLSLL_ZA_ZZI_S, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i4h<<3)|ctx->i4l)); - ctx->nreg = 1; - OK(ENC_SMLSLL_ZA_ZZI_S); - } - /* class iclass_one_za_quad_vector_of_64_bit_elements */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|0|i3l=xx|Zn=xxxxx|U=0|S=1|0|off2=xx */ - if((INSWORD & 0xFFF0101C)==0xC1800008) { - decode_fields32(ENC_SMLSLL_ZA_ZZI_D, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_SMLSLL_ZA_ZZI_D); - } - /* class iclass_two_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|0|i4h=xx|Zn=xxxx|op=0|U=0|S=1|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09038)==0xC1100008) { - decode_fields32(ENC_SMLSLL_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_SMLSLL_ZA_ZZI_S2XI); - } - /* class iclass_two_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|00|i3h=x|Zn=xxxx|0|U=0|S=1|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09838)==0xC1900008) { - decode_fields32(ENC_SMLSLL_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_SMLSLL_ZA_ZZI_D2XI); - } - /* class iclass_four_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|0|i4h=xx|Zn=xxx|0|op=0|U=0|S=1|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09078)==0xC1108008) { - decode_fields32(ENC_SMLSLL_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_SMLSLL_ZA_ZZI_S4XI); - } - /* class iclass_four_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|00|i3h=x|Zn=xxx|00|U=0|S=1|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09878)==0xC1908008) { - decode_fields32(ENC_SMLSLL_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_SMLSLL_ZA_ZZI_D4XI); - } - return rc; -} - -/* smlsll_za_zzv.xml */ -int smlsll_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|001|Zn=xxxxx|U=0|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFB09C1C)==0xC1200408) { - decode_fields32(ENC_SMLSLL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->nreg = 1; - OK(ENC_SMLSLL_ZA_ZZV_1); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=0|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1200008) { - decode_fields32(ENC_SMLSLL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_SMLSLL_ZA_ZZV_2X1); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=0|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1300008) { - decode_fields32(ENC_SMLSLL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_SMLSLL_ZA_ZZV_4X1); - } - return rc; -} - -/* smlsll_za_zzw.xml */ -int smlsll_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|000|Zn=xxxx|0|U=0|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFA19C3E)==0xC1A00008) { - decode_fields32(ENC_SMLSLL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_SMLSLL_ZA_ZZW_2X2); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|000|Zn=xxx|00|U=0|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFA39C7E)==0xC1A10008) { - decode_fields32(ENC_SMLSLL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_SMLSLL_ZA_ZZW_4X4); - } - return rc; -} - -/* smlslt_z_zzz.xml */ -int smlslt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=1|U=0|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44005400) { - decode_fields32(ENC_SMLSLT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SMLSLT_Z_ZZZ_); - } - return rc; -} - -/* smlslt_z_zzzi.xml */ -int smlslt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=1|U=0|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0A400) { - decode_fields32(ENC_SMLSLT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SMLSLT_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=1|U=0|i2l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0A400) { - decode_fields32(ENC_SMLSLT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SMLSLT_Z_ZZZI_D); - } - return rc; -} - -/* smmla_z_zzz.xml */ -int smmla_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|1|uns=00|0|Zm=xxxxx|10|0110|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x45009800) { - decode_fields32(ENC_SMMLA_Z_ZZZ_, ctx, instr); - if(!HaveSVE() || !HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMMLA_Z_ZZZ_); - } - return rc; -} - -/* smop4a_za32_zz.xml */ -int smop4a_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|u0=0|00|0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108008) { - decode_fields32(ENC_SMOP4A_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|u0=0|00|0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008008) { - decode_fields32(ENC_SMOP4A_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|u0=0|00|0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008208) { - decode_fields32(ENC_SMOP4A_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|u0=0|00|0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108208) { - decode_fields32(ENC_SMOP4A_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA32_ZZ_H2X2); - } - return rc; -} - -/* smop4a_za_zz.xml */ -int smop4a_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108000) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008000) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008200) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108200) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0D00008) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0C00008) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0C00208) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0D00208) { - decode_fields32(ENC_SMOP4A_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4A_ZA_ZZ_H2X2); - } - return rc; -} - -/* smop4s_za32_zz.xml */ -int smop4s_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|u0=0|00|0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108018) { - decode_fields32(ENC_SMOP4S_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|u0=0|00|0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008018) { - decode_fields32(ENC_SMOP4S_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|u0=0|00|0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008218) { - decode_fields32(ENC_SMOP4S_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|u0=0|00|0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108218) { - decode_fields32(ENC_SMOP4S_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA32_ZZ_H2X2); - } - return rc; -} - -/* smop4s_za_zz.xml */ -int smop4s_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108010) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008010) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80008210) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80108210) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0D00018) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0C00018) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0C00218) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=0|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0D00218) { - decode_fields32(ENC_SMOP4S_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOP4S_ZA_ZZ_H2X2); - } - return rc; -} - -/* smopa_za32_pp_zz.xml */ -int smopa_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|01|0000|u0=0|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA0800008) { - decode_fields32(ENC_SMOPA_ZA32_PP_ZZ_16, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->unsigned_ = FALSE; - OK(ENC_SMOPA_ZA32_PP_ZZ_16); - } - return rc; -} - -/* smopa_za_pp_zz.xml */ -int smopa_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=0|10|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA0800000) { - decode_fields32(ENC_SMOPA_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOPA_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=0|11|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA0C00000) { - decode_fields32(ENC_SMOPA_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOPA_ZA_PP_ZZ_64); - } - return rc; -} - -/* smops_za32_pp_zz.xml */ -int smops_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|01|0000|u0=0|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA0800018) { - decode_fields32(ENC_SMOPS_ZA32_PP_ZZ_16, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->unsigned_ = FALSE; - OK(ENC_SMOPS_ZA32_PP_ZZ_16); - } - return rc; -} - -/* smops_za_pp_zz.xml */ -int smops_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=0|10|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA0800010) { - decode_fields32(ENC_SMOPS_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOPS_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=0|11|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA0C00010) { - decode_fields32(ENC_SMOPS_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_SMOPS_ZA_PP_ZZ_64); - } - return rc; -} - -/* smulh_z_p_zz.xml */ -int smulh_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|100|H=1|U=0|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4120000) { - decode_fields32(ENC_SMULH_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SMULH_Z_P_ZZ_); - } - return rc; -} - -/* smulh_z_zz.xml */ -int smulh_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|011|0|1|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4206800) { - decode_fields32(ENC_SMULH_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - OK(ENC_SMULH_Z_ZZ_); - } - return rc; -} - -/* smullb_z_zz.xml */ -int smullb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|11|op=1|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45007000) { - decode_fields32(ENC_SMULLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SMULLB_Z_ZZ_); - } - return rc; -} - -/* smullb_z_zzi.xml */ -int smullb_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|110|U=0|i3l=x|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0C000) { - decode_fields32(ENC_SMULLB_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 0; - OK(ENC_SMULLB_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|110|U=0|i2l=x|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0C000) { - decode_fields32(ENC_SMULLB_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 0; - OK(ENC_SMULLB_Z_ZZI_D); - } - return rc; -} - -/* smullt_z_zz.xml */ -int smullt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|11|op=1|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45007400) { - decode_fields32(ENC_SMULLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SMULLT_Z_ZZ_); - } - return rc; -} - -/* smullt_z_zzi.xml */ -int smullt_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|110|U=0|i3l=x|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0C400) { - decode_fields32(ENC_SMULLT_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 1; - OK(ENC_SMULLT_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|110|U=0|i2l=x|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0C400) { - decode_fields32(ENC_SMULLT_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 1; - OK(ENC_SMULLT_Z_ZZI_D); - } - return rc; -} - -/* splice_z_p_zz.xml */ -int splice_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_constructive */ - /* 000|0010|1|size=xx|1|0|110|1|10|0|Pv=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x52D8000) { - decode_fields32(ENC_SPLICE_Z_P_ZZ_CON, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->v = UINT(ctx->Pv); - ctx->dst = UINT(ctx->Zd); - ctx->s1 = UINT(ctx->Zn); - ctx->s2 = ((ctx->s1+1)) % 32; - OK(ENC_SPLICE_Z_P_ZZ_CON); - } - /* class iclass_destructive */ - /* 000|0010|1|size=xx|1|0|110|0|10|0|Pv=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x52C8000) { - decode_fields32(ENC_SPLICE_Z_P_ZZ_DES, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->v = UINT(ctx->Pv); - ctx->dst = UINT(ctx->Zdn); - ctx->s1 = ctx->dst; - ctx->s2 = UINT(ctx->Zm); - OK(ENC_SPLICE_Z_P_ZZ_DES); - } - return rc; -} - -/* sqabs_z_p_z.xml */ -int sqabs_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 010|0010|0|size=xx|0|0|Q=1|0|Z=0|op=0|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4408A000) { - decode_fields32(ENC_SQABS_Z_P_Z_M, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_SQABS_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 010|0010|0|size=xx|0|0|Q=1|0|Z=1|op=0|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440AA000) { - decode_fields32(ENC_SQABS_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_SQABS_Z_P_Z_Z); - } - return rc; -} - -/* sqadd_z_p_zz.xml */ -int sqadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=0|S=0|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44188000) { - decode_fields32(ENC_SQADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SQADD_Z_P_ZZ_); - } - return rc; -} - -/* sqadd_z_zi.xml */ -int sqadd_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|00|10|U=0|11|sh=x|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2524C000) { - decode_fields32(ENC_SQADD_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = UINT(ctx->imm8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - ctx->unsigned_ = FALSE; - OK(ENC_SQADD_Z_ZI_); - } - return rc; -} - -/* sqadd_z_zz.xml */ -int sqadd_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|000|10|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4201000) { - decode_fields32(ENC_SQADD_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - OK(ENC_SQADD_Z_ZZ_); - } - return rc; -} - -/* sqcadd_z_zz.xml */ -int sqcadd_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|0000|op=1|11|011|rot=x|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FF800)==0x4501D800) { - decode_fields32(ENC_SQCADD_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - ctx->sub_i = (ctx->rot==0); - ctx->sub_r = (ctx->rot==1); - OK(ENC_SQCADD_Z_ZZ_); - } - return rc; -} - -/* sqcvt_z_mz2.xml */ -int sqcvt_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=0|1|000|11|111000|Zn=xxxx|U=0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC123E000) { - decode_fields32(ENC_SQCVT_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVT_Z_MZ2_); - } - return rc; -} - -/* sqcvt_z_mz4.xml */ -int sqcvt_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|sz=x|op=0|1|100|11|111000|Zn=xxx|N=0|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF7FFC60)==0xC133E000) { - decode_fields32(ENC_SQCVT_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVT_Z_MZ4_); - } - return rc; -} - -/* sqcvtn_z_mz2.xml */ -int sqcvtn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=0|1|tszl=10|00|1|0|10|0|U=0|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0x45314000) { - decode_fields32(ENC_SQCVTN_Z_MZ2_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVTN_Z_MZ2_); - } - return rc; -} - -/* sqcvtn_z_mz4.xml */ -int sqcvtn_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|sz=x|op=0|1|100|11|111000|Zn=xxx|N=1|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF7FFC60)==0xC133E040) { - decode_fields32(ENC_SQCVTN_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVTN_Z_MZ4_); - } - return rc; -} - -/* sqcvtu_z_mz2.xml */ -int sqcvtu_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=1|1|000|11|111000|Zn=xxxx|U=0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC163E000) { - decode_fields32(ENC_SQCVTU_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVTU_Z_MZ2_); - } - return rc; -} - -/* sqcvtu_z_mz4.xml */ -int sqcvtu_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|sz=x|op=1|1|100|11|111000|Zn=xxx|N=0|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF7FFC60)==0xC173E000) { - decode_fields32(ENC_SQCVTU_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVTU_Z_MZ4_); - } - return rc; -} - -/* sqcvtun_z_mz2.xml */ -int sqcvtun_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=0|1|tszl=10|00|1|0|10|opc=10|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0x45315000) { - decode_fields32(ENC_SQCVTUN_Z_MZ2_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVTUN_Z_MZ2_); - } - return rc; -} - -/* sqcvtun_z_mz4.xml */ -int sqcvtun_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|sz=x|op=1|1|100|11|111000|Zn=xxx|N=1|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF7FFC60)==0xC173E040) { - decode_fields32(ENC_SQCVTUN_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQCVTUN_Z_MZ4_); - } - return rc; -} - -/* sqdecb_r_rs.xml */ -int sqdecb_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=00|1|sf=0|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x420F800) { - decode_fields32(ENC_SQDECB_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQDECB_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=00|1|sf=1|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x430F800) { - decode_fields32(ENC_SQDECB_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQDECB_R_RS_X); - } - return rc; -} - -/* sqdecd_r_rs.xml */ -int sqdecd_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=11|1|sf=0|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0F800) { - decode_fields32(ENC_SQDECD_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQDECD_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=11|1|sf=1|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0F800) { - decode_fields32(ENC_SQDECD_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQDECD_R_RS_X); - } - return rc; -} - -/* sqdecd_z_zs.xml */ -int sqdecd_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=11|1|0|imm4=xxxx|11|00|D=1|U=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0C800) { - decode_fields32(ENC_SQDECD_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - OK(ENC_SQDECD_Z_ZS_); - } - return rc; -} - -/* sqdech_r_rs.xml */ -int sqdech_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=01|1|sf=0|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460F800) { - decode_fields32(ENC_SQDECH_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQDECH_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=01|1|sf=1|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470F800) { - decode_fields32(ENC_SQDECH_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQDECH_R_RS_X); - } - return rc; -} - -/* sqdech_z_zs.xml */ -int sqdech_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=01|1|0|imm4=xxxx|11|00|D=1|U=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460C800) { - decode_fields32(ENC_SQDECH_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - OK(ENC_SQDECH_Z_ZS_); - } - return rc; -} - -/* sqdecp_r_p_r.xml */ -int sqdecp_r_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 001|0010|1|size=xx|101|0|D=1|U=0|1000|1|sf=0|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252A8800) { - decode_fields32(ENC_SQDECP_R_P_R_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQDECP_R_P_R_SX); - } - /* class iclass_64_bit */ - /* 001|0010|1|size=xx|101|0|D=1|U=0|1000|1|sf=1|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252A8C00) { - decode_fields32(ENC_SQDECP_R_P_R_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQDECP_R_P_R_X); - } - return rc; -} - -/* sqdecp_z_p_z.xml */ -int sqdecp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|0|D=1|U=0|1000|0|opc=00|Pm=xxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252A8000) { - decode_fields32(ENC_SQDECP_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = FALSE; - OK(ENC_SQDECP_Z_P_Z_); - } - return rc; -} - -/* sqdecw_r_rs.xml */ -int sqdecw_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=10|1|sf=0|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0F800) { - decode_fields32(ENC_SQDECW_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQDECW_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=10|1|sf=1|imm4=xxxx|11|11|D=1|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0F800) { - decode_fields32(ENC_SQDECW_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQDECW_R_RS_X); - } - return rc; -} - -/* sqdecw_z_zs.xml */ -int sqdecw_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=10|1|0|imm4=xxxx|11|00|D=1|U=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0C800) { - decode_fields32(ENC_SQDECW_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - OK(ENC_SQDECW_Z_ZS_); - } - return rc; -} - -/* sqdmlalb_z_zzz.xml */ -int sqdmlalb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|110|S=0|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44006000) { - decode_fields32(ENC_SQDMLALB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel1 = 0; - ctx->sel2 = 0; - OK(ENC_SQDMLALB_Z_ZZZ_); - } - return rc; -} - -/* sqdmlalb_z_zzzi.xml */ -int sqdmlalb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|001|S=0|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A02000) { - decode_fields32(ENC_SQDMLALB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SQDMLALB_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|001|S=0|i2l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E02000) { - decode_fields32(ENC_SQDMLALB_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SQDMLALB_Z_ZZZI_D); - } - return rc; -} - -/* sqdmlalbt_z_zzz.xml */ -int sqdmlalbt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|0001|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44000800) { - decode_fields32(ENC_SQDMLALBT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel1 = 0; - ctx->sel2 = 1; - OK(ENC_SQDMLALBT_Z_ZZZ_); - } - return rc; -} - -/* sqdmlalt_z_zzz.xml */ -int sqdmlalt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|110|S=0|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44006400) { - decode_fields32(ENC_SQDMLALT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel1 = 1; - ctx->sel2 = 1; - OK(ENC_SQDMLALT_Z_ZZZ_); - } - return rc; -} - -/* sqdmlalt_z_zzzi.xml */ -int sqdmlalt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|001|S=0|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A02400) { - decode_fields32(ENC_SQDMLALT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SQDMLALT_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|001|S=0|i2l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E02400) { - decode_fields32(ENC_SQDMLALT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SQDMLALT_Z_ZZZI_D); - } - return rc; -} - -/* sqdmlslb_z_zzz.xml */ -int sqdmlslb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|110|S=1|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44006800) { - decode_fields32(ENC_SQDMLSLB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel1 = 0; - ctx->sel2 = 0; - OK(ENC_SQDMLSLB_Z_ZZZ_); - } - return rc; -} - -/* sqdmlslb_z_zzzi.xml */ -int sqdmlslb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|001|S=1|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A03000) { - decode_fields32(ENC_SQDMLSLB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SQDMLSLB_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|001|S=1|i2l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E03000) { - decode_fields32(ENC_SQDMLSLB_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_SQDMLSLB_Z_ZZZI_D); - } - return rc; -} - -/* sqdmlslbt_z_zzz.xml */ -int sqdmlslbt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|0001|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44000C00) { - decode_fields32(ENC_SQDMLSLBT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel1 = 0; - ctx->sel2 = 1; - OK(ENC_SQDMLSLBT_Z_ZZZ_); - } - return rc; -} - -/* sqdmlslt_z_zzz.xml */ -int sqdmlslt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|110|S=1|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44006C00) { - decode_fields32(ENC_SQDMLSLT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel1 = 1; - ctx->sel2 = 1; - OK(ENC_SQDMLSLT_Z_ZZZ_); - } - return rc; -} - -/* sqdmlslt_z_zzzi.xml */ -int sqdmlslt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|001|S=1|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A03400) { - decode_fields32(ENC_SQDMLSLT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SQDMLSLT_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|001|S=1|i2l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E03400) { - decode_fields32(ENC_SQDMLSLT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_SQDMLSLT_Z_ZZZI_D); - } - return rc; -} - -/* sqdmulh_mz_zzv.xml */ -int sqdmulh_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|1|00|000|Zdn=xxxx|op=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A400) { - decode_fields32(ENC_SQDMULH_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_SQDMULH_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|1|00|000|Zdn=xxx|0|op=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120AC00) { - decode_fields32(ENC_SQDMULH_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_SQDMULH_MZ_ZZV_4X1); - } - return rc; -} - -/* sqdmulh_mz_zzw.xml */ -int sqdmulh_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101101|00000|Zdn=xxxx|op=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B400) { - decode_fields32(ENC_SQDMULH_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_SQDMULH_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101111|00000|Zdn=xxx|0|op=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120BC00) { - decode_fields32(ENC_SQDMULH_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_SQDMULH_MZ_ZZW_4X4); - } - return rc; -} - -/* sqdmulh_z_zz.xml */ -int sqdmulh_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|011|10|R=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4207000) { - decode_fields32(ENC_SQDMULH_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQDMULH_Z_ZZ_); - } - return rc; -} - -/* sqdmulh_z_zzi.xml */ -int sqdmulh_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|11110|R=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4420F000) { - decode_fields32(ENC_SQDMULH_Z_ZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQDMULH_Z_ZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|11110|R=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A0F000) { - decode_fields32(ENC_SQDMULH_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQDMULH_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|11110|R=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E0F000) { - decode_fields32(ENC_SQDMULH_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQDMULH_Z_ZZI_D); - } - return rc; -} - -/* sqdmullb_z_zz.xml */ -int sqdmullb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|11|op=0|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45006000) { - decode_fields32(ENC_SQDMULLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQDMULLB_Z_ZZ_); - } - return rc; -} - -/* sqdmullb_z_zzi.xml */ -int sqdmullb_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|1110|i3l=x|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0E000) { - decode_fields32(ENC_SQDMULLB_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 0; - OK(ENC_SQDMULLB_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|1110|i2l=x|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0E000) { - decode_fields32(ENC_SQDMULLB_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 0; - OK(ENC_SQDMULLB_Z_ZZI_D); - } - return rc; -} - -/* sqdmullt_z_zz.xml */ -int sqdmullt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|11|op=0|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45006400) { - decode_fields32(ENC_SQDMULLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQDMULLT_Z_ZZ_); - } - return rc; -} - -/* sqdmullt_z_zzi.xml */ -int sqdmullt_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|1110|i3l=x|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0E400) { - decode_fields32(ENC_SQDMULLT_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 1; - OK(ENC_SQDMULLT_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|1110|i2l=x|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0E400) { - decode_fields32(ENC_SQDMULLT_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 1; - OK(ENC_SQDMULLT_Z_ZZI_D); - } - return rc; -} - -/* sqincb_r_rs.xml */ -int sqincb_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=00|1|sf=0|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x420F000) { - decode_fields32(ENC_SQINCB_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQINCB_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=00|1|sf=1|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x430F000) { - decode_fields32(ENC_SQINCB_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQINCB_R_RS_X); - } - return rc; -} - -/* sqincd_r_rs.xml */ -int sqincd_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=11|1|sf=0|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0F000) { - decode_fields32(ENC_SQINCD_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQINCD_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=11|1|sf=1|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0F000) { - decode_fields32(ENC_SQINCD_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQINCD_R_RS_X); - } - return rc; -} - -/* sqincd_z_zs.xml */ -int sqincd_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=11|1|0|imm4=xxxx|11|00|D=0|U=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0C000) { - decode_fields32(ENC_SQINCD_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - OK(ENC_SQINCD_Z_ZS_); - } - return rc; -} - -/* sqinch_r_rs.xml */ -int sqinch_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=01|1|sf=0|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460F000) { - decode_fields32(ENC_SQINCH_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQINCH_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=01|1|sf=1|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470F000) { - decode_fields32(ENC_SQINCH_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQINCH_R_RS_X); - } - return rc; -} - -/* sqinch_z_zs.xml */ -int sqinch_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=01|1|0|imm4=xxxx|11|00|D=0|U=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460C000) { - decode_fields32(ENC_SQINCH_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - OK(ENC_SQINCH_Z_ZS_); - } - return rc; -} - -/* sqincp_r_p_r.xml */ -int sqincp_r_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 001|0010|1|size=xx|101|0|D=0|U=0|1000|1|sf=0|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x25288800) { - decode_fields32(ENC_SQINCP_R_P_R_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQINCP_R_P_R_SX); - } - /* class iclass_64_bit */ - /* 001|0010|1|size=xx|101|0|D=0|U=0|1000|1|sf=1|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x25288C00) { - decode_fields32(ENC_SQINCP_R_P_R_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQINCP_R_P_R_X); - } - return rc; -} - -/* sqincp_z_p_z.xml */ -int sqincp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|0|D=0|U=0|1000|0|opc=00|Pm=xxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x25288000) { - decode_fields32(ENC_SQINCP_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = FALSE; - OK(ENC_SQINCP_Z_P_Z_); - } - return rc; -} - -/* sqincw_r_rs.xml */ -int sqincw_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=10|1|sf=0|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0F000) { - decode_fields32(ENC_SQINCW_R_RS_SX, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x20; - OK(ENC_SQINCW_R_RS_SX); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=10|1|sf=1|imm4=xxxx|11|11|D=0|U=0|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0F000) { - decode_fields32(ENC_SQINCW_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - ctx->ssize = 0x40; - OK(ENC_SQINCW_R_RS_X); - } - return rc; -} - -/* sqincw_z_zs.xml */ -int sqincw_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=10|1|0|imm4=xxxx|11|00|D=0|U=0|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0C000) { - decode_fields32(ENC_SQINCW_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = FALSE; - OK(ENC_SQINCW_Z_ZS_); - } - return rc; -} - -/* sqneg_z_p_z.xml */ -int sqneg_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 010|0010|0|size=xx|0|0|Q=1|0|Z=0|op=1|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4409A000) { - decode_fields32(ENC_SQNEG_Z_P_Z_M, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_SQNEG_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 010|0010|0|size=xx|0|0|Q=1|0|Z=1|op=1|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440BA000) { - decode_fields32(ENC_SQNEG_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_SQNEG_Z_P_Z_Z); - } - return rc; -} - -/* sqrdcmlah_z_zzz.xml */ -int sqrdcmlah_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|01|op=1|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20F000)==0x44003000) { - decode_fields32(ENC_SQRDCMLAH_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - ctx->sub_i = (SLICE(ctx->rot,1,1)==1); - OK(ENC_SQRDCMLAH_Z_ZZZ_); - } - return rc; -} - -/* sqrdcmlah_z_zzzi.xml */ -int sqrdcmlah_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|0111|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x44A07000) { - decode_fields32(ENC_SQRDCMLAH_Z_ZZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - ctx->sub_i = (SLICE(ctx->rot,1,1)==1); - OK(ENC_SQRDCMLAH_Z_ZZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|0111|rot=xx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F000)==0x44E07000) { - decode_fields32(ENC_SQRDCMLAH_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel_a = UINT(SLICE(ctx->rot,0,0)); - ctx->sel_b = UINT(NOT(SLICE(ctx->rot,0,0),1)); - ctx->sub_r = (SLICE(ctx->rot,0,0)!=SLICE(ctx->rot,1,1)); - ctx->sub_i = (SLICE(ctx->rot,1,1)==1); - OK(ENC_SQRDCMLAH_Z_ZZZI_S); - } - return rc; -} - -/* sqrdmlah_z_zzz.xml */ -int sqrdmlah_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|1110|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44007000) { - decode_fields32(ENC_SQRDMLAH_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLAH_Z_ZZZ_); - } - return rc; -} - -/* sqrdmlah_z_zzzi.xml */ -int sqrdmlah_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|00010|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44201000) { - decode_fields32(ENC_SQRDMLAH_Z_ZZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLAH_Z_ZZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00010|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A01000) { - decode_fields32(ENC_SQRDMLAH_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLAH_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|00010|S=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E01000) { - decode_fields32(ENC_SQRDMLAH_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLAH_Z_ZZZI_D); - } - return rc; -} - -/* sqrdmlsh_z_zzz.xml */ -int sqrdmlsh_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|1110|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44007400) { - decode_fields32(ENC_SQRDMLSH_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLSH_Z_ZZZ_); - } - return rc; -} - -/* sqrdmlsh_z_zzzi.xml */ -int sqrdmlsh_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|00010|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44201400) { - decode_fields32(ENC_SQRDMLSH_Z_ZZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLSH_Z_ZZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00010|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A01400) { - decode_fields32(ENC_SQRDMLSH_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLSH_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|00010|S=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E01400) { - decode_fields32(ENC_SQRDMLSH_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SQRDMLSH_Z_ZZZI_D); - } - return rc; -} - -/* sqrdmulh_z_zz.xml */ -int sqrdmulh_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|011|10|R=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4207400) { - decode_fields32(ENC_SQRDMULH_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQRDMULH_Z_ZZ_); - } - return rc; -} - -/* sqrdmulh_z_zzi.xml */ -int sqrdmulh_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|11110|R=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4420F400) { - decode_fields32(ENC_SQRDMULH_Z_ZZI_H, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQRDMULH_Z_ZZI_H); - } - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|11110|R=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A0F400) { - decode_fields32(ENC_SQRDMULH_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQRDMULH_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|11110|R=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E0F400) { - decode_fields32(ENC_SQRDMULH_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQRDMULH_Z_ZZI_D); - } - return rc; -} - -/* sqrshl_z_p_zz.xml */ -int sqrshl_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=0|N=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440A8000) { - decode_fields32(ENC_SQRSHL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SQRSHL_Z_P_ZZ_); - } - return rc; -} - -/* sqrshlr_z_p_zz.xml */ -int sqrshlr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=1|N=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440E8000) { - decode_fields32(ENC_SQRSHLR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SQRSHLR_Z_P_ZZ_); - } - return rc; -} - -/* sqrshr_z_mz2.xml */ -int sqrshr_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|11|1|op=0|imm4=xxxx|110|101|Zn=xxxx|U=0|Zd=xxxxx */ - if((INSWORD & 0xFFF0FC20)==0xC1E0D400) { - decode_fields32(ENC_SQRSHR_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm4); - OK(ENC_SQRSHR_Z_MZ2_); - } - return rc; -} - -/* sqrshr_z_mz4.xml */ -int sqrshr_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|tsize=xx|1|imm5=xxxxx|110|11|N=0|Zn=xxx|op=0|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF20FC60)==0xC120D800) { - decode_fields32(ENC_SQRSHR_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((8) * (ctx->esize))-UINT(((ctx->tsize<<5)|ctx->imm5)); - OK(ENC_SQRSHR_Z_MZ4_); - } - return rc; -} - -/* sqrshrn_z_mz2.xml */ -int sqrshrn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 010|0010|1|1|op0=0|1|01|imm3=xxx|0|0|op1=1|U=0|R=1|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFF8FC20)==0x45A82800) { - decode_fields32(ENC_SQRSHRN_Z_MZ2_B, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm3); - OK(ENC_SQRSHRN_Z_MZ2_B); - } - /* class iclass_16_bit */ - /* 010|0010|1|1|op0=0|1|1|imm4=xxxx|0|0|op1=1|U=0|R=1|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFF0FC20)==0x45B02800) { - decode_fields32(ENC_SQRSHRN_Z_MZ2_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm4); - OK(ENC_SQRSHRN_Z_MZ2_); - } - return rc; -} - -/* sqrshrn_z_mz4.xml */ -int sqrshrn_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|tsize=xx|1|imm5=xxxxx|110|11|N=1|Zn=xxx|op=0|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF20FC60)==0xC120DC00) { - decode_fields32(ENC_SQRSHRN_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((8) * (ctx->esize))-UINT(((ctx->tsize<<5)|ctx->imm5)); - OK(ENC_SQRSHRN_Z_MZ4_); - } - return rc; -} - -/* sqrshrnb_z_zi.xml */ -int sqrshrnb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=0|R=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45202800) { - decode_fields32(ENC_SQRSHRNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQRSHRNB_Z_ZI_); - } - return rc; -} - -/* sqrshrnt_z_zi.xml */ -int sqrshrnt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=0|R=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45202C00) { - decode_fields32(ENC_SQRSHRNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQRSHRNT_Z_ZI_); - } - return rc; -} - -/* sqrshru_z_mz2.xml */ -int sqrshru_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|11|1|op=1|imm4=xxxx|110|101|Zn=xxxx|U=0|Zd=xxxxx */ - if((INSWORD & 0xFFF0FC20)==0xC1F0D400) { - decode_fields32(ENC_SQRSHRU_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm4); - OK(ENC_SQRSHRU_Z_MZ2_); - } - return rc; -} - -/* sqrshru_z_mz4.xml */ -int sqrshru_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|tsize=xx|1|imm5=xxxxx|110|11|N=0|Zn=xxx|op=1|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF20FC60)==0xC120D840) { - decode_fields32(ENC_SQRSHRU_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((8) * (ctx->esize))-UINT(((ctx->tsize<<5)|ctx->imm5)); - OK(ENC_SQRSHRU_Z_MZ4_); - } - return rc; -} - -/* sqrshrun_z_mz2.xml */ -int sqrshrun_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 010|0010|1|1|op0=0|1|01|imm3=xxx|0|0|op1=0|U=0|R=1|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFF8FC20)==0x45A80800) { - decode_fields32(ENC_SQRSHRUN_Z_MZ2_B, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm3); - OK(ENC_SQRSHRUN_Z_MZ2_B); - } - /* class iclass_16_bit */ - /* 010|0010|1|1|op0=0|1|1|imm4=xxxx|0|0|op1=0|U=0|R=1|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFF0FC20)==0x45B00800) { - decode_fields32(ENC_SQRSHRUN_Z_MZ2_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm4); - OK(ENC_SQRSHRUN_Z_MZ2_); - } - return rc; -} - -/* sqrshrun_z_mz4.xml */ -int sqrshrun_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|tsize=xx|1|imm5=xxxxx|110|11|N=1|Zn=xxx|op=1|U=0|Zd=xxxxx */ - if((INSWORD & 0xFF20FC60)==0xC120DC40) { - decode_fields32(ENC_SQRSHRUN_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((8) * (ctx->esize))-UINT(((ctx->tsize<<5)|ctx->imm5)); - OK(ENC_SQRSHRUN_Z_MZ4_); - } - return rc; -} - -/* sqrshrunb_z_zi.xml */ -int sqrshrunb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=0|R=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45200800) { - decode_fields32(ENC_SQRSHRUNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQRSHRUNB_Z_ZI_); - } - return rc; -} - -/* sqrshrunt_z_zi.xml */ -int sqrshrunt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=0|R=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45200C00) { - decode_fields32(ENC_SQRSHRUNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQRSHRUNT_Z_ZI_); - } - return rc; -} - -/* sqshl_z_p_zi.xml */ -int sqshl_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|tszh=xx|0|0|opc=01|L=1|U=0|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4068000) { - decode_fields32(ENC_SQSHL_Z_P_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_SQSHL_Z_P_ZI_); - } - return rc; -} - -/* sqshl_z_p_zz.xml */ -int sqshl_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=0|N=0|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44088000) { - decode_fields32(ENC_SQSHL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SQSHL_Z_P_ZZ_); - } - return rc; -} - -/* sqshlr_z_p_zz.xml */ -int sqshlr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=1|N=0|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440C8000) { - decode_fields32(ENC_SQSHLR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SQSHLR_Z_P_ZZ_); - } - return rc; -} - -/* sqshlu_z_p_zi.xml */ -int sqshlu_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|tszh=xx|0|0|opc=11|L=1|U=1|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40F8000) { - decode_fields32(ENC_SQSHLU_Z_P_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_SQSHLU_Z_P_ZI_); - } - return rc; -} - -/* sqshrn_z_mz2.xml */ -int sqshrn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|1|op0=0|1|tsize=xx|imm3=xxx|0|0|op1=0|U=0|R=0|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC20)==0x45A00000) { - decode_fields32(ENC_SQSHRN_Z_MZ2_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQSHRN_Z_MZ2_); - } - return rc; -} - -/* sqshrnb_z_zi.xml */ -int sqshrnb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=0|R=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45202000) { - decode_fields32(ENC_SQSHRNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQSHRNB_Z_ZI_); - } - return rc; -} - -/* sqshrnt_z_zi.xml */ -int sqshrnt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=0|R=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45202400) { - decode_fields32(ENC_SQSHRNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQSHRNT_Z_ZI_); - } - return rc; -} - -/* sqshrun_z_mz2.xml */ -int sqshrun_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|1|op0=0|1|tsize=xx|imm3=xxx|0|0|op1=1|U=0|R=0|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC20)==0x45A02000) { - decode_fields32(ENC_SQSHRUN_Z_MZ2_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQSHRUN_Z_MZ2_); - } - return rc; -} - -/* sqshrunb_z_zi.xml */ -int sqshrunb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=0|R=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45200000) { - decode_fields32(ENC_SQSHRUNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQSHRUNB_Z_ZI_); - } - return rc; -} - -/* sqshrunt_z_zi.xml */ -int sqshrunt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=0|U=0|R=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45200400) { - decode_fields32(ENC_SQSHRUNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SQSHRUNT_Z_ZI_); - } - return rc; -} - -/* sqsub_z_p_zz.xml */ -int sqsub_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=0|S=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x441A8000) { - decode_fields32(ENC_SQSUB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SQSUB_Z_P_ZZ_); - } - return rc; -} - -/* sqsub_z_zi.xml */ -int sqsub_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|00|11|U=0|11|sh=x|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2526C000) { - decode_fields32(ENC_SQSUB_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = UINT(ctx->imm8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - ctx->unsigned_ = FALSE; - OK(ENC_SQSUB_Z_ZI_); - } - return rc; -} - -/* sqsub_z_zz.xml */ -int sqsub_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|000|11|U=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4201800) { - decode_fields32(ENC_SQSUB_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - OK(ENC_SQSUB_Z_ZZ_); - } - return rc; -} - -/* sqsubr_z_p_zz.xml */ -int sqsubr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=1|S=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x441E8000) { - decode_fields32(ENC_SQSUBR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SQSUBR_Z_P_ZZ_); - } - return rc; -} - -/* sqxtnb_z_zz.xml */ -int sqxtnb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|00|0|0|10|0|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA7FC00)==0x45204000) { - decode_fields32(ENC_SQXTNB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(!((ctx->tsize==1 || ctx->tsize==2 || ctx->tsize==4))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x10) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQXTNB_Z_ZZ_); - } - return rc; -} - -/* sqxtnt_z_zz.xml */ -int sqxtnt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|00|0|0|10|0|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA7FC00)==0x45204400) { - decode_fields32(ENC_SQXTNT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(!((ctx->tsize==1 || ctx->tsize==2 || ctx->tsize==4))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x10) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQXTNT_Z_ZZ_); - } - return rc; -} - -/* sqxtunb_z_zz.xml */ -int sqxtunb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|00|0|0|10|opc=10|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA7FC00)==0x45205000) { - decode_fields32(ENC_SQXTUNB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(!((ctx->tsize==1 || ctx->tsize==2 || ctx->tsize==4))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x10) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQXTUNB_Z_ZZ_); - } - return rc; -} - -/* sqxtunt_z_zz.xml */ -int sqxtunt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|00|0|0|10|opc=10|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA7FC00)==0x45205400) { - decode_fields32(ENC_SQXTUNT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(!((ctx->tsize==1 || ctx->tsize==2 || ctx->tsize==4))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x10) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_SQXTUNT_Z_ZZ_); - } - return rc; -} - -/* srhadd_z_p_zz.xml */ -int srhadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=1|S=0|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44148000) { - decode_fields32(ENC_SRHADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SRHADD_Z_P_ZZ_); - } - return rc; -} - -/* sri_z_zzi.xml */ -int sri_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|tszh=xx|0|tszl=xx|imm3=xxx|11|110|op=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500F000) { - decode_fields32(ENC_SRI_Z_ZZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SRI_Z_ZZI_); - } - return rc; -} - -/* srshl_mz_zzv.xml */ -int srshl_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|0|10|opc=001|Zdn=xxxx|U=0 */ - if((INSWORD & 0xFF30FFE1)==0xC120A220) { - decode_fields32(ENC_SRSHL_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_SRSHL_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|0|10|opc=001|Zdn=xxx|0|U=0 */ - if((INSWORD & 0xFF30FFE3)==0xC120AA20) { - decode_fields32(ENC_SRSHL_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_SRSHL_MZ_ZZV_4X1); - } - return rc; -} - -/* srshl_mz_zzw.xml */ -int srshl_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|10|opc=001|Zdn=xxxx|U=0 */ - if((INSWORD & 0xFF21FFE1)==0xC120B220) { - decode_fields32(ENC_SRSHL_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_SRSHL_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|10|opc=001|Zdn=xxx|0|U=0 */ - if((INSWORD & 0xFF23FFE3)==0xC120BA20) { - decode_fields32(ENC_SRSHL_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_SRSHL_MZ_ZZW_4X4); - } - return rc; -} - -/* srshl_z_p_zz.xml */ -int srshl_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=0|R=0|N=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44028000) { - decode_fields32(ENC_SRSHL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SRSHL_Z_P_ZZ_); - } - return rc; -} - -/* srshlr_z_p_zz.xml */ -int srshlr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=0|R=1|N=1|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44068000) { - decode_fields32(ENC_SRSHLR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SRSHLR_Z_P_ZZ_); - } - return rc; -} - -/* srshr_z_p_zi.xml */ -int srshr_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|tszh=xx|0|0|opc=11|L=0|U=0|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40C8000) { - decode_fields32(ENC_SRSHR_Z_P_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SRSHR_Z_P_ZI_); - } - return rc; -} - -/* srsra_z_zi.xml */ -int srsra_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|tszh=xx|0|tszl=xx|imm3=xxx|11|10|R=1|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500E800) { - decode_fields32(ENC_SRSRA_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->Zda); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SRSRA_Z_ZI_); - } - return rc; -} - -/* sshllb_z_zi.xml */ -int sshllb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|0|tszl=xx|imm3=xxx|10|10|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4500A000) { - decode_fields32(ENC_SSHLLB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_SSHLLB_Z_ZI_); - } - return rc; -} - -/* sshllt_z_zi.xml */ -int sshllt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|0|tszl=xx|imm3=xxx|10|10|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4500A400) { - decode_fields32(ENC_SSHLLT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_SSHLLT_Z_ZI_); - } - return rc; -} - -/* ssra_z_zi.xml */ -int ssra_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|tszh=xx|0|tszl=xx|imm3=xxx|11|10|R=0|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500E000) { - decode_fields32(ENC_SSRA_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->Zda); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_SSRA_Z_ZI_); - } - return rc; -} - -/* ssublb_z_zz.xml */ -int ssublb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=1|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45001000) { - decode_fields32(ENC_SSUBLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 0; - ctx->sel2 = 0; - ctx->unsigned_ = FALSE; - OK(ENC_SSUBLB_Z_ZZ_); - } - return rc; -} - -/* ssublbt_z_zz.xml */ -int ssublbt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|00|S=1|tb=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45008800) { - decode_fields32(ENC_SSUBLBT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 0; - ctx->sel2 = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SSUBLBT_Z_ZZ_); - } - return rc; -} - -/* ssublt_z_zz.xml */ -int ssublt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=1|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45001400) { - decode_fields32(ENC_SSUBLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 1; - ctx->sel2 = 1; - ctx->unsigned_ = FALSE; - OK(ENC_SSUBLT_Z_ZZ_); - } - return rc; -} - -/* ssubltb_z_zz.xml */ -int ssubltb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|10|00|S=1|tb=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45008C00) { - decode_fields32(ENC_SSUBLTB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 1; - ctx->sel2 = 0; - ctx->unsigned_ = FALSE; - OK(ENC_SSUBLTB_Z_ZZ_); - } - return rc; -} - -/* ssubwb_z_zz.xml */ -int ssubwb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=1|U=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45005000) { - decode_fields32(ENC_SSUBWB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SSUBWB_Z_ZZ_); - } - return rc; -} - -/* ssubwt_z_zz.xml */ -int ssubwt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=1|U=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45005400) { - decode_fields32(ENC_SSUBWT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SSUBWT_Z_ZZ_); - } - return rc; -} - -/* st1b_mz_p_bi.xml */ -int st1b_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0600000) { - decode_fields32(ENC_ST1B_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1B_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA0608000) { - decode_fields32(ENC_ST1B_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1B_MZ_P_BI_4); - } - return rc; -} - -/* st1b_mz_p_br.xml */ -int st1b_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0200000) { - decode_fields32(ENC_ST1B_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - OK(ENC_ST1B_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA0208000) { - decode_fields32(ENC_ST1B_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - OK(ENC_ST1B_MZ_P_BR_4); - } - return rc; -} - -/* st1b_mzx_p_bi.xml */ -int st1b_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1600000) { - decode_fields32(ENC_ST1B_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1B_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA1608000) { - decode_fields32(ENC_ST1B_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1B_MZX_P_BI_4X4); - } - return rc; -} - -/* st1b_mzx_p_br.xml */ -int st1b_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1200000) { - decode_fields32(ENC_ST1B_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_ST1B_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA1208000) { - decode_fields32(ENC_ST1B_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_ST1B_MZX_P_BR_4X4); - } - return rc; -} - -/* st1b_z_p_ai.xml */ -int st1b_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 111|0010|msz=00|11|imm5=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE460A000) { - decode_fields32(ENC_ST1B_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->offset = UINT(ctx->imm5); - OK(ENC_ST1B_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 111|0010|msz=00|10|imm5=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE440A000) { - decode_fields32(ENC_ST1B_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offset = UINT(ctx->imm5); - OK(ENC_ST1B_Z_P_AI_D); - } - return rc; -} - -/* st1b_z_p_bi.xml */ -int st1b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|size=xx|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFF90E000)==0xE400E000) { - decode_fields32(ENC_ST1B_Z_P_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->msize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1B_Z_P_BI_); - } - return rc; -} - -/* st1b_z_p_br.xml */ -int st1b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|00|size=xx|Rm!=11111|0|1|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFF80E000)==0xE4004000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST1B_Z_P_BR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->msize = 8; - OK(ENC_ST1B_Z_P_BR_); - } - return rc; -} - -/* st1b_z_p_bz.xml */ -int st1b_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 111|0010|msz=00|00|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE4008000) { - decode_fields32(ENC_ST1B_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_ST1B_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 111|0010|msz=00|10|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE4408000) { - decode_fields32(ENC_ST1B_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_ST1B_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 111|0010|msz=00|00|Zm=xxxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE400A000) { - decode_fields32(ENC_ST1B_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_ST1B_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* st1b_za_p_rrr.xml */ -int st1b_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=00|1|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|off4=xxxx */ - if((INSWORD & 0xFFE00010)==0xE0200000) { - decode_fields32(ENC_ST1B_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = 0; - ctx->offset = UINT(ctx->off4); - ctx->esize = 8; - ctx->vertical = ctx->V==1; - OK(ENC_ST1B_ZA_P_RRR_); - } - return rc; -} - -/* st1d_mz_p_bi.xml */ -int st1d_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0606000) { - decode_fields32(ENC_ST1D_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1D_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA060E000) { - decode_fields32(ENC_ST1D_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1D_MZ_P_BI_4); - } - return rc; -} - -/* st1d_mz_p_br.xml */ -int st1d_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0206000) { - decode_fields32(ENC_ST1D_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - OK(ENC_ST1D_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA020E000) { - decode_fields32(ENC_ST1D_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - OK(ENC_ST1D_MZ_P_BR_4); - } - return rc; -} - -/* st1d_mzx_p_bi.xml */ -int st1d_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1606000) { - decode_fields32(ENC_ST1D_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1D_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA160E000) { - decode_fields32(ENC_ST1D_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1D_MZX_P_BI_4X4); - } - return rc; -} - -/* st1d_mzx_p_br.xml */ -int st1d_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1206000) { - decode_fields32(ENC_ST1D_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_ST1D_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA120E000) { - decode_fields32(ENC_ST1D_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_ST1D_MZX_P_BR_4X4); - } - return rc; -} - -/* st1d_z_p_ai.xml */ -int st1d_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|10|imm5=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5C0A000) { - decode_fields32(ENC_ST1D_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offset = UINT(ctx->imm5); - OK(ENC_ST1D_Z_P_AI_D); - } - return rc; -} - -/* st1d_z_p_bi.xml */ -int st1d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit_element */ - /* 111|0010|msz=11|opc=11|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE5E0E000) { - decode_fields32(ENC_ST1D_Z_P_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1D_Z_P_BI_); - } - /* class iclass_128_bit_element */ - /* 111|0010|msz=11|opc=10|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE5C0E000) { - decode_fields32(ENC_ST1D_Z_P_BI_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1D_Z_P_BI_U128); - } - return rc; -} - -/* st1d_z_p_br.xml */ -int st1d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_64_bit_element */ - /* 111|0010|opc=111|o2=1|Rm!=11111|0|1|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5E04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST1D_Z_P_BR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - OK(ENC_ST1D_Z_P_BR_); - } - /* class iclass_128_bit_element */ - /* 111|0010|opc=111|o2=0|Rm!=11111|0|1|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5C04000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST1D_Z_P_BR_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x40; - OK(ENC_ST1D_Z_P_BR_U128); - } - return rc; -} - -/* st1d_z_p_bz.xml */ -int st1d_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 111|0010|msz=11|01|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE5A08000) { - decode_fields32(ENC_ST1D_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 3; - OK(ENC_ST1D_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 111|0010|msz=11|00|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE5808000) { - decode_fields32(ENC_ST1D_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_ST1D_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 111|0010|msz=11|01|Zm=xxxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5A0A000) { - decode_fields32(ENC_ST1D_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 3; - OK(ENC_ST1D_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 111|0010|msz=11|00|Zm=xxxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE580A000) { - decode_fields32(ENC_ST1D_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_ST1D_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* st1d_za_p_rrr.xml */ -int st1d_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=11|1|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=xxx|o1=x */ - if((INSWORD & 0xFFE00010)==0xE0E00000) { - decode_fields32(ENC_ST1D_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = UINT(ctx->o1); - ctx->esize = 0x40; - ctx->vertical = ctx->V==1; - OK(ENC_ST1D_ZA_P_RRR_); - } - return rc; -} - -/* st1h_mz_p_bi.xml */ -int st1h_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0602000) { - decode_fields32(ENC_ST1H_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1H_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA060A000) { - decode_fields32(ENC_ST1H_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1H_MZ_P_BI_4); - } - return rc; -} - -/* st1h_mz_p_br.xml */ -int st1h_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0202000) { - decode_fields32(ENC_ST1H_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - OK(ENC_ST1H_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA020A000) { - decode_fields32(ENC_ST1H_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - OK(ENC_ST1H_MZ_P_BR_4); - } - return rc; -} - -/* st1h_mzx_p_bi.xml */ -int st1h_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1602000) { - decode_fields32(ENC_ST1H_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1H_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA160A000) { - decode_fields32(ENC_ST1H_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1H_MZX_P_BI_4X4); - } - return rc; -} - -/* st1h_mzx_p_br.xml */ -int st1h_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1202000) { - decode_fields32(ENC_ST1H_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_ST1H_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA120A000) { - decode_fields32(ENC_ST1H_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_ST1H_MZX_P_BR_4X4); - } - return rc; -} - -/* st1h_z_p_ai.xml */ -int st1h_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 111|0010|msz=01|11|imm5=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4E0A000) { - decode_fields32(ENC_ST1H_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offset = UINT(ctx->imm5); - OK(ENC_ST1H_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 111|0010|msz=01|10|imm5=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4C0A000) { - decode_fields32(ENC_ST1H_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offset = UINT(ctx->imm5); - OK(ENC_ST1H_Z_P_AI_D); - } - return rc; -} - -/* st1h_z_p_bi.xml */ -int st1h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|size=xx|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFF90E000)==0xE480E000) { - decode_fields32(ENC_ST1H_Z_P_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->msize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1H_Z_P_BI_); - } - return rc; -} - -/* st1h_z_p_br.xml */ -int st1h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|01|size=xx|Rm!=11111|0|1|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFF80E000)==0xE4804000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST1H_Z_P_BR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = (8) << (UINT(ctx->size)); - ctx->msize = 0x10; - OK(ENC_ST1H_Z_P_BR_); - } - return rc; -} - -/* st1h_z_p_bz.xml */ -int st1h_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 111|0010|msz=01|11|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE4E08000) { - decode_fields32(ENC_ST1H_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_ST1H_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 111|0010|msz=01|01|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE4A08000) { - decode_fields32(ENC_ST1H_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 1; - OK(ENC_ST1H_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 111|0010|msz=01|00|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE4808000) { - decode_fields32(ENC_ST1H_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_ST1H_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 111|0010|msz=01|10|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE4C08000) { - decode_fields32(ENC_ST1H_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_ST1H_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 111|0010|msz=01|01|Zm=xxxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4A0A000) { - decode_fields32(ENC_ST1H_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 1; - OK(ENC_ST1H_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 111|0010|msz=01|00|Zm=xxxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE480A000) { - decode_fields32(ENC_ST1H_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_ST1H_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* st1h_za_p_rrr.xml */ -int st1h_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=01|1|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=x|off3=xxx */ - if((INSWORD & 0xFFE00010)==0xE0600000) { - decode_fields32(ENC_ST1H_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = UINT(ctx->off3); - ctx->esize = 0x10; - ctx->vertical = ctx->V==1; - OK(ENC_ST1H_ZA_P_RRR_); - } - return rc; -} - -/* st1q_z_p_ar.xml */ -int st1q_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|000|1|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4202000) { - decode_fields32(ENC_ST1Q_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - OK(ENC_ST1Q_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* st1q_za_p_rrr.xml */ -int st1q_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|1111|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=xxxx */ - if((INSWORD & 0xFFE00010)==0xE1E00000) { - decode_fields32(ENC_ST1Q_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = 0; - ctx->esize = 0x80; - ctx->vertical = ctx->V==1; - OK(ENC_ST1Q_ZA_P_RRR_); - } - return rc; -} - -/* st1w_mz_p_bi.xml */ -int st1w_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFF0E001)==0xA0604000) { - decode_fields32(ENC_ST1W_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1W_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFF0E003)==0xA060C000) { - decode_fields32(ENC_ST1W_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1W_MZ_P_BI_4); - } - return rc; -} - -/* st1w_mz_p_br.xml */ -int st1w_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=0 */ - if((INSWORD & 0xFFE0E001)==0xA0204000) { - decode_fields32(ENC_ST1W_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - OK(ENC_ST1W_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=0 */ - if((INSWORD & 0xFFE0E003)==0xA020C000) { - decode_fields32(ENC_ST1W_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - OK(ENC_ST1W_MZ_P_BR_4); - } - return rc; -} - -/* st1w_mzx_p_bi.xml */ -int st1w_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1604000) { - decode_fields32(ENC_ST1W_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1W_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA160C000) { - decode_fields32(ENC_ST1W_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1W_MZX_P_BI_4X4); - } - return rc; -} - -/* st1w_mzx_p_br.xml */ -int st1w_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1204000) { - decode_fields32(ENC_ST1W_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_ST1W_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=0|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA120C000) { - decode_fields32(ENC_ST1W_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_ST1W_MZX_P_BR_4X4); - } - return rc; -} - -/* st1w_z_p_ai.xml */ -int st1w_z_p_ai(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_element */ - /* 111|0010|msz=10|11|imm5=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE560A000) { - decode_fields32(ENC_ST1W_Z_P_AI_S, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->offset = UINT(ctx->imm5); - OK(ENC_ST1W_Z_P_AI_S); - } - /* class iclass_64_bit_element */ - /* 111|0010|msz=10|10|imm5=xxxxx|101|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE540A000) { - decode_fields32(ENC_ST1W_Z_P_AI_D, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offset = UINT(ctx->imm5); - OK(ENC_ST1W_Z_P_AI_D); - } - return rc; -} - -/* st1w_z_p_bi.xml */ -int st1w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_and_64_bit_elements */ - /* 111|0010|msz=10|1|sz=x|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFD0E000)==0xE540E000) { - decode_fields32(ENC_ST1W_Z_P_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->msize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1W_Z_P_BI_); - } - /* class iclass_128_bit_element */ - /* 111|0010|msz=10|opc=00|0|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE500E000) { - decode_fields32(ENC_ST1W_Z_P_BI_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_ST1W_Z_P_BI_U128); - } - return rc; -} - -/* st1w_z_p_br.xml */ -int st1w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_and_64_bit_elements */ - /* 111|0010|opc=101|sz=x|Rm!=11111|0|1|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0xE5404000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST1W_Z_P_BR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->msize = 0x20; - OK(ENC_ST1W_Z_P_BR_); - } - /* class iclass_128_bit_element */ - /* 111|0010|opc=100|o2=0|Rm!=11111|0|1|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5004000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST1W_Z_P_BR_U128, ctx, instr); - if(!HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->msize = 0x20; - OK(ENC_ST1W_Z_P_BR_U128); - } - return rc; -} - -/* st1w_z_p_bz.xml */ -int st1w_z_p_bz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_scaled_offset */ - /* 111|0010|msz=10|11|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE5608000) { - decode_fields32(ENC_ST1W_Z_P_BZ_S_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_ST1W_Z_P_BZ_S_X32_SCALED); - } - /* class iclass_32_bit_unpacked_scaled_offset */ - /* 111|0010|msz=10|01|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE5208000) { - decode_fields32(ENC_ST1W_Z_P_BZ_D_X32_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 2; - OK(ENC_ST1W_Z_P_BZ_D_X32_SCALED); - } - /* class iclass_32_bit_unpacked_unscaled_offset */ - /* 111|0010|msz=10|00|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE5008000) { - decode_fields32(ENC_ST1W_Z_P_BZ_D_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_ST1W_Z_P_BZ_D_X32_UNSCALED); - } - /* class iclass_32_bit_unscaled_offset */ - /* 111|0010|msz=10|10|Zm=xxxxx|1|xs=x|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0A000)==0xE5408000) { - decode_fields32(ENC_ST1W_Z_P_BZ_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - ctx->offs_size = 0x20; - ctx->offs_unsigned = ctx->xs==0; - ctx->scale = 0; - OK(ENC_ST1W_Z_P_BZ_S_X32_UNSCALED); - } - /* class iclass_64_bit_scaled_offset */ - /* 111|0010|msz=10|01|Zm=xxxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE520A000) { - decode_fields32(ENC_ST1W_Z_P_BZ_D_64_SCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 2; - OK(ENC_ST1W_Z_P_BZ_D_64_SCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 111|0010|msz=10|00|Zm=xxxxx|101|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE500A000) { - decode_fields32(ENC_ST1W_Z_P_BZ_D_64_UNSCALED, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Zm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - ctx->offs_size = 0x40; - ctx->offs_unsigned = TRUE; - ctx->scale = 0; - OK(ENC_ST1W_Z_P_BZ_D_64_UNSCALED); - } - return rc; -} - -/* st1w_za_p_rrr.xml */ -int st1w_za_p_rrr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|0|msz=10|1|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|0|ZAt=xx|off2=xx */ - if((INSWORD & 0xFFE00010)==0xE0A00000) { - decode_fields32(ENC_ST1W_ZA_P_RRR_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->s = UINT(((3<<2)|ctx->Rs)); - ctx->t = UINT(ctx->ZAt); - ctx->offset = UINT(ctx->off2); - ctx->esize = 0x20; - ctx->vertical = ctx->V==1; - OK(ENC_ST1W_ZA_P_RRR_); - } - return rc; -} - -/* st2b_z_p_bi.xml */ -int st2b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|opc=01|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE430E000) { - decode_fields32(ENC_ST2B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_ST2B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st2b_z_p_br.xml */ -int st2b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|opc=01|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4206000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST2B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->nreg = 2; - OK(ENC_ST2B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st2d_z_p_bi.xml */ -int st2d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|opc=01|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE5B0E000) { - decode_fields32(ENC_ST2D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_ST2D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st2d_z_p_br.xml */ -int st2d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|opc=01|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5A06000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST2D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->nreg = 2; - OK(ENC_ST2D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st2h_z_p_bi.xml */ -int st2h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|opc=01|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE4B0E000) { - decode_fields32(ENC_ST2H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_ST2H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st2h_z_p_br.xml */ -int st2h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|opc=01|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4A06000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST2H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->nreg = 2; - OK(ENC_ST2H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st2q_z_p_bi.xml */ -int st2q_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|0|num=01|00|imm4=xxxx|0|0|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE4400000) { - decode_fields32(ENC_ST2Q_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_ST2Q_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st2q_z_p_br.xml */ -int st2q_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|0|num=01|1|Rm!=11111|0|0|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4600000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST2Q_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->nreg = 2; - OK(ENC_ST2Q_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st2w_z_p_bi.xml */ -int st2w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|opc=01|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE530E000) { - decode_fields32(ENC_ST2W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 2; - OK(ENC_ST2W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st2w_z_p_br.xml */ -int st2w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|opc=01|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5206000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST2W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->nreg = 2; - OK(ENC_ST2W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st3b_z_p_bi.xml */ -int st3b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|opc=10|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE450E000) { - decode_fields32(ENC_ST3B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_ST3B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st3b_z_p_br.xml */ -int st3b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|opc=10|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4406000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST3B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->nreg = 3; - OK(ENC_ST3B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st3d_z_p_bi.xml */ -int st3d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|opc=10|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE5D0E000) { - decode_fields32(ENC_ST3D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_ST3D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st3d_z_p_br.xml */ -int st3d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|opc=10|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5C06000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST3D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->nreg = 3; - OK(ENC_ST3D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st3h_z_p_bi.xml */ -int st3h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|opc=10|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE4D0E000) { - decode_fields32(ENC_ST3H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_ST3H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st3h_z_p_br.xml */ -int st3h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|opc=10|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4C06000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST3H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->nreg = 3; - OK(ENC_ST3H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st3q_z_p_bi.xml */ -int st3q_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|0|num=10|00|imm4=xxxx|0|0|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE4800000) { - decode_fields32(ENC_ST3Q_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_ST3Q_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st3q_z_p_br.xml */ -int st3q_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|0|num=10|1|Rm!=11111|0|0|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4A00000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST3Q_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->nreg = 3; - OK(ENC_ST3Q_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st3w_z_p_bi.xml */ -int st3w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|opc=10|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE550E000) { - decode_fields32(ENC_ST3W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 3; - OK(ENC_ST3W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st3w_z_p_br.xml */ -int st3w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|opc=10|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5406000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST3W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->nreg = 3; - OK(ENC_ST3W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st4b_z_p_bi.xml */ -int st4b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|opc=11|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE470E000) { - decode_fields32(ENC_ST4B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_ST4B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st4b_z_p_br.xml */ -int st4b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|opc=11|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4606000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST4B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->nreg = 4; - OK(ENC_ST4B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st4d_z_p_bi.xml */ -int st4d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|opc=11|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE5F0E000) { - decode_fields32(ENC_ST4D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_ST4D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st4d_z_p_br.xml */ -int st4d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|opc=11|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5E06000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST4D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->nreg = 4; - OK(ENC_ST4D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st4h_z_p_bi.xml */ -int st4h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|opc=11|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE4F0E000) { - decode_fields32(ENC_ST4H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_ST4H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st4h_z_p_br.xml */ -int st4h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|opc=11|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4E06000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST4H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->nreg = 4; - OK(ENC_ST4H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st4q_z_p_bi.xml */ -int st4q_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|0|num=11|00|imm4=xxxx|0|0|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE4C00000) { - decode_fields32(ENC_ST4Q_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_ST4Q_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st4q_z_p_br.xml */ -int st4q_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|0|num=11|1|Rm!=11111|0|0|0|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4E00000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST4Q_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x80; - ctx->nreg = 4; - OK(ENC_ST4Q_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* st4w_z_p_bi.xml */ -int st4w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|opc=11|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE570E000) { - decode_fields32(ENC_ST4W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - ctx->nreg = 4; - OK(ENC_ST4W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* st4w_z_p_br.xml */ -int st4w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|opc=11|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5606000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_ST4W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->nreg = 4; - OK(ENC_ST4W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* stmopa_za32_zzzi.xml */ -int stmopa_za32_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|u0=0|01|0|Zm=xxxxx|1|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|1|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x80408008) { - decode_fields32(ENC_STMOPA_ZA32_ZZZI_H2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->unsigned_ = FALSE; - OK(ENC_STMOPA_ZA32_ZZZI_H2X1); - } - return rc; -} - -/* stmopa_za_zzzi.xml */ -int stmopa_za_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|u0=0|01|u1=0|Zm=xxxxx|1|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x80408000) { - decode_fields32(ENC_STMOPA_ZA_ZZZI_B2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = FALSE; - OK(ENC_STMOPA_ZA_ZZZI_B2X1); - } - return rc; -} - -/* stnt1b_mz_p_bi.xml */ -int stnt1b_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0600001) { - decode_fields32(ENC_STNT1B_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1B_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA0608001) { - decode_fields32(ENC_STNT1B_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1B_MZ_P_BI_4); - } - return rc; -} - -/* stnt1b_mz_p_br.xml */ -int stnt1b_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0200001) { - decode_fields32(ENC_STNT1B_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 8; - OK(ENC_STNT1B_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA0208001) { - decode_fields32(ENC_STNT1B_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 8; - OK(ENC_STNT1B_MZ_P_BR_4); - } - return rc; -} - -/* stnt1b_mzx_p_bi.xml */ -int stnt1b_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1600008) { - decode_fields32(ENC_STNT1B_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1B_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA1608008) { - decode_fields32(ENC_STNT1B_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1B_MZX_P_BI_4X4); - } - return rc; -} - -/* stnt1b_mzx_p_br.xml */ -int stnt1b_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1200008) { - decode_fields32(ENC_STNT1B_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_STNT1B_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=00|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA1208008) { - decode_fields32(ENC_STNT1B_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 8; - OK(ENC_STNT1B_MZX_P_BR_4X4); - } - return rc; -} - -/* stnt1b_z_p_ar.xml */ -int stnt1b_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 111|0010|msz=00|1|0|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4402000) { - decode_fields32(ENC_STNT1B_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 8; - OK(ENC_STNT1B_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 111|0010|msz=00|0|0|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4002000) { - decode_fields32(ENC_STNT1B_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 8; - OK(ENC_STNT1B_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* stnt1b_z_p_bi.xml */ -int stnt1b_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|00|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE410E000) { - decode_fields32(ENC_STNT1B_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1B_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* stnt1b_z_p_br.xml */ -int stnt1b_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=00|00|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4006000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_STNT1B_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 8; - OK(ENC_STNT1B_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* stnt1d_mz_p_bi.xml */ -int stnt1d_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0606001) { - decode_fields32(ENC_STNT1D_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1D_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA060E001) { - decode_fields32(ENC_STNT1D_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1D_MZ_P_BI_4); - } - return rc; -} - -/* stnt1d_mz_p_br.xml */ -int stnt1d_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0206001) { - decode_fields32(ENC_STNT1D_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x40; - OK(ENC_STNT1D_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA020E001) { - decode_fields32(ENC_STNT1D_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x40; - OK(ENC_STNT1D_MZ_P_BR_4); - } - return rc; -} - -/* stnt1d_mzx_p_bi.xml */ -int stnt1d_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1606008) { - decode_fields32(ENC_STNT1D_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1D_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA160E008) { - decode_fields32(ENC_STNT1D_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1D_MZX_P_BI_4X4); - } - return rc; -} - -/* stnt1d_mzx_p_br.xml */ -int stnt1d_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1206008) { - decode_fields32(ENC_STNT1D_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_STNT1D_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=11|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA120E008) { - decode_fields32(ENC_STNT1D_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x40; - OK(ENC_STNT1D_MZX_P_BR_4X4); - } - return rc; -} - -/* stnt1d_z_p_ar.xml */ -int stnt1d_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 111|0010|msz=11|0|0|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5802000) { - decode_fields32(ENC_STNT1D_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x40; - OK(ENC_STNT1D_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* stnt1d_z_p_bi.xml */ -int stnt1d_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|00|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE590E000) { - decode_fields32(ENC_STNT1D_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1D_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* stnt1d_z_p_br.xml */ -int stnt1d_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=11|00|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5806000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_STNT1D_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - OK(ENC_STNT1D_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* stnt1h_mz_p_bi.xml */ -int stnt1h_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0602001) { - decode_fields32(ENC_STNT1H_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1H_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA060A001) { - decode_fields32(ENC_STNT1H_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1H_MZ_P_BI_4); - } - return rc; -} - -/* stnt1h_mz_p_br.xml */ -int stnt1h_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0202001) { - decode_fields32(ENC_STNT1H_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x10; - OK(ENC_STNT1H_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA020A001) { - decode_fields32(ENC_STNT1H_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x10; - OK(ENC_STNT1H_MZ_P_BR_4); - } - return rc; -} - -/* stnt1h_mzx_p_bi.xml */ -int stnt1h_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1602008) { - decode_fields32(ENC_STNT1H_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1H_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA160A008) { - decode_fields32(ENC_STNT1H_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1H_MZX_P_BI_4X4); - } - return rc; -} - -/* stnt1h_mzx_p_br.xml */ -int stnt1h_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1202008) { - decode_fields32(ENC_STNT1H_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_STNT1H_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=01|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA120A008) { - decode_fields32(ENC_STNT1H_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x10; - OK(ENC_STNT1H_MZX_P_BR_4X4); - } - return rc; -} - -/* stnt1h_z_p_ar.xml */ -int stnt1h_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 111|0010|msz=01|1|0|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4C02000) { - decode_fields32(ENC_STNT1H_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x10; - OK(ENC_STNT1H_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 111|0010|msz=01|0|0|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4802000) { - decode_fields32(ENC_STNT1H_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x10; - OK(ENC_STNT1H_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* stnt1h_z_p_bi.xml */ -int stnt1h_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|00|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE490E000) { - decode_fields32(ENC_STNT1H_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1H_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* stnt1h_z_p_br.xml */ -int stnt1h_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=01|00|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE4806000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_STNT1H_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x10; - OK(ENC_STNT1H_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* stnt1w_mz_p_bi.xml */ -int stnt1w_mz_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|110|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFF0E001)==0xA0604001) { - decode_fields32(ENC_STNT1W_MZ_P_BI_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1W_MZ_P_BI_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|110|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFF0E003)==0xA060C001) { - decode_fields32(ENC_STNT1W_MZ_P_BI_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1W_MZ_P_BI_4); - } - return rc; -} - -/* stnt1w_mz_p_br.xml */ -int stnt1w_mz_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=1 */ - if((INSWORD & 0xFFE0E001)==0xA0204001) { - decode_fields32(ENC_STNT1W_MZ_P_BR_2, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->t = UINT((ctx->Zt<<1)); - ctx->esize = 0x20; - OK(ENC_STNT1W_MZ_P_BR_2); - } - /* class iclass_four_registers */ - /* 1|01|0000|00|01|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|Zt=xxx|0|N=1 */ - if((INSWORD & 0xFFE0E003)==0xA020C001) { - decode_fields32(ENC_STNT1W_MZ_P_BR_4, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->t = UINT((ctx->Zt<<2)); - ctx->esize = 0x20; - OK(ENC_STNT1W_MZ_P_BR_4); - } - return rc; -} - -/* stnt1w_mzx_p_bi.xml */ -int stnt1w_mzx_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|110|imm4=xxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFF0E008)==0xA1604008) { - decode_fields32(ENC_STNT1W_MZX_P_BI_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1W_MZX_P_BI_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|110|imm4=xxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFF0E00C)==0xA160C008) { - decode_fields32(ENC_STNT1W_MZX_P_BI_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1W_MZX_P_BI_4X4); - } - return rc; -} - -/* stnt1w_mzx_p_br.xml */ -int stnt1w_mzx_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|0|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|Zt=xxx */ - if((INSWORD & 0xFFE0E008)==0xA1204008) { - decode_fields32(ENC_STNT1W_MZX_P_BR_2X8, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 2; - ctx->tstride = 8; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_STNT1W_MZX_P_BR_2X8); - } - /* class iclass_four_registers */ - /* 1|01|0000|10|01|Rm=xxxxx|1|msz=10|PNg=xxx|Rn=xxxxx|T=x|N=1|0|Zt=xx */ - if((INSWORD & 0xFFE0E00C)==0xA120C008) { - decode_fields32(ENC_STNT1W_MZX_P_BR_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(((1<<3)|ctx->PNg)); - ctx->nreg = 4; - ctx->tstride = 4; - ctx->t = UINT(((ctx->T<<4)|ctx->Zt)); - ctx->esize = 0x20; - OK(ENC_STNT1W_MZX_P_BR_4X4); - } - return rc; -} - -/* stnt1w_z_p_ar.xml */ -int stnt1w_z_p_ar(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_unscaled_offset */ - /* 111|0010|msz=10|1|0|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5402000) { - decode_fields32(ENC_STNT1W_Z_P_AR_S_X32_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->msize = 0x20; - OK(ENC_STNT1W_Z_P_AR_S_X32_UNSCALED); - } - /* class iclass_64_bit_unscaled_offset */ - /* 111|0010|msz=10|0|0|Rm=xxxxx|001|Pg=xxx|Zn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5002000) { - decode_fields32(ENC_STNT1W_Z_P_AR_D_64_UNSCALED, ctx, instr); - if(!HaveSVE2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x40; - ctx->msize = 0x20; - OK(ENC_STNT1W_Z_P_AR_D_64_UNSCALED); - } - return rc; -} - -/* stnt1w_z_p_bi.xml */ -int stnt1w_z_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|00|1|imm4=xxxx|111|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFF0E000)==0xE510E000) { - decode_fields32(ENC_STNT1W_Z_P_BI_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - ctx->offset = SInt(ctx->imm4,4); - OK(ENC_STNT1W_Z_P_BI_CONTIGUOUS); - } - return rc; -} - -/* stnt1w_z_p_br.xml */ -int stnt1w_z_p_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|msz=10|00|Rm!=11111|011|Pg=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFE0E000)==0xE5006000 && (INSWORD & 0x1F0000)!=0x1F0000) { - decode_fields32(ENC_STNT1W_Z_P_BR_CONTIGUOUS, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->Rm==0x1f) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->g = UINT(ctx->Pg); - ctx->esize = 0x20; - OK(ENC_STNT1W_Z_P_BR_CONTIGUOUS); - } - return rc; -} - -/* str_p_bi.xml */ -int str_p_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|110|imm9h=xxxxxx|0|0|0|imm9l=xxx|Rn=xxxxx|0|Pt=xxxx */ - if((INSWORD & 0xFFC0E010)==0xE5800000) { - decode_fields32(ENC_STR_P_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Pt); - ctx->n = UINT(ctx->Rn); - ctx->imm = SInt(((ctx->imm9h<<3)|ctx->imm9l),9); - OK(ENC_STR_P_BI_); - } - return rc; -} - -/* str_z_bi.xml */ -int str_z_bi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 111|0010|110|imm9h=xxxxxx|0|1|0|imm9l=xxx|Rn=xxxxx|Zt=xxxxx */ - if((INSWORD & 0xFFC0E000)==0xE5804000) { - decode_fields32(ENC_STR_Z_BI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->t = UINT(ctx->Zt); - ctx->n = UINT(ctx->Rn); - ctx->imm = SInt(((ctx->imm9h<<3)|ctx->imm9l),9); - OK(ENC_STR_Z_BI_); - } - return rc; -} - -/* str_za_ri.xml */ -int str_za_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|11|0000|100|op=1|00000|0|Rv=xx|000|Rn=xxxxx|0|off4=xxxx */ - if((INSWORD & 0xFFFF9C10)==0xE1200000) { - decode_fields32(ENC_STR_ZA_RI_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - ctx->v = UINT(((3<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off4); - OK(ENC_STR_ZA_RI_); - } - return rc; -} - -/* str_zt_br.xml */ -int str_zt_br(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|11|0000|100|opc=111111|1|00000|Rn=xxxxx|000|opc2=00 */ - if((INSWORD & 0xFFFFFC1F)==0xE13F8000) { - decode_fields32(ENC_STR_ZT_BR_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Rn); - OK(ENC_STR_ZT_BR_); - } - return rc; -} - -/* sub_z_p_zz.xml */ -int sub_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|00|opc=001|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4010000) { - decode_fields32(ENC_SUB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SUB_Z_P_ZZ_); - } - return rc; -} - -/* sub_z_zi.xml */ -int sub_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|00|opc=001|11|sh=x|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2521C000) { - decode_fields32(ENC_SUB_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = UINT(ctx->imm8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - OK(ENC_SUB_Z_ZI_); - } - return rc; -} - -/* sub_z_zz.xml */ -int sub_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|000|opc=001|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4200400) { - decode_fields32(ENC_SUB_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SUB_Z_ZZ_); - } - return rc; -} - -/* sub_za_zw.xml */ -int sub_za_zw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|00|Rv=xx|111|Zm=xxxx|0|1|S=1|off3=xxx */ - if((INSWORD & 0xFFBF9C38)==0xC1A01C18) { - decode_fields32(ENC_SUB_ZA_ZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SUB_ZA_ZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|00|00|10|Rv=xx|111|Zm=xxx|00|1|S=1|off3=xxx */ - if((INSWORD & 0xFFBF9C78)==0xC1A11C18) { - decode_fields32(ENC_SUB_ZA_ZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SUB_ZA_ZW_4X4); - } - return rc; -} - -/* sub_za_zzv.xml */ -int sub_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|1|S=1|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1201818) { - decode_fields32(ENC_SUB_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SUB_ZA_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|110|Zn=xxxxx|1|S=1|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1301818) { - decode_fields32(ENC_SUB_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SUB_ZA_ZZV_4X1); - } - return rc; -} - -/* sub_za_zzw.xml */ -int sub_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|110|Zn=xxxx|0|1|S=1|off3=xxx */ - if((INSWORD & 0xFFA19C38)==0xC1A01818) { - decode_fields32(ENC_SUB_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SUB_ZA_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|110|Zn=xxx|00|1|S=1|off3=xxx */ - if((INSWORD & 0xFFA39C78)==0xC1A11818) { - decode_fields32(ENC_SUB_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SUB_ZA_ZZW_4X4); - } - return rc; -} - -/* subhnb_z_zz.xml */ -int subhnb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=1|R=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45207000) { - decode_fields32(ENC_SUBHNB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SUBHNB_Z_ZZ_); - } - return rc; -} - -/* subhnt_z_zz.xml */ -int subhnt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|1|Zm=xxxxx|0|11|S=1|R=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45207400) { - decode_fields32(ENC_SUBHNT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SUBHNT_Z_ZZ_); - } - return rc; -} - -/* subp_z_p_zz.xml */ -int subp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|opc=00|U=0|10|1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4410A000) { - decode_fields32(ENC_SUBP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_SUBP_Z_P_ZZ_); - } - return rc; -} - -/* subpt_z_p_zz.xml */ -int subpt_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=11|0|00|opc=101|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x4C50000) { - decode_fields32(ENC_SUBPT_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() || !HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SUBPT_Z_P_ZZ_); - } - return rc; -} - -/* subpt_z_zz.xml */ -int subpt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=11|1|Zm=xxxxx|000|opc=011|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4E00C00) { - decode_fields32(ENC_SUBPT_Z_ZZ_, ctx, instr); - if(!HaveSVE() || !HaveCPA()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_SUBPT_Z_ZZ_); - } - return rc; -} - -/* subr_z_p_zz.xml */ -int subr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|00|opc=011|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4030000) { - decode_fields32(ENC_SUBR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SUBR_Z_P_ZZ_); - } - return rc; -} - -/* subr_z_zi.xml */ -int subr_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|00|opc=011|11|sh=x|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2523C000) { - decode_fields32(ENC_SUBR_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = UINT(ctx->imm8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - OK(ENC_SUBR_Z_ZI_); - } - return rc; -} - -/* sudot_z_zzzi.xml */ -int sudot_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00011|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A01C00) { - decode_fields32(ENC_SUDOT_Z_ZZZI_S, ctx, instr); - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_SUDOT_Z_ZZZI_S); - } - return rc; -} - -/* sudot_za_zzi.xml */ -int sudot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|1|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501038) { - decode_fields32(ENC_SUDOT_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_SUDOT_ZA_ZZI_S2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|1|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509038) { - decode_fields32(ENC_SUDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_SUDOT_ZA_ZZI_S4XI); - } - return rc; -} - -/* sudot_za_zzv.xml */ -int sudot_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201418) { - decode_fields32(ENC_SUDOT_ZA_ZZV_S2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_SUDOT_ZA_ZZV_S2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301418) { - decode_fields32(ENC_SUDOT_ZA_ZZV_S4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_SUDOT_ZA_ZZV_S4X1); - } - return rc; -} - -/* sumlall_za_zzi.xml */ -int sumlall_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|1|00|00|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|U=1|S=0|op=1|off2=xx */ - if((INSWORD & 0xFFF0001C)==0xC1000014) { - decode_fields32(ENC_SUMLALL_ZA_ZZI_S, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i4h<<3)|ctx->i4l)); - ctx->nreg = 1; - OK(ENC_SUMLALL_ZA_ZZI_S); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|0|i4h=xx|Zn=xxxx|op=1|U=1|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09038)==0xC1100030) { - decode_fields32(ENC_SUMLALL_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_SUMLALL_ZA_ZZI_S2XI); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|0|i4h=xx|Zn=xxx|0|op=1|U=1|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09078)==0xC1108030) { - decode_fields32(ENC_SUMLALL_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_SUMLALL_ZA_ZZI_S4XI); - } - return rc; -} - -/* sumlall_za_zzv.xml */ -int sumlall_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|10|sz=0|10|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=1|S=0|op=1|0|o1=x */ - if((INSWORD & 0xFFF09C1E)==0xC1200014) { - decode_fields32(ENC_SUMLALL_ZA_ZZV_S2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_SUMLALL_ZA_ZZV_S2X1); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|10|sz=0|11|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=1|S=0|op=1|0|o1=x */ - if((INSWORD & 0xFFF09C1E)==0xC1300014) { - decode_fields32(ENC_SUMLALL_ZA_ZZV_S4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_SUMLALL_ZA_ZZV_S4X1); - } - return rc; -} - -/* sumop4a_za_zz.xml */ -int sumop4a_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80308000) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80208000) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80208200) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80308200) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0F00008) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0E00008) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0E00208) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0F00208) { - decode_fields32(ENC_SUMOP4A_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4A_ZA_ZZ_H2X2); - } - return rc; -} - -/* sumop4s_za_zz.xml */ -int sumop4s_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80308010) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80208010) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80208210) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=0|00|u1=1|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x80308210) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0F00018) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0E00018) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0E00218) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=0|11|u1=1|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA0F00218) { - decode_fields32(ENC_SUMOP4S_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOP4S_ZA_ZZ_H2X2); - } - return rc; -} - -/* sumopa_za_pp_zz.xml */ -int sumopa_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=0|10|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA0A00000) { - decode_fields32(ENC_SUMOPA_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOPA_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=0|11|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA0E00000) { - decode_fields32(ENC_SUMOPA_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOPA_ZA_PP_ZZ_64); - } - return rc; -} - -/* sumops_za_pp_zz.xml */ -int sumops_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=0|10|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA0A00010) { - decode_fields32(ENC_SUMOPS_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOPS_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=0|11|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA0E00010) { - decode_fields32(ENC_SUMOPS_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUMOPS_ZA_PP_ZZ_64); - } - return rc; -} - -/* sunpk_mz_z.xml */ -int sunpk_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|001|01|111000|Zn=xxxxx|Zd=xxxx|U=0 */ - if((INSWORD & 0xFF3FFC01)==0xC125E000) { - decode_fields32(ENC_SUNPK_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->unsigned_ = FALSE; - OK(ENC_SUNPK_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|101|01|111000|Zn=xxxx|0|Zd=xxx|0|U=0 */ - if((INSWORD & 0xFF3FFC23)==0xC135E000) { - decode_fields32(ENC_SUNPK_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->unsigned_ = FALSE; - OK(ENC_SUNPK_MZ_Z_4); - } - return rc; -} - -/* sunpkhi_z_z.xml */ -int sunpkhi_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_high_half */ - /* 000|0010|1|size=xx|1|10|0|U=0|H=1|001110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5313800) { - decode_fields32(ENC_SUNPKHI_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->hi = TRUE; - OK(ENC_SUNPKHI_Z_Z_); - } - /* class iclass_low_half */ - /* 000|0010|1|size=xx|1|10|0|U=0|H=0|001110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5303800) { - decode_fields32(ENC_SUNPKLO_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->hi = FALSE; - OK(ENC_SUNPKLO_Z_Z_); - } - return rc; -} - -/* suqadd_z_p_zz.xml */ -int suqadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=1|S=0|U=0|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x441C8000) { - decode_fields32(ENC_SUQADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_SUQADD_Z_P_ZZ_); - } - return rc; -} - -/* sutmopa_za_zzzi.xml */ -int sutmopa_za_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|u0=0|01|u1=1|Zm=xxxxx|1|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x80608000) { - decode_fields32(ENC_SUTMOPA_ZA_ZZZI_B2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = FALSE; - ctx->op2_unsigned = TRUE; - OK(ENC_SUTMOPA_ZA_ZZZI_B2X1); - } - return rc; -} - -/* suvdot_za_zzi.xml */ -int suvdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=0|i2=xx|Zn=xxx|0|1|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1508038) { - decode_fields32(ENC_SUVDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_SUVDOT_ZA_ZZI_S4XI); - } - return rc; -} - -/* svdot_za32_zzi.xml */ -int svdot_za32_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=0|i2=xx|Zn=xxxx|1|U=0|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1500020) { - decode_fields32(ENC_SVDOT_ZA32_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_SVDOT_ZA32_ZZI_2XI); - } - return rc; -} - -/* svdot_za_zzi.xml */ -int svdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_32_bit */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=0|i2=xx|Zn=xxx|0|1|U=0|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1508020) { - decode_fields32(ENC_SVDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_SVDOT_ZA_ZZI_S4XI); - } - /* class iclass_16_bit_to_64_bit */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|0|op=1|i1=x|Zn=xxx|00|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09878)==0xC1D08808) { - decode_fields32(ENC_SVDOT_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - OK(ENC_SVDOT_ZA_ZZI_D4XI); - } - return rc; -} - -/* sxtb_z_p_z.xml */ -int sxtb_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte_merging */ - /* 000|0010|0|size=xx|0|M=1|0|00|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x410A000) { - decode_fields32(ENC_SXTB_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->merging = TRUE; - OK(ENC_SXTB_Z_P_Z_M); - } - /* class iclass_byte_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|00|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x400A000) { - decode_fields32(ENC_SXTB_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->merging = FALSE; - OK(ENC_SXTB_Z_P_Z_Z); - } - /* class iclass_halfword_merging */ - /* 000|0010|0|size=xx|0|M=1|0|01|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x412A000) { - decode_fields32(ENC_SXTH_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->merging = TRUE; - OK(ENC_SXTH_Z_P_Z_M); - } - /* class iclass_halfword_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|01|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x402A000) { - decode_fields32(ENC_SXTH_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->merging = FALSE; - OK(ENC_SXTH_Z_P_Z_Z); - } - /* class iclass_word_merging */ - /* 000|0010|0|size=xx|0|M=1|0|10|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x414A000) { - decode_fields32(ENC_SXTW_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->merging = TRUE; - OK(ENC_SXTW_Z_P_Z_M); - } - /* class iclass_word_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|10|U=0|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x404A000) { - decode_fields32(ENC_SXTW_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = FALSE; - ctx->merging = FALSE; - OK(ENC_SXTW_Z_P_Z_Z); - } - return rc; -} - -/* tbl_z_zz.xml */ -int tbl_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_register_table */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|001100|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5203000) { - decode_fields32(ENC_TBL_Z_ZZ_1, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->double_table = FALSE; - OK(ENC_TBL_Z_ZZ_1); - } - /* class iclass_two_register_table */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|00101|op=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5202800) { - decode_fields32(ENC_TBL_Z_ZZ_2, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->double_table = TRUE; - OK(ENC_TBL_Z_ZZ_2); - } - return rc; -} - -/* tblq_z_zz.xml */ -int tblq_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|111|opc=110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400F800) { - decode_fields32(ENC_TBLQ_Z_ZZ_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_TBLQ_Z_ZZ_); - } - return rc; -} - -/* tbx_z_zz.xml */ -int tbx_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|00101|op=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5202C00) { - decode_fields32(ENC_TBX_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_TBX_Z_ZZ_); - } - return rc; -} - -/* tbxq_z_zz.xml */ -int tbxq_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|001101|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5203400) { - decode_fields32(ENC_TBXQ_Z_ZZ_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_TBXQ_Z_ZZ_); - } - return rc; -} - -/* trn1_p_pp.xml */ -int trn1_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_even */ - /* 000|0010|1|size=xx|1|0|Pm=xxxx|010|opc=10|H=0|0|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF30FE10)==0x5205000) { - decode_fields32(ENC_TRN1_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->part = 0; - OK(ENC_TRN1_P_PP_); - } - /* class iclass_odd */ - /* 000|0010|1|size=xx|1|0|Pm=xxxx|010|opc=10|H=1|0|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF30FE10)==0x5205400) { - decode_fields32(ENC_TRN2_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->part = 1; - OK(ENC_TRN2_P_PP_); - } - return rc; -} - -/* trn1_z_zz.xml */ -int trn1_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_even */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|011|10|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5207000) { - decode_fields32(ENC_TRN1_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_TRN1_Z_ZZ_); - } - /* class iclass_even_quadwords_ */ - /* 000|0010|11|0|1|Zm=xxxxx|000|opc=11|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5A01800) { - decode_fields32(ENC_TRN1_Z_ZZ_Q, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_TRN1_Z_ZZ_Q); - } - /* class iclass_odd */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|011|10|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5207400) { - decode_fields32(ENC_TRN2_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_TRN2_Z_ZZ_); - } - /* class iclass_odd_quadwords_ */ - /* 000|0010|11|0|1|Zm=xxxxx|000|opc=11|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5A01C00) { - decode_fields32(ENC_TRN2_Z_ZZ_Q, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_TRN2_Z_ZZ_Q); - } - return rc; -} - -/* uaba_z_zzz.xml */ -int uaba_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|11|111|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500FC00) { - decode_fields32(ENC_UABA_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->unsigned_ = TRUE; - OK(ENC_UABA_Z_ZZZ_); - } - return rc; -} - -/* uabal_z_zzz.xml */ -int uabal_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|1101|U=1|1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400DC00) { - decode_fields32(ENC_UABAL_Z_ZZ_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UABAL_Z_ZZ_); - } - return rc; -} - -/* uabalb_z_zzz.xml */ -int uabalb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|11|00|U=1|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500C800) { - decode_fields32(ENC_UABALB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UABALB_Z_ZZZ_); - } - return rc; -} - -/* uabalt_z_zzz.xml */ -int uabalt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|11|00|U=1|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500CC00) { - decode_fields32(ENC_UABALT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UABALT_Z_ZZZ_); - } - return rc; -} - -/* uabd_z_p_zz.xml */ -int uabd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|01|opc=10|U=1|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40D0000) { - decode_fields32(ENC_UABD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UABD_Z_P_ZZ_); - } - return rc; -} - -/* uabdlb_z_zz.xml */ -int uabdlb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=1|S=1|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45003800) { - decode_fields32(ENC_UABDLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_UABDLB_Z_ZZ_); - } - return rc; -} - -/* uabdlt_z_zz.xml */ -int uabdlt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=1|S=1|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45003C00) { - decode_fields32(ENC_UABDLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_UABDLT_Z_ZZ_); - } - return rc; -} - -/* uadalp_z_p_z.xml */ -int uadalp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0010|U=1|10|1|Pg=xxx|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4405A000) { - decode_fields32(ENC_UADALP_Z_P_Z_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->Zda); - OK(ENC_UADALP_Z_P_Z_); - } - return rc; -} - -/* uaddlb_z_zz.xml */ -int uaddlb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=0|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45000800) { - decode_fields32(ENC_UADDLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 0; - ctx->sel2 = 0; - ctx->unsigned_ = TRUE; - OK(ENC_UADDLB_Z_ZZ_); - } - return rc; -} - -/* uaddlt_z_zz.xml */ -int uaddlt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=0|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45000C00) { - decode_fields32(ENC_UADDLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 1; - ctx->sel2 = 1; - ctx->unsigned_ = TRUE; - OK(ENC_UADDLT_Z_ZZ_); - } - return rc; -} - -/* uaddv_r_p_z.xml */ -int uaddv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|000|op=0|U=1|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4012000) { - decode_fields32(ENC_UADDV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - OK(ENC_UADDV_R_P_Z_); - } - return rc; -} - -/* uaddwb_z_zz.xml */ -int uaddwb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=0|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45004800) { - decode_fields32(ENC_UADDWB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_UADDWB_Z_ZZ_); - } - return rc; -} - -/* uaddwt_z_zz.xml */ -int uaddwt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=0|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45004C00) { - decode_fields32(ENC_UADDWT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_UADDWT_Z_ZZ_); - } - return rc; -} - -/* uclamp_mz_zz.xml */ -int uclamp_mz_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxxx|110|001|Zn=xxxxx|Zd=xxxx|U=1 */ - if((INSWORD & 0xFF20FC01)==0xC120C401) { - decode_fields32(ENC_UCLAMP_MZ_ZZ_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - OK(ENC_UCLAMP_MZ_ZZ_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxxx|110|011|Zn=xxxxx|Zd=xxx|0|U=1 */ - if((INSWORD & 0xFF20FC03)==0xC120CC01) { - decode_fields32(ENC_UCLAMP_MZ_ZZ_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - OK(ENC_UCLAMP_MZ_ZZ_4); - } - return rc; -} - -/* uclamp_z_zz.xml */ -int uclamp_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|11000|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400C400) { - decode_fields32(ENC_UCLAMP_Z_ZZ_, ctx, instr); - if(!HaveSME() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_UCLAMP_Z_ZZ_); - } - return rc; -} - -/* ucvtf_mz_z.xml */ -int ucvtf_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|00|1|000|10|111000|Zn=xxxx|U=1|Zd=xxxx|0 */ - if((INSWORD & 0xFFFFFC21)==0xC122E020) { - decode_fields32(ENC_UCVTF_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_UCVTF_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|00|1|100|10|111000|Zn=xxx|0|U=1|Zd=xxx|00 */ - if((INSWORD & 0xFFFFFC63)==0xC132E020) { - decode_fields32(ENC_UCVTF_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_UCVTF_MZ_Z_4); - } - return rc; -} - -/* ucvtf_z_p_z.xml */ -int ucvtf_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_16_bit_to_half_precision_merging */ - /* 011|0010|1|opc=01|0|10|opc2=01|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6553A000) { - decode_fields32(ENC_UCVTF_Z_P_Z_H2FP16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_UCVTF_Z_P_Z_H2FP16); - } - /* class iclass_16_bit_to_half_precision_zeroing */ - /* 011|0010|0|opc=01|011|10|o2=0|1|o3=1|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645CE000) { - decode_fields32(ENC_UCVTF_Z_P_Z_H2FP16Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x10; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_UCVTF_Z_P_Z_H2FP16Z); - } - /* class iclass_32_bit_to_half_precision_merging */ - /* 011|0010|1|opc=01|0|10|opc2=10|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6555A000) { - decode_fields32(ENC_UCVTF_Z_P_Z_W2FP16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_UCVTF_Z_P_Z_W2FP16); - } - /* class iclass_32_bit_to_half_precision_zeroing */ - /* 011|0010|0|opc=01|011|10|o2=1|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645DA000) { - decode_fields32(ENC_UCVTF_Z_P_Z_W2FP16Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_UCVTF_Z_P_Z_W2FP16Z); - } - /* class iclass_32_bit_to_single_precision_merging */ - /* 011|0010|1|opc=10|0|10|opc2=10|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6595A000) { - decode_fields32(ENC_UCVTF_Z_P_Z_W2S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_UCVTF_Z_P_Z_W2S); - } - /* class iclass_32_bit_to_single_precision_zeroing */ - /* 011|0010|0|opc=10|011|10|o2=1|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x649DA000) { - decode_fields32(ENC_UCVTF_Z_P_Z_W2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_UCVTF_Z_P_Z_W2SZ); - } - /* class iclass_32_bit_to_double_precision_merging */ - /* 011|0010|1|opc=11|0|10|opc2=00|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D1A000) { - decode_fields32(ENC_UCVTF_Z_P_Z_W2D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_UCVTF_Z_P_Z_W2D); - } - /* class iclass_32_bit_to_double_precision_zeroing */ - /* 011|0010|0|opc=11|011|10|o2=0|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DCA000) { - decode_fields32(ENC_UCVTF_Z_P_Z_W2DZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x20; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_UCVTF_Z_P_Z_W2DZ); - } - /* class iclass_64_bit_to_half_precision_merging */ - /* 011|0010|1|opc=01|0|10|opc2=11|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x6557A000) { - decode_fields32(ENC_UCVTF_Z_P_Z_X2FP16, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_UCVTF_Z_P_Z_X2FP16); - } - /* class iclass_64_bit_to_half_precision_zeroing */ - /* 011|0010|0|opc=01|011|10|o2=1|1|o3=1|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x645DE000) { - decode_fields32(ENC_UCVTF_Z_P_Z_X2FP16Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x10; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_UCVTF_Z_P_Z_X2FP16Z); - } - /* class iclass_64_bit_to_single_precision_merging */ - /* 011|0010|1|opc=11|0|10|opc2=10|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D5A000) { - decode_fields32(ENC_UCVTF_Z_P_Z_X2S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_UCVTF_Z_P_Z_X2S); - } - /* class iclass_64_bit_to_single_precision_zeroing */ - /* 011|0010|0|opc=11|011|10|o2=1|1|o3=0|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DDA000) { - decode_fields32(ENC_UCVTF_Z_P_Z_X2SZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x20; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_UCVTF_Z_P_Z_X2SZ); - } - /* class iclass_64_bit_to_double_precision_merging */ - /* 011|0010|1|opc=11|0|10|opc2=11|int_U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x65D7A000) { - decode_fields32(ENC_UCVTF_Z_P_Z_X2D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = TRUE; - OK(ENC_UCVTF_Z_P_Z_X2D); - } - /* class iclass_64_bit_to_double_precision_zeroing */ - /* 011|0010|0|opc=11|011|10|o2=1|1|o3=1|int_U=1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFFFE000)==0x64DDE000) { - decode_fields32(ENC_UCVTF_Z_P_Z_X2DZ, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->s_esize = 0x40; - ctx->d_esize = 0x40; - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - ctx->merging = FALSE; - OK(ENC_UCVTF_Z_P_Z_X2DZ); - } - return rc; -} - -/* ucvtf_z_z.xml */ -int ucvtf_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|001|100|0011|0|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x650C3400) { - decode_fields32(ENC_UCVTF_Z_Z_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_UCVTF_Z_Z_); - } - return rc; -} - -/* ucvtflt_z_z.xml */ -int ucvtflt_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 011|0010|1|size=xx|001|100|0011|1|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x650C3C00) { - decode_fields32(ENC_UCVTFLT_Z_Z_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->rounding = FPRoundingMode(ctx->FPCR); - OK(ENC_UCVTFLT_Z_Z_); - } - return rc; -} - -/* udiv_z_p_zz.xml */ -int udiv_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|101|R=0|U=1|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4150000) { - decode_fields32(ENC_UDIV_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UDIV_Z_P_ZZ_); - } - return rc; -} - -/* udivr_z_p_zz.xml */ -int udivr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|101|R=1|U=1|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4170000) { - decode_fields32(ENC_UDIVR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UDIVR_Z_P_ZZ_); - } - return rc; -} - -/* udot_z32_zzz.xml */ -int udot_z32_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_16_bit */ - /* 010|0010|0|size=01|0|Zm=xxxxx|0|0000|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44400400) { - decode_fields32(ENC_UDOT_Z16_ZZZ_H, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UDOT_Z16_ZZZ_H); - } - /* class iclass_16_bit_to_32_bit */ - /* 010|0010|0000|Zm=xxxxx|11001|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4400CC00) { - decode_fields32(ENC_UDOT_Z32_ZZZ_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UDOT_Z32_ZZZ_); - } - return rc; -} - -/* udot_z32_zzzi.xml */ -int udot_z32_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_16_bit */ - /* 010|0010|0|0|i3h=x|1|i3l=xx|Zm=xxx|00000|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44200400) { - decode_fields32(ENC_UDOT_Z16_ZZZI_H, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UDOT_Z16_ZZZI_H); - } - /* class iclass_16_bit_to_32_bit */ - /* 010|0010|0100|i2=xx|Zm=xxx|11001|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x4480CC00) { - decode_fields32(ENC_UDOT_Z32_ZZZI_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UDOT_Z32_ZZZI_); - } - return rc; -} - -/* udot_z_zzz.xml */ -int udot_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|0|size=1x|0|Zm=xxxxx|0|0000|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x44800400) { - decode_fields32(ENC_UDOT_Z_ZZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UDOT_Z_ZZZ_); - } - return rc; -} - -/* udot_z_zzzi.xml */ -int udot_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_32_bit */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00000|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A00400) { - decode_fields32(ENC_UDOT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UDOT_Z_ZZZI_S); - } - /* class iclass_16_bit_to_64_bit */ - /* 010|0010|0|size=11|1|i1=x|Zm=xxxx|00000|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44E00400) { - decode_fields32(ENC_UDOT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->index = UINT(ctx->i1); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UDOT_Z_ZZZI_D); - } - return rc; -} - -/* udot_za32_zzi.xml */ -int udot_za32_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|0|U=1|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501010) { - decode_fields32(ENC_UDOT_ZA32_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_UDOT_ZA32_ZZI_2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|0|U=1|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509010) { - decode_fields32(ENC_UDOT_ZA32_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_UDOT_ZA32_ZZI_4XI); - } - return rc; -} - -/* udot_za32_zzv.xml */ -int udot_za32_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1601418) { - decode_fields32(ENC_UDOT_ZA32_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_UDOT_ZA32_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|1|11|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1701418) { - decode_fields32(ENC_UDOT_ZA32_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_UDOT_ZA32_ZZV_4X1); - } - return rc; -} - -/* udot_za32_zzw.xml */ -int udot_za32_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|1|1|Zm=xxxx|00|Rv=xx|101|Zn=xxxx|0|U=1|1|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1E01418) { - decode_fields32(ENC_UDOT_ZA32_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_UDOT_ZA32_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|1|1|Zm=xxx|0|10|Rv=xx|101|Zn=xxx|00|U=1|1|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1E11418) { - decode_fields32(ENC_UDOT_ZA32_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_UDOT_ZA32_ZZW_4X4); - } - return rc; -} - -/* udot_za_zzi.xml */ -int udot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors_of_32_bit_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|1|U=1|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501030) { - decode_fields32(ENC_UDOT_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_UDOT_ZA_ZZI_S2XI); - } - /* class iclass_two_za_single_vectors_of_64_bit_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|00|i1=x|Zn=xxxx|0|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09838)==0xC1D00018) { - decode_fields32(ENC_UDOT_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 2; - OK(ENC_UDOT_ZA_ZZI_D2XI); - } - /* class iclass_four_za_single_vectors_of_32_bit_elements */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|1|U=1|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509030) { - decode_fields32(ENC_UDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_UDOT_ZA_ZZI_S4XI); - } - /* class iclass_four_za_single_vectors_of_64_bit_elements */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|0|op=0|i1=x|Zn=xxx|00|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09878)==0xC1D08018) { - decode_fields32(ENC_UDOT_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - ctx->nreg = 4; - OK(ENC_UDOT_ZA_ZZI_D4XI); - } - return rc; -} - -/* udot_za_zzv.xml */ -int udot_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=1|0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1201410) { - decode_fields32(ENC_UDOT_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_UDOT_ZA_ZZV_2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=1|0|off3=xxx */ - if((INSWORD & 0xFFB09C18)==0xC1301410) { - decode_fields32(ENC_UDOT_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_UDOT_ZA_ZZV_4X1); - } - return rc; -} - -/* udot_za_zzw.xml */ -int udot_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|101|Zn=xxxx|0|U=1|0|off3=xxx */ - if((INSWORD & 0xFFA19C38)==0xC1A01410) { - decode_fields32(ENC_UDOT_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_UDOT_ZA_ZZW_2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|101|Zn=xxx|00|U=1|0|off3=xxx */ - if((INSWORD & 0xFFA39C78)==0xC1A11410) { - decode_fields32(ENC_UDOT_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_UDOT_ZA_ZZW_4X4); - } - return rc; -} - -/* uhadd_z_p_zz.xml */ -int uhadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=0|S=0|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44118000) { - decode_fields32(ENC_UHADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UHADD_Z_P_ZZ_); - } - return rc; -} - -/* uhsub_z_p_zz.xml */ -int uhsub_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=0|S=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44138000) { - decode_fields32(ENC_UHSUB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UHSUB_Z_P_ZZ_); - } - return rc; -} - -/* uhsubr_z_p_zz.xml */ -int uhsubr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=1|S=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44178000) { - decode_fields32(ENC_UHSUBR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UHSUBR_Z_P_ZZ_); - } - return rc; -} - -/* umax_mz_zzv.xml */ -int umax_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|0|00|00|op=0|Zdn=xxxx|U=1 */ - if((INSWORD & 0xFF30FFE1)==0xC120A001) { - decode_fields32(ENC_UMAX_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - ctx->unsigned_ = TRUE; - OK(ENC_UMAX_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|0|00|00|op=0|Zdn=xxx|0|U=1 */ - if((INSWORD & 0xFF30FFE3)==0xC120A801) { - decode_fields32(ENC_UMAX_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - ctx->unsigned_ = TRUE; - OK(ENC_UMAX_MZ_ZZV_4X1); - } - return rc; -} - -/* umax_mz_zzw.xml */ -int umax_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|000|opc=00|Zdn=xxxx|U=1 */ - if((INSWORD & 0xFF21FFE1)==0xC120B001) { - decode_fields32(ENC_UMAX_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - ctx->unsigned_ = TRUE; - OK(ENC_UMAX_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|000|opc=00|Zdn=xxx|0|U=1 */ - if((INSWORD & 0xFF23FFE3)==0xC120B801) { - decode_fields32(ENC_UMAX_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - ctx->unsigned_ = TRUE; - OK(ENC_UMAX_MZ_ZZW_4X4); - } - return rc; -} - -/* umax_z_p_zz.xml */ -int umax_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|01|opc=00|U=1|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4090000) { - decode_fields32(ENC_UMAX_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UMAX_Z_P_ZZ_); - } - return rc; -} - -/* umax_z_zi.xml */ -int umax_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|01|00|U=1|11|o2=0|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x2529C000) { - decode_fields32(ENC_UMAX_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = TRUE; - ctx->imm = (ctx->unsigned_)!=0 ? UINT(ctx->imm8) : SInt(ctx->imm8,8); - OK(ENC_UMAX_Z_ZI_); - } - return rc; -} - -/* umaxp_z_p_zz.xml */ -int umaxp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|opc=10|U=1|10|1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4415A000) { - decode_fields32(ENC_UMAXP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_UMAXP_Z_P_ZZ_); - } - return rc; -} - -/* umaxqv_z_p_z.xml */ -int umaxqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|011|op=0|U=1|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40D2000) { - decode_fields32(ENC_UMAXQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = TRUE; - OK(ENC_UMAXQV_Z_P_Z_); - } - return rc; -} - -/* umaxv_r_p_z.xml */ -int umaxv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|010|op=0|U=1|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4092000) { - decode_fields32(ENC_UMAXV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = TRUE; - OK(ENC_UMAXV_R_P_Z_); - } - return rc; -} - -/* umin_mz_zzv.xml */ -int umin_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|0|00|00|op=1|Zdn=xxxx|U=1 */ - if((INSWORD & 0xFF30FFE1)==0xC120A021) { - decode_fields32(ENC_UMIN_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - ctx->unsigned_ = TRUE; - OK(ENC_UMIN_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|0|00|00|op=1|Zdn=xxx|0|U=1 */ - if((INSWORD & 0xFF30FFE3)==0xC120A821) { - decode_fields32(ENC_UMIN_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - ctx->unsigned_ = TRUE; - OK(ENC_UMIN_MZ_ZZV_4X1); - } - return rc; -} - -/* umin_mz_zzw.xml */ -int umin_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|000|opc=01|Zdn=xxxx|U=1 */ - if((INSWORD & 0xFF21FFE1)==0xC120B021) { - decode_fields32(ENC_UMIN_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - ctx->unsigned_ = TRUE; - OK(ENC_UMIN_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|000|opc=01|Zdn=xxx|0|U=1 */ - if((INSWORD & 0xFF23FFE3)==0xC120B821) { - decode_fields32(ENC_UMIN_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - ctx->unsigned_ = TRUE; - OK(ENC_UMIN_MZ_ZZW_4X4); - } - return rc; -} - -/* umin_z_p_zz.xml */ -int umin_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|01|opc=01|U=1|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40B0000) { - decode_fields32(ENC_UMIN_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UMIN_Z_P_ZZ_); - } - return rc; -} - -/* umin_z_zi.xml */ -int umin_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|01|01|U=1|11|o2=0|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x252BC000) { - decode_fields32(ENC_UMIN_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = TRUE; - ctx->imm = (ctx->unsigned_)!=0 ? UINT(ctx->imm8) : SInt(ctx->imm8,8); - OK(ENC_UMIN_Z_ZI_); - } - return rc; -} - -/* uminp_z_p_zz.xml */ -int uminp_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|opc=11|U=1|10|1|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4417A000) { - decode_fields32(ENC_UMINP_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_UMINP_Z_P_ZZ_); - } - return rc; -} - -/* uminqv_z_p_z.xml */ -int uminqv_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|0|011|op=1|U=1|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40F2000) { - decode_fields32(ENC_UMINQV_Z_P_Z_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = TRUE; - OK(ENC_UMINQV_Z_P_Z_); - } - return rc; -} - -/* uminv_r_p_z.xml */ -int uminv_r_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|010|op=1|U=1|001|Pg=xxx|Zn=xxxxx|Vd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40B2000) { - decode_fields32(ENC_UMINV_R_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Vd); - ctx->unsigned_ = TRUE; - OK(ENC_UMINV_R_P_Z_); - } - return rc; -} - -/* umlal_za_zzi.xml */ -int umlal_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|11|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|U=1|S=0|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1C01010) { - decode_fields32(ENC_UMLAL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_UMLAL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|U=1|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1D01010) { - decode_fields32(ENC_UMLAL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_UMLAL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|U=1|S=0|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1D09010) { - decode_fields32(ENC_UMLAL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_UMLAL_ZA_ZZI_4XI); - } - return rc; -} - -/* umlal_za_zzv.xml */ -int umlal_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|U=1|S=0|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1600C10) { - decode_fields32(ENC_UMLAL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_UMLAL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=1|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1600810) { - decode_fields32(ENC_UMLAL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_UMLAL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|1|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=1|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1700810) { - decode_fields32(ENC_UMLAL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_UMLAL_ZA_ZZV_4X1); - } - return rc; -} - -/* umlal_za_zzw.xml */ -int umlal_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|U=1|S=0|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1E00810) { - decode_fields32(ENC_UMLAL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_UMLAL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|U=1|S=0|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1E10810) { - decode_fields32(ENC_UMLAL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_UMLAL_ZA_ZZW_4X4); - } - return rc; -} - -/* umlalb_z_zzz.xml */ -int umlalb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=0|U=1|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44004800) { - decode_fields32(ENC_UMLALB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UMLALB_Z_ZZZ_); - } - return rc; -} - -/* umlalb_z_zzzi.xml */ -int umlalb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=0|U=1|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A09000) { - decode_fields32(ENC_UMLALB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_UMLALB_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=0|U=1|i2l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E09000) { - decode_fields32(ENC_UMLALB_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_UMLALB_Z_ZZZI_D); - } - return rc; -} - -/* umlall_za_zzi.xml */ -int umlall_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector_of_32_bit_elements */ - /* 1|10|0000|1|00|00|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|U=1|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFF0001C)==0xC1000010) { - decode_fields32(ENC_UMLALL_ZA_ZZI_S, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i4h<<3)|ctx->i4l)); - ctx->nreg = 1; - OK(ENC_UMLALL_ZA_ZZI_S); - } - /* class iclass_one_za_quad_vector_of_64_bit_elements */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|0|i3l=xx|Zn=xxxxx|U=1|S=0|0|off2=xx */ - if((INSWORD & 0xFFF0101C)==0xC1800010) { - decode_fields32(ENC_UMLALL_ZA_ZZI_D, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_UMLALL_ZA_ZZI_D); - } - /* class iclass_two_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|0|i4h=xx|Zn=xxxx|op=0|U=1|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09038)==0xC1100010) { - decode_fields32(ENC_UMLALL_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_UMLALL_ZA_ZZI_S2XI); - } - /* class iclass_two_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|00|i3h=x|Zn=xxxx|0|U=1|S=0|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09838)==0xC1900010) { - decode_fields32(ENC_UMLALL_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_UMLALL_ZA_ZZI_D2XI); - } - /* class iclass_four_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|0|i4h=xx|Zn=xxx|0|op=0|U=1|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09078)==0xC1108010) { - decode_fields32(ENC_UMLALL_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_UMLALL_ZA_ZZI_S4XI); - } - /* class iclass_four_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|00|i3h=x|Zn=xxx|00|U=1|S=0|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09878)==0xC1908010) { - decode_fields32(ENC_UMLALL_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_UMLALL_ZA_ZZI_D4XI); - } - return rc; -} - -/* umlall_za_zzv.xml */ -int umlall_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|001|Zn=xxxxx|U=1|S=0|op=0|off2=xx */ - if((INSWORD & 0xFFB09C1C)==0xC1200410) { - decode_fields32(ENC_UMLALL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->nreg = 1; - OK(ENC_UMLALL_ZA_ZZV_1); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=1|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1200010) { - decode_fields32(ENC_UMLALL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_UMLALL_ZA_ZZV_2X1); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=1|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1300010) { - decode_fields32(ENC_UMLALL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_UMLALL_ZA_ZZV_4X1); - } - return rc; -} - -/* umlall_za_zzw.xml */ -int umlall_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|000|Zn=xxxx|0|U=1|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFA19C3E)==0xC1A00010) { - decode_fields32(ENC_UMLALL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_UMLALL_ZA_ZZW_2X2); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|000|Zn=xxx|00|U=1|S=0|op=0|0|o1=x */ - if((INSWORD & 0xFFA39C7E)==0xC1A10010) { - decode_fields32(ENC_UMLALL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_UMLALL_ZA_ZZW_4X4); - } - return rc; -} - -/* umlalt_z_zzz.xml */ -int umlalt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=0|U=1|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44004C00) { - decode_fields32(ENC_UMLALT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UMLALT_Z_ZZZ_); - } - return rc; -} - -/* umlalt_z_zzzi.xml */ -int umlalt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=0|U=1|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A09400) { - decode_fields32(ENC_UMLALT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_UMLALT_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=0|U=1|i2l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E09400) { - decode_fields32(ENC_UMLALT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_UMLALT_Z_ZZZI_D); - } - return rc; -} - -/* umlsl_za_zzi.xml */ -int umlsl_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|1|11|00|Zm=xxxx|i3h=x|Rv=xx|1|i3l=xx|Zn=xxxxx|U=1|S=1|off3=xxx */ - if((INSWORD & 0xFFF01018)==0xC1C01018) { - decode_fields32(ENC_UMLSL_ZA_ZZI_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_UMLSL_ZA_ZZI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|0|Rv=xx|1|i3h=xx|Zn=xxxx|0|U=1|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09038)==0xC1D01018) { - decode_fields32(ENC_UMLSL_ZA_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_UMLSL_ZA_ZZI_2XI); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|1|i3h=xx|Zn=xxx|00|U=1|S=1|i3l=x|off2=xx */ - if((INSWORD & 0xFFF09078)==0xC1D09018) { - decode_fields32(ENC_UMLSL_ZA_ZZI_4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_UMLSL_ZA_ZZI_4XI); - } - return rc; -} - -/* umlsl_za_zzv.xml */ -int umlsl_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|011|Zn=xxxxx|U=1|S=1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1600C18) { - decode_fields32(ENC_UMLSL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off3<<1)); - ctx->nreg = 1; - OK(ENC_UMLSL_ZA_ZZV_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|10|1|10|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=1|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1600818) { - decode_fields32(ENC_UMLSL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_UMLSL_ZA_ZZV_2X1); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|10|1|11|Zm=xxxx|0|Rv=xx|010|Zn=xxxxx|U=1|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1700818) { - decode_fields32(ENC_UMLSL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_UMLSL_ZA_ZZV_4X1); - } - return rc; -} - -/* umlsl_za_zzw.xml */ -int umlsl_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxxx|00|Rv=xx|010|Zn=xxxx|0|U=1|S=1|0|off2=xx */ - if((INSWORD & 0xFFE19C3C)==0xC1E00818) { - decode_fields32(ENC_UMLSL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 2; - OK(ENC_UMLSL_ZA_ZZW_2X2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|11|1|1|Zm=xxx|0|10|Rv=xx|010|Zn=xxx|00|U=1|S=1|0|off2=xx */ - if((INSWORD & 0xFFE39C7C)==0xC1E10818) { - decode_fields32(ENC_UMLSL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->nreg = 4; - OK(ENC_UMLSL_ZA_ZZW_4X4); - } - return rc; -} - -/* umlslb_z_zzz.xml */ -int umlslb_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=1|U=1|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44005800) { - decode_fields32(ENC_UMLSLB_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UMLSLB_Z_ZZZ_); - } - return rc; -} - -/* umlslb_z_zzzi.xml */ -int umlslb_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=1|U=1|i3l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0B000) { - decode_fields32(ENC_UMLSLB_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_UMLSLB_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=1|U=1|i2l=x|T=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0B000) { - decode_fields32(ENC_UMLSLB_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 0; - OK(ENC_UMLSLB_Z_ZZZI_D); - } - return rc; -} - -/* umlsll_za_zzi.xml */ -int umlsll_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector_of_32_bit_elements */ - /* 1|10|0000|1|00|00|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|U=1|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFF0001C)==0xC1000018) { - decode_fields32(ENC_UMLSLL_ZA_ZZI_S, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i4h<<3)|ctx->i4l)); - ctx->nreg = 1; - OK(ENC_UMLSLL_ZA_ZZI_S); - } - /* class iclass_one_za_quad_vector_of_64_bit_elements */ - /* 1|10|0000|1|10|00|Zm=xxxx|i3h=x|Rv=xx|0|i3l=xx|Zn=xxxxx|U=1|S=1|0|off2=xx */ - if((INSWORD & 0xFFF0101C)==0xC1800018) { - decode_fields32(ENC_UMLSLL_ZA_ZZI_D, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 1; - OK(ENC_UMLSLL_ZA_ZZI_D); - } - /* class iclass_two_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|0|i4h=xx|Zn=xxxx|op=0|U=1|S=1|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09038)==0xC1100018) { - decode_fields32(ENC_UMLSLL_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_UMLSLL_ZA_ZZI_S2XI); - } - /* class iclass_two_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|0|Rv=xx|00|i3h=x|Zn=xxxx|0|U=1|S=1|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09838)==0xC1900018) { - decode_fields32(ENC_UMLSLL_ZA_ZZI_D2XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 2; - OK(ENC_UMLSLL_ZA_ZZI_D2XI); - } - /* class iclass_four_za_quad_vectors_of_32_bit_elements */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|0|i4h=xx|Zn=xxx|0|op=0|U=1|S=1|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09078)==0xC1108018) { - decode_fields32(ENC_UMLSLL_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_UMLSLL_ZA_ZZI_S4XI); - } - /* class iclass_four_za_quad_vectors_of_64_bit_elements */ - /* 1|10|0000|1|10|01|Zm=xxxx|1|Rv=xx|00|i3h=x|Zn=xxx|00|U=1|S=1|i3l=xx|o1=x */ - if((INSWORD & 0xFFF09878)==0xC1908018) { - decode_fields32(ENC_UMLSLL_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i3h<<2)|ctx->i3l)); - ctx->nreg = 4; - OK(ENC_UMLSLL_ZA_ZZI_D4XI); - } - return rc; -} - -/* umlsll_za_zzv.xml */ -int umlsll_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|001|Zn=xxxxx|U=1|S=1|op=0|off2=xx */ - if((INSWORD & 0xFFB09C1C)==0xC1200418) { - decode_fields32(ENC_UMLSLL_ZA_ZZV_1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->nreg = 1; - OK(ENC_UMLSLL_ZA_ZZV_1); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|10|sz=x|10|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=1|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1200018) { - decode_fields32(ENC_UMLSLL_ZA_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_UMLSLL_ZA_ZZV_2X1); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|10|sz=x|11|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=1|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFB09C1E)==0xC1300018) { - decode_fields32(ENC_UMLSLL_ZA_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_UMLSLL_ZA_ZZV_4X1); - } - return rc; -} - -/* umlsll_za_zzw.xml */ -int umlsll_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxxx|00|Rv=xx|000|Zn=xxxx|0|U=1|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFA19C3E)==0xC1A00018) { - decode_fields32(ENC_UMLSLL_ZA_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_UMLSLL_ZA_ZZW_2X2); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|11|sz=x|1|Zm=xxx|0|10|Rv=xx|000|Zn=xxx|00|U=1|S=1|op=0|0|o1=x */ - if((INSWORD & 0xFFA39C7E)==0xC1A10018) { - decode_fields32(ENC_UMLSLL_ZA_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->sz==1 && !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x20) << (UINT(ctx->sz)); - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_UMLSLL_ZA_ZZW_4X4); - } - return rc; -} - -/* umlslt_z_zzz.xml */ -int umlslt_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|0|10|S=1|U=1|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x44005C00) { - decode_fields32(ENC_UMLSLT_Z_ZZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_UMLSLT_Z_ZZZ_); - } - return rc; -} - -/* umlslt_z_zzzi.xml */ -int umlslt_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|10|S=1|U=1|i3l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0B400) { - decode_fields32(ENC_UMLSLT_Z_ZZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_UMLSLT_Z_ZZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|10|S=1|U=1|i2l=x|T=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0B400) { - decode_fields32(ENC_UMLSLT_Z_ZZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->sel = 1; - OK(ENC_UMLSLT_Z_ZZZI_D); - } - return rc; -} - -/* ummla_z_zzz.xml */ -int ummla_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|1|uns=11|0|Zm=xxxxx|10|0110|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x45C09800) { - decode_fields32(ENC_UMMLA_Z_ZZZ_, ctx, instr); - if(!HaveSVE() || !HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMMLA_Z_ZZZ_); - } - return rc; -} - -/* umop4a_za32_zz.xml */ -int umop4a_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|u0=1|00|0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108008) { - decode_fields32(ENC_UMOP4A_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|u0=1|00|0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008008) { - decode_fields32(ENC_UMOP4A_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|u0=1|00|0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008208) { - decode_fields32(ENC_UMOP4A_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|u0=1|00|0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108208) { - decode_fields32(ENC_UMOP4A_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA32_ZZ_H2X2); - } - return rc; -} - -/* umop4a_za_zz.xml */ -int umop4a_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81308000) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81208000) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81208200) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81308200) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1F00008) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1E00008) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1E00208) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1F00208) { - decode_fields32(ENC_UMOP4A_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4A_ZA_ZZ_H2X2); - } - return rc; -} - -/* umop4s_za32_zz.xml */ -int umop4s_za32_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_single_and_multiple_vectors */ - /* 1|00|0000|u0=1|00|0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108018) { - decode_fields32(ENC_UMOP4S_ZA32_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA32_ZZ_H1X2); - } - /* class iclass_single_vectors */ - /* 1|00|0000|u0=1|00|0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008018) { - decode_fields32(ENC_UMOP4S_ZA32_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA32_ZZ_H1X1); - } - /* class iclass_multiple_and_single_vectors */ - /* 1|00|0000|u0=1|00|0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008218) { - decode_fields32(ENC_UMOP4S_ZA32_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA32_ZZ_H2X1); - } - /* class iclass_multiple_vectors */ - /* 1|00|0000|u0=1|00|0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108218) { - decode_fields32(ENC_UMOP4S_ZA32_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA32_ZZ_H2X2); - } - return rc; -} - -/* umop4s_za_zz.xml */ -int umop4s_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81308010) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81208010) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81208210) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=1|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81308210) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1F00018) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1E00018) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1E00218) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=1|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1F00218) { - decode_fields32(ENC_UMOP4S_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOP4S_ZA_ZZ_H2X2); - } - return rc; -} - -/* umopa_za32_pp_zz.xml */ -int umopa_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|01|0000|u0=1|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|1|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA1800008) { - decode_fields32(ENC_UMOPA_ZA32_PP_ZZ_16, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->unsigned_ = TRUE; - OK(ENC_UMOPA_ZA32_PP_ZZ_16); - } - return rc; -} - -/* umopa_za_pp_zz.xml */ -int umopa_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=1|10|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA1A00000) { - decode_fields32(ENC_UMOPA_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOPA_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=1|11|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA1E00000) { - decode_fields32(ENC_UMOPA_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOPA_ZA_PP_ZZ_64); - } - return rc; -} - -/* umops_za32_pp_zz.xml */ -int umops_za32_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|01|0000|u0=1|10|0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|1|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA1800018) { - decode_fields32(ENC_UMOPS_ZA32_PP_ZZ_16, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->unsigned_ = TRUE; - OK(ENC_UMOPS_ZA32_PP_ZZ_16); - } - return rc; -} - -/* umops_za_pp_zz.xml */ -int umops_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=1|10|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA1A00010) { - decode_fields32(ENC_UMOPS_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOPS_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=1|11|u1=1|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA1E00010) { - decode_fields32(ENC_UMOPS_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UMOPS_ZA_PP_ZZ_64); - } - return rc; -} - -/* umulh_z_p_zz.xml */ -int umulh_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|0|100|H=1|U=1|000|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4130000) { - decode_fields32(ENC_UMULH_Z_P_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UMULH_Z_P_ZZ_); - } - return rc; -} - -/* umulh_z_zz.xml */ -int umulh_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|011|0|1|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4206C00) { - decode_fields32(ENC_UMULH_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - OK(ENC_UMULH_Z_ZZ_); - } - return rc; -} - -/* umullb_z_zz.xml */ -int umullb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|11|op=1|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45007800) { - decode_fields32(ENC_UMULLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_UMULLB_Z_ZZ_); - } - return rc; -} - -/* umullb_z_zzi.xml */ -int umullb_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|110|U=1|i3l=x|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0D000) { - decode_fields32(ENC_UMULLB_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 0; - OK(ENC_UMULLB_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|110|U=1|i2l=x|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0D000) { - decode_fields32(ENC_UMULLB_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 0; - OK(ENC_UMULLB_Z_ZZI_D); - } - return rc; -} - -/* umullt_z_zz.xml */ -int umullt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|11|op=1|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45007C00) { - decode_fields32(ENC_UMULLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_UMULLT_Z_ZZ_); - } - return rc; -} - -/* umullt_z_zzi.xml */ -int umullt_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 010|0010|0|size=10|1|i3h=xx|Zm=xxx|110|U=1|i3l=x|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44A0D400) { - decode_fields32(ENC_UMULLT_Z_ZZI_S, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->index = UINT(((ctx->i3h<<1)|ctx->i3l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 1; - OK(ENC_UMULLT_Z_ZZI_S); - } - /* class iclass_64_bit */ - /* 010|0010|0|size=11|1|i2h=x|Zm=xxxx|110|U=1|i2l=x|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0F400)==0x44E0D400) { - decode_fields32(ENC_UMULLT_Z_ZZI_D, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->index = UINT(((ctx->i2h<<1)|ctx->i2l)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel = 1; - OK(ENC_UMULLT_Z_ZZI_D); - } - return rc; -} - -/* uqadd_z_p_zz.xml */ -int uqadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=0|S=0|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44198000) { - decode_fields32(ENC_UQADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UQADD_Z_P_ZZ_); - } - return rc; -} - -/* uqadd_z_zi.xml */ -int uqadd_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|00|10|U=1|11|sh=x|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2525C000) { - decode_fields32(ENC_UQADD_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = UINT(ctx->imm8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - ctx->unsigned_ = TRUE; - OK(ENC_UQADD_Z_ZI_); - } - return rc; -} - -/* uqadd_z_zz.xml */ -int uqadd_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|000|10|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4201400) { - decode_fields32(ENC_UQADD_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - OK(ENC_UQADD_Z_ZZ_); - } - return rc; -} - -/* uqcvt_z_mz2.xml */ -int uqcvt_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|0|op=0|1|000|11|111000|Zn=xxxx|U=1|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0xC123E020) { - decode_fields32(ENC_UQCVT_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_UQCVT_Z_MZ2_); - } - return rc; -} - -/* uqcvt_z_mz4.xml */ -int uqcvt_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|sz=x|op=0|1|100|11|111000|Zn=xxx|N=0|U=1|Zd=xxxxx */ - if((INSWORD & 0xFF7FFC60)==0xC133E020) { - decode_fields32(ENC_UQCVT_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_UQCVT_Z_MZ4_); - } - return rc; -} - -/* uqcvtn_z_mz2.xml */ -int uqcvtn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=0|1|tszl=10|00|1|0|10|0|U=1|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFFFFC20)==0x45314800) { - decode_fields32(ENC_UQCVTN_Z_MZ2_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - OK(ENC_UQCVTN_Z_MZ2_); - } - return rc; -} - -/* uqcvtn_z_mz4.xml */ -int uqcvtn_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|sz=x|op=0|1|100|11|111000|Zn=xxx|N=1|U=1|Zd=xxxxx */ - if((INSWORD & 0xFF7FFC60)==0xC133E060) { - decode_fields32(ENC_UQCVTN_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->sz)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - OK(ENC_UQCVTN_Z_MZ4_); - } - return rc; -} - -/* uqdecb_r_rs.xml */ -int uqdecb_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=00|1|sf=0|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x420FC00) { - decode_fields32(ENC_UQDECB_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQDECB_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=00|1|sf=1|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x430FC00) { - decode_fields32(ENC_UQDECB_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQDECB_R_RS_X); - } - return rc; -} - -/* uqdecd_r_rs.xml */ -int uqdecd_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=11|1|sf=0|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0FC00) { - decode_fields32(ENC_UQDECD_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQDECD_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=11|1|sf=1|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0FC00) { - decode_fields32(ENC_UQDECD_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQDECD_R_RS_X); - } - return rc; -} - -/* uqdecd_z_zs.xml */ -int uqdecd_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=11|1|0|imm4=xxxx|11|00|D=1|U=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0CC00) { - decode_fields32(ENC_UQDECD_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - OK(ENC_UQDECD_Z_ZS_); - } - return rc; -} - -/* uqdech_r_rs.xml */ -int uqdech_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=01|1|sf=0|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460FC00) { - decode_fields32(ENC_UQDECH_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQDECH_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=01|1|sf=1|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470FC00) { - decode_fields32(ENC_UQDECH_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQDECH_R_RS_X); - } - return rc; -} - -/* uqdech_z_zs.xml */ -int uqdech_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=01|1|0|imm4=xxxx|11|00|D=1|U=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460CC00) { - decode_fields32(ENC_UQDECH_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - OK(ENC_UQDECH_Z_ZS_); - } - return rc; -} - -/* uqdecp_r_p_r.xml */ -int uqdecp_r_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 001|0010|1|size=xx|101|0|D=1|U=1|1000|1|sf=0|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252B8800) { - decode_fields32(ENC_UQDECP_R_P_R_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQDECP_R_P_R_UW); - } - /* class iclass_64_bit */ - /* 001|0010|1|size=xx|101|0|D=1|U=1|1000|1|sf=1|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252B8C00) { - decode_fields32(ENC_UQDECP_R_P_R_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQDECP_R_P_R_X); - } - return rc; -} - -/* uqdecp_z_p_z.xml */ -int uqdecp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|0|D=1|U=1|1000|0|opc=00|Pm=xxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x252B8000) { - decode_fields32(ENC_UQDECP_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = TRUE; - OK(ENC_UQDECP_Z_P_Z_); - } - return rc; -} - -/* uqdecw_r_rs.xml */ -int uqdecw_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=10|1|sf=0|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0FC00) { - decode_fields32(ENC_UQDECW_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQDECW_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=10|1|sf=1|imm4=xxxx|11|11|D=1|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0FC00) { - decode_fields32(ENC_UQDECW_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQDECW_R_RS_X); - } - return rc; -} - -/* uqdecw_z_zs.xml */ -int uqdecw_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=10|1|0|imm4=xxxx|11|00|D=1|U=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0CC00) { - decode_fields32(ENC_UQDECW_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - OK(ENC_UQDECW_Z_ZS_); - } - return rc; -} - -/* uqincb_r_rs.xml */ -int uqincb_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=00|1|sf=0|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x420F400) { - decode_fields32(ENC_UQINCB_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQINCB_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=00|1|sf=1|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x430F400) { - decode_fields32(ENC_UQINCB_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQINCB_R_RS_X); - } - return rc; -} - -/* uqincd_r_rs.xml */ -int uqincd_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=11|1|sf=0|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0F400) { - decode_fields32(ENC_UQINCD_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQINCD_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=11|1|sf=1|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4F0F400) { - decode_fields32(ENC_UQINCD_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQINCD_R_RS_X); - } - return rc; -} - -/* uqincd_z_zs.xml */ -int uqincd_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=11|1|0|imm4=xxxx|11|00|D=0|U=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4E0C400) { - decode_fields32(ENC_UQINCD_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - OK(ENC_UQINCD_Z_ZS_); - } - return rc; -} - -/* uqinch_r_rs.xml */ -int uqinch_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=01|1|sf=0|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460F400) { - decode_fields32(ENC_UQINCH_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQINCH_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=01|1|sf=1|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x470F400) { - decode_fields32(ENC_UQINCH_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQINCH_R_RS_X); - } - return rc; -} - -/* uqinch_z_zs.xml */ -int uqinch_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=01|1|0|imm4=xxxx|11|00|D=0|U=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x460C400) { - decode_fields32(ENC_UQINCH_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - OK(ENC_UQINCH_Z_ZS_); - } - return rc; -} - -/* uqincp_r_p_r.xml */ -int uqincp_r_p_r(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 001|0010|1|size=xx|101|0|D=0|U=1|1000|1|sf=0|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x25298800) { - decode_fields32(ENC_UQINCP_R_P_R_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQINCP_R_P_R_UW); - } - /* class iclass_64_bit */ - /* 001|0010|1|size=xx|101|0|D=0|U=1|1000|1|sf=1|op=0|Pm=xxxx|Rdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x25298C00) { - decode_fields32(ENC_UQINCP_R_P_R_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Rdn); - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQINCP_R_P_R_X); - } - return rc; -} - -/* uqincp_z_p_z.xml */ -int uqincp_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|101|0|D=0|U=1|1000|0|opc=00|Pm=xxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FFE00)==0x25298000) { - decode_fields32(ENC_UQINCP_Z_P_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->m = UINT(ctx->Pm); - ctx->dn = UINT(ctx->Zdn); - ctx->unsigned_ = TRUE; - OK(ENC_UQINCP_Z_P_Z_); - } - return rc; -} - -/* uqincw_r_rs.xml */ -int uqincw_r_rs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 000|0010|0|size=10|1|sf=0|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0F400) { - decode_fields32(ENC_UQINCW_R_RS_UW, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x20; - OK(ENC_UQINCW_R_RS_UW); - } - /* class iclass_64_bit */ - /* 000|0010|0|size=10|1|sf=1|imm4=xxxx|11|11|D=0|U=1|pattern=xxxxx|Rdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4B0F400) { - decode_fields32(ENC_UQINCW_R_RS_X, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Rdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - ctx->ssize = 0x40; - OK(ENC_UQINCW_R_RS_X); - } - return rc; -} - -/* uqincw_z_zs.xml */ -int uqincw_z_zs(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=10|1|0|imm4=xxxx|11|00|D=0|U=1|pattern=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFFF0FC00)==0x4A0C400) { - decode_fields32(ENC_UQINCW_Z_ZS_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->dn = UINT(ctx->Zdn); - ctx->pat = ctx->pattern; - ctx->imm = UINT(ctx->imm4)+1; - ctx->unsigned_ = TRUE; - OK(ENC_UQINCW_Z_ZS_); - } - return rc; -} - -/* uqrshl_z_p_zz.xml */ -int uqrshl_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=0|N=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440B8000) { - decode_fields32(ENC_UQRSHL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_UQRSHL_Z_P_ZZ_); - } - return rc; -} - -/* uqrshlr_z_p_zz.xml */ -int uqrshlr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=1|N=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440F8000) { - decode_fields32(ENC_UQRSHLR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_UQRSHLR_Z_P_ZZ_); - } - return rc; -} - -/* uqrshr_z_mz2.xml */ -int uqrshr_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|11|1|op=0|imm4=xxxx|110|101|Zn=xxxx|U=1|Zd=xxxxx */ - if((INSWORD & 0xFFF0FC20)==0xC1E0D420) { - decode_fields32(ENC_UQRSHR_Z_MZ2_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm4); - OK(ENC_UQRSHR_Z_MZ2_); - } - return rc; -} - -/* uqrshr_z_mz4.xml */ -int uqrshr_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|tsize=xx|1|imm5=xxxxx|110|11|N=0|Zn=xxx|op=0|U=1|Zd=xxxxx */ - if((INSWORD & 0xFF20FC60)==0xC120D820) { - decode_fields32(ENC_UQRSHR_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((8) * (ctx->esize))-UINT(((ctx->tsize<<5)|ctx->imm5)); - OK(ENC_UQRSHR_Z_MZ4_); - } - return rc; -} - -/* uqrshrn_z_mz2.xml */ -int uqrshrn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit */ - /* 010|0010|1|1|op0=0|1|01|imm3=xxx|0|0|op1=1|U=1|R=1|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFF8FC20)==0x45A83800) { - decode_fields32(ENC_UQRSHRN_Z_MZ2_B, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 8; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm3); - OK(ENC_UQRSHRN_Z_MZ2_B); - } - /* class iclass_16_bit */ - /* 010|0010|1|1|op0=0|1|1|imm4=xxxx|0|0|op1=1|U=1|R=1|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFF0FC20)==0x45B03800) { - decode_fields32(ENC_UQRSHRN_Z_MZ2_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x10; - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ctx->esize-UINT(ctx->imm4); - OK(ENC_UQRSHRN_Z_MZ2_); - } - return rc; -} - -/* uqrshrn_z_mz4.xml */ -int uqrshrn_z_mz4(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|tsize=xx|1|imm5=xxxxx|110|11|N=1|Zn=xxx|op=0|U=1|Zd=xxxxx */ - if((INSWORD & 0xFF20FC60)==0xC120DC20) { - decode_fields32(ENC_UQRSHRN_Z_MZ4_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((8) * (ctx->esize))-UINT(((ctx->tsize<<5)|ctx->imm5)); - OK(ENC_UQRSHRN_Z_MZ4_); - } - return rc; -} - -/* uqrshrnb_z_zi.xml */ -int uqrshrnb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=1|R=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45203800) { - decode_fields32(ENC_UQRSHRNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_UQRSHRNB_Z_ZI_); - } - return rc; -} - -/* uqrshrnt_z_zi.xml */ -int uqrshrnt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=1|R=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45203C00) { - decode_fields32(ENC_UQRSHRNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_UQRSHRNT_Z_ZI_); - } - return rc; -} - -/* uqshl_z_p_zi.xml */ -int uqshl_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|tszh=xx|0|0|opc=01|L=1|U=1|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4078000) { - decode_fields32(ENC_UQSHL_Z_P_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_UQSHL_Z_P_ZI_); - } - return rc; -} - -/* uqshl_z_p_zz.xml */ -int uqshl_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=0|N=0|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44098000) { - decode_fields32(ENC_UQSHL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_UQSHL_Z_P_ZZ_); - } - return rc; -} - -/* uqshlr_z_p_zz.xml */ -int uqshlr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=1|R=1|N=0|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x440D8000) { - decode_fields32(ENC_UQSHLR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_UQSHLR_Z_P_ZZ_); - } - return rc; -} - -/* uqshrn_z_mz2.xml */ -int uqshrn_z_mz2(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|1|op0=0|1|tsize=xx|imm3=xxx|0|0|op1=0|U=1|R=0|0|Zn=xxxx|0|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC20)==0x45A01000) { - decode_fields32(ENC_UQSHRN_Z_MZ2_, ctx, instr); - if(!HaveSVE2p3() && !HaveSME2p3()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_UQSHRN_Z_MZ2_); - } - return rc; -} - -/* uqshrnb_z_zi.xml */ -int uqshrnb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=1|R=0|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45203000) { - decode_fields32(ENC_UQSHRNB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_UQSHRNB_Z_ZI_); - } - return rc; -} - -/* uqshrnt_z_zi.xml */ -int uqshrnt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|imm3=xxx|0|0|op=1|U=1|R=0|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x45203400) { - decode_fields32(ENC_UQSHRNT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_UQSHRNT_Z_ZI_); - } - return rc; -} - -/* uqsub_z_p_zz.xml */ -int uqsub_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=0|S=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x441B8000) { - decode_fields32(ENC_UQSUB_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UQSUB_Z_P_ZZ_); - } - return rc; -} - -/* uqsub_z_zi.xml */ -int uqsub_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|00|11|U=1|11|sh=x|imm8=xxxxxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FC000)==0x2527C000) { - decode_fields32(ENC_UQSUB_Z_ZI_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(((ctx->size<<1)|ctx->sh)==1) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT(ctx->Zdn); - ctx->imm = UINT(ctx->imm8); - if(ctx->sh==1) { - ctx->imm = (ctx->imm) << (8); - } - ctx->unsigned_ = TRUE; - OK(ENC_UQSUB_Z_ZI_); - } - return rc; -} - -/* uqsub_z_zz.xml */ -int uqsub_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 000|0010|0|size=xx|1|Zm=xxxxx|000|11|U=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4201C00) { - decode_fields32(ENC_UQSUB_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - OK(ENC_UQSUB_Z_ZZ_); - } - return rc; -} - -/* uqsubr_z_p_zz.xml */ -int uqsubr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=1|S=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x441F8000) { - decode_fields32(ENC_UQSUBR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_UQSUBR_Z_P_ZZ_); - } - return rc; -} - -/* uqxtnb_z_zz.xml */ -int uqxtnb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|00|0|0|10|0|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA7FC00)==0x45204800) { - decode_fields32(ENC_UQXTNB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(!((ctx->tsize==1 || ctx->tsize==2 || ctx->tsize==4))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x10) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_UQXTNB_Z_ZZ_); - } - return rc; -} - -/* uqxtnt_z_zz.xml */ -int uqxtnt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|1|tszl=xx|00|0|0|10|0|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA7FC00)==0x45204C00) { - decode_fields32(ENC_UQXTNT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(!((ctx->tsize==1 || ctx->tsize==2 || ctx->tsize==4))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (0x10) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - OK(ENC_UQXTNT_Z_ZZ_); - } - return rc; -} - -/* urecpe_z_p_z.xml */ -int urecpe_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 010|0010|0|size=xx|0|0|Q=0|0|Z=0|op=0|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4400A000) { - decode_fields32(ENC_URECPE_Z_P_Z_M, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_URECPE_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 010|0010|0|size=xx|0|0|Q=0|0|Z=1|op=0|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4402A000) { - decode_fields32(ENC_URECPE_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_URECPE_Z_P_Z_Z); - } - return rc; -} - -/* urhadd_z_p_zz.xml */ -int urhadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|10|R=1|S=0|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44158000) { - decode_fields32(ENC_URHADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_URHADD_Z_P_ZZ_); - } - return rc; -} - -/* urshl_mz_zzv.xml */ -int urshl_mz_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10100|0|10|opc=001|Zdn=xxxx|U=1 */ - if((INSWORD & 0xFF30FFE1)==0xC120A221) { - decode_fields32(ENC_URSHL_MZ_ZZV_2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 2; - OK(ENC_URSHL_MZ_ZZV_2X1); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|10|Zm=xxxx|10101|0|10|opc=001|Zdn=xxx|0|U=1 */ - if((INSWORD & 0xFF30FFE3)==0xC120AA21) { - decode_fields32(ENC_URSHL_MZ_ZZV_4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->nreg = 4; - OK(ENC_URSHL_MZ_ZZV_4X1); - } - return rc; -} - -/* urshl_mz_zzw.xml */ -int urshl_mz_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxxx|0101100|10|opc=001|Zdn=xxxx|U=1 */ - if((INSWORD & 0xFF21FFE1)==0xC120B221) { - decode_fields32(ENC_URSHL_MZ_ZZW_2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->nreg = 2; - OK(ENC_URSHL_MZ_ZZW_2X2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|Zm=xxx|00101110|10|opc=001|Zdn=xxx|0|U=1 */ - if((INSWORD & 0xFF23FFE3)==0xC120BA21) { - decode_fields32(ENC_URSHL_MZ_ZZW_4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->dn = UINT((ctx->Zdn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->nreg = 4; - OK(ENC_URSHL_MZ_ZZW_4X4); - } - return rc; -} - -/* urshl_z_p_zz.xml */ -int urshl_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=0|R=0|N=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44038000) { - decode_fields32(ENC_URSHL_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_URSHL_Z_P_ZZ_); - } - return rc; -} - -/* urshlr_z_p_zz.xml */ -int urshlr_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|0|Q=0|R=1|N=1|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x44078000) { - decode_fields32(ENC_URSHLR_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - OK(ENC_URSHLR_Z_P_ZZ_); - } - return rc; -} - -/* urshr_z_p_zi.xml */ -int urshr_z_p_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|tszh=xx|0|0|opc=11|L=0|U=1|100|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x40D8000) { - decode_fields32(ENC_URSHR_Z_P_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_URSHR_Z_P_ZI_); - } - return rc; -} - -/* ursqrte_z_p_z.xml */ -int ursqrte_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_merging */ - /* 010|0010|0|size=xx|0|0|Q=0|0|Z=0|op=1|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4401A000) { - decode_fields32(ENC_URSQRTE_Z_P_Z_M, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = TRUE; - OK(ENC_URSQRTE_Z_P_Z_M); - } - /* class iclass_zeroing */ - /* 010|0010|0|size=xx|0|0|Q=0|0|Z=1|op=1|10|1|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x4403A000) { - decode_fields32(ENC_URSQRTE_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=2) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->merging = FALSE; - OK(ENC_URSQRTE_Z_P_Z_Z); - } - return rc; -} - -/* ursra_z_zi.xml */ -int ursra_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|tszh=xx|0|tszl=xx|imm3=xxx|11|10|R=1|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500EC00) { - decode_fields32(ENC_URSRA_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->Zda); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_URSRA_Z_ZI_); - } - return rc; -} - -/* usdot_z_zzz.xml */ -int usdot_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|0|size=10|0|Zm=xxxxx|0|11110|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44807800) { - decode_fields32(ENC_USDOT_Z_ZZZ_S, ctx, instr); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_USDOT_Z_ZZZ_S); - } - return rc; -} - -/* usdot_z_zzzi.xml */ -int usdot_z_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|0|size=10|1|i2=xx|Zm=xxx|00011|U=0|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x44A01800) { - decode_fields32(ENC_USDOT_Z_ZZZI_S, ctx, instr); - ctx->esize = 0x20; - ctx->index = UINT(ctx->i2); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - OK(ENC_USDOT_Z_ZZZI_S); - } - return rc; -} - -/* usdot_za_zzi.xml */ -int usdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=1|i2=xx|Zn=xxxx|1|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1501028) { - decode_fields32(ENC_USDOT_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 2; - OK(ENC_USDOT_ZA_ZZI_S2XI); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=1|i2=xx|Zn=xxx|0|1|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1509028) { - decode_fields32(ENC_USDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - ctx->nreg = 4; - OK(ENC_USDOT_ZA_ZZI_S4XI); - } - return rc; -} - -/* usdot_za_zzv.xml */ -int usdot_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|10|0|10|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1201408) { - decode_fields32(ENC_USDOT_ZA_ZZV_S2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_USDOT_ZA_ZZV_S2X1); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|10|0|11|Zm=xxxx|0|Rv=xx|101|Zn=xxxxx|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09C18)==0xC1301408) { - decode_fields32(ENC_USDOT_ZA_ZZV_S4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_USDOT_ZA_ZZV_S4X1); - } - return rc; -} - -/* usdot_za_zzw.xml */ -int usdot_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxxx|00|Rv=xx|101|Zn=xxxx|0|01|off3=xxx */ - if((INSWORD & 0xFFE19C38)==0xC1A01408) { - decode_fields32(ENC_USDOT_ZA_ZZW_S2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 2; - OK(ENC_USDOT_ZA_ZZW_S2X2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|11|0|1|Zm=xxx|0|10|Rv=xx|101|Zn=xxx|00|01|off3=xxx */ - if((INSWORD & 0xFFE39C78)==0xC1A11408) { - decode_fields32(ENC_USDOT_ZA_ZZW_S4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT(ctx->off3); - ctx->nreg = 4; - OK(ENC_USDOT_ZA_ZZW_S4X4); - } - return rc; -} - -/* ushllb_z_zi.xml */ -int ushllb_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|0|tszl=xx|imm3=xxx|10|10|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4500A800) { - decode_fields32(ENC_USHLLB_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_USHLLB_Z_ZI_); - } - return rc; -} - -/* ushllt_z_zi.xml */ -int ushllt_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|0|tszh=x|0|tszl=xx|imm3=xxx|10|10|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFA0FC00)==0x4500AC00) { - decode_fields32(ENC_USHLLT_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->shift = UINT(((ctx->tsize<<3)|ctx->imm3))-ctx->esize; - OK(ENC_USHLLT_Z_ZI_); - } - return rc; -} - -/* usmlall_za_zzi.xml */ -int usmlall_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|1|00|00|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|U=0|S=0|op=1|off2=xx */ - if((INSWORD & 0xFFF0001C)==0xC1000004) { - decode_fields32(ENC_USMLALL_ZA_ZZI_S, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->index = UINT(((ctx->i4h<<3)|ctx->i4l)); - ctx->nreg = 1; - OK(ENC_USMLALL_ZA_ZZI_S); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|0|Rv=xx|0|i4h=xx|Zn=xxxx|op=1|U=0|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09038)==0xC1100020) { - decode_fields32(ENC_USMLALL_ZA_ZZI_S2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 2; - OK(ENC_USMLALL_ZA_ZZI_S2XI); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|1|00|01|Zm=xxxx|1|Rv=xx|0|i4h=xx|Zn=xxx|0|op=1|U=0|S=0|i4l=xx|o1=x */ - if((INSWORD & 0xFFF09078)==0xC1108020) { - decode_fields32(ENC_USMLALL_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->index = UINT(((ctx->i4h<<2)|ctx->i4l)); - ctx->nreg = 4; - OK(ENC_USMLALL_ZA_ZZI_S4XI); - } - return rc; -} - -/* usmlall_za_zzv.xml */ -int usmlall_za_zzv(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|10|sz=0|10|Zm=xxxx|0|Rv=xx|001|Zn=xxxxx|U=0|S=0|op=1|off2=xx */ - if((INSWORD & 0xFFF09C1C)==0xC1200404) { - decode_fields32(ENC_USMLALL_ZA_ZZV_S, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->off2<<2)); - ctx->nreg = 1; - OK(ENC_USMLALL_ZA_ZZV_S); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|10|sz=0|10|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=0|S=0|op=1|0|o1=x */ - if((INSWORD & 0xFFF09C1E)==0xC1200004) { - decode_fields32(ENC_USMLALL_ZA_ZZV_S2X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_USMLALL_ZA_ZZV_S2X1); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|10|sz=0|11|Zm=xxxx|0|Rv=xx|000|Zn=xxxxx|U=0|S=0|op=1|0|o1=x */ - if((INSWORD & 0xFFF09C1E)==0xC1300004) { - decode_fields32(ENC_USMLALL_ZA_ZZV_S4X1, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_USMLALL_ZA_ZZV_S4X1); - } - return rc; -} - -/* usmlall_za_zzw.xml */ -int usmlall_za_zzw(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|11|sz=0|1|Zm=xxxx|00|Rv=xx|000|Zn=xxxx|0|U=0|S=0|op=1|0|o1=x */ - if((INSWORD & 0xFFE19C3E)==0xC1A00004) { - decode_fields32(ENC_USMLALL_ZA_ZZW_S2X2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT((ctx->Zm<<1)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 2; - OK(ENC_USMLALL_ZA_ZZW_S2X2); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|11|sz=0|1|Zm=xxx|0|10|Rv=xx|000|Zn=xxx|00|U=0|S=0|op=1|0|o1=x */ - if((INSWORD & 0xFFE39C7E)==0xC1A10004) { - decode_fields32(ENC_USMLALL_ZA_ZZW_S4X4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT((ctx->Zm<<2)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->nreg = 4; - OK(ENC_USMLALL_ZA_ZZW_S4X4); - } - return rc; -} - -/* usmmla_z_zzz.xml */ -int usmmla_z_zzz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 010|0010|1|uns=10|0|Zm=xxxxx|10|0110|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x45809800) { - decode_fields32(ENC_USMMLA_Z_ZZZ_, ctx, instr); - if(!HaveSVE() || !HaveI8MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->Zda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMMLA_Z_ZZZ_); - } - return rc; -} - -/* usmop4a_za_zz.xml */ -int usmop4a_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108000) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008000) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008200) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108200) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1D00008) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1C00008) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1C00208) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=0|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1D00208) { - decode_fields32(ENC_USMOP4A_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = FALSE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4A_ZA_ZZ_H2X2); - } - return rc; -} - -/* usmop4s_za_zz.xml */ -int usmop4s_za_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit_single_and_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=1|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108010) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_B1X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_B1X2); - } - /* class iclass_32_bit_single_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=0|Zm=xxx|0|1|00000|N=0|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008010) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_B1X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_B1X1); - } - /* class iclass_32_bit_multiple_and_single_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=0|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81008210) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_B2X1, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_B2X1); - } - /* class iclass_32_bit_multiple_vectors */ - /* 1|00|0000|u0=1|00|u1=0|M=1|Zm=xxx|0|1|00000|N=1|Zn=xxx|0|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFF1FE3C)==0x81108210) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_B2X2, ctx, instr); - if(!HaveSME_MOP4()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_B2X2); - } - /* class iclass_64_bit_single_and_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=1|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1D00018) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_H1X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_H1X2); - } - /* class iclass_64_bit_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=0|Zm=xxx|0000000|N=0|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1C00018) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_H1X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 1; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_H1X1); - } - /* class iclass_64_bit_multiple_and_single_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=0|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1C00218) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_H2X1, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 1; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_H2X1); - } - /* class iclass_64_bit_multiple_vectors */ - /* 1|0|1|0000|u0=1|11|u1=0|M=1|Zm=xxx|0000000|N=1|Zn=xxx|0|S=1|1|ZAda=xxx */ - if((INSWORD & 0xFFF1FE38)==0xA1D00218) { - decode_fields32(ENC_USMOP4S_ZA_ZZ_H2X2, ctx, instr); - if(!HaveSME_MOP4() || !HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(((1<<4)|(ctx->Zm<<1))); - ctx->nreg = 2; - ctx->mreg = 2; - ctx->da = UINT(ctx->ZAda); - ctx->sub_op = TRUE; - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOP4S_ZA_ZZ_H2X2); - } - return rc; -} - -/* usmopa_za_pp_zz.xml */ -int usmopa_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=1|10|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA1800000) { - decode_fields32(ENC_USMOPA_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOPA_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=1|11|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=0|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA1C00000) { - decode_fields32(ENC_USMOPA_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOPA_ZA_PP_ZZ_64); - } - return rc; -} - -/* usmops_za_pp_zz.xml */ -int usmops_za_pp_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_32_bit */ - /* 1|01|0000|u0=1|10|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0001C)==0xA1800010) { - decode_fields32(ENC_USMOPS_ZA_PP_ZZ_32, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x20; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOPS_ZA_PP_ZZ_32); - } - /* class iclass_64_bit */ - /* 1|0|1|0000|u0=1|11|u1=0|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=1|0|ZAda=xxx */ - if((INSWORD & 0xFFE00018)==0xA1C00010) { - decode_fields32(ENC_USMOPS_ZA_PP_ZZ_64, ctx, instr); - if(!HaveSME_I16I64()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x40; - ctx->a = UINT(ctx->Pn); - ctx->b = UINT(ctx->Pm); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USMOPS_ZA_PP_ZZ_64); - } - return rc; -} - -/* usqadd_z_p_zz.xml */ -int usqadd_z_p_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|11|op=1|S=0|U=1|10|0|Pg=xxx|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x441D8000) { - decode_fields32(ENC_USQADD_Z_P_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->g = UINT(ctx->Pg); - ctx->dn = UINT(ctx->Zdn); - ctx->m = UINT(ctx->Zm); - OK(ENC_USQADD_Z_P_ZZ_); - } - return rc; -} - -/* usra_z_zi.xml */ -int usra_z_zi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|tszh=xx|0|tszl=xx|imm3=xxx|11|10|R=0|U=1|Zn=xxxxx|Zda=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4500E400) { - decode_fields32(ENC_USRA_Z_ZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->n = UINT(ctx->Zn); - ctx->da = UINT(ctx->Zda); - ctx->shift = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_USRA_Z_ZI_); - } - return rc; -} - -/* ustmopa_za_zzzi.xml */ -int ustmopa_za_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|u0=1|01|u1=0|Zm=xxxxx|1|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x81408000) { - decode_fields32(ENC_USTMOPA_ZA_ZZZI_B2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = FALSE; - OK(ENC_USTMOPA_ZA_ZZZI_B2X1); - } - return rc; -} - -/* usublb_z_zz.xml */ -int usublb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=1|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45001800) { - decode_fields32(ENC_USUBLB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 0; - ctx->sel2 = 0; - ctx->unsigned_ = TRUE; - OK(ENC_USUBLB_Z_ZZ_); - } - return rc; -} - -/* usublt_z_zz.xml */ -int usublt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|0|op=0|S=1|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45001C00) { - decode_fields32(ENC_USUBLT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->sel1 = 1; - ctx->sel2 = 1; - ctx->unsigned_ = TRUE; - OK(ENC_USUBLT_Z_ZZ_); - } - return rc; -} - -/* usubwb_z_zz.xml */ -int usubwb_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=1|U=1|T=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45005800) { - decode_fields32(ENC_USUBWB_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_USUBWB_Z_ZZ_); - } - return rc; -} - -/* usubwt_z_zz.xml */ -int usubwt_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|1|size=xx|0|Zm=xxxxx|0|10|S=1|U=1|T=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x45005C00) { - decode_fields32(ENC_USUBWT_Z_ZZ_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - OK(ENC_USUBWT_Z_ZZ_); - } - return rc; -} - -/* usvdot_za_zzi.xml */ -int usvdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=0|i2=xx|Zn=xxx|0|1|U=0|1|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1508028) { - decode_fields32(ENC_USVDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_USVDOT_ZA_ZZI_S4XI); - } - return rc; -} - -/* utmopa_za32_zzzi.xml */ -int utmopa_za32_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|u0=1|01|0|Zm=xxxxx|1|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|1|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x81408008) { - decode_fields32(ENC_UTMOPA_ZA32_ZZZI_H2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->unsigned_ = TRUE; - OK(ENC_UTMOPA_ZA32_ZZZI_H2X1); - } - return rc; -} - -/* utmopa_za_zzzi.xml */ -int utmopa_za_zzzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|00|0000|u0=1|01|u1=1|Zm=xxxxx|1|0|0|K=x|Zk=xx|Zn=xxxx|i2=xx|0|0|ZAda=xx */ - if((INSWORD & 0xFFE0E00C)==0x81608000) { - decode_fields32(ENC_UTMOPA_ZA_ZZZI_B2X1, ctx, instr); - if(!HaveSME_TMOP()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->k = UINT(((1<<4)|(ctx->K<<3)|(1<<2)|ctx->Zk)); - ctx->index = UINT(ctx->i2); - ctx->da = UINT(ctx->ZAda); - ctx->op1_unsigned = TRUE; - ctx->op2_unsigned = TRUE; - OK(ENC_UTMOPA_ZA_ZZZI_B2X1); - } - return rc; -} - -/* uunpk_mz_z.xml */ -int uunpk_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_registers */ - /* 1|10|0000|1|size=xx|1|001|01|111000|Zn=xxxxx|Zd=xxxx|U=1 */ - if((INSWORD & 0xFF3FFC01)==0xC125E001) { - decode_fields32(ENC_UUNPK_MZ_Z_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT((ctx->Zd<<1)); - ctx->nreg = 2; - ctx->unsigned_ = TRUE; - OK(ENC_UUNPK_MZ_Z_2); - } - /* class iclass_four_registers */ - /* 1|10|0000|1|size=xx|1|101|01|111000|Zn=xxxx|0|Zd=xxx|0|U=1 */ - if((INSWORD & 0xFF3FFC23)==0xC135E001) { - decode_fields32(ENC_UUNPK_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<1)); - ctx->d = UINT((ctx->Zd<<2)); - ctx->nreg = 4; - ctx->unsigned_ = TRUE; - OK(ENC_UUNPK_MZ_Z_4); - } - return rc; -} - -/* uunpkhi_z_z.xml */ -int uunpkhi_z_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_high_half */ - /* 000|0010|1|size=xx|1|10|0|U=1|H=1|001110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5333800) { - decode_fields32(ENC_UUNPKHI_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->hi = TRUE; - OK(ENC_UUNPKHI_Z_Z_); - } - /* class iclass_low_half */ - /* 000|0010|1|size=xx|1|10|0|U=1|H=0|001110|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FFC00)==0x5323800) { - decode_fields32(ENC_UUNPKLO_Z_Z_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->hi = FALSE; - OK(ENC_UUNPKLO_Z_Z_); - } - return rc; -} - -/* uvdot_za32_zzi.xml */ -int uvdot_za32_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|1|01|01|Zm=xxxx|0|Rv=xx|op=0|i2=xx|Zn=xxxx|1|U=1|0|off3=xxx */ - if((INSWORD & 0xFFF09038)==0xC1500030) { - decode_fields32(ENC_UVDOT_ZA32_ZZI_2XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<1)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_UVDOT_ZA32_ZZI_2XI); - } - return rc; -} - -/* uvdot_za_zzi.xml */ -int uvdot_za_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_32_bit */ - /* 1|10|0000|1|01|01|Zm=xxxx|1|Rv=xx|op=0|i2=xx|Zn=xxx|0|1|U=1|0|off3=xxx */ - if((INSWORD & 0xFFF09078)==0xC1508030) { - decode_fields32(ENC_UVDOT_ZA_ZZI_S4XI, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x20; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i2); - OK(ENC_UVDOT_ZA_ZZI_S4XI); - } - /* class iclass_16_bit_to_64_bit */ - /* 1|10|0000|1|11|01|Zm=xxxx|1|Rv=xx|0|op=1|i1=x|Zn=xxx|00|U=1|1|off3=xxx */ - if((INSWORD & 0xFFF09878)==0xC1D08818) { - decode_fields32(ENC_UVDOT_ZA_ZZI_D4XI, ctx, instr); - if(!(HaveSME2() && HaveSME_I16I64())) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->esize = 0x40; - ctx->n = UINT((ctx->Zn<<2)); - ctx->m = UINT(ctx->Zm); - ctx->offset = UINT(ctx->off3); - ctx->index = UINT(ctx->i1); - OK(ENC_UVDOT_ZA_ZZI_D4XI); - } - return rc; -} - -/* uxtb_z_p_z.xml */ -int uxtb_z_p_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_byte_merging */ - /* 000|0010|0|size=xx|0|M=1|0|00|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x411A000) { - decode_fields32(ENC_UXTB_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->merging = TRUE; - OK(ENC_UXTB_Z_P_Z_M); - } - /* class iclass_byte_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|00|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x401A000) { - decode_fields32(ENC_UXTB_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 8; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->merging = FALSE; - OK(ENC_UXTB_Z_P_Z_Z); - } - /* class iclass_halfword_merging */ - /* 000|0010|0|size=xx|0|M=1|0|01|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x413A000) { - decode_fields32(ENC_UXTH_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->merging = TRUE; - OK(ENC_UXTH_Z_P_Z_M); - } - /* class iclass_halfword_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|01|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x403A000) { - decode_fields32(ENC_UXTH_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if((!(ctx->size&2))) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x10; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->merging = FALSE; - OK(ENC_UXTH_Z_P_Z_Z); - } - /* class iclass_word_merging */ - /* 000|0010|0|size=xx|0|M=1|0|10|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x415A000) { - decode_fields32(ENC_UXTW_Z_P_Z_M, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->merging = TRUE; - OK(ENC_UXTW_Z_P_Z_M); - } - /* class iclass_word_zeroing */ - /* 000|0010|0|size=xx|0|M=0|0|10|U=1|101|Pg=xxx|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF3FE000)==0x405A000) { - decode_fields32(ENC_UXTW_Z_P_Z_Z, ctx, instr); - if(!HaveSVE2p2() && !HaveSME2p2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size!=3) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->s_esize = 0x20; - ctx->g = UINT(ctx->Pg); - ctx->n = UINT(ctx->Zn); - ctx->d = UINT(ctx->Zd); - ctx->unsigned_ = TRUE; - ctx->merging = FALSE; - OK(ENC_UXTW_Z_P_Z_Z); - } - return rc; -} - -/* uzp1_p_pp.xml */ -int uzp1_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_even */ - /* 000|0010|1|size=xx|1|0|Pm=xxxx|010|opc=01|H=0|0|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF30FE10)==0x5204800) { - decode_fields32(ENC_UZP1_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->part = 0; - OK(ENC_UZP1_P_PP_); - } - /* class iclass_odd */ - /* 000|0010|1|size=xx|1|0|Pm=xxxx|010|opc=01|H=1|0|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF30FE10)==0x5204C00) { - decode_fields32(ENC_UZP2_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->part = 1; - OK(ENC_UZP2_P_PP_); - } - return rc; -} - -/* uzp1_z_zz.xml */ -int uzp1_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_even */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|011|01|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5206800) { - decode_fields32(ENC_UZP1_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_UZP1_Z_ZZ_); - } - /* class iclass_even_quadwords_ */ - /* 000|0010|11|0|1|Zm=xxxxx|000|opc=01|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5A00800) { - decode_fields32(ENC_UZP1_Z_ZZ_Q, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_UZP1_Z_ZZ_Q); - } - /* class iclass_odd */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|011|01|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5206C00) { - decode_fields32(ENC_UZP2_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_UZP2_Z_ZZ_); - } - /* class iclass_odd_quadwords_ */ - /* 000|0010|11|0|1|Zm=xxxxx|000|opc=01|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5A00C00) { - decode_fields32(ENC_UZP2_Z_ZZ_Q, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_UZP2_Z_ZZ_Q); - } - return rc; -} - -/* uzp_mz_z.xml */ -int uzp_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_64_bit_elements */ - /* 1|10|0000|1|size=xx|1|101|10|111000|Zn=xxx|00|Zd=xxx|op=1|0 */ - if((INSWORD & 0xFF3FFC63)==0xC136E002) { - decode_fields32(ENC_UZP_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 && MaxImplementedSVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - OK(ENC_UZP_MZ_Z_4); - } - /* class iclass_128_bit_element */ - /* 1|10|0000|1|00|1|101|11|111000|Zn=xxx|00|Zd=xxx|op=1|0 */ - if((INSWORD & 0xFFFFFC63)==0xC137E002) { - decode_fields32(ENC_UZP_MZ_Z_4Q, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedSVL()<0x200) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - OK(ENC_UZP_MZ_Z_4Q); - } - return rc; -} - -/* uzp_mz_zz.xml */ -int uzp_mz_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_64_bit_elements */ - /* 1|10|0000|1|size=xx|1|Zm=xxxxx|110|100|Zn=xxxxx|Zd=xxxx|op=1 */ - if((INSWORD & 0xFF20FC01)==0xC120D001) { - decode_fields32(ENC_UZP_MZ_ZZ_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - OK(ENC_UZP_MZ_ZZ_2); - } - /* class iclass_128_bit_element */ - /* 1|10|0000|1|00|1|Zm=xxxxx|110|101|Zn=xxxxx|Zd=xxxx|op=1 */ - if((INSWORD & 0xFFE0FC01)==0xC120D401) { - decode_fields32(ENC_UZP_MZ_ZZ_2Q, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedSVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - OK(ENC_UZP_MZ_ZZ_2Q); - } - return rc; -} - -/* uzpq1_z_zz.xml */ -int uzpq1_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|111|01|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400E800) { - decode_fields32(ENC_UZPQ1_Z_ZZ_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_UZPQ1_Z_ZZ_); - } - return rc; -} - -/* uzpq2_z_zz.xml */ -int uzpq2_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|111|01|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400EC00) { - decode_fields32(ENC_UZPQ2_Z_ZZ_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_UZPQ2_Z_ZZ_); - } - return rc; -} - -/* whilege_p_p_rr.xml */ -int whilege_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=0|lt=0|Rn=xxxxx|eq=0|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200000) { - decode_fields32(ENC_WHILEGE_P_P_RR_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_GE; - OK(ENC_WHILEGE_P_P_RR_); - } - return rc; -} - -/* whilege_pn_rr.xml */ -int whilege_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=0|lt=0|Rn=xxxxx|1|eq=0|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204010) { - decode_fields32(ENC_WHILEGE_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = FALSE; - ctx->invert = TRUE; - ctx->op = Cmp_GE; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILEGE_PN_RR_); - } - return rc; -} - -/* whilege_pp_rr.xml */ -int whilege_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=0|lt=0|Rn=xxxxx|1|Pd=xxx|eq=0 */ - if((INSWORD & 0xFF20FC11)==0x25205010) { - decode_fields32(ENC_WHILEGE_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_GE; - OK(ENC_WHILEGE_PP_RR_); - } - return rc; -} - -/* whilegt_p_p_rr.xml */ -int whilegt_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=0|lt=0|Rn=xxxxx|eq=1|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200010) { - decode_fields32(ENC_WHILEGT_P_P_RR_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_GT; - OK(ENC_WHILEGT_P_P_RR_); - } - return rc; -} - -/* whilegt_pn_rr.xml */ -int whilegt_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=0|lt=0|Rn=xxxxx|1|eq=1|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204018) { - decode_fields32(ENC_WHILEGT_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = FALSE; - ctx->invert = TRUE; - ctx->op = Cmp_GT; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILEGT_PN_RR_); - } - return rc; -} - -/* whilegt_pp_rr.xml */ -int whilegt_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=0|lt=0|Rn=xxxxx|1|Pd=xxx|eq=1 */ - if((INSWORD & 0xFF20FC11)==0x25205011) { - decode_fields32(ENC_WHILEGT_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_GT; - OK(ENC_WHILEGT_PP_RR_); - } - return rc; -} - -/* whilehi_p_p_rr.xml */ -int whilehi_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=1|lt=0|Rn=xxxxx|eq=1|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200810) { - decode_fields32(ENC_WHILEHI_P_P_RR_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_GT; - OK(ENC_WHILEHI_P_P_RR_); - } - return rc; -} - -/* whilehi_pn_rr.xml */ -int whilehi_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=1|lt=0|Rn=xxxxx|1|eq=1|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204818) { - decode_fields32(ENC_WHILEHI_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = TRUE; - ctx->invert = TRUE; - ctx->op = Cmp_GT; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILEHI_PN_RR_); - } - return rc; -} - -/* whilehi_pp_rr.xml */ -int whilehi_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=1|lt=0|Rn=xxxxx|1|Pd=xxx|eq=1 */ - if((INSWORD & 0xFF20FC11)==0x25205811) { - decode_fields32(ENC_WHILEHI_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_GT; - OK(ENC_WHILEHI_PP_RR_); - } - return rc; -} - -/* whilehs_p_p_rr.xml */ -int whilehs_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=1|lt=0|Rn=xxxxx|eq=0|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200800) { - decode_fields32(ENC_WHILEHS_P_P_RR_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_GE; - OK(ENC_WHILEHS_P_P_RR_); - } - return rc; -} - -/* whilehs_pn_rr.xml */ -int whilehs_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=1|lt=0|Rn=xxxxx|1|eq=0|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204810) { - decode_fields32(ENC_WHILEHS_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = TRUE; - ctx->invert = TRUE; - ctx->op = Cmp_GE; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILEHS_PN_RR_); - } - return rc; -} - -/* whilehs_pp_rr.xml */ -int whilehs_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=1|lt=0|Rn=xxxxx|1|Pd=xxx|eq=0 */ - if((INSWORD & 0xFF20FC11)==0x25205810) { - decode_fields32(ENC_WHILEHS_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_GE; - OK(ENC_WHILEHS_PP_RR_); - } - return rc; -} - -/* whilele_p_p_rr.xml */ -int whilele_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=0|lt=1|Rn=xxxxx|eq=1|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200410) { - decode_fields32(ENC_WHILELE_P_P_RR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_LE; - OK(ENC_WHILELE_P_P_RR_); - } - return rc; -} - -/* whilele_pn_rr.xml */ -int whilele_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=0|lt=1|Rn=xxxxx|1|eq=1|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204418) { - decode_fields32(ENC_WHILELE_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = FALSE; - ctx->invert = FALSE; - ctx->op = Cmp_LE; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILELE_PN_RR_); - } - return rc; -} - -/* whilele_pp_rr.xml */ -int whilele_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=0|lt=1|Rn=xxxxx|1|Pd=xxx|eq=1 */ - if((INSWORD & 0xFF20FC11)==0x25205411) { - decode_fields32(ENC_WHILELE_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_LE; - OK(ENC_WHILELE_PP_RR_); - } - return rc; -} - -/* whilelo_p_p_rr.xml */ -int whilelo_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=1|lt=1|Rn=xxxxx|eq=0|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200C00) { - decode_fields32(ENC_WHILELO_P_P_RR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_LT; - OK(ENC_WHILELO_P_P_RR_); - } - return rc; -} - -/* whilelo_pn_rr.xml */ -int whilelo_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=1|lt=1|Rn=xxxxx|1|eq=0|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204C10) { - decode_fields32(ENC_WHILELO_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = TRUE; - ctx->invert = FALSE; - ctx->op = Cmp_LT; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILELO_PN_RR_); - } - return rc; -} - -/* whilelo_pp_rr.xml */ -int whilelo_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=1|lt=1|Rn=xxxxx|1|Pd=xxx|eq=0 */ - if((INSWORD & 0xFF20FC11)==0x25205C10) { - decode_fields32(ENC_WHILELO_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_LT; - OK(ENC_WHILELO_PP_RR_); - } - return rc; -} - -/* whilels_p_p_rr.xml */ -int whilels_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=1|lt=1|Rn=xxxxx|eq=1|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200C10) { - decode_fields32(ENC_WHILELS_P_P_RR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_LE; - OK(ENC_WHILELS_P_P_RR_); - } - return rc; -} - -/* whilels_pn_rr.xml */ -int whilels_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=1|lt=1|Rn=xxxxx|1|eq=1|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204C18) { - decode_fields32(ENC_WHILELS_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = TRUE; - ctx->invert = FALSE; - ctx->op = Cmp_LE; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILELS_PN_RR_); - } - return rc; -} - -/* whilels_pp_rr.xml */ -int whilels_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=1|lt=1|Rn=xxxxx|1|Pd=xxx|eq=1 */ - if((INSWORD & 0xFF20FC11)==0x25205C11) { - decode_fields32(ENC_WHILELS_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = TRUE; - ctx->op = Cmp_LE; - OK(ENC_WHILELS_PP_RR_); - } - return rc; -} - -/* whilelt_p_p_rr.xml */ -int whilelt_p_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|0|sf=x|U=0|lt=1|Rn=xxxxx|eq=0|Pd=xxxx */ - if((INSWORD & 0xFF20EC10)==0x25200400) { - decode_fields32(ENC_WHILELT_P_P_RR_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = (0x20) << (UINT(ctx->sf)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_LT; - OK(ENC_WHILELT_P_P_RR_); - } - return rc; -} - -/* whilelt_pn_rr.xml */ -int whilelt_pn_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|vl=x|0|U=0|lt=1|Rn=xxxxx|1|eq=0|PNd=xxx */ - if((INSWORD & 0xFF20DC18)==0x25204410) { - decode_fields32(ENC_WHILELT_PN_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(((1<<3)|ctx->PNd)); - ctx->unsigned_ = FALSE; - ctx->invert = FALSE; - ctx->op = Cmp_LT; - ctx->width = (2) << (UINT(ctx->vl)); - OK(ENC_WHILELT_PN_RR_); - } - return rc; -} - -/* whilelt_pp_rr.xml */ -int whilelt_pp_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|01|01|U=0|lt=1|Rn=xxxxx|1|Pd=xxx|eq=0 */ - if((INSWORD & 0xFF20FC11)==0x25205410) { - decode_fields32(ENC_WHILELT_PP_RR_, ctx, instr); - if(!HaveSME2() && !HaveSVE2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->rsize = 0x40; - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d0 = UINT((ctx->Pd<<1)); - ctx->d1 = UINT(((ctx->Pd<<1)|(1<<0))); - ctx->unsigned_ = FALSE; - ctx->op = Cmp_LT; - OK(ENC_WHILELT_PP_RR_); - } - return rc; -} - -/* whilerw_p_rr.xml */ -int whilerw_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|11|00|Rn=xxxxx|rw=1|Pd=xxxx */ - if((INSWORD & 0xFF20FC10)==0x25203010) { - decode_fields32(ENC_WHILERW_P_RR_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - OK(ENC_WHILERW_P_RR_); - } - return rc; -} - -/* whilewr_p_rr.xml */ -int whilewr_p_rr(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 001|0010|1|size=xx|1|Rm=xxxxx|00|11|00|Rn=xxxxx|rw=0|Pd=xxxx */ - if((INSWORD & 0xFF20FC10)==0x25203000) { - decode_fields32(ENC_WHILEWR_P_RR_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Rn); - ctx->m = UINT(ctx->Rm); - ctx->d = UINT(ctx->Pd); - OK(ENC_WHILEWR_P_RR_); - } - return rc; -} - -/* wrffr_f_p.xml */ -int wrffr_f_p(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve */ - /* 001|0010|1|opc=00|101|0|00|1001|000|Pn=xxxx|00000 */ - if((INSWORD & 0xFFFFFE1F)==0x25289000) { - decode_fields32(ENC_WRFFR_F_P_, ctx, instr); - if(!HaveSVE()) { - EndOfDecode(Decode_UNDEF); - } - ctx->n = UINT(ctx->Pn); - OK(ENC_WRFFR_F_P_); - } - return rc; -} - -/* xar_z_zzi.xml */ -int xar_z_zzi(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 000|0010|0|tszh=xx|1|tszl=xx|imm3=xxx|001|101|Zm=xxxxx|Zdn=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4203400) { - decode_fields32(ENC_XAR_Z_ZZI_, ctx, instr); - if(!HaveSVE2() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->tsize = ((ctx->tszh<<2)|ctx->tszl); - if(ctx->tsize==0) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (HighestSetBitNZ(ctx->tsize)); - ctx->m = UINT(ctx->Zm); - ctx->dn = UINT(ctx->Zdn); - ctx->rot = ((2) * (ctx->esize))-UINT(((ctx->tsize<<3)|ctx->imm3)); - OK(ENC_XAR_Z_ZZI_); - } - return rc; -} - -/* zero_za1_ri.xml */ -int zero_za1_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_two_za_single_vectors */ - /* 1|10|0000|0000011|opc=000|Rv=xx|0000000000|off3=xxx */ - if((INSWORD & 0xFFFF9FF8)==0xC00C0000) { - decode_fields32(ENC_ZERO_ZA1_RI_2, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->ngrp = 2; - OK(ENC_ZERO_ZA1_RI_2); - } - /* class iclass_four_za_single_vectors */ - /* 1|10|0000|0000011|opc=100|Rv=xx|0000000000|off3=xxx */ - if((INSWORD & 0xFFFF9FF8)==0xC00E0000) { - decode_fields32(ENC_ZERO_ZA1_RI_4, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT(ctx->off3); - ctx->ngrp = 4; - OK(ENC_ZERO_ZA1_RI_4); - } - return rc; -} - -/* zero_za2_ri.xml */ -int zero_za2_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_double_vector */ - /* 1|10|0000|0000011|opc=001|Rv=xx|0000000000|off3=xxx */ - if((INSWORD & 0xFFFF9FF8)==0xC00C8000) { - decode_fields32(ENC_ZERO_ZA2_RI_1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT((ctx->off3<<1)); - ctx->ngrp = 1; - ctx->nvec = 2; - OK(ENC_ZERO_ZA2_RI_1); - } - /* class iclass_two_za_double_vectors */ - /* 1|10|0000|0000011|opc=010|Rv=xx|0000000000|0|off2=xx */ - if((INSWORD & 0xFFFF9FFC)==0xC00D0000) { - decode_fields32(ENC_ZERO_ZA2_RI_2, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->ngrp = 2; - ctx->nvec = 2; - OK(ENC_ZERO_ZA2_RI_2); - } - /* class iclass_four_za_double_vectors */ - /* 1|10|0000|0000011|opc=011|Rv=xx|0000000000|0|off2=xx */ - if((INSWORD & 0xFFFF9FFC)==0xC00D8000) { - decode_fields32(ENC_ZERO_ZA2_RI_4, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT((ctx->off2<<1)); - ctx->ngrp = 4; - ctx->nvec = 2; - OK(ENC_ZERO_ZA2_RI_4); - } - return rc; -} - -/* zero_za4_ri.xml */ -int zero_za4_ri(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_one_za_quad_vector */ - /* 1|10|0000|0000011|opc=101|Rv=xx|0000000000|0|off2=xx */ - if((INSWORD & 0xFFFF9FFC)==0xC00E8000) { - decode_fields32(ENC_ZERO_ZA4_RI_1, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT((ctx->off2<<2)); - ctx->ngrp = 1; - ctx->nvec = 4; - OK(ENC_ZERO_ZA4_RI_1); - } - /* class iclass_two_za_quad_vectors */ - /* 1|10|0000|0000011|opc=110|Rv=xx|0000000000|00|o1=x */ - if((INSWORD & 0xFFFF9FFE)==0xC00F0000) { - decode_fields32(ENC_ZERO_ZA4_RI_2, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->ngrp = 2; - ctx->nvec = 4; - OK(ENC_ZERO_ZA4_RI_2); - } - /* class iclass_four_za_quad_vectors */ - /* 1|10|0000|0000011|opc=111|Rv=xx|0000000000|00|o1=x */ - if((INSWORD & 0xFFFF9FFE)==0xC00F8000) { - decode_fields32(ENC_ZERO_ZA4_RI_4, ctx, instr); - if(!HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->v = UINT(((2<<2)|ctx->Rv)); - ctx->offset = UINT((ctx->o1<<2)); - ctx->ngrp = 4; - ctx->nvec = 4; - OK(ENC_ZERO_ZA4_RI_4); - } - return rc; -} - -/* zero_za_i.xml */ -int zero_za_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme */ - /* 1|10|0000|0000010|0000000000|imm8=xxxxxxxx */ - if((INSWORD & 0xFFFFFF00)==0xC0080000) { - decode_fields32(ENC_ZERO_ZA_I_, ctx, instr); - if(!HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->mask = ctx->imm8; - ctx->esize = 0x40; - OK(ENC_ZERO_ZA_I_); - } - return rc; -} - -/* zero_zt_i.xml */ -int zero_zt_i(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sme2 */ - /* 1|10|0000|0010010|00000000000000|opc=0001 */ - if((INSWORD & 0xFFFFFFFF)==0xC0480001) { - decode_fields32(ENC_ZERO_ZT_I_, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - OK(ENC_ZERO_ZT_I_); - } - return rc; -} - -/* zip1_p_pp.xml */ -int zip1_p_pp(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_high_halves */ - /* 000|0010|1|size=xx|1|0|Pm=xxxx|010|opc=00|H=1|0|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF30FE10)==0x5204400) { - decode_fields32(ENC_ZIP2_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->part = 1; - OK(ENC_ZIP2_P_PP_); - } - /* class iclass_low_halves */ - /* 000|0010|1|size=xx|1|0|Pm=xxxx|010|opc=00|H=0|0|Pn=xxxx|0|Pd=xxxx */ - if((INSWORD & 0xFF30FE10)==0x5204000) { - decode_fields32(ENC_ZIP1_P_PP_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Pn); - ctx->m = UINT(ctx->Pm); - ctx->d = UINT(ctx->Pd); - ctx->part = 0; - OK(ENC_ZIP1_P_PP_); - } - return rc; -} - -/* zip1_z_zz.xml */ -int zip1_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_high_halves */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|011|00|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5206400) { - decode_fields32(ENC_ZIP2_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_ZIP2_Z_ZZ_); - } - /* class iclass_high_halves_quadwords_ */ - /* 000|0010|11|0|1|Zm=xxxxx|000|opc=00|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5A00400) { - decode_fields32(ENC_ZIP2_Z_ZZ_Q, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_ZIP2_Z_ZZ_Q); - } - /* class iclass_low_halves */ - /* 000|0010|1|size=xx|1|Zm=xxxxx|011|00|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x5206000) { - decode_fields32(ENC_ZIP1_Z_ZZ_, ctx, instr); - if(!HaveSVE() && !HaveSME()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_ZIP1_Z_ZZ_); - } - /* class iclass_low_halves_quadwords_ */ - /* 000|0010|11|0|1|Zm=xxxxx|000|opc=00|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFFE0FC00)==0x5A00000) { - decode_fields32(ENC_ZIP1_Z_ZZ_Q, ctx, instr); - if(!HaveF64MM()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_ZIP1_Z_ZZ_Q); - } - return rc; -} - -/* zip_mz_z.xml */ -int zip_mz_z(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_64_bit_elements */ - /* 1|10|0000|1|size=xx|1|101|10|111000|Zn=xxx|00|Zd=xxx|op=0|0 */ - if((INSWORD & 0xFF3FFC63)==0xC136E000) { - decode_fields32(ENC_ZIP_MZ_Z_4, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(ctx->size==3 && MaxImplementedSVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - OK(ENC_ZIP_MZ_Z_4); - } - /* class iclass_128_bit_element */ - /* 1|10|0000|1|00|1|101|11|111000|Zn=xxx|00|Zd=xxx|op=0|0 */ - if((INSWORD & 0xFFFFFC63)==0xC137E000) { - decode_fields32(ENC_ZIP_MZ_Z_4Q, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedSVL()<0x200) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT((ctx->Zn<<2)); - ctx->d = UINT((ctx->Zd<<2)); - OK(ENC_ZIP_MZ_Z_4Q); - } - return rc; -} - -/* zip_mz_zz.xml */ -int zip_mz_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_8_bit_to_64_bit_elements */ - /* 1|10|0000|1|size=xx|1|Zm=xxxxx|110|100|Zn=xxxxx|Zd=xxxx|op=0 */ - if((INSWORD & 0xFF20FC01)==0xC120D000) { - decode_fields32(ENC_ZIP_MZ_ZZ_2, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - OK(ENC_ZIP_MZ_ZZ_2); - } - /* class iclass_128_bit_element */ - /* 1|10|0000|1|00|1|Zm=xxxxx|110|101|Zn=xxxxx|Zd=xxxx|op=0 */ - if((INSWORD & 0xFFE0FC01)==0xC120D400) { - decode_fields32(ENC_ZIP_MZ_ZZ_2Q, ctx, instr); - if(!HaveSME2()) { - EndOfDecode(Decode_UNDEF); - } - if(MaxImplementedSVL()<0x100) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = 0x80; - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT((ctx->Zd<<1)); - OK(ENC_ZIP_MZ_ZZ_2Q); - } - return rc; -} - -/* zipq1_z_zz.xml */ -int zipq1_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|111|00|H=0|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400E000) { - decode_fields32(ENC_ZIPQ1_Z_ZZ_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 0; - OK(ENC_ZIPQ1_Z_ZZ_); - } - return rc; -} - -/* zipq2_z_zz.xml */ -int zipq2_z_zz(context *ctx, Instruction *instr) -{ - int rc = DECODE_STATUS_UNMATCHED; - /* class iclass_sve2 */ - /* 010|0010|0|size=xx|0|Zm=xxxxx|111|00|H=1|Zn=xxxxx|Zd=xxxxx */ - if((INSWORD & 0xFF20FC00)==0x4400E400) { - decode_fields32(ENC_ZIPQ2_Z_ZZ_, ctx, instr); - if(!HaveSVE2p1() && !HaveSME2p1()) { - EndOfDecode(Decode_UNDEF); - } - ctx->esize = (8) << (UINT(ctx->size)); - ctx->n = UINT(ctx->Zn); - ctx->m = UINT(ctx->Zm); - ctx->d = UINT(ctx->Zd); - ctx->part = 1; - OK(ENC_ZIPQ2_Z_ZZ_); - } - return rc; -} - diff --git a/arch/arm64/disassembler/decode2.h b/arch/arm64/disassembler/decode2.h deleted file mode 100644 index 2fbd00cf7..000000000 --- a/arch/arm64/disassembler/decode2.h +++ /dev/null @@ -1,2294 +0,0 @@ -/* GENERATED FILE */ -#pragma once -int ABS(context *ctx, Instruction *instr); -int ABS_advsimd(context *ctx, Instruction *instr); -int ADC(context *ctx, Instruction *instr); -int ADCS(context *ctx, Instruction *instr); -int ADDG(context *ctx, Instruction *instr); -int ADDHN_advsimd(context *ctx, Instruction *instr); -int ADDPT(context *ctx, Instruction *instr); -int ADDP_advsimd_pair(context *ctx, Instruction *instr); -int ADDP_advsimd_vec(context *ctx, Instruction *instr); -int ADDS_addsub_ext(context *ctx, Instruction *instr); -int ADDS_addsub_imm(context *ctx, Instruction *instr); -int ADDS_addsub_shift(context *ctx, Instruction *instr); -int ADDV_advsimd(context *ctx, Instruction *instr); -int ADD_addsub_ext(context *ctx, Instruction *instr); -int ADD_addsub_imm(context *ctx, Instruction *instr); -int ADD_addsub_shift(context *ctx, Instruction *instr); -int ADD_advsimd(context *ctx, Instruction *instr); -int ADR(context *ctx, Instruction *instr); -int ADRP(context *ctx, Instruction *instr); -int AESD_advsimd(context *ctx, Instruction *instr); -int AESE_advsimd(context *ctx, Instruction *instr); -int AESIMC_advsimd(context *ctx, Instruction *instr); -int AESMC_advsimd(context *ctx, Instruction *instr); -int ANDS_log_imm(context *ctx, Instruction *instr); -int ANDS_log_shift(context *ctx, Instruction *instr); -int AND_advsimd(context *ctx, Instruction *instr); -int AND_log_imm(context *ctx, Instruction *instr); -int AND_log_shift(context *ctx, Instruction *instr); -int APAS_SYS(context *ctx, Instruction *instr); -int ASRV(context *ctx, Instruction *instr); -int ASR_ASRV(context *ctx, Instruction *instr); -int ASR_SBFM(context *ctx, Instruction *instr); -int AT_SYS(context *ctx, Instruction *instr); -int AUTDA(context *ctx, Instruction *instr); -int AUTDB(context *ctx, Instruction *instr); -int AUTIA(context *ctx, Instruction *instr); -int AUTIA171615(context *ctx, Instruction *instr); -int AUTIASPPCR(context *ctx, Instruction *instr); -int AUTIASPPC_imm(context *ctx, Instruction *instr); -int AUTIB(context *ctx, Instruction *instr); -int AUTIB171615(context *ctx, Instruction *instr); -int AUTIBSPPCR(context *ctx, Instruction *instr); -int AUTIBSPPC_imm(context *ctx, Instruction *instr); -int AXFLAG(context *ctx, Instruction *instr); -int BCAX_advsimd(context *ctx, Instruction *instr); -int BC_cond(context *ctx, Instruction *instr); -int BF12CVTL_advsimd(context *ctx, Instruction *instr); -int BFCVTN_advsimd(context *ctx, Instruction *instr); -int BFCVT_float(context *ctx, Instruction *instr); -int BFC_BFM(context *ctx, Instruction *instr); -int BFDOT_advsimd_elt(context *ctx, Instruction *instr); -int BFDOT_advsimd_vec(context *ctx, Instruction *instr); -int BFI_BFM(context *ctx, Instruction *instr); -int BFM(context *ctx, Instruction *instr); -int BFMLAL_advsimd_elt(context *ctx, Instruction *instr); -int BFMLAL_advsimd_vec(context *ctx, Instruction *instr); -int BFMMLA_advsimd(context *ctx, Instruction *instr); -int BFXIL_BFM(context *ctx, Instruction *instr); -int BICS(context *ctx, Instruction *instr); -int BIC_advsimd_imm(context *ctx, Instruction *instr); -int BIC_advsimd_reg(context *ctx, Instruction *instr); -int BIC_log_shift(context *ctx, Instruction *instr); -int BIF_advsimd(context *ctx, Instruction *instr); -int BIT_advsimd(context *ctx, Instruction *instr); -int BL(context *ctx, Instruction *instr); -int BLR(context *ctx, Instruction *instr); -int BLRA(context *ctx, Instruction *instr); -int BR(context *ctx, Instruction *instr); -int BRA(context *ctx, Instruction *instr); -int BRB_SYS(context *ctx, Instruction *instr); -int BRK(context *ctx, Instruction *instr); -int BSL_advsimd(context *ctx, Instruction *instr); -int BTI(context *ctx, Instruction *instr); -int B_cond(context *ctx, Instruction *instr); -int B_uncond(context *ctx, Instruction *instr); -int CAS(context *ctx, Instruction *instr); -int CASB(context *ctx, Instruction *instr); -int CASH(context *ctx, Instruction *instr); -int CASP(context *ctx, Instruction *instr); -int CASPT(context *ctx, Instruction *instr); -int CAST(context *ctx, Instruction *instr); -int CBBLE_regs(context *ctx, Instruction *instr); -int CBBLO_regs(context *ctx, Instruction *instr); -int CBBLS_regs(context *ctx, Instruction *instr); -int CBBLT_regs(context *ctx, Instruction *instr); -int CBBcc_regs(context *ctx, Instruction *instr); -int CBGE_imm(context *ctx, Instruction *instr); -int CBHLE_regs(context *ctx, Instruction *instr); -int CBHLO_regs(context *ctx, Instruction *instr); -int CBHLS_regs(context *ctx, Instruction *instr); -int CBHLT_regs(context *ctx, Instruction *instr); -int CBHS_imm(context *ctx, Instruction *instr); -int CBHcc_regs(context *ctx, Instruction *instr); -int CBLE_imm(context *ctx, Instruction *instr); -int CBLE_regs(context *ctx, Instruction *instr); -int CBLO_regs(context *ctx, Instruction *instr); -int CBLS_imm(context *ctx, Instruction *instr); -int CBLS_regs(context *ctx, Instruction *instr); -int CBLT_regs(context *ctx, Instruction *instr); -int CBNZ(context *ctx, Instruction *instr); -int CBZ(context *ctx, Instruction *instr); -int CBcc_imm(context *ctx, Instruction *instr); -int CBcc_regs(context *ctx, Instruction *instr); -int CCMN_imm(context *ctx, Instruction *instr); -int CCMN_reg(context *ctx, Instruction *instr); -int CCMP_imm(context *ctx, Instruction *instr); -int CCMP_reg(context *ctx, Instruction *instr); -int CFINV(context *ctx, Instruction *instr); -int CFP_SYS(context *ctx, Instruction *instr); -int CHKFEAT(context *ctx, Instruction *instr); -int CINC_CSINC(context *ctx, Instruction *instr); -int CINV_CSINV(context *ctx, Instruction *instr); -int CLRBHB(context *ctx, Instruction *instr); -int CLREX(context *ctx, Instruction *instr); -int CLS_advsimd(context *ctx, Instruction *instr); -int CLS_int(context *ctx, Instruction *instr); -int CLZ_advsimd(context *ctx, Instruction *instr); -int CLZ_int(context *ctx, Instruction *instr); -int CMEQ_advsimd_reg(context *ctx, Instruction *instr); -int CMEQ_advsimd_zero(context *ctx, Instruction *instr); -int CMGE_advsimd_reg(context *ctx, Instruction *instr); -int CMGE_advsimd_zero(context *ctx, Instruction *instr); -int CMGT_advsimd_reg(context *ctx, Instruction *instr); -int CMGT_advsimd_zero(context *ctx, Instruction *instr); -int CMHI_advsimd(context *ctx, Instruction *instr); -int CMHS_advsimd(context *ctx, Instruction *instr); -int CMLE_advsimd(context *ctx, Instruction *instr); -int CMLT_advsimd(context *ctx, Instruction *instr); -int CMN_ADDS_addsub_ext(context *ctx, Instruction *instr); -int CMN_ADDS_addsub_imm(context *ctx, Instruction *instr); -int CMN_ADDS_addsub_shift(context *ctx, Instruction *instr); -int CMPP_SUBPS(context *ctx, Instruction *instr); -int CMP_SUBS_addsub_ext(context *ctx, Instruction *instr); -int CMP_SUBS_addsub_imm(context *ctx, Instruction *instr); -int CMP_SUBS_addsub_shift(context *ctx, Instruction *instr); -int CMTST_advsimd(context *ctx, Instruction *instr); -int CNEG_CSNEG(context *ctx, Instruction *instr); -int CNT(context *ctx, Instruction *instr); -int CNT_advsimd(context *ctx, Instruction *instr); -int COSP_SYS(context *ctx, Instruction *instr); -int CPP_SYS(context *ctx, Instruction *instr); -int CPYFP(context *ctx, Instruction *instr); -int CPYFPN(context *ctx, Instruction *instr); -int CPYFPRN(context *ctx, Instruction *instr); -int CPYFPRT(context *ctx, Instruction *instr); -int CPYFPRTN(context *ctx, Instruction *instr); -int CPYFPRTRN(context *ctx, Instruction *instr); -int CPYFPRTWN(context *ctx, Instruction *instr); -int CPYFPT(context *ctx, Instruction *instr); -int CPYFPTN(context *ctx, Instruction *instr); -int CPYFPTRN(context *ctx, Instruction *instr); -int CPYFPTWN(context *ctx, Instruction *instr); -int CPYFPWN(context *ctx, Instruction *instr); -int CPYFPWT(context *ctx, Instruction *instr); -int CPYFPWTN(context *ctx, Instruction *instr); -int CPYFPWTRN(context *ctx, Instruction *instr); -int CPYFPWTWN(context *ctx, Instruction *instr); -int CPYP(context *ctx, Instruction *instr); -int CPYPN(context *ctx, Instruction *instr); -int CPYPRN(context *ctx, Instruction *instr); -int CPYPRT(context *ctx, Instruction *instr); -int CPYPRTN(context *ctx, Instruction *instr); -int CPYPRTRN(context *ctx, Instruction *instr); -int CPYPRTWN(context *ctx, Instruction *instr); -int CPYPT(context *ctx, Instruction *instr); -int CPYPTN(context *ctx, Instruction *instr); -int CPYPTRN(context *ctx, Instruction *instr); -int CPYPTWN(context *ctx, Instruction *instr); -int CPYPWN(context *ctx, Instruction *instr); -int CPYPWT(context *ctx, Instruction *instr); -int CPYPWTN(context *ctx, Instruction *instr); -int CPYPWTRN(context *ctx, Instruction *instr); -int CPYPWTWN(context *ctx, Instruction *instr); -int CRC32(context *ctx, Instruction *instr); -int CRC32C(context *ctx, Instruction *instr); -int CSDB(context *ctx, Instruction *instr); -int CSEL(context *ctx, Instruction *instr); -int CSETM_CSINV(context *ctx, Instruction *instr); -int CSET_CSINC(context *ctx, Instruction *instr); -int CSINC(context *ctx, Instruction *instr); -int CSINV(context *ctx, Instruction *instr); -int CSNEG(context *ctx, Instruction *instr); -int CTZ(context *ctx, Instruction *instr); -int DCPS1(context *ctx, Instruction *instr); -int DCPS2(context *ctx, Instruction *instr); -int DCPS3(context *ctx, Instruction *instr); -int DC_SYS(context *ctx, Instruction *instr); -int DGH(context *ctx, Instruction *instr); -int DMB(context *ctx, Instruction *instr); -int DRPS(context *ctx, Instruction *instr); -int DSB(context *ctx, Instruction *instr); -int DUP_advsimd_elt(context *ctx, Instruction *instr); -int DUP_advsimd_gen(context *ctx, Instruction *instr); -int DVP_SYS(context *ctx, Instruction *instr); -int EON(context *ctx, Instruction *instr); -int EOR3_advsimd(context *ctx, Instruction *instr); -int EOR_advsimd(context *ctx, Instruction *instr); -int EOR_log_imm(context *ctx, Instruction *instr); -int EOR_log_shift(context *ctx, Instruction *instr); -int ERET(context *ctx, Instruction *instr); -int ERETA(context *ctx, Instruction *instr); -int ESB(context *ctx, Instruction *instr); -int EXTR(context *ctx, Instruction *instr); -int EXT_advsimd(context *ctx, Instruction *instr); -int F12CVTL_advsimd(context *ctx, Instruction *instr); -int FABD_advsimd(context *ctx, Instruction *instr); -int FABS_advsimd(context *ctx, Instruction *instr); -int FABS_float(context *ctx, Instruction *instr); -int FACGE_advsimd(context *ctx, Instruction *instr); -int FACGT_advsimd(context *ctx, Instruction *instr); -int FADDP_advsimd_pair(context *ctx, Instruction *instr); -int FADDP_advsimd_vec(context *ctx, Instruction *instr); -int FADD_advsimd(context *ctx, Instruction *instr); -int FADD_float(context *ctx, Instruction *instr); -int FAMAX_advsimd(context *ctx, Instruction *instr); -int FAMIN_advsimd(context *ctx, Instruction *instr); -int FCADD_advsimd_vec(context *ctx, Instruction *instr); -int FCCMPE_float(context *ctx, Instruction *instr); -int FCCMP_float(context *ctx, Instruction *instr); -int FCMEQ_advsimd_reg(context *ctx, Instruction *instr); -int FCMEQ_advsimd_zero(context *ctx, Instruction *instr); -int FCMGE_advsimd_reg(context *ctx, Instruction *instr); -int FCMGE_advsimd_zero(context *ctx, Instruction *instr); -int FCMGT_advsimd_reg(context *ctx, Instruction *instr); -int FCMGT_advsimd_zero(context *ctx, Instruction *instr); -int FCMLA_advsimd_elt(context *ctx, Instruction *instr); -int FCMLA_advsimd_vec(context *ctx, Instruction *instr); -int FCMLE_advsimd(context *ctx, Instruction *instr); -int FCMLT_advsimd(context *ctx, Instruction *instr); -int FCMPE_float(context *ctx, Instruction *instr); -int FCMP_float(context *ctx, Instruction *instr); -int FCSEL_float(context *ctx, Instruction *instr); -int FCVTAS_advsimd(context *ctx, Instruction *instr); -int FCVTAS_float(context *ctx, Instruction *instr); -int FCVTAS_sisd(context *ctx, Instruction *instr); -int FCVTAU_advsimd(context *ctx, Instruction *instr); -int FCVTAU_float(context *ctx, Instruction *instr); -int FCVTAU_sisd(context *ctx, Instruction *instr); -int FCVTL_advsimd(context *ctx, Instruction *instr); -int FCVTMS_advsimd(context *ctx, Instruction *instr); -int FCVTMS_float(context *ctx, Instruction *instr); -int FCVTMS_sisd(context *ctx, Instruction *instr); -int FCVTMU_advsimd(context *ctx, Instruction *instr); -int FCVTMU_float(context *ctx, Instruction *instr); -int FCVTMU_sisd(context *ctx, Instruction *instr); -int FCVTNS_advsimd(context *ctx, Instruction *instr); -int FCVTNS_float(context *ctx, Instruction *instr); -int FCVTNS_sisd(context *ctx, Instruction *instr); -int FCVTNU_advsimd(context *ctx, Instruction *instr); -int FCVTNU_float(context *ctx, Instruction *instr); -int FCVTNU_sisd(context *ctx, Instruction *instr); -int FCVTN_advsimd(context *ctx, Instruction *instr); -int FCVTN_advsimd_168(context *ctx, Instruction *instr); -int FCVTN_advsimd_328(context *ctx, Instruction *instr); -int FCVTPS_advsimd(context *ctx, Instruction *instr); -int FCVTPS_float(context *ctx, Instruction *instr); -int FCVTPS_sisd(context *ctx, Instruction *instr); -int FCVTPU_advsimd(context *ctx, Instruction *instr); -int FCVTPU_float(context *ctx, Instruction *instr); -int FCVTPU_sisd(context *ctx, Instruction *instr); -int FCVTXN_advsimd(context *ctx, Instruction *instr); -int FCVTZS_advsimd_fix(context *ctx, Instruction *instr); -int FCVTZS_advsimd_int(context *ctx, Instruction *instr); -int FCVTZS_float_fix(context *ctx, Instruction *instr); -int FCVTZS_float_int(context *ctx, Instruction *instr); -int FCVTZS_sisd(context *ctx, Instruction *instr); -int FCVTZU_advsimd_fix(context *ctx, Instruction *instr); -int FCVTZU_advsimd_int(context *ctx, Instruction *instr); -int FCVTZU_float_fix(context *ctx, Instruction *instr); -int FCVTZU_float_int(context *ctx, Instruction *instr); -int FCVTZU_sisd(context *ctx, Instruction *instr); -int FCVT_float(context *ctx, Instruction *instr); -int FDIV_advsimd(context *ctx, Instruction *instr); -int FDIV_float(context *ctx, Instruction *instr); -int FDOT_advsimd_2wayelem(context *ctx, Instruction *instr); -int FDOT_advsimd_2wayvec(context *ctx, Instruction *instr); -int FDOT_advsimd_4wayelem(context *ctx, Instruction *instr); -int FDOT_advsimd_4wayvec(context *ctx, Instruction *instr); -int FDOT_advsimd_elt_fp16fp32(context *ctx, Instruction *instr); -int FDOT_advsimd_fp16fp32(context *ctx, Instruction *instr); -int FJCVTZS(context *ctx, Instruction *instr); -int FMADD_float(context *ctx, Instruction *instr); -int FMAXNMP_advsimd_pair(context *ctx, Instruction *instr); -int FMAXNMP_advsimd_vec(context *ctx, Instruction *instr); -int FMAXNMV_advsimd(context *ctx, Instruction *instr); -int FMAXNM_advsimd(context *ctx, Instruction *instr); -int FMAXNM_float(context *ctx, Instruction *instr); -int FMAXP_advsimd_pair(context *ctx, Instruction *instr); -int FMAXP_advsimd_vec(context *ctx, Instruction *instr); -int FMAXV_advsimd(context *ctx, Instruction *instr); -int FMAX_advsimd(context *ctx, Instruction *instr); -int FMAX_float(context *ctx, Instruction *instr); -int FMINNMP_advsimd_pair(context *ctx, Instruction *instr); -int FMINNMP_advsimd_vec(context *ctx, Instruction *instr); -int FMINNMV_advsimd(context *ctx, Instruction *instr); -int FMINNM_advsimd(context *ctx, Instruction *instr); -int FMINNM_float(context *ctx, Instruction *instr); -int FMINP_advsimd_pair(context *ctx, Instruction *instr); -int FMINP_advsimd_vec(context *ctx, Instruction *instr); -int FMINV_advsimd(context *ctx, Instruction *instr); -int FMIN_advsimd(context *ctx, Instruction *instr); -int FMIN_float(context *ctx, Instruction *instr); -int FMLALB_advsimd_elem(context *ctx, Instruction *instr); -int FMLALB_advsimd_vec(context *ctx, Instruction *instr); -int FMLALLBB_advsimd_elem(context *ctx, Instruction *instr); -int FMLALLBB_advsimd_vec(context *ctx, Instruction *instr); -int FMLAL_advsimd_elt(context *ctx, Instruction *instr); -int FMLAL_advsimd_vec(context *ctx, Instruction *instr); -int FMLA_advsimd_elt(context *ctx, Instruction *instr); -int FMLA_advsimd_vec(context *ctx, Instruction *instr); -int FMLSL_advsimd_elt(context *ctx, Instruction *instr); -int FMLSL_advsimd_vec(context *ctx, Instruction *instr); -int FMLS_advsimd_elt(context *ctx, Instruction *instr); -int FMLS_advsimd_vec(context *ctx, Instruction *instr); -int FMMLA_FP8FP16(context *ctx, Instruction *instr); -int FMMLA_FP8FP32(context *ctx, Instruction *instr); -int FMMLA_advsimd_fp16fp16(context *ctx, Instruction *instr); -int FMMLA_advsimd_fp16fp32(context *ctx, Instruction *instr); -int FMOV_advsimd(context *ctx, Instruction *instr); -int FMOV_float(context *ctx, Instruction *instr); -int FMOV_float_gen(context *ctx, Instruction *instr); -int FMOV_float_imm(context *ctx, Instruction *instr); -int FMSUB_float(context *ctx, Instruction *instr); -int FMULX_advsimd_elt(context *ctx, Instruction *instr); -int FMULX_advsimd_vec(context *ctx, Instruction *instr); -int FMUL_advsimd_elt(context *ctx, Instruction *instr); -int FMUL_advsimd_vec(context *ctx, Instruction *instr); -int FMUL_float(context *ctx, Instruction *instr); -int FNEG_advsimd(context *ctx, Instruction *instr); -int FNEG_float(context *ctx, Instruction *instr); -int FNMADD_float(context *ctx, Instruction *instr); -int FNMSUB_float(context *ctx, Instruction *instr); -int FNMUL_float(context *ctx, Instruction *instr); -int FRECPE_advsimd(context *ctx, Instruction *instr); -int FRECPS_advsimd(context *ctx, Instruction *instr); -int FRECPX_advsimd(context *ctx, Instruction *instr); -int FRINT32X_advsimd(context *ctx, Instruction *instr); -int FRINT32X_float(context *ctx, Instruction *instr); -int FRINT32Z_advsimd(context *ctx, Instruction *instr); -int FRINT32Z_float(context *ctx, Instruction *instr); -int FRINT64X_advsimd(context *ctx, Instruction *instr); -int FRINT64X_float(context *ctx, Instruction *instr); -int FRINT64Z_advsimd(context *ctx, Instruction *instr); -int FRINT64Z_float(context *ctx, Instruction *instr); -int FRINTA_advsimd(context *ctx, Instruction *instr); -int FRINTA_float(context *ctx, Instruction *instr); -int FRINTI_advsimd(context *ctx, Instruction *instr); -int FRINTI_float(context *ctx, Instruction *instr); -int FRINTM_advsimd(context *ctx, Instruction *instr); -int FRINTM_float(context *ctx, Instruction *instr); -int FRINTN_advsimd(context *ctx, Instruction *instr); -int FRINTN_float(context *ctx, Instruction *instr); -int FRINTP_advsimd(context *ctx, Instruction *instr); -int FRINTP_float(context *ctx, Instruction *instr); -int FRINTX_advsimd(context *ctx, Instruction *instr); -int FRINTX_float(context *ctx, Instruction *instr); -int FRINTZ_advsimd(context *ctx, Instruction *instr); -int FRINTZ_float(context *ctx, Instruction *instr); -int FRSQRTE_advsimd(context *ctx, Instruction *instr); -int FRSQRTS_advsimd(context *ctx, Instruction *instr); -int FSCALE_advsimd(context *ctx, Instruction *instr); -int FSQRT_advsimd(context *ctx, Instruction *instr); -int FSQRT_float(context *ctx, Instruction *instr); -int FSUB_advsimd(context *ctx, Instruction *instr); -int FSUB_float(context *ctx, Instruction *instr); -int GCSB(context *ctx, Instruction *instr); -int GCSPOPCX_SYS(context *ctx, Instruction *instr); -int GCSPOPM_SYSL(context *ctx, Instruction *instr); -int GCSPOPX_SYS(context *ctx, Instruction *instr); -int GCSPUSHM_SYS(context *ctx, Instruction *instr); -int GCSPUSHX_SYS(context *ctx, Instruction *instr); -int GCSSS1_SYS(context *ctx, Instruction *instr); -int GCSSS2_SYSL(context *ctx, Instruction *instr); -int GCSSTR(context *ctx, Instruction *instr); -int GCSSTTR(context *ctx, Instruction *instr); -int GICR_SYSL(context *ctx, Instruction *instr); -int GIC_SYS(context *ctx, Instruction *instr); -int GMI(context *ctx, Instruction *instr); -int GSB_SYS(context *ctx, Instruction *instr); -int HINT(context *ctx, Instruction *instr); -int HLT(context *ctx, Instruction *instr); -int HVC(context *ctx, Instruction *instr); -int IC_SYS(context *ctx, Instruction *instr); -int INS_advsimd_elt(context *ctx, Instruction *instr); -int INS_advsimd_gen(context *ctx, Instruction *instr); -int IRG(context *ctx, Instruction *instr); -int ISB(context *ctx, Instruction *instr); -int LD1R_advsimd(context *ctx, Instruction *instr); -int LD1_advsimd_mult(context *ctx, Instruction *instr); -int LD1_advsimd_sngl(context *ctx, Instruction *instr); -int LD2R_advsimd(context *ctx, Instruction *instr); -int LD2_advsimd_mult(context *ctx, Instruction *instr); -int LD2_advsimd_sngl(context *ctx, Instruction *instr); -int LD3R_advsimd(context *ctx, Instruction *instr); -int LD3_advsimd_mult(context *ctx, Instruction *instr); -int LD3_advsimd_sngl(context *ctx, Instruction *instr); -int LD4R_advsimd(context *ctx, Instruction *instr); -int LD4_advsimd_mult(context *ctx, Instruction *instr); -int LD4_advsimd_sngl(context *ctx, Instruction *instr); -int LD64B(context *ctx, Instruction *instr); -int LDADD(context *ctx, Instruction *instr); -int LDADDB(context *ctx, Instruction *instr); -int LDADDH(context *ctx, Instruction *instr); -int LDAP1_advsimd_sngl(context *ctx, Instruction *instr); -int LDAPP_gen(context *ctx, Instruction *instr); -int LDAPR(context *ctx, Instruction *instr); -int LDAPRB(context *ctx, Instruction *instr); -int LDAPRH(context *ctx, Instruction *instr); -int LDAPURB(context *ctx, Instruction *instr); -int LDAPURH(context *ctx, Instruction *instr); -int LDAPURSB(context *ctx, Instruction *instr); -int LDAPURSH(context *ctx, Instruction *instr); -int LDAPURSW(context *ctx, Instruction *instr); -int LDAPUR_fpsimd(context *ctx, Instruction *instr); -int LDAPUR_gen(context *ctx, Instruction *instr); -int LDAP_gen(context *ctx, Instruction *instr); -int LDAR(context *ctx, Instruction *instr); -int LDARB(context *ctx, Instruction *instr); -int LDARH(context *ctx, Instruction *instr); -int LDATXR(context *ctx, Instruction *instr); -int LDAXP(context *ctx, Instruction *instr); -int LDAXR(context *ctx, Instruction *instr); -int LDAXRB(context *ctx, Instruction *instr); -int LDAXRH(context *ctx, Instruction *instr); -int LDBFADD(context *ctx, Instruction *instr); -int LDBFMAX(context *ctx, Instruction *instr); -int LDBFMAXNM(context *ctx, Instruction *instr); -int LDBFMIN(context *ctx, Instruction *instr); -int LDBFMINNM(context *ctx, Instruction *instr); -int LDCLR(context *ctx, Instruction *instr); -int LDCLRB(context *ctx, Instruction *instr); -int LDCLRH(context *ctx, Instruction *instr); -int LDCLRP(context *ctx, Instruction *instr); -int LDEOR(context *ctx, Instruction *instr); -int LDEORB(context *ctx, Instruction *instr); -int LDEORH(context *ctx, Instruction *instr); -int LDFADD(context *ctx, Instruction *instr); -int LDFMAX(context *ctx, Instruction *instr); -int LDFMAXNM(context *ctx, Instruction *instr); -int LDFMIN(context *ctx, Instruction *instr); -int LDFMINNM(context *ctx, Instruction *instr); -int LDG(context *ctx, Instruction *instr); -int LDGM(context *ctx, Instruction *instr); -int LDIAPP(context *ctx, Instruction *instr); -int LDLAR(context *ctx, Instruction *instr); -int LDLARB(context *ctx, Instruction *instr); -int LDLARH(context *ctx, Instruction *instr); -int LDNP_fpsimd(context *ctx, Instruction *instr); -int LDNP_gen(context *ctx, Instruction *instr); -int LDPSW(context *ctx, Instruction *instr); -int LDP_fpsimd(context *ctx, Instruction *instr); -int LDP_gen(context *ctx, Instruction *instr); -int LDRA(context *ctx, Instruction *instr); -int LDRB_imm(context *ctx, Instruction *instr); -int LDRB_reg(context *ctx, Instruction *instr); -int LDRH_imm(context *ctx, Instruction *instr); -int LDRH_reg(context *ctx, Instruction *instr); -int LDRSB_imm(context *ctx, Instruction *instr); -int LDRSB_reg(context *ctx, Instruction *instr); -int LDRSH_imm(context *ctx, Instruction *instr); -int LDRSH_reg(context *ctx, Instruction *instr); -int LDRSW_imm(context *ctx, Instruction *instr); -int LDRSW_lit(context *ctx, Instruction *instr); -int LDRSW_reg(context *ctx, Instruction *instr); -int LDR_imm_fpsimd(context *ctx, Instruction *instr); -int LDR_imm_gen(context *ctx, Instruction *instr); -int LDR_lit_fpsimd(context *ctx, Instruction *instr); -int LDR_lit_gen(context *ctx, Instruction *instr); -int LDR_reg_fpsimd(context *ctx, Instruction *instr); -int LDR_reg_gen(context *ctx, Instruction *instr); -int LDSET(context *ctx, Instruction *instr); -int LDSETB(context *ctx, Instruction *instr); -int LDSETH(context *ctx, Instruction *instr); -int LDSETP(context *ctx, Instruction *instr); -int LDSMAX(context *ctx, Instruction *instr); -int LDSMAXB(context *ctx, Instruction *instr); -int LDSMAXH(context *ctx, Instruction *instr); -int LDSMIN(context *ctx, Instruction *instr); -int LDSMINB(context *ctx, Instruction *instr); -int LDSMINH(context *ctx, Instruction *instr); -int LDTADD(context *ctx, Instruction *instr); -int LDTCLR(context *ctx, Instruction *instr); -int LDTNP_fpsimd(context *ctx, Instruction *instr); -int LDTNP_gen(context *ctx, Instruction *instr); -int LDTP_fpsimd(context *ctx, Instruction *instr); -int LDTP_gen(context *ctx, Instruction *instr); -int LDTR(context *ctx, Instruction *instr); -int LDTRB(context *ctx, Instruction *instr); -int LDTRH(context *ctx, Instruction *instr); -int LDTRSB(context *ctx, Instruction *instr); -int LDTRSH(context *ctx, Instruction *instr); -int LDTRSW(context *ctx, Instruction *instr); -int LDTSET(context *ctx, Instruction *instr); -int LDTXR(context *ctx, Instruction *instr); -int LDUMAX(context *ctx, Instruction *instr); -int LDUMAXB(context *ctx, Instruction *instr); -int LDUMAXH(context *ctx, Instruction *instr); -int LDUMIN(context *ctx, Instruction *instr); -int LDUMINB(context *ctx, Instruction *instr); -int LDUMINH(context *ctx, Instruction *instr); -int LDURB(context *ctx, Instruction *instr); -int LDURH(context *ctx, Instruction *instr); -int LDURSB(context *ctx, Instruction *instr); -int LDURSH(context *ctx, Instruction *instr); -int LDURSW(context *ctx, Instruction *instr); -int LDUR_fpsimd(context *ctx, Instruction *instr); -int LDUR_gen(context *ctx, Instruction *instr); -int LDXP(context *ctx, Instruction *instr); -int LDXR(context *ctx, Instruction *instr); -int LDXRB(context *ctx, Instruction *instr); -int LDXRH(context *ctx, Instruction *instr); -int LSLV(context *ctx, Instruction *instr); -int LSL_LSLV(context *ctx, Instruction *instr); -int LSL_UBFM(context *ctx, Instruction *instr); -int LSRV(context *ctx, Instruction *instr); -int LSR_LSRV(context *ctx, Instruction *instr); -int LSR_UBFM(context *ctx, Instruction *instr); -int LUTI2_advsimd(context *ctx, Instruction *instr); -int LUTI4_advsimd(context *ctx, Instruction *instr); -int MADD(context *ctx, Instruction *instr); -int MADDPT(context *ctx, Instruction *instr); -int MLA_advsimd_elt(context *ctx, Instruction *instr); -int MLA_advsimd_vec(context *ctx, Instruction *instr); -int MLBI_SYS(context *ctx, Instruction *instr); -int MLS_advsimd_elt(context *ctx, Instruction *instr); -int MLS_advsimd_vec(context *ctx, Instruction *instr); -int MNEG_MSUB(context *ctx, Instruction *instr); -int MOVI_advsimd(context *ctx, Instruction *instr); -int MOVK(context *ctx, Instruction *instr); -int MOVN(context *ctx, Instruction *instr); -int MOVZ(context *ctx, Instruction *instr); -int MOV_ADD_addsub_imm(context *ctx, Instruction *instr); -int MOV_DUP_advsimd_elt(context *ctx, Instruction *instr); -int MOV_INS_advsimd_elt(context *ctx, Instruction *instr); -int MOV_INS_advsimd_gen(context *ctx, Instruction *instr); -int MOV_MOVN(context *ctx, Instruction *instr); -int MOV_MOVZ(context *ctx, Instruction *instr); -int MOV_ORR_advsimd_reg(context *ctx, Instruction *instr); -int MOV_ORR_log_imm(context *ctx, Instruction *instr); -int MOV_ORR_log_shift(context *ctx, Instruction *instr); -int MOV_UMOV_advsimd(context *ctx, Instruction *instr); -int MRRS(context *ctx, Instruction *instr); -int MRS(context *ctx, Instruction *instr); -int MSRR(context *ctx, Instruction *instr); -int MSR_imm(context *ctx, Instruction *instr); -int MSR_reg(context *ctx, Instruction *instr); -int MSUB(context *ctx, Instruction *instr); -int MSUBPT(context *ctx, Instruction *instr); -int MUL_MADD(context *ctx, Instruction *instr); -int MUL_advsimd_elt(context *ctx, Instruction *instr); -int MUL_advsimd_vec(context *ctx, Instruction *instr); -int MVNI_advsimd(context *ctx, Instruction *instr); -int MVN_NOT_advsimd(context *ctx, Instruction *instr); -int MVN_ORN_log_shift(context *ctx, Instruction *instr); -int NEGS_SUBS_addsub_shift(context *ctx, Instruction *instr); -int NEG_SUB_addsub_shift(context *ctx, Instruction *instr); -int NEG_advsimd(context *ctx, Instruction *instr); -int NGCS_SBCS(context *ctx, Instruction *instr); -int NGC_SBC(context *ctx, Instruction *instr); -int NOP(context *ctx, Instruction *instr); -int NOT_advsimd(context *ctx, Instruction *instr); -int ORN_advsimd(context *ctx, Instruction *instr); -int ORN_log_shift(context *ctx, Instruction *instr); -int ORR_advsimd_imm(context *ctx, Instruction *instr); -int ORR_advsimd_reg(context *ctx, Instruction *instr); -int ORR_log_imm(context *ctx, Instruction *instr); -int ORR_log_shift(context *ctx, Instruction *instr); -int PACDA(context *ctx, Instruction *instr); -int PACDB(context *ctx, Instruction *instr); -int PACGA(context *ctx, Instruction *instr); -int PACIA(context *ctx, Instruction *instr); -int PACIA171615(context *ctx, Instruction *instr); -int PACIASPPC(context *ctx, Instruction *instr); -int PACIB(context *ctx, Instruction *instr); -int PACIB171615(context *ctx, Instruction *instr); -int PACIBSPPC(context *ctx, Instruction *instr); -int PACM(context *ctx, Instruction *instr); -int PACNBIASPPC(context *ctx, Instruction *instr); -int PACNBIBSPPC(context *ctx, Instruction *instr); -int PMULL_advsimd(context *ctx, Instruction *instr); -int PMUL_advsimd(context *ctx, Instruction *instr); -int PRFM_imm(context *ctx, Instruction *instr); -int PRFM_lit(context *ctx, Instruction *instr); -int PRFM_reg(context *ctx, Instruction *instr); -int PRFUM(context *ctx, Instruction *instr); -int PSB(context *ctx, Instruction *instr); -int PSSBB_DSB(context *ctx, Instruction *instr); -int RADDHN_advsimd(context *ctx, Instruction *instr); -int RAX1_advsimd(context *ctx, Instruction *instr); -int RBIT_advsimd(context *ctx, Instruction *instr); -int RBIT_int(context *ctx, Instruction *instr); -int RCWCAS(context *ctx, Instruction *instr); -int RCWCASP(context *ctx, Instruction *instr); -int RCWCLR(context *ctx, Instruction *instr); -int RCWCLRP(context *ctx, Instruction *instr); -int RCWSCAS(context *ctx, Instruction *instr); -int RCWSCASP(context *ctx, Instruction *instr); -int RCWSCLR(context *ctx, Instruction *instr); -int RCWSCLRP(context *ctx, Instruction *instr); -int RCWSET(context *ctx, Instruction *instr); -int RCWSETP(context *ctx, Instruction *instr); -int RCWSSET(context *ctx, Instruction *instr); -int RCWSSETP(context *ctx, Instruction *instr); -int RCWSSWP(context *ctx, Instruction *instr); -int RCWSSWPP(context *ctx, Instruction *instr); -int RCWSWP(context *ctx, Instruction *instr); -int RCWSWPP(context *ctx, Instruction *instr); -int RET(context *ctx, Instruction *instr); -int RETA(context *ctx, Instruction *instr); -int RETASPPCR_reg(context *ctx, Instruction *instr); -int RETASPPC_imm(context *ctx, Instruction *instr); -int REV(context *ctx, Instruction *instr); -int REV16_advsimd(context *ctx, Instruction *instr); -int REV16_int(context *ctx, Instruction *instr); -int REV32_advsimd(context *ctx, Instruction *instr); -int REV32_int(context *ctx, Instruction *instr); -int REV64_REV(context *ctx, Instruction *instr); -int REV64_advsimd(context *ctx, Instruction *instr); -int RMIF(context *ctx, Instruction *instr); -int RORV(context *ctx, Instruction *instr); -int ROR_EXTR(context *ctx, Instruction *instr); -int ROR_RORV(context *ctx, Instruction *instr); -int RPRFM_reg(context *ctx, Instruction *instr); -int RSHRN_advsimd(context *ctx, Instruction *instr); -int RSUBHN_advsimd(context *ctx, Instruction *instr); -int SABAL_advsimd(context *ctx, Instruction *instr); -int SABA_advsimd(context *ctx, Instruction *instr); -int SABDL_advsimd(context *ctx, Instruction *instr); -int SABD_advsimd(context *ctx, Instruction *instr); -int SADALP_advsimd(context *ctx, Instruction *instr); -int SADDLP_advsimd(context *ctx, Instruction *instr); -int SADDLV_advsimd(context *ctx, Instruction *instr); -int SADDL_advsimd(context *ctx, Instruction *instr); -int SADDW_advsimd(context *ctx, Instruction *instr); -int SB(context *ctx, Instruction *instr); -int SBC(context *ctx, Instruction *instr); -int SBCS(context *ctx, Instruction *instr); -int SBFIZ_SBFM(context *ctx, Instruction *instr); -int SBFM(context *ctx, Instruction *instr); -int SBFX_SBFM(context *ctx, Instruction *instr); -int SCVTF_advsimd_fix(context *ctx, Instruction *instr); -int SCVTF_advsimd_int(context *ctx, Instruction *instr); -int SCVTF_float_fix(context *ctx, Instruction *instr); -int SCVTF_float_int(context *ctx, Instruction *instr); -int SCVTF_sisd(context *ctx, Instruction *instr); -int SDIV(context *ctx, Instruction *instr); -int SDOT_advsimd_elt(context *ctx, Instruction *instr); -int SDOT_advsimd_vec(context *ctx, Instruction *instr); -int SETF(context *ctx, Instruction *instr); -int SETGP(context *ctx, Instruction *instr); -int SETGPN(context *ctx, Instruction *instr); -int SETGPT(context *ctx, Instruction *instr); -int SETGPTN(context *ctx, Instruction *instr); -int SETP(context *ctx, Instruction *instr); -int SETPN(context *ctx, Instruction *instr); -int SETPT(context *ctx, Instruction *instr); -int SETPTN(context *ctx, Instruction *instr); -int SEV(context *ctx, Instruction *instr); -int SEVL(context *ctx, Instruction *instr); -int SHA1C_advsimd(context *ctx, Instruction *instr); -int SHA1H_advsimd(context *ctx, Instruction *instr); -int SHA1M_advsimd(context *ctx, Instruction *instr); -int SHA1P_advsimd(context *ctx, Instruction *instr); -int SHA1SU0_advsimd(context *ctx, Instruction *instr); -int SHA1SU1_advsimd(context *ctx, Instruction *instr); -int SHA256H2_advsimd(context *ctx, Instruction *instr); -int SHA256H_advsimd(context *ctx, Instruction *instr); -int SHA256SU0_advsimd(context *ctx, Instruction *instr); -int SHA256SU1_advsimd(context *ctx, Instruction *instr); -int SHA512H2_advsimd(context *ctx, Instruction *instr); -int SHA512H_advsimd(context *ctx, Instruction *instr); -int SHA512SU0_advsimd(context *ctx, Instruction *instr); -int SHA512SU1_advsimd(context *ctx, Instruction *instr); -int SHADD_advsimd(context *ctx, Instruction *instr); -int SHLL_advsimd(context *ctx, Instruction *instr); -int SHL_advsimd(context *ctx, Instruction *instr); -int SHRN_advsimd(context *ctx, Instruction *instr); -int SHSUB_advsimd(context *ctx, Instruction *instr); -int SHUH(context *ctx, Instruction *instr); -int SLI_advsimd(context *ctx, Instruction *instr); -int SM3PARTW1_advsimd(context *ctx, Instruction *instr); -int SM3PARTW2_advsimd(context *ctx, Instruction *instr); -int SM3SS1_advsimd(context *ctx, Instruction *instr); -int SM3TT1A_advsimd(context *ctx, Instruction *instr); -int SM3TT1B_advsimd(context *ctx, Instruction *instr); -int SM3TT2A_advsimd(context *ctx, Instruction *instr); -int SM3TT2B_advsimd(context *ctx, Instruction *instr); -int SM4EKEY_advsimd(context *ctx, Instruction *instr); -int SM4E_advsimd(context *ctx, Instruction *instr); -int SMADDL(context *ctx, Instruction *instr); -int SMAXP_advsimd(context *ctx, Instruction *instr); -int SMAXV_advsimd(context *ctx, Instruction *instr); -int SMAX_advsimd(context *ctx, Instruction *instr); -int SMAX_imm(context *ctx, Instruction *instr); -int SMAX_reg(context *ctx, Instruction *instr); -int SMC(context *ctx, Instruction *instr); -int SMINP_advsimd(context *ctx, Instruction *instr); -int SMINV_advsimd(context *ctx, Instruction *instr); -int SMIN_advsimd(context *ctx, Instruction *instr); -int SMIN_imm(context *ctx, Instruction *instr); -int SMIN_reg(context *ctx, Instruction *instr); -int SMLAL_advsimd_elt(context *ctx, Instruction *instr); -int SMLAL_advsimd_vec(context *ctx, Instruction *instr); -int SMLSL_advsimd_elt(context *ctx, Instruction *instr); -int SMLSL_advsimd_vec(context *ctx, Instruction *instr); -int SMMLA_advsimd_vec(context *ctx, Instruction *instr); -int SMNEGL_SMSUBL(context *ctx, Instruction *instr); -int SMOV_advsimd(context *ctx, Instruction *instr); -int SMSTART_MSR_imm(context *ctx, Instruction *instr); -int SMSTOP_MSR_imm(context *ctx, Instruction *instr); -int SMSUBL(context *ctx, Instruction *instr); -int SMULH(context *ctx, Instruction *instr); -int SMULL_SMADDL(context *ctx, Instruction *instr); -int SMULL_advsimd_elt(context *ctx, Instruction *instr); -int SMULL_advsimd_vec(context *ctx, Instruction *instr); -int SQABS_advsimd(context *ctx, Instruction *instr); -int SQADD_advsimd(context *ctx, Instruction *instr); -int SQDMLAL_advsimd_elt(context *ctx, Instruction *instr); -int SQDMLAL_advsimd_vec(context *ctx, Instruction *instr); -int SQDMLSL_advsimd_elt(context *ctx, Instruction *instr); -int SQDMLSL_advsimd_vec(context *ctx, Instruction *instr); -int SQDMULH_advsimd_elt(context *ctx, Instruction *instr); -int SQDMULH_advsimd_vec(context *ctx, Instruction *instr); -int SQDMULL_advsimd_elt(context *ctx, Instruction *instr); -int SQDMULL_advsimd_vec(context *ctx, Instruction *instr); -int SQNEG_advsimd(context *ctx, Instruction *instr); -int SQRDMLAH_advsimd_elt(context *ctx, Instruction *instr); -int SQRDMLAH_advsimd_vec(context *ctx, Instruction *instr); -int SQRDMLSH_advsimd_elt(context *ctx, Instruction *instr); -int SQRDMLSH_advsimd_vec(context *ctx, Instruction *instr); -int SQRDMULH_advsimd_elt(context *ctx, Instruction *instr); -int SQRDMULH_advsimd_vec(context *ctx, Instruction *instr); -int SQRSHL_advsimd(context *ctx, Instruction *instr); -int SQRSHRN_advsimd(context *ctx, Instruction *instr); -int SQRSHRUN_advsimd(context *ctx, Instruction *instr); -int SQSHLU_advsimd(context *ctx, Instruction *instr); -int SQSHL_advsimd_imm(context *ctx, Instruction *instr); -int SQSHL_advsimd_reg(context *ctx, Instruction *instr); -int SQSHRN_advsimd(context *ctx, Instruction *instr); -int SQSHRUN_advsimd(context *ctx, Instruction *instr); -int SQSUB_advsimd(context *ctx, Instruction *instr); -int SQXTN_advsimd(context *ctx, Instruction *instr); -int SQXTUN_advsimd(context *ctx, Instruction *instr); -int SRHADD_advsimd(context *ctx, Instruction *instr); -int SRI_advsimd(context *ctx, Instruction *instr); -int SRSHL_advsimd(context *ctx, Instruction *instr); -int SRSHR_advsimd(context *ctx, Instruction *instr); -int SRSRA_advsimd(context *ctx, Instruction *instr); -int SSBB_DSB(context *ctx, Instruction *instr); -int SSHLL_advsimd(context *ctx, Instruction *instr); -int SSHL_advsimd(context *ctx, Instruction *instr); -int SSHR_advsimd(context *ctx, Instruction *instr); -int SSRA_advsimd(context *ctx, Instruction *instr); -int SSUBL_advsimd(context *ctx, Instruction *instr); -int SSUBW_advsimd(context *ctx, Instruction *instr); -int ST1_advsimd_mult(context *ctx, Instruction *instr); -int ST1_advsimd_sngl(context *ctx, Instruction *instr); -int ST2G(context *ctx, Instruction *instr); -int ST2_advsimd_mult(context *ctx, Instruction *instr); -int ST2_advsimd_sngl(context *ctx, Instruction *instr); -int ST3_advsimd_mult(context *ctx, Instruction *instr); -int ST3_advsimd_sngl(context *ctx, Instruction *instr); -int ST4_advsimd_mult(context *ctx, Instruction *instr); -int ST4_advsimd_sngl(context *ctx, Instruction *instr); -int ST64B(context *ctx, Instruction *instr); -int ST64BV(context *ctx, Instruction *instr); -int ST64BV0(context *ctx, Instruction *instr); -int STADDB_LDADDB(context *ctx, Instruction *instr); -int STADDH_LDADDH(context *ctx, Instruction *instr); -int STADD_LDADD(context *ctx, Instruction *instr); -int STBFADD(context *ctx, Instruction *instr); -int STBFMAX(context *ctx, Instruction *instr); -int STBFMAXNM(context *ctx, Instruction *instr); -int STBFMIN(context *ctx, Instruction *instr); -int STBFMINNM(context *ctx, Instruction *instr); -int STCLRB_LDCLRB(context *ctx, Instruction *instr); -int STCLRH_LDCLRH(context *ctx, Instruction *instr); -int STCLR_LDCLR(context *ctx, Instruction *instr); -int STCPH(context *ctx, Instruction *instr); -int STEORB_LDEORB(context *ctx, Instruction *instr); -int STEORH_LDEORH(context *ctx, Instruction *instr); -int STEOR_LDEOR(context *ctx, Instruction *instr); -int STFADD(context *ctx, Instruction *instr); -int STFMAX(context *ctx, Instruction *instr); -int STFMAXNM(context *ctx, Instruction *instr); -int STFMIN(context *ctx, Instruction *instr); -int STFMINNM(context *ctx, Instruction *instr); -int STG(context *ctx, Instruction *instr); -int STGM(context *ctx, Instruction *instr); -int STGP(context *ctx, Instruction *instr); -int STILP(context *ctx, Instruction *instr); -int STL1_advsimd_sngl(context *ctx, Instruction *instr); -int STLLR(context *ctx, Instruction *instr); -int STLLRB(context *ctx, Instruction *instr); -int STLLRH(context *ctx, Instruction *instr); -int STLP_gen(context *ctx, Instruction *instr); -int STLR(context *ctx, Instruction *instr); -int STLRB(context *ctx, Instruction *instr); -int STLRH(context *ctx, Instruction *instr); -int STLTXR(context *ctx, Instruction *instr); -int STLURB(context *ctx, Instruction *instr); -int STLURH(context *ctx, Instruction *instr); -int STLUR_fpsimd(context *ctx, Instruction *instr); -int STLUR_gen(context *ctx, Instruction *instr); -int STLXP(context *ctx, Instruction *instr); -int STLXR(context *ctx, Instruction *instr); -int STLXRB(context *ctx, Instruction *instr); -int STLXRH(context *ctx, Instruction *instr); -int STNP_fpsimd(context *ctx, Instruction *instr); -int STNP_gen(context *ctx, Instruction *instr); -int STP_fpsimd(context *ctx, Instruction *instr); -int STP_gen(context *ctx, Instruction *instr); -int STRB_imm(context *ctx, Instruction *instr); -int STRB_reg(context *ctx, Instruction *instr); -int STRH_imm(context *ctx, Instruction *instr); -int STRH_reg(context *ctx, Instruction *instr); -int STR_imm_fpsimd(context *ctx, Instruction *instr); -int STR_imm_gen(context *ctx, Instruction *instr); -int STR_reg_fpsimd(context *ctx, Instruction *instr); -int STR_reg_gen(context *ctx, Instruction *instr); -int STSETB_LDSETB(context *ctx, Instruction *instr); -int STSETH_LDSETH(context *ctx, Instruction *instr); -int STSET_LDSET(context *ctx, Instruction *instr); -int STSHH(context *ctx, Instruction *instr); -int STSMAXB_LDSMAXB(context *ctx, Instruction *instr); -int STSMAXH_LDSMAXH(context *ctx, Instruction *instr); -int STSMAX_LDSMAX(context *ctx, Instruction *instr); -int STSMINB_LDSMINB(context *ctx, Instruction *instr); -int STSMINH_LDSMINH(context *ctx, Instruction *instr); -int STSMIN_LDSMIN(context *ctx, Instruction *instr); -int STTADD_LDTADD(context *ctx, Instruction *instr); -int STTCLR_LDTCLR(context *ctx, Instruction *instr); -int STTNP_fpsimd(context *ctx, Instruction *instr); -int STTNP_gen(context *ctx, Instruction *instr); -int STTP_fpsimd(context *ctx, Instruction *instr); -int STTP_gen(context *ctx, Instruction *instr); -int STTR(context *ctx, Instruction *instr); -int STTRB(context *ctx, Instruction *instr); -int STTRH(context *ctx, Instruction *instr); -int STTSET_LDTSET(context *ctx, Instruction *instr); -int STTXR(context *ctx, Instruction *instr); -int STUMAXB_LDUMAXB(context *ctx, Instruction *instr); -int STUMAXH_LDUMAXH(context *ctx, Instruction *instr); -int STUMAX_LDUMAX(context *ctx, Instruction *instr); -int STUMINB_LDUMINB(context *ctx, Instruction *instr); -int STUMINH_LDUMINH(context *ctx, Instruction *instr); -int STUMIN_LDUMIN(context *ctx, Instruction *instr); -int STURB(context *ctx, Instruction *instr); -int STURH(context *ctx, Instruction *instr); -int STUR_fpsimd(context *ctx, Instruction *instr); -int STUR_gen(context *ctx, Instruction *instr); -int STXP(context *ctx, Instruction *instr); -int STXR(context *ctx, Instruction *instr); -int STXRB(context *ctx, Instruction *instr); -int STXRH(context *ctx, Instruction *instr); -int STZ2G(context *ctx, Instruction *instr); -int STZG(context *ctx, Instruction *instr); -int STZGM(context *ctx, Instruction *instr); -int SUBG(context *ctx, Instruction *instr); -int SUBHN_advsimd(context *ctx, Instruction *instr); -int SUBP(context *ctx, Instruction *instr); -int SUBPS(context *ctx, Instruction *instr); -int SUBPT(context *ctx, Instruction *instr); -int SUBS_addsub_ext(context *ctx, Instruction *instr); -int SUBS_addsub_imm(context *ctx, Instruction *instr); -int SUBS_addsub_shift(context *ctx, Instruction *instr); -int SUB_addsub_ext(context *ctx, Instruction *instr); -int SUB_addsub_imm(context *ctx, Instruction *instr); -int SUB_addsub_shift(context *ctx, Instruction *instr); -int SUB_advsimd(context *ctx, Instruction *instr); -int SUDOT_advsimd_elt(context *ctx, Instruction *instr); -int SUQADD_advsimd(context *ctx, Instruction *instr); -int SVC(context *ctx, Instruction *instr); -int SWP(context *ctx, Instruction *instr); -int SWPB(context *ctx, Instruction *instr); -int SWPH(context *ctx, Instruction *instr); -int SWPP(context *ctx, Instruction *instr); -int SWPT(context *ctx, Instruction *instr); -int SXTB_SBFM(context *ctx, Instruction *instr); -int SXTH_SBFM(context *ctx, Instruction *instr); -int SXTL_SSHLL_advsimd(context *ctx, Instruction *instr); -int SXTW_SBFM(context *ctx, Instruction *instr); -int SYS(context *ctx, Instruction *instr); -int SYSL(context *ctx, Instruction *instr); -int SYSP(context *ctx, Instruction *instr); -int TBL_advsimd(context *ctx, Instruction *instr); -int TBNZ(context *ctx, Instruction *instr); -int TBX_advsimd(context *ctx, Instruction *instr); -int TBZ(context *ctx, Instruction *instr); -int TLBIP_SYSP(context *ctx, Instruction *instr); -int TLBI_SYS(context *ctx, Instruction *instr); -int TRCIT_SYS(context *ctx, Instruction *instr); -int TRN1_advsimd(context *ctx, Instruction *instr); -int TRN2_advsimd(context *ctx, Instruction *instr); -int TSB(context *ctx, Instruction *instr); -int TST_ANDS_log_imm(context *ctx, Instruction *instr); -int TST_ANDS_log_shift(context *ctx, Instruction *instr); -int UABAL_advsimd(context *ctx, Instruction *instr); -int UABA_advsimd(context *ctx, Instruction *instr); -int UABDL_advsimd(context *ctx, Instruction *instr); -int UABD_advsimd(context *ctx, Instruction *instr); -int UADALP_advsimd(context *ctx, Instruction *instr); -int UADDLP_advsimd(context *ctx, Instruction *instr); -int UADDLV_advsimd(context *ctx, Instruction *instr); -int UADDL_advsimd(context *ctx, Instruction *instr); -int UADDW_advsimd(context *ctx, Instruction *instr); -int UBFIZ_UBFM(context *ctx, Instruction *instr); -int UBFM(context *ctx, Instruction *instr); -int UBFX_UBFM(context *ctx, Instruction *instr); -int UCVTF_advsimd_fix(context *ctx, Instruction *instr); -int UCVTF_advsimd_int(context *ctx, Instruction *instr); -int UCVTF_float_fix(context *ctx, Instruction *instr); -int UCVTF_float_int(context *ctx, Instruction *instr); -int UCVTF_sisd(context *ctx, Instruction *instr); -int UDF_perm_undef(context *ctx, Instruction *instr); -int UDIV(context *ctx, Instruction *instr); -int UDOT_advsimd_elt(context *ctx, Instruction *instr); -int UDOT_advsimd_vec(context *ctx, Instruction *instr); -int UHADD_advsimd(context *ctx, Instruction *instr); -int UHSUB_advsimd(context *ctx, Instruction *instr); -int UMADDL(context *ctx, Instruction *instr); -int UMAXP_advsimd(context *ctx, Instruction *instr); -int UMAXV_advsimd(context *ctx, Instruction *instr); -int UMAX_advsimd(context *ctx, Instruction *instr); -int UMAX_imm(context *ctx, Instruction *instr); -int UMAX_reg(context *ctx, Instruction *instr); -int UMINP_advsimd(context *ctx, Instruction *instr); -int UMINV_advsimd(context *ctx, Instruction *instr); -int UMIN_advsimd(context *ctx, Instruction *instr); -int UMIN_imm(context *ctx, Instruction *instr); -int UMIN_reg(context *ctx, Instruction *instr); -int UMLAL_advsimd_elt(context *ctx, Instruction *instr); -int UMLAL_advsimd_vec(context *ctx, Instruction *instr); -int UMLSL_advsimd_elt(context *ctx, Instruction *instr); -int UMLSL_advsimd_vec(context *ctx, Instruction *instr); -int UMMLA_advsimd_vec(context *ctx, Instruction *instr); -int UMNEGL_UMSUBL(context *ctx, Instruction *instr); -int UMOV_advsimd(context *ctx, Instruction *instr); -int UMSUBL(context *ctx, Instruction *instr); -int UMULH(context *ctx, Instruction *instr); -int UMULL_UMADDL(context *ctx, Instruction *instr); -int UMULL_advsimd_elt(context *ctx, Instruction *instr); -int UMULL_advsimd_vec(context *ctx, Instruction *instr); -int UQADD_advsimd(context *ctx, Instruction *instr); -int UQRSHL_advsimd(context *ctx, Instruction *instr); -int UQRSHRN_advsimd(context *ctx, Instruction *instr); -int UQSHL_advsimd_imm(context *ctx, Instruction *instr); -int UQSHL_advsimd_reg(context *ctx, Instruction *instr); -int UQSHRN_advsimd(context *ctx, Instruction *instr); -int UQSUB_advsimd(context *ctx, Instruction *instr); -int UQXTN_advsimd(context *ctx, Instruction *instr); -int URECPE_advsimd(context *ctx, Instruction *instr); -int URHADD_advsimd(context *ctx, Instruction *instr); -int URSHL_advsimd(context *ctx, Instruction *instr); -int URSHR_advsimd(context *ctx, Instruction *instr); -int URSQRTE_advsimd(context *ctx, Instruction *instr); -int URSRA_advsimd(context *ctx, Instruction *instr); -int USDOT_advsimd_elt(context *ctx, Instruction *instr); -int USDOT_advsimd_vec(context *ctx, Instruction *instr); -int USHLL_advsimd(context *ctx, Instruction *instr); -int USHL_advsimd(context *ctx, Instruction *instr); -int USHR_advsimd(context *ctx, Instruction *instr); -int USMMLA_advsimd_vec(context *ctx, Instruction *instr); -int USQADD_advsimd(context *ctx, Instruction *instr); -int USRA_advsimd(context *ctx, Instruction *instr); -int USUBL_advsimd(context *ctx, Instruction *instr); -int USUBW_advsimd(context *ctx, Instruction *instr); -int UXTB_UBFM(context *ctx, Instruction *instr); -int UXTH_UBFM(context *ctx, Instruction *instr); -int UXTL_USHLL_advsimd(context *ctx, Instruction *instr); -int UZP1_advsimd(context *ctx, Instruction *instr); -int UZP2_advsimd(context *ctx, Instruction *instr); -int WFE(context *ctx, Instruction *instr); -int WFET(context *ctx, Instruction *instr); -int WFI(context *ctx, Instruction *instr); -int WFIT(context *ctx, Instruction *instr); -int XAFLAG(context *ctx, Instruction *instr); -int XAR_advsimd(context *ctx, Instruction *instr); -int XPAC(context *ctx, Instruction *instr); -int XTN_advsimd(context *ctx, Instruction *instr); -int YIELD(context *ctx, Instruction *instr); -int ZIP1_advsimd(context *ctx, Instruction *instr); -int ZIP2_advsimd(context *ctx, Instruction *instr); -int abs_z_p_z(context *ctx, Instruction *instr); -int adclb_z_zzz(context *ctx, Instruction *instr); -int adclt_z_zzz(context *ctx, Instruction *instr); -int add_mz_zzv(context *ctx, Instruction *instr); -int add_z_p_zz(context *ctx, Instruction *instr); -int add_z_zi(context *ctx, Instruction *instr); -int add_z_zz(context *ctx, Instruction *instr); -int add_za_zw(context *ctx, Instruction *instr); -int add_za_zzv(context *ctx, Instruction *instr); -int add_za_zzw(context *ctx, Instruction *instr); -int addha_za_pp_z(context *ctx, Instruction *instr); -int addhnb_z_zz(context *ctx, Instruction *instr); -int addhnt_z_zz(context *ctx, Instruction *instr); -int addp_z_p_zz(context *ctx, Instruction *instr); -int addpl_r_ri(context *ctx, Instruction *instr); -int addpt_z_p_zz(context *ctx, Instruction *instr); -int addpt_z_zz(context *ctx, Instruction *instr); -int addqp_z_zz(context *ctx, Instruction *instr); -int addqv_z_p_z(context *ctx, Instruction *instr); -int addspl_r_ri(context *ctx, Instruction *instr); -int addsubp_z_zz(context *ctx, Instruction *instr); -int addsvl_r_ri(context *ctx, Instruction *instr); -int addva_za_pp_z(context *ctx, Instruction *instr); -int addvl_r_ri(context *ctx, Instruction *instr); -int adr_z_az(context *ctx, Instruction *instr); -int aesd_mz_zzi(context *ctx, Instruction *instr); -int aesd_z_zz(context *ctx, Instruction *instr); -int aesdimc_mz_zzi(context *ctx, Instruction *instr); -int aese_mz_zzi(context *ctx, Instruction *instr); -int aese_z_zz(context *ctx, Instruction *instr); -int aesemc_mz_zzi(context *ctx, Instruction *instr); -int aesimc_z_z(context *ctx, Instruction *instr); -int aesmc_z_z(context *ctx, Instruction *instr); -int and_p_p_pp(context *ctx, Instruction *instr); -int and_z_p_zz(context *ctx, Instruction *instr); -int and_z_zi(context *ctx, Instruction *instr); -int and_z_zz(context *ctx, Instruction *instr); -int andqv_z_p_z(context *ctx, Instruction *instr); -int ands_p_p_pp(context *ctx, Instruction *instr); -int andv_r_p_z(context *ctx, Instruction *instr); -int asr_z_p_zi(context *ctx, Instruction *instr); -int asr_z_p_zw(context *ctx, Instruction *instr); -int asr_z_p_zz(context *ctx, Instruction *instr); -int asr_z_zi(context *ctx, Instruction *instr); -int asr_z_zw(context *ctx, Instruction *instr); -int asrd_z_p_zi(context *ctx, Instruction *instr); -int asrr_z_p_zz(context *ctx, Instruction *instr); -int bcax_z_zzz(context *ctx, Instruction *instr); -int bdep_z_zz(context *ctx, Instruction *instr); -int bext_z_zz(context *ctx, Instruction *instr); -int bf1cvt_mz2_z8(context *ctx, Instruction *instr); -int bf1cvt_z_z8(context *ctx, Instruction *instr); -int bf1cvtl_mz2_z8(context *ctx, Instruction *instr); -int bf1cvtlt_z_z8(context *ctx, Instruction *instr); -int bfadd_z_p_zz(context *ctx, Instruction *instr); -int bfadd_z_zz(context *ctx, Instruction *instr); -int bfadd_za_zw(context *ctx, Instruction *instr); -int bfclamp_mz_zz(context *ctx, Instruction *instr); -int bfclamp_z_zz(context *ctx, Instruction *instr); -int bfcvt_z8_mz2(context *ctx, Instruction *instr); -int bfcvt_z_mz2(context *ctx, Instruction *instr); -int bfcvt_z_p_z(context *ctx, Instruction *instr); -int bfcvtn_z8_mz2(context *ctx, Instruction *instr); -int bfcvtn_z_mz2(context *ctx, Instruction *instr); -int bfcvtnt_z_p_z(context *ctx, Instruction *instr); -int bfdot_z_zzz(context *ctx, Instruction *instr); -int bfdot_z_zzzi(context *ctx, Instruction *instr); -int bfdot_za_zzi(context *ctx, Instruction *instr); -int bfdot_za_zzv(context *ctx, Instruction *instr); -int bfdot_za_zzw(context *ctx, Instruction *instr); -int bfmax_mz_zzv(context *ctx, Instruction *instr); -int bfmax_mz_zzw(context *ctx, Instruction *instr); -int bfmax_z_p_zz(context *ctx, Instruction *instr); -int bfmaxnm_mz_zzv(context *ctx, Instruction *instr); -int bfmaxnm_mz_zzw(context *ctx, Instruction *instr); -int bfmaxnm_z_p_zz(context *ctx, Instruction *instr); -int bfmin_mz_zzv(context *ctx, Instruction *instr); -int bfmin_mz_zzw(context *ctx, Instruction *instr); -int bfmin_z_p_zz(context *ctx, Instruction *instr); -int bfminnm_mz_zzv(context *ctx, Instruction *instr); -int bfminnm_mz_zzw(context *ctx, Instruction *instr); -int bfminnm_z_p_zz(context *ctx, Instruction *instr); -int bfmla_z_p_zzz(context *ctx, Instruction *instr); -int bfmla_z_zzzi(context *ctx, Instruction *instr); -int bfmla_za_zzi(context *ctx, Instruction *instr); -int bfmla_za_zzv(context *ctx, Instruction *instr); -int bfmla_za_zzw(context *ctx, Instruction *instr); -int bfmlal_za_zzi(context *ctx, Instruction *instr); -int bfmlal_za_zzv(context *ctx, Instruction *instr); -int bfmlal_za_zzw(context *ctx, Instruction *instr); -int bfmlalb_z_zzz(context *ctx, Instruction *instr); -int bfmlalb_z_zzzi(context *ctx, Instruction *instr); -int bfmlalt_z_zzz(context *ctx, Instruction *instr); -int bfmlalt_z_zzzi(context *ctx, Instruction *instr); -int bfmls_z_p_zzz(context *ctx, Instruction *instr); -int bfmls_z_zzzi(context *ctx, Instruction *instr); -int bfmls_za_zzi(context *ctx, Instruction *instr); -int bfmls_za_zzv(context *ctx, Instruction *instr); -int bfmls_za_zzw(context *ctx, Instruction *instr); -int bfmlsl_za_zzi(context *ctx, Instruction *instr); -int bfmlsl_za_zzv(context *ctx, Instruction *instr); -int bfmlsl_za_zzw(context *ctx, Instruction *instr); -int bfmlslb_z_zzz(context *ctx, Instruction *instr); -int bfmlslb_z_zzzi(context *ctx, Instruction *instr); -int bfmlslt_z_zzz(context *ctx, Instruction *instr); -int bfmlslt_z_zzzi(context *ctx, Instruction *instr); -int bfmmla_z16_zzz(context *ctx, Instruction *instr); -int bfmmla_z_zzz(context *ctx, Instruction *instr); -int bfmop4a_za32_zz(context *ctx, Instruction *instr); -int bfmop4a_za_zz(context *ctx, Instruction *instr); -int bfmop4s_za32_zz(context *ctx, Instruction *instr); -int bfmop4s_za_zz(context *ctx, Instruction *instr); -int bfmopa_za32_pp_zz(context *ctx, Instruction *instr); -int bfmopa_za_pp_zz(context *ctx, Instruction *instr); -int bfmops_za32_pp_zz(context *ctx, Instruction *instr); -int bfmops_za_pp_zz(context *ctx, Instruction *instr); -int bfmul_mz_zzv(context *ctx, Instruction *instr); -int bfmul_mz_zzw(context *ctx, Instruction *instr); -int bfmul_z_p_zz(context *ctx, Instruction *instr); -int bfmul_z_zz(context *ctx, Instruction *instr); -int bfmul_z_zzi(context *ctx, Instruction *instr); -int bfscale_mz_zzv(context *ctx, Instruction *instr); -int bfscale_mz_zzw(context *ctx, Instruction *instr); -int bfscale_z_p_zz(context *ctx, Instruction *instr); -int bfsub_z_p_zz(context *ctx, Instruction *instr); -int bfsub_z_zz(context *ctx, Instruction *instr); -int bfsub_za_zw(context *ctx, Instruction *instr); -int bftmopa_za32_zzzi(context *ctx, Instruction *instr); -int bftmopa_za_zzzi(context *ctx, Instruction *instr); -int bfvdot_za_zzi(context *ctx, Instruction *instr); -int bgrp_z_zz(context *ctx, Instruction *instr); -int bic_and_z_zi(context *ctx, Instruction *instr); -int bic_p_p_pp(context *ctx, Instruction *instr); -int bic_z_p_zz(context *ctx, Instruction *instr); -int bic_z_zz(context *ctx, Instruction *instr); -int bics_p_p_pp(context *ctx, Instruction *instr); -int bmopa_za_pp_zz(context *ctx, Instruction *instr); -int bmops_za_pp_zz(context *ctx, Instruction *instr); -int brka_p_p_p(context *ctx, Instruction *instr); -int brkas_p_p_p(context *ctx, Instruction *instr); -int brkb_p_p_p(context *ctx, Instruction *instr); -int brkbs_p_p_p(context *ctx, Instruction *instr); -int brkn_p_p_pp(context *ctx, Instruction *instr); -int brkns_p_p_pp(context *ctx, Instruction *instr); -int brkpa_p_p_pp(context *ctx, Instruction *instr); -int brkpas_p_p_pp(context *ctx, Instruction *instr); -int brkpb_p_p_pp(context *ctx, Instruction *instr); -int brkpbs_p_p_pp(context *ctx, Instruction *instr); -int bsl1n_z_zzz(context *ctx, Instruction *instr); -int bsl2n_z_zzz(context *ctx, Instruction *instr); -int bsl_z_zzz(context *ctx, Instruction *instr); -int cadd_z_zz(context *ctx, Instruction *instr); -int cdot_z_zzz(context *ctx, Instruction *instr); -int cdot_z_zzzi(context *ctx, Instruction *instr); -int clasta_r_p_z(context *ctx, Instruction *instr); -int clasta_v_p_z(context *ctx, Instruction *instr); -int clasta_z_p_zz(context *ctx, Instruction *instr); -int clastb_r_p_z(context *ctx, Instruction *instr); -int clastb_v_p_z(context *ctx, Instruction *instr); -int clastb_z_p_zz(context *ctx, Instruction *instr); -int cls_z_p_z(context *ctx, Instruction *instr); -int clz_z_p_z(context *ctx, Instruction *instr); -int cmla_z_zzz(context *ctx, Instruction *instr); -int cmla_z_zzzi(context *ctx, Instruction *instr); -int cmpeq_p_p_zi(context *ctx, Instruction *instr); -int cmpeq_p_p_zw(context *ctx, Instruction *instr); -int cmpeq_p_p_zz(context *ctx, Instruction *instr); -int cmple_cmpeq_p_p_zz(context *ctx, Instruction *instr); -int cmplo_cmpeq_p_p_zz(context *ctx, Instruction *instr); -int cmpls_cmpeq_p_p_zz(context *ctx, Instruction *instr); -int cmplt_cmpeq_p_p_zz(context *ctx, Instruction *instr); -int cnot_z_p_z(context *ctx, Instruction *instr); -int cnt_z_p_z(context *ctx, Instruction *instr); -int cntb_r_s(context *ctx, Instruction *instr); -int cntp_r_p_p(context *ctx, Instruction *instr); -int cntp_r_pn(context *ctx, Instruction *instr); -int compact_z_p_z(context *ctx, Instruction *instr); -int cpy_z_o_i(context *ctx, Instruction *instr); -int cpy_z_p_i(context *ctx, Instruction *instr); -int cpy_z_p_r(context *ctx, Instruction *instr); -int cpy_z_p_v(context *ctx, Instruction *instr); -int ctermeq_rr(context *ctx, Instruction *instr); -int decb_r_rs(context *ctx, Instruction *instr); -int decd_z_zs(context *ctx, Instruction *instr); -int decp_r_p_r(context *ctx, Instruction *instr); -int decp_z_p_z(context *ctx, Instruction *instr); -int dup_z_i(context *ctx, Instruction *instr); -int dup_z_r(context *ctx, Instruction *instr); -int dup_z_zi(context *ctx, Instruction *instr); -int dupm_z_i(context *ctx, Instruction *instr); -int dupq_z_zi(context *ctx, Instruction *instr); -int eon_eor_z_zi(context *ctx, Instruction *instr); -int eor3_z_zzz(context *ctx, Instruction *instr); -int eor_p_p_pp(context *ctx, Instruction *instr); -int eor_z_p_zz(context *ctx, Instruction *instr); -int eor_z_zi(context *ctx, Instruction *instr); -int eor_z_zz(context *ctx, Instruction *instr); -int eorbt_z_zz(context *ctx, Instruction *instr); -int eorqv_z_p_z(context *ctx, Instruction *instr); -int eors_p_p_pp(context *ctx, Instruction *instr); -int eortb_z_zz(context *ctx, Instruction *instr); -int eorv_r_p_z(context *ctx, Instruction *instr); -int expand_z_p_z(context *ctx, Instruction *instr); -int ext_z_zi(context *ctx, Instruction *instr); -int extq_z_zi(context *ctx, Instruction *instr); -int f1cvt_mz2_z8(context *ctx, Instruction *instr); -int f1cvt_z_z8(context *ctx, Instruction *instr); -int f1cvtl_mz2_z8(context *ctx, Instruction *instr); -int f1cvtlt_z_z8(context *ctx, Instruction *instr); -int fabd_z_p_zz(context *ctx, Instruction *instr); -int fabs_z_p_z(context *ctx, Instruction *instr); -int facge_p_p_zz(context *ctx, Instruction *instr); -int facle_facge_p_p_zz(context *ctx, Instruction *instr); -int faclt_facge_p_p_zz(context *ctx, Instruction *instr); -int fadd_z_p_zs(context *ctx, Instruction *instr); -int fadd_z_p_zz(context *ctx, Instruction *instr); -int fadd_z_zz(context *ctx, Instruction *instr); -int fadd_za_zw(context *ctx, Instruction *instr); -int fadda_v_p_z(context *ctx, Instruction *instr); -int faddp_z_p_zz(context *ctx, Instruction *instr); -int faddqv_z_p_z(context *ctx, Instruction *instr); -int faddv_v_p_z(context *ctx, Instruction *instr); -int famax_mz_zzw(context *ctx, Instruction *instr); -int famax_z_p_zz(context *ctx, Instruction *instr); -int famin_mz_zzw(context *ctx, Instruction *instr); -int famin_z_p_zz(context *ctx, Instruction *instr); -int fcadd_z_p_zz(context *ctx, Instruction *instr); -int fclamp_mz_zz(context *ctx, Instruction *instr); -int fclamp_z_zz(context *ctx, Instruction *instr); -int fcmeq_p_p_z0(context *ctx, Instruction *instr); -int fcmeq_p_p_zz(context *ctx, Instruction *instr); -int fcmla_z_p_zzz(context *ctx, Instruction *instr); -int fcmla_z_zzzi(context *ctx, Instruction *instr); -int fcmle_fcmeq_p_p_zz(context *ctx, Instruction *instr); -int fcmlt_fcmeq_p_p_zz(context *ctx, Instruction *instr); -int fcpy_z_p_i(context *ctx, Instruction *instr); -int fcvt_mz2_z(context *ctx, Instruction *instr); -int fcvt_z8_mz2(context *ctx, Instruction *instr); -int fcvt_z8_mz4(context *ctx, Instruction *instr); -int fcvt_z_mz2(context *ctx, Instruction *instr); -int fcvt_z_p_z(context *ctx, Instruction *instr); -int fcvtl_mz2_z(context *ctx, Instruction *instr); -int fcvtlt_z_p_z(context *ctx, Instruction *instr); -int fcvtn_z8_mz2(context *ctx, Instruction *instr); -int fcvtn_z8_mz4(context *ctx, Instruction *instr); -int fcvtn_z_mz2(context *ctx, Instruction *instr); -int fcvtnb_z8_mz2(context *ctx, Instruction *instr); -int fcvtnt_z8_mz2(context *ctx, Instruction *instr); -int fcvtnt_z_p_z(context *ctx, Instruction *instr); -int fcvtx_z_p_z(context *ctx, Instruction *instr); -int fcvtxnt_z_p_z(context *ctx, Instruction *instr); -int fcvtzs_mz_z(context *ctx, Instruction *instr); -int fcvtzs_z_p_z(context *ctx, Instruction *instr); -int fcvtzsn_z_mz2(context *ctx, Instruction *instr); -int fcvtzu_mz_z(context *ctx, Instruction *instr); -int fcvtzu_z_p_z(context *ctx, Instruction *instr); -int fcvtzun_z_mz2(context *ctx, Instruction *instr); -int fdiv_z_p_zz(context *ctx, Instruction *instr); -int fdivr_z_p_zz(context *ctx, Instruction *instr); -int fdot_z32_zz8z8(context *ctx, Instruction *instr); -int fdot_z32_zz8z8i(context *ctx, Instruction *instr); -int fdot_z_zz8z8(context *ctx, Instruction *instr); -int fdot_z_zz8z8i(context *ctx, Instruction *instr); -int fdot_z_zzz(context *ctx, Instruction *instr); -int fdot_z_zzzi(context *ctx, Instruction *instr); -int fdot_za32_z8z8i(context *ctx, Instruction *instr); -int fdot_za32_z8z8v(context *ctx, Instruction *instr); -int fdot_za32_z8z8w(context *ctx, Instruction *instr); -int fdot_za_z8z8i(context *ctx, Instruction *instr); -int fdot_za_z8z8v(context *ctx, Instruction *instr); -int fdot_za_z8z8w(context *ctx, Instruction *instr); -int fdot_za_zzi(context *ctx, Instruction *instr); -int fdot_za_zzv(context *ctx, Instruction *instr); -int fdot_za_zzw(context *ctx, Instruction *instr); -int fdup_z_i(context *ctx, Instruction *instr); -int fexpa_z_z(context *ctx, Instruction *instr); -int firstp_r_p_p(context *ctx, Instruction *instr); -int flogb_z_p_z(context *ctx, Instruction *instr); -int fmad_z_p_zzz(context *ctx, Instruction *instr); -int fmax_mz_zzv(context *ctx, Instruction *instr); -int fmax_mz_zzw(context *ctx, Instruction *instr); -int fmax_z_p_zs(context *ctx, Instruction *instr); -int fmax_z_p_zz(context *ctx, Instruction *instr); -int fmaxnm_mz_zzv(context *ctx, Instruction *instr); -int fmaxnm_mz_zzw(context *ctx, Instruction *instr); -int fmaxnm_z_p_zs(context *ctx, Instruction *instr); -int fmaxnm_z_p_zz(context *ctx, Instruction *instr); -int fmaxnmp_z_p_zz(context *ctx, Instruction *instr); -int fmaxnmqv_z_p_z(context *ctx, Instruction *instr); -int fmaxnmv_v_p_z(context *ctx, Instruction *instr); -int fmaxp_z_p_zz(context *ctx, Instruction *instr); -int fmaxqv_z_p_z(context *ctx, Instruction *instr); -int fmaxv_v_p_z(context *ctx, Instruction *instr); -int fmin_mz_zzv(context *ctx, Instruction *instr); -int fmin_mz_zzw(context *ctx, Instruction *instr); -int fmin_z_p_zs(context *ctx, Instruction *instr); -int fmin_z_p_zz(context *ctx, Instruction *instr); -int fminnm_mz_zzv(context *ctx, Instruction *instr); -int fminnm_mz_zzw(context *ctx, Instruction *instr); -int fminnm_z_p_zs(context *ctx, Instruction *instr); -int fminnm_z_p_zz(context *ctx, Instruction *instr); -int fminnmp_z_p_zz(context *ctx, Instruction *instr); -int fminnmqv_z_p_z(context *ctx, Instruction *instr); -int fminnmv_v_p_z(context *ctx, Instruction *instr); -int fminp_z_p_zz(context *ctx, Instruction *instr); -int fminqv_z_p_z(context *ctx, Instruction *instr); -int fminv_v_p_z(context *ctx, Instruction *instr); -int fmla_z_p_zzz(context *ctx, Instruction *instr); -int fmla_z_zzzi(context *ctx, Instruction *instr); -int fmla_za_zzi(context *ctx, Instruction *instr); -int fmla_za_zzv(context *ctx, Instruction *instr); -int fmla_za_zzw(context *ctx, Instruction *instr); -int fmlal_za_z8z8i(context *ctx, Instruction *instr); -int fmlal_za_z8z8v(context *ctx, Instruction *instr); -int fmlal_za_z8z8w(context *ctx, Instruction *instr); -int fmlal_za_zzi(context *ctx, Instruction *instr); -int fmlal_za_zzv(context *ctx, Instruction *instr); -int fmlal_za_zzw(context *ctx, Instruction *instr); -int fmlalb_z_z8z8z8(context *ctx, Instruction *instr); -int fmlalb_z_z8z8z8i(context *ctx, Instruction *instr); -int fmlalb_z_zzz(context *ctx, Instruction *instr); -int fmlalb_z_zzzi(context *ctx, Instruction *instr); -int fmlall_za32_z8z8i(context *ctx, Instruction *instr); -int fmlall_za32_z8z8v(context *ctx, Instruction *instr); -int fmlall_za32_z8z8w(context *ctx, Instruction *instr); -int fmlallbb_z32_z8z8z8(context *ctx, Instruction *instr); -int fmlallbb_z32_z8z8z8i(context *ctx, Instruction *instr); -int fmlallbt_z32_z8z8z8(context *ctx, Instruction *instr); -int fmlallbt_z32_z8z8z8i(context *ctx, Instruction *instr); -int fmlalltb_z32_z8z8z8(context *ctx, Instruction *instr); -int fmlalltb_z32_z8z8z8i(context *ctx, Instruction *instr); -int fmlalltt_z32_z8z8z8(context *ctx, Instruction *instr); -int fmlalltt_z32_z8z8z8i(context *ctx, Instruction *instr); -int fmlalt_z_z8z8z8(context *ctx, Instruction *instr); -int fmlalt_z_z8z8z8i(context *ctx, Instruction *instr); -int fmlalt_z_zzz(context *ctx, Instruction *instr); -int fmlalt_z_zzzi(context *ctx, Instruction *instr); -int fmls_z_p_zzz(context *ctx, Instruction *instr); -int fmls_z_zzzi(context *ctx, Instruction *instr); -int fmls_za_zzi(context *ctx, Instruction *instr); -int fmls_za_zzv(context *ctx, Instruction *instr); -int fmls_za_zzw(context *ctx, Instruction *instr); -int fmlsl_za_zzi(context *ctx, Instruction *instr); -int fmlsl_za_zzv(context *ctx, Instruction *instr); -int fmlsl_za_zzw(context *ctx, Instruction *instr); -int fmlslb_z_zzz(context *ctx, Instruction *instr); -int fmlslb_z_zzzi(context *ctx, Instruction *instr); -int fmlslt_z_zzz(context *ctx, Instruction *instr); -int fmlslt_z_zzzi(context *ctx, Instruction *instr); -int fmmla_z16_zz8z8(context *ctx, Instruction *instr); -int fmmla_z32_zz8z8(context *ctx, Instruction *instr); -int fmmla_z32_zzz(context *ctx, Instruction *instr); -int fmmla_z_zzz(context *ctx, Instruction *instr); -int fmop4a_za16_z8z8(context *ctx, Instruction *instr); -int fmop4a_za32_z8z8(context *ctx, Instruction *instr); -int fmop4a_za32_zz(context *ctx, Instruction *instr); -int fmop4a_za_zz(context *ctx, Instruction *instr); -int fmop4s_za32_zz(context *ctx, Instruction *instr); -int fmop4s_za_zz(context *ctx, Instruction *instr); -int fmopa_za16_pp_z8z8(context *ctx, Instruction *instr); -int fmopa_za32_pp_z8z8(context *ctx, Instruction *instr); -int fmopa_za32_pp_zz(context *ctx, Instruction *instr); -int fmopa_za_pp_zz(context *ctx, Instruction *instr); -int fmops_za32_pp_zz(context *ctx, Instruction *instr); -int fmops_za_pp_zz(context *ctx, Instruction *instr); -int fmov_cpy_z_p_i(context *ctx, Instruction *instr); -int fmov_dup_z_i(context *ctx, Instruction *instr); -int fmov_fcpy_z_p_i(context *ctx, Instruction *instr); -int fmov_fdup_z_i(context *ctx, Instruction *instr); -int fmsb_z_p_zzz(context *ctx, Instruction *instr); -int fmul_mz_zzv(context *ctx, Instruction *instr); -int fmul_mz_zzw(context *ctx, Instruction *instr); -int fmul_z_p_zs(context *ctx, Instruction *instr); -int fmul_z_p_zz(context *ctx, Instruction *instr); -int fmul_z_zz(context *ctx, Instruction *instr); -int fmul_z_zzi(context *ctx, Instruction *instr); -int fmulx_z_p_zz(context *ctx, Instruction *instr); -int fneg_z_p_z(context *ctx, Instruction *instr); -int fnmad_z_p_zzz(context *ctx, Instruction *instr); -int fnmla_z_p_zzz(context *ctx, Instruction *instr); -int fnmls_z_p_zzz(context *ctx, Instruction *instr); -int fnmsb_z_p_zzz(context *ctx, Instruction *instr); -int frecpe_z_z(context *ctx, Instruction *instr); -int frecps_z_zz(context *ctx, Instruction *instr); -int frecpx_z_p_z(context *ctx, Instruction *instr); -int frint32x_z_p_z(context *ctx, Instruction *instr); -int frint32z_z_p_z(context *ctx, Instruction *instr); -int frint64x_z_p_z(context *ctx, Instruction *instr); -int frint64z_z_p_z(context *ctx, Instruction *instr); -int frinta_mz_z(context *ctx, Instruction *instr); -int frinta_z_p_z(context *ctx, Instruction *instr); -int frintm_mz_z(context *ctx, Instruction *instr); -int frintn_mz_z(context *ctx, Instruction *instr); -int frintp_mz_z(context *ctx, Instruction *instr); -int frsqrte_z_z(context *ctx, Instruction *instr); -int frsqrts_z_zz(context *ctx, Instruction *instr); -int fscale_mz_zzv(context *ctx, Instruction *instr); -int fscale_mz_zzw(context *ctx, Instruction *instr); -int fscale_z_p_zz(context *ctx, Instruction *instr); -int fsqrt_z_p_z(context *ctx, Instruction *instr); -int fsub_z_p_zs(context *ctx, Instruction *instr); -int fsub_z_p_zz(context *ctx, Instruction *instr); -int fsub_z_zz(context *ctx, Instruction *instr); -int fsub_za_zw(context *ctx, Instruction *instr); -int fsubr_z_p_zs(context *ctx, Instruction *instr); -int fsubr_z_p_zz(context *ctx, Instruction *instr); -int ftmad_z_zzi(context *ctx, Instruction *instr); -int ftmopa_za16_z8z8zi(context *ctx, Instruction *instr); -int ftmopa_za32_z8z8zi(context *ctx, Instruction *instr); -int ftmopa_za32_zzzi(context *ctx, Instruction *instr); -int ftmopa_za_zzzi(context *ctx, Instruction *instr); -int ftsmul_z_zz(context *ctx, Instruction *instr); -int ftssel_z_zz(context *ctx, Instruction *instr); -int fvdot_za_z8z8i(context *ctx, Instruction *instr); -int fvdot_za_zzi(context *ctx, Instruction *instr); -int fvdotb_za32_z8z8i(context *ctx, Instruction *instr); -int fvdott_za32_z8z8i(context *ctx, Instruction *instr); -int histcnt_z_p_zz(context *ctx, Instruction *instr); -int histseg_z_zz(context *ctx, Instruction *instr); -int incb_r_rs(context *ctx, Instruction *instr); -int incd_z_zs(context *ctx, Instruction *instr); -int incp_r_p_r(context *ctx, Instruction *instr); -int incp_z_p_z(context *ctx, Instruction *instr); -int index_z_ii(context *ctx, Instruction *instr); -int index_z_ir(context *ctx, Instruction *instr); -int index_z_ri(context *ctx, Instruction *instr); -int index_z_rr(context *ctx, Instruction *instr); -int insr_z_r(context *ctx, Instruction *instr); -int insr_z_v(context *ctx, Instruction *instr); -int lasta_r_p_z(context *ctx, Instruction *instr); -int lasta_v_p_z(context *ctx, Instruction *instr); -int lastb_r_p_z(context *ctx, Instruction *instr); -int lastb_v_p_z(context *ctx, Instruction *instr); -int lastp_r_p_p(context *ctx, Instruction *instr); -int ld1b_mz_p_bi(context *ctx, Instruction *instr); -int ld1b_mz_p_br(context *ctx, Instruction *instr); -int ld1b_mzx_p_bi(context *ctx, Instruction *instr); -int ld1b_mzx_p_br(context *ctx, Instruction *instr); -int ld1b_z_p_ai(context *ctx, Instruction *instr); -int ld1b_z_p_bi(context *ctx, Instruction *instr); -int ld1b_z_p_br(context *ctx, Instruction *instr); -int ld1b_z_p_bz(context *ctx, Instruction *instr); -int ld1b_za_p_rrr(context *ctx, Instruction *instr); -int ld1d_mz_p_bi(context *ctx, Instruction *instr); -int ld1d_mz_p_br(context *ctx, Instruction *instr); -int ld1d_mzx_p_bi(context *ctx, Instruction *instr); -int ld1d_mzx_p_br(context *ctx, Instruction *instr); -int ld1d_z_p_ai(context *ctx, Instruction *instr); -int ld1d_z_p_bi(context *ctx, Instruction *instr); -int ld1d_z_p_br(context *ctx, Instruction *instr); -int ld1d_z_p_bz(context *ctx, Instruction *instr); -int ld1d_za_p_rrr(context *ctx, Instruction *instr); -int ld1h_mz_p_bi(context *ctx, Instruction *instr); -int ld1h_mz_p_br(context *ctx, Instruction *instr); -int ld1h_mzx_p_bi(context *ctx, Instruction *instr); -int ld1h_mzx_p_br(context *ctx, Instruction *instr); -int ld1h_z_p_ai(context *ctx, Instruction *instr); -int ld1h_z_p_bi(context *ctx, Instruction *instr); -int ld1h_z_p_br(context *ctx, Instruction *instr); -int ld1h_z_p_bz(context *ctx, Instruction *instr); -int ld1h_za_p_rrr(context *ctx, Instruction *instr); -int ld1q_z_p_ar(context *ctx, Instruction *instr); -int ld1q_za_p_rrr(context *ctx, Instruction *instr); -int ld1rb_z_p_bi(context *ctx, Instruction *instr); -int ld1rd_z_p_bi(context *ctx, Instruction *instr); -int ld1rh_z_p_bi(context *ctx, Instruction *instr); -int ld1rob_z_p_bi(context *ctx, Instruction *instr); -int ld1rob_z_p_br(context *ctx, Instruction *instr); -int ld1rod_z_p_bi(context *ctx, Instruction *instr); -int ld1rod_z_p_br(context *ctx, Instruction *instr); -int ld1roh_z_p_bi(context *ctx, Instruction *instr); -int ld1roh_z_p_br(context *ctx, Instruction *instr); -int ld1row_z_p_bi(context *ctx, Instruction *instr); -int ld1row_z_p_br(context *ctx, Instruction *instr); -int ld1rqb_z_p_bi(context *ctx, Instruction *instr); -int ld1rqb_z_p_br(context *ctx, Instruction *instr); -int ld1rqd_z_p_bi(context *ctx, Instruction *instr); -int ld1rqd_z_p_br(context *ctx, Instruction *instr); -int ld1rqh_z_p_bi(context *ctx, Instruction *instr); -int ld1rqh_z_p_br(context *ctx, Instruction *instr); -int ld1rqw_z_p_bi(context *ctx, Instruction *instr); -int ld1rqw_z_p_br(context *ctx, Instruction *instr); -int ld1rsb_z_p_bi(context *ctx, Instruction *instr); -int ld1rsh_z_p_bi(context *ctx, Instruction *instr); -int ld1rsw_z_p_bi(context *ctx, Instruction *instr); -int ld1rw_z_p_bi(context *ctx, Instruction *instr); -int ld1sb_z_p_ai(context *ctx, Instruction *instr); -int ld1sb_z_p_bi(context *ctx, Instruction *instr); -int ld1sb_z_p_br(context *ctx, Instruction *instr); -int ld1sb_z_p_bz(context *ctx, Instruction *instr); -int ld1sh_z_p_ai(context *ctx, Instruction *instr); -int ld1sh_z_p_bi(context *ctx, Instruction *instr); -int ld1sh_z_p_br(context *ctx, Instruction *instr); -int ld1sh_z_p_bz(context *ctx, Instruction *instr); -int ld1sw_z_p_ai(context *ctx, Instruction *instr); -int ld1sw_z_p_bi(context *ctx, Instruction *instr); -int ld1sw_z_p_br(context *ctx, Instruction *instr); -int ld1sw_z_p_bz(context *ctx, Instruction *instr); -int ld1w_mz_p_bi(context *ctx, Instruction *instr); -int ld1w_mz_p_br(context *ctx, Instruction *instr); -int ld1w_mzx_p_bi(context *ctx, Instruction *instr); -int ld1w_mzx_p_br(context *ctx, Instruction *instr); -int ld1w_z_p_ai(context *ctx, Instruction *instr); -int ld1w_z_p_bi(context *ctx, Instruction *instr); -int ld1w_z_p_br(context *ctx, Instruction *instr); -int ld1w_z_p_bz(context *ctx, Instruction *instr); -int ld1w_za_p_rrr(context *ctx, Instruction *instr); -int ld2b_z_p_bi(context *ctx, Instruction *instr); -int ld2b_z_p_br(context *ctx, Instruction *instr); -int ld2d_z_p_bi(context *ctx, Instruction *instr); -int ld2d_z_p_br(context *ctx, Instruction *instr); -int ld2h_z_p_bi(context *ctx, Instruction *instr); -int ld2h_z_p_br(context *ctx, Instruction *instr); -int ld2q_z_p_bi(context *ctx, Instruction *instr); -int ld2q_z_p_br(context *ctx, Instruction *instr); -int ld2w_z_p_bi(context *ctx, Instruction *instr); -int ld2w_z_p_br(context *ctx, Instruction *instr); -int ld3b_z_p_bi(context *ctx, Instruction *instr); -int ld3b_z_p_br(context *ctx, Instruction *instr); -int ld3d_z_p_bi(context *ctx, Instruction *instr); -int ld3d_z_p_br(context *ctx, Instruction *instr); -int ld3h_z_p_bi(context *ctx, Instruction *instr); -int ld3h_z_p_br(context *ctx, Instruction *instr); -int ld3q_z_p_bi(context *ctx, Instruction *instr); -int ld3q_z_p_br(context *ctx, Instruction *instr); -int ld3w_z_p_bi(context *ctx, Instruction *instr); -int ld3w_z_p_br(context *ctx, Instruction *instr); -int ld4b_z_p_bi(context *ctx, Instruction *instr); -int ld4b_z_p_br(context *ctx, Instruction *instr); -int ld4d_z_p_bi(context *ctx, Instruction *instr); -int ld4d_z_p_br(context *ctx, Instruction *instr); -int ld4h_z_p_bi(context *ctx, Instruction *instr); -int ld4h_z_p_br(context *ctx, Instruction *instr); -int ld4q_z_p_bi(context *ctx, Instruction *instr); -int ld4q_z_p_br(context *ctx, Instruction *instr); -int ld4w_z_p_bi(context *ctx, Instruction *instr); -int ld4w_z_p_br(context *ctx, Instruction *instr); -int ldff1b_z_p_ai(context *ctx, Instruction *instr); -int ldff1b_z_p_br(context *ctx, Instruction *instr); -int ldff1b_z_p_bz(context *ctx, Instruction *instr); -int ldff1d_z_p_ai(context *ctx, Instruction *instr); -int ldff1d_z_p_br(context *ctx, Instruction *instr); -int ldff1d_z_p_bz(context *ctx, Instruction *instr); -int ldff1h_z_p_ai(context *ctx, Instruction *instr); -int ldff1h_z_p_br(context *ctx, Instruction *instr); -int ldff1h_z_p_bz(context *ctx, Instruction *instr); -int ldff1sb_z_p_ai(context *ctx, Instruction *instr); -int ldff1sb_z_p_br(context *ctx, Instruction *instr); -int ldff1sb_z_p_bz(context *ctx, Instruction *instr); -int ldff1sh_z_p_ai(context *ctx, Instruction *instr); -int ldff1sh_z_p_br(context *ctx, Instruction *instr); -int ldff1sh_z_p_bz(context *ctx, Instruction *instr); -int ldff1sw_z_p_ai(context *ctx, Instruction *instr); -int ldff1sw_z_p_br(context *ctx, Instruction *instr); -int ldff1sw_z_p_bz(context *ctx, Instruction *instr); -int ldff1w_z_p_ai(context *ctx, Instruction *instr); -int ldff1w_z_p_br(context *ctx, Instruction *instr); -int ldff1w_z_p_bz(context *ctx, Instruction *instr); -int ldnf1b_z_p_bi(context *ctx, Instruction *instr); -int ldnf1d_z_p_bi(context *ctx, Instruction *instr); -int ldnf1h_z_p_bi(context *ctx, Instruction *instr); -int ldnf1sb_z_p_bi(context *ctx, Instruction *instr); -int ldnf1sh_z_p_bi(context *ctx, Instruction *instr); -int ldnf1sw_z_p_bi(context *ctx, Instruction *instr); -int ldnf1w_z_p_bi(context *ctx, Instruction *instr); -int ldnt1b_mz_p_bi(context *ctx, Instruction *instr); -int ldnt1b_mz_p_br(context *ctx, Instruction *instr); -int ldnt1b_mzx_p_bi(context *ctx, Instruction *instr); -int ldnt1b_mzx_p_br(context *ctx, Instruction *instr); -int ldnt1b_z_p_ar(context *ctx, Instruction *instr); -int ldnt1b_z_p_bi(context *ctx, Instruction *instr); -int ldnt1b_z_p_br(context *ctx, Instruction *instr); -int ldnt1d_mz_p_bi(context *ctx, Instruction *instr); -int ldnt1d_mz_p_br(context *ctx, Instruction *instr); -int ldnt1d_mzx_p_bi(context *ctx, Instruction *instr); -int ldnt1d_mzx_p_br(context *ctx, Instruction *instr); -int ldnt1d_z_p_ar(context *ctx, Instruction *instr); -int ldnt1d_z_p_bi(context *ctx, Instruction *instr); -int ldnt1d_z_p_br(context *ctx, Instruction *instr); -int ldnt1h_mz_p_bi(context *ctx, Instruction *instr); -int ldnt1h_mz_p_br(context *ctx, Instruction *instr); -int ldnt1h_mzx_p_bi(context *ctx, Instruction *instr); -int ldnt1h_mzx_p_br(context *ctx, Instruction *instr); -int ldnt1h_z_p_ar(context *ctx, Instruction *instr); -int ldnt1h_z_p_bi(context *ctx, Instruction *instr); -int ldnt1h_z_p_br(context *ctx, Instruction *instr); -int ldnt1sb_z_p_ar(context *ctx, Instruction *instr); -int ldnt1sh_z_p_ar(context *ctx, Instruction *instr); -int ldnt1sw_z_p_ar(context *ctx, Instruction *instr); -int ldnt1w_mz_p_bi(context *ctx, Instruction *instr); -int ldnt1w_mz_p_br(context *ctx, Instruction *instr); -int ldnt1w_mzx_p_bi(context *ctx, Instruction *instr); -int ldnt1w_mzx_p_br(context *ctx, Instruction *instr); -int ldnt1w_z_p_ar(context *ctx, Instruction *instr); -int ldnt1w_z_p_bi(context *ctx, Instruction *instr); -int ldnt1w_z_p_br(context *ctx, Instruction *instr); -int ldr_p_bi(context *ctx, Instruction *instr); -int ldr_z_bi(context *ctx, Instruction *instr); -int ldr_za_ri(context *ctx, Instruction *instr); -int ldr_zt_br(context *ctx, Instruction *instr); -int lsl_z_p_zi(context *ctx, Instruction *instr); -int lsl_z_p_zw(context *ctx, Instruction *instr); -int lsl_z_p_zz(context *ctx, Instruction *instr); -int lsl_z_zi(context *ctx, Instruction *instr); -int lsl_z_zw(context *ctx, Instruction *instr); -int lslr_z_p_zz(context *ctx, Instruction *instr); -int lsr_z_p_zi(context *ctx, Instruction *instr); -int lsr_z_p_zw(context *ctx, Instruction *instr); -int lsr_z_p_zz(context *ctx, Instruction *instr); -int lsr_z_zi(context *ctx, Instruction *instr); -int lsr_z_zw(context *ctx, Instruction *instr); -int lsrr_z_p_zz(context *ctx, Instruction *instr); -int luti2_mz2_ztz(context *ctx, Instruction *instr); -int luti2_mz4_ztz(context *ctx, Instruction *instr); -int luti2_z_ztz(context *ctx, Instruction *instr); -int luti2_z_zz(context *ctx, Instruction *instr); -int luti4_mz2_ztz(context *ctx, Instruction *instr); -int luti4_mz4_ztmz2(context *ctx, Instruction *instr); -int luti4_mz4_ztz(context *ctx, Instruction *instr); -int luti4_z_ztz(context *ctx, Instruction *instr); -int luti4_z_zz(context *ctx, Instruction *instr); -int luti6_mz4_zmz2(context *ctx, Instruction *instr); -int luti6_mz4_ztz(context *ctx, Instruction *instr); -int luti6_z_z2zz(context *ctx, Instruction *instr); -int luti6_z_ztz(context *ctx, Instruction *instr); -int luti6_z_zzz(context *ctx, Instruction *instr); -int mad_z_p_zzz(context *ctx, Instruction *instr); -int madpt_z_zzz(context *ctx, Instruction *instr); -int match_p_p_zz(context *ctx, Instruction *instr); -int mla_z_p_zzz(context *ctx, Instruction *instr); -int mla_z_zzzi(context *ctx, Instruction *instr); -int mlapt_z_zzz(context *ctx, Instruction *instr); -int mls_z_p_zzz(context *ctx, Instruction *instr); -int mls_z_zzzi(context *ctx, Instruction *instr); -int mov_and_p_p_pp(context *ctx, Instruction *instr); -int mov_cpy_z_o_i(context *ctx, Instruction *instr); -int mov_cpy_z_p_i(context *ctx, Instruction *instr); -int mov_cpy_z_p_r(context *ctx, Instruction *instr); -int mov_cpy_z_p_v(context *ctx, Instruction *instr); -int mov_dup_z_i(context *ctx, Instruction *instr); -int mov_dup_z_r(context *ctx, Instruction *instr); -int mov_dup_z_zi(context *ctx, Instruction *instr); -int mov_dupm_z_i(context *ctx, Instruction *instr); -int mov_mova_mz2_za(context *ctx, Instruction *instr); -int mov_mova_mz4_za(context *ctx, Instruction *instr); -int mov_mova_mz_za2(context *ctx, Instruction *instr); -int mov_mova_mz_za4(context *ctx, Instruction *instr); -int mov_mova_z_p_rza(context *ctx, Instruction *instr); -int mov_mova_za2_z(context *ctx, Instruction *instr); -int mov_mova_za4_z(context *ctx, Instruction *instr); -int mov_mova_za_mz2(context *ctx, Instruction *instr); -int mov_mova_za_mz4(context *ctx, Instruction *instr); -int mov_mova_za_p_rz(context *ctx, Instruction *instr); -int mov_orr_p_p_pp(context *ctx, Instruction *instr); -int mov_orr_z_zz(context *ctx, Instruction *instr); -int mov_sel_p_p_pp(context *ctx, Instruction *instr); -int mov_sel_z_p_zz(context *ctx, Instruction *instr); -int mova_mz2_za(context *ctx, Instruction *instr); -int mova_mz4_za(context *ctx, Instruction *instr); -int mova_mz_za2(context *ctx, Instruction *instr); -int mova_mz_za4(context *ctx, Instruction *instr); -int mova_z_p_rza(context *ctx, Instruction *instr); -int mova_za2_z(context *ctx, Instruction *instr); -int mova_za4_z(context *ctx, Instruction *instr); -int mova_za_mz2(context *ctx, Instruction *instr); -int mova_za_mz4(context *ctx, Instruction *instr); -int mova_za_p_rz(context *ctx, Instruction *instr); -int movaz_mz2_za(context *ctx, Instruction *instr); -int movaz_mz4_za(context *ctx, Instruction *instr); -int movaz_mz_za2(context *ctx, Instruction *instr); -int movaz_mz_za4(context *ctx, Instruction *instr); -int movaz_z_rza(context *ctx, Instruction *instr); -int movprfx_z_p_z(context *ctx, Instruction *instr); -int movprfx_z_z(context *ctx, Instruction *instr); -int movs_ands_p_p_pp(context *ctx, Instruction *instr); -int movs_orrs_p_p_pp(context *ctx, Instruction *instr); -int movt_r_zt(context *ctx, Instruction *instr); -int movt_zt_r(context *ctx, Instruction *instr); -int movt_zt_z(context *ctx, Instruction *instr); -int msb_z_p_zzz(context *ctx, Instruction *instr); -int mul_z_p_zz(context *ctx, Instruction *instr); -int mul_z_zi(context *ctx, Instruction *instr); -int mul_z_zz(context *ctx, Instruction *instr); -int mul_z_zzi(context *ctx, Instruction *instr); -int nand_p_p_pp(context *ctx, Instruction *instr); -int nands_p_p_pp(context *ctx, Instruction *instr); -int nbsl_z_zzz(context *ctx, Instruction *instr); -int neg_z_p_z(context *ctx, Instruction *instr); -int nmatch_p_p_zz(context *ctx, Instruction *instr); -int nor_p_p_pp(context *ctx, Instruction *instr); -int nors_p_p_pp(context *ctx, Instruction *instr); -int not_eor_p_p_pp(context *ctx, Instruction *instr); -int not_z_p_z(context *ctx, Instruction *instr); -int nots_eors_p_p_pp(context *ctx, Instruction *instr); -int orn_orr_z_zi(context *ctx, Instruction *instr); -int orn_p_p_pp(context *ctx, Instruction *instr); -int orns_p_p_pp(context *ctx, Instruction *instr); -int orqv_z_p_z(context *ctx, Instruction *instr); -int orr_p_p_pp(context *ctx, Instruction *instr); -int orr_z_p_zz(context *ctx, Instruction *instr); -int orr_z_zi(context *ctx, Instruction *instr); -int orr_z_zz(context *ctx, Instruction *instr); -int orrs_p_p_pp(context *ctx, Instruction *instr); -int orv_r_p_z(context *ctx, Instruction *instr); -int pext_pn_rr(context *ctx, Instruction *instr); -int pext_pp_rr(context *ctx, Instruction *instr); -int pfalse_p(context *ctx, Instruction *instr); -int pfirst_p_p_p(context *ctx, Instruction *instr); -int pmlal_mz_zzzw(context *ctx, Instruction *instr); -int pmov_p_zi(context *ctx, Instruction *instr); -int pmov_z_pi(context *ctx, Instruction *instr); -int pmul_z_zz(context *ctx, Instruction *instr); -int pmull_mz_zzw(context *ctx, Instruction *instr); -int pmullb_z_zz(context *ctx, Instruction *instr); -int pmullt_z_zz(context *ctx, Instruction *instr); -int pnext_p_p_p(context *ctx, Instruction *instr); -int prfb_i_p_ai(context *ctx, Instruction *instr); -int prfb_i_p_bi(context *ctx, Instruction *instr); -int prfb_i_p_br(context *ctx, Instruction *instr); -int prfb_i_p_bz(context *ctx, Instruction *instr); -int prfd_i_p_ai(context *ctx, Instruction *instr); -int prfd_i_p_bi(context *ctx, Instruction *instr); -int prfd_i_p_br(context *ctx, Instruction *instr); -int prfd_i_p_bz(context *ctx, Instruction *instr); -int prfh_i_p_ai(context *ctx, Instruction *instr); -int prfh_i_p_bi(context *ctx, Instruction *instr); -int prfh_i_p_br(context *ctx, Instruction *instr); -int prfh_i_p_bz(context *ctx, Instruction *instr); -int prfw_i_p_ai(context *ctx, Instruction *instr); -int prfw_i_p_bi(context *ctx, Instruction *instr); -int prfw_i_p_br(context *ctx, Instruction *instr); -int prfw_i_p_bz(context *ctx, Instruction *instr); -int psel_p_ppi(context *ctx, Instruction *instr); -int ptest_p_p(context *ctx, Instruction *instr); -int ptrue_p_s(context *ctx, Instruction *instr); -int ptrue_pn_i(context *ctx, Instruction *instr); -int ptrues_p_s(context *ctx, Instruction *instr); -int punpkhi_p_p(context *ctx, Instruction *instr); -int raddhnb_z_zz(context *ctx, Instruction *instr); -int raddhnt_z_zz(context *ctx, Instruction *instr); -int rax1_z_zz(context *ctx, Instruction *instr); -int rbit_z_p_z(context *ctx, Instruction *instr); -int rdffr_p_f(context *ctx, Instruction *instr); -int rdffr_p_p_f(context *ctx, Instruction *instr); -int rdffrs_p_p_f(context *ctx, Instruction *instr); -int rdsvl_r_i(context *ctx, Instruction *instr); -int rdvl_r_i(context *ctx, Instruction *instr); -int rev_p_p(context *ctx, Instruction *instr); -int rev_z_z(context *ctx, Instruction *instr); -int revb_z_z(context *ctx, Instruction *instr); -int revd_z_p_z(context *ctx, Instruction *instr); -int rshrnb_z_zi(context *ctx, Instruction *instr); -int rshrnt_z_zi(context *ctx, Instruction *instr); -int rsubhnb_z_zz(context *ctx, Instruction *instr); -int rsubhnt_z_zz(context *ctx, Instruction *instr); -int saba_z_zzz(context *ctx, Instruction *instr); -int sabal_z_zzz(context *ctx, Instruction *instr); -int sabalb_z_zzz(context *ctx, Instruction *instr); -int sabalt_z_zzz(context *ctx, Instruction *instr); -int sabd_z_p_zz(context *ctx, Instruction *instr); -int sabdlb_z_zz(context *ctx, Instruction *instr); -int sabdlt_z_zz(context *ctx, Instruction *instr); -int sadalp_z_p_z(context *ctx, Instruction *instr); -int saddlb_z_zz(context *ctx, Instruction *instr); -int saddlbt_z_zz(context *ctx, Instruction *instr); -int saddlt_z_zz(context *ctx, Instruction *instr); -int saddv_r_p_z(context *ctx, Instruction *instr); -int saddwb_z_zz(context *ctx, Instruction *instr); -int saddwt_z_zz(context *ctx, Instruction *instr); -int sbclb_z_zzz(context *ctx, Instruction *instr); -int sbclt_z_zzz(context *ctx, Instruction *instr); -int sclamp_mz_zz(context *ctx, Instruction *instr); -int sclamp_z_zz(context *ctx, Instruction *instr); -int scvtf_mz_z(context *ctx, Instruction *instr); -int scvtf_z_p_z(context *ctx, Instruction *instr); -int scvtf_z_z(context *ctx, Instruction *instr); -int scvtflt_z_z(context *ctx, Instruction *instr); -int sdiv_z_p_zz(context *ctx, Instruction *instr); -int sdivr_z_p_zz(context *ctx, Instruction *instr); -int sdot_z32_zzz(context *ctx, Instruction *instr); -int sdot_z32_zzzi(context *ctx, Instruction *instr); -int sdot_z_zzz(context *ctx, Instruction *instr); -int sdot_z_zzzi(context *ctx, Instruction *instr); -int sdot_za32_zzi(context *ctx, Instruction *instr); -int sdot_za32_zzv(context *ctx, Instruction *instr); -int sdot_za32_zzw(context *ctx, Instruction *instr); -int sdot_za_zzi(context *ctx, Instruction *instr); -int sdot_za_zzv(context *ctx, Instruction *instr); -int sdot_za_zzw(context *ctx, Instruction *instr); -int sel_mz_p_zz(context *ctx, Instruction *instr); -int sel_p_p_pp(context *ctx, Instruction *instr); -int sel_z_p_zz(context *ctx, Instruction *instr); -int setffr_f(context *ctx, Instruction *instr); -int shadd_z_p_zz(context *ctx, Instruction *instr); -int shared_pseudocode(context *ctx, Instruction *instr); -int shrnb_z_zi(context *ctx, Instruction *instr); -int shrnt_z_zi(context *ctx, Instruction *instr); -int shsub_z_p_zz(context *ctx, Instruction *instr); -int shsubr_z_p_zz(context *ctx, Instruction *instr); -int sli_z_zzi(context *ctx, Instruction *instr); -int sm4e_z_zz(context *ctx, Instruction *instr); -int sm4ekey_z_zz(context *ctx, Instruction *instr); -int smax_mz_zzv(context *ctx, Instruction *instr); -int smax_mz_zzw(context *ctx, Instruction *instr); -int smax_z_p_zz(context *ctx, Instruction *instr); -int smax_z_zi(context *ctx, Instruction *instr); -int smaxp_z_p_zz(context *ctx, Instruction *instr); -int smaxqv_z_p_z(context *ctx, Instruction *instr); -int smaxv_r_p_z(context *ctx, Instruction *instr); -int smin_mz_zzv(context *ctx, Instruction *instr); -int smin_mz_zzw(context *ctx, Instruction *instr); -int smin_z_p_zz(context *ctx, Instruction *instr); -int smin_z_zi(context *ctx, Instruction *instr); -int sminp_z_p_zz(context *ctx, Instruction *instr); -int sminqv_z_p_z(context *ctx, Instruction *instr); -int sminv_r_p_z(context *ctx, Instruction *instr); -int smlal_za_zzi(context *ctx, Instruction *instr); -int smlal_za_zzv(context *ctx, Instruction *instr); -int smlal_za_zzw(context *ctx, Instruction *instr); -int smlalb_z_zzz(context *ctx, Instruction *instr); -int smlalb_z_zzzi(context *ctx, Instruction *instr); -int smlall_za_zzi(context *ctx, Instruction *instr); -int smlall_za_zzv(context *ctx, Instruction *instr); -int smlall_za_zzw(context *ctx, Instruction *instr); -int smlalt_z_zzz(context *ctx, Instruction *instr); -int smlalt_z_zzzi(context *ctx, Instruction *instr); -int smlsl_za_zzi(context *ctx, Instruction *instr); -int smlsl_za_zzv(context *ctx, Instruction *instr); -int smlsl_za_zzw(context *ctx, Instruction *instr); -int smlslb_z_zzz(context *ctx, Instruction *instr); -int smlslb_z_zzzi(context *ctx, Instruction *instr); -int smlsll_za_zzi(context *ctx, Instruction *instr); -int smlsll_za_zzv(context *ctx, Instruction *instr); -int smlsll_za_zzw(context *ctx, Instruction *instr); -int smlslt_z_zzz(context *ctx, Instruction *instr); -int smlslt_z_zzzi(context *ctx, Instruction *instr); -int smmla_z_zzz(context *ctx, Instruction *instr); -int smop4a_za32_zz(context *ctx, Instruction *instr); -int smop4a_za_zz(context *ctx, Instruction *instr); -int smop4s_za32_zz(context *ctx, Instruction *instr); -int smop4s_za_zz(context *ctx, Instruction *instr); -int smopa_za32_pp_zz(context *ctx, Instruction *instr); -int smopa_za_pp_zz(context *ctx, Instruction *instr); -int smops_za32_pp_zz(context *ctx, Instruction *instr); -int smops_za_pp_zz(context *ctx, Instruction *instr); -int smulh_z_p_zz(context *ctx, Instruction *instr); -int smulh_z_zz(context *ctx, Instruction *instr); -int smullb_z_zz(context *ctx, Instruction *instr); -int smullb_z_zzi(context *ctx, Instruction *instr); -int smullt_z_zz(context *ctx, Instruction *instr); -int smullt_z_zzi(context *ctx, Instruction *instr); -int splice_z_p_zz(context *ctx, Instruction *instr); -int sqabs_z_p_z(context *ctx, Instruction *instr); -int sqadd_z_p_zz(context *ctx, Instruction *instr); -int sqadd_z_zi(context *ctx, Instruction *instr); -int sqadd_z_zz(context *ctx, Instruction *instr); -int sqcadd_z_zz(context *ctx, Instruction *instr); -int sqcvt_z_mz2(context *ctx, Instruction *instr); -int sqcvt_z_mz4(context *ctx, Instruction *instr); -int sqcvtn_z_mz2(context *ctx, Instruction *instr); -int sqcvtn_z_mz4(context *ctx, Instruction *instr); -int sqcvtu_z_mz2(context *ctx, Instruction *instr); -int sqcvtu_z_mz4(context *ctx, Instruction *instr); -int sqcvtun_z_mz2(context *ctx, Instruction *instr); -int sqcvtun_z_mz4(context *ctx, Instruction *instr); -int sqdecb_r_rs(context *ctx, Instruction *instr); -int sqdecd_r_rs(context *ctx, Instruction *instr); -int sqdecd_z_zs(context *ctx, Instruction *instr); -int sqdech_r_rs(context *ctx, Instruction *instr); -int sqdech_z_zs(context *ctx, Instruction *instr); -int sqdecp_r_p_r(context *ctx, Instruction *instr); -int sqdecp_z_p_z(context *ctx, Instruction *instr); -int sqdecw_r_rs(context *ctx, Instruction *instr); -int sqdecw_z_zs(context *ctx, Instruction *instr); -int sqdmlalb_z_zzz(context *ctx, Instruction *instr); -int sqdmlalb_z_zzzi(context *ctx, Instruction *instr); -int sqdmlalbt_z_zzz(context *ctx, Instruction *instr); -int sqdmlalt_z_zzz(context *ctx, Instruction *instr); -int sqdmlalt_z_zzzi(context *ctx, Instruction *instr); -int sqdmlslb_z_zzz(context *ctx, Instruction *instr); -int sqdmlslb_z_zzzi(context *ctx, Instruction *instr); -int sqdmlslbt_z_zzz(context *ctx, Instruction *instr); -int sqdmlslt_z_zzz(context *ctx, Instruction *instr); -int sqdmlslt_z_zzzi(context *ctx, Instruction *instr); -int sqdmulh_mz_zzv(context *ctx, Instruction *instr); -int sqdmulh_mz_zzw(context *ctx, Instruction *instr); -int sqdmulh_z_zz(context *ctx, Instruction *instr); -int sqdmulh_z_zzi(context *ctx, Instruction *instr); -int sqdmullb_z_zz(context *ctx, Instruction *instr); -int sqdmullb_z_zzi(context *ctx, Instruction *instr); -int sqdmullt_z_zz(context *ctx, Instruction *instr); -int sqdmullt_z_zzi(context *ctx, Instruction *instr); -int sqincb_r_rs(context *ctx, Instruction *instr); -int sqincd_r_rs(context *ctx, Instruction *instr); -int sqincd_z_zs(context *ctx, Instruction *instr); -int sqinch_r_rs(context *ctx, Instruction *instr); -int sqinch_z_zs(context *ctx, Instruction *instr); -int sqincp_r_p_r(context *ctx, Instruction *instr); -int sqincp_z_p_z(context *ctx, Instruction *instr); -int sqincw_r_rs(context *ctx, Instruction *instr); -int sqincw_z_zs(context *ctx, Instruction *instr); -int sqneg_z_p_z(context *ctx, Instruction *instr); -int sqrdcmlah_z_zzz(context *ctx, Instruction *instr); -int sqrdcmlah_z_zzzi(context *ctx, Instruction *instr); -int sqrdmlah_z_zzz(context *ctx, Instruction *instr); -int sqrdmlah_z_zzzi(context *ctx, Instruction *instr); -int sqrdmlsh_z_zzz(context *ctx, Instruction *instr); -int sqrdmlsh_z_zzzi(context *ctx, Instruction *instr); -int sqrdmulh_z_zz(context *ctx, Instruction *instr); -int sqrdmulh_z_zzi(context *ctx, Instruction *instr); -int sqrshl_z_p_zz(context *ctx, Instruction *instr); -int sqrshlr_z_p_zz(context *ctx, Instruction *instr); -int sqrshr_z_mz2(context *ctx, Instruction *instr); -int sqrshr_z_mz4(context *ctx, Instruction *instr); -int sqrshrn_z_mz2(context *ctx, Instruction *instr); -int sqrshrn_z_mz4(context *ctx, Instruction *instr); -int sqrshrnb_z_zi(context *ctx, Instruction *instr); -int sqrshrnt_z_zi(context *ctx, Instruction *instr); -int sqrshru_z_mz2(context *ctx, Instruction *instr); -int sqrshru_z_mz4(context *ctx, Instruction *instr); -int sqrshrun_z_mz2(context *ctx, Instruction *instr); -int sqrshrun_z_mz4(context *ctx, Instruction *instr); -int sqrshrunb_z_zi(context *ctx, Instruction *instr); -int sqrshrunt_z_zi(context *ctx, Instruction *instr); -int sqshl_z_p_zi(context *ctx, Instruction *instr); -int sqshl_z_p_zz(context *ctx, Instruction *instr); -int sqshlr_z_p_zz(context *ctx, Instruction *instr); -int sqshlu_z_p_zi(context *ctx, Instruction *instr); -int sqshrn_z_mz2(context *ctx, Instruction *instr); -int sqshrnb_z_zi(context *ctx, Instruction *instr); -int sqshrnt_z_zi(context *ctx, Instruction *instr); -int sqshrun_z_mz2(context *ctx, Instruction *instr); -int sqshrunb_z_zi(context *ctx, Instruction *instr); -int sqshrunt_z_zi(context *ctx, Instruction *instr); -int sqsub_z_p_zz(context *ctx, Instruction *instr); -int sqsub_z_zi(context *ctx, Instruction *instr); -int sqsub_z_zz(context *ctx, Instruction *instr); -int sqsubr_z_p_zz(context *ctx, Instruction *instr); -int sqxtnb_z_zz(context *ctx, Instruction *instr); -int sqxtnt_z_zz(context *ctx, Instruction *instr); -int sqxtunb_z_zz(context *ctx, Instruction *instr); -int sqxtunt_z_zz(context *ctx, Instruction *instr); -int srhadd_z_p_zz(context *ctx, Instruction *instr); -int sri_z_zzi(context *ctx, Instruction *instr); -int srshl_mz_zzv(context *ctx, Instruction *instr); -int srshl_mz_zzw(context *ctx, Instruction *instr); -int srshl_z_p_zz(context *ctx, Instruction *instr); -int srshlr_z_p_zz(context *ctx, Instruction *instr); -int srshr_z_p_zi(context *ctx, Instruction *instr); -int srsra_z_zi(context *ctx, Instruction *instr); -int sshllb_z_zi(context *ctx, Instruction *instr); -int sshllt_z_zi(context *ctx, Instruction *instr); -int ssra_z_zi(context *ctx, Instruction *instr); -int ssublb_z_zz(context *ctx, Instruction *instr); -int ssublbt_z_zz(context *ctx, Instruction *instr); -int ssublt_z_zz(context *ctx, Instruction *instr); -int ssubltb_z_zz(context *ctx, Instruction *instr); -int ssubwb_z_zz(context *ctx, Instruction *instr); -int ssubwt_z_zz(context *ctx, Instruction *instr); -int st1b_mz_p_bi(context *ctx, Instruction *instr); -int st1b_mz_p_br(context *ctx, Instruction *instr); -int st1b_mzx_p_bi(context *ctx, Instruction *instr); -int st1b_mzx_p_br(context *ctx, Instruction *instr); -int st1b_z_p_ai(context *ctx, Instruction *instr); -int st1b_z_p_bi(context *ctx, Instruction *instr); -int st1b_z_p_br(context *ctx, Instruction *instr); -int st1b_z_p_bz(context *ctx, Instruction *instr); -int st1b_za_p_rrr(context *ctx, Instruction *instr); -int st1d_mz_p_bi(context *ctx, Instruction *instr); -int st1d_mz_p_br(context *ctx, Instruction *instr); -int st1d_mzx_p_bi(context *ctx, Instruction *instr); -int st1d_mzx_p_br(context *ctx, Instruction *instr); -int st1d_z_p_ai(context *ctx, Instruction *instr); -int st1d_z_p_bi(context *ctx, Instruction *instr); -int st1d_z_p_br(context *ctx, Instruction *instr); -int st1d_z_p_bz(context *ctx, Instruction *instr); -int st1d_za_p_rrr(context *ctx, Instruction *instr); -int st1h_mz_p_bi(context *ctx, Instruction *instr); -int st1h_mz_p_br(context *ctx, Instruction *instr); -int st1h_mzx_p_bi(context *ctx, Instruction *instr); -int st1h_mzx_p_br(context *ctx, Instruction *instr); -int st1h_z_p_ai(context *ctx, Instruction *instr); -int st1h_z_p_bi(context *ctx, Instruction *instr); -int st1h_z_p_br(context *ctx, Instruction *instr); -int st1h_z_p_bz(context *ctx, Instruction *instr); -int st1h_za_p_rrr(context *ctx, Instruction *instr); -int st1q_z_p_ar(context *ctx, Instruction *instr); -int st1q_za_p_rrr(context *ctx, Instruction *instr); -int st1w_mz_p_bi(context *ctx, Instruction *instr); -int st1w_mz_p_br(context *ctx, Instruction *instr); -int st1w_mzx_p_bi(context *ctx, Instruction *instr); -int st1w_mzx_p_br(context *ctx, Instruction *instr); -int st1w_z_p_ai(context *ctx, Instruction *instr); -int st1w_z_p_bi(context *ctx, Instruction *instr); -int st1w_z_p_br(context *ctx, Instruction *instr); -int st1w_z_p_bz(context *ctx, Instruction *instr); -int st1w_za_p_rrr(context *ctx, Instruction *instr); -int st2b_z_p_bi(context *ctx, Instruction *instr); -int st2b_z_p_br(context *ctx, Instruction *instr); -int st2d_z_p_bi(context *ctx, Instruction *instr); -int st2d_z_p_br(context *ctx, Instruction *instr); -int st2h_z_p_bi(context *ctx, Instruction *instr); -int st2h_z_p_br(context *ctx, Instruction *instr); -int st2q_z_p_bi(context *ctx, Instruction *instr); -int st2q_z_p_br(context *ctx, Instruction *instr); -int st2w_z_p_bi(context *ctx, Instruction *instr); -int st2w_z_p_br(context *ctx, Instruction *instr); -int st3b_z_p_bi(context *ctx, Instruction *instr); -int st3b_z_p_br(context *ctx, Instruction *instr); -int st3d_z_p_bi(context *ctx, Instruction *instr); -int st3d_z_p_br(context *ctx, Instruction *instr); -int st3h_z_p_bi(context *ctx, Instruction *instr); -int st3h_z_p_br(context *ctx, Instruction *instr); -int st3q_z_p_bi(context *ctx, Instruction *instr); -int st3q_z_p_br(context *ctx, Instruction *instr); -int st3w_z_p_bi(context *ctx, Instruction *instr); -int st3w_z_p_br(context *ctx, Instruction *instr); -int st4b_z_p_bi(context *ctx, Instruction *instr); -int st4b_z_p_br(context *ctx, Instruction *instr); -int st4d_z_p_bi(context *ctx, Instruction *instr); -int st4d_z_p_br(context *ctx, Instruction *instr); -int st4h_z_p_bi(context *ctx, Instruction *instr); -int st4h_z_p_br(context *ctx, Instruction *instr); -int st4q_z_p_bi(context *ctx, Instruction *instr); -int st4q_z_p_br(context *ctx, Instruction *instr); -int st4w_z_p_bi(context *ctx, Instruction *instr); -int st4w_z_p_br(context *ctx, Instruction *instr); -int stmopa_za32_zzzi(context *ctx, Instruction *instr); -int stmopa_za_zzzi(context *ctx, Instruction *instr); -int stnt1b_mz_p_bi(context *ctx, Instruction *instr); -int stnt1b_mz_p_br(context *ctx, Instruction *instr); -int stnt1b_mzx_p_bi(context *ctx, Instruction *instr); -int stnt1b_mzx_p_br(context *ctx, Instruction *instr); -int stnt1b_z_p_ar(context *ctx, Instruction *instr); -int stnt1b_z_p_bi(context *ctx, Instruction *instr); -int stnt1b_z_p_br(context *ctx, Instruction *instr); -int stnt1d_mz_p_bi(context *ctx, Instruction *instr); -int stnt1d_mz_p_br(context *ctx, Instruction *instr); -int stnt1d_mzx_p_bi(context *ctx, Instruction *instr); -int stnt1d_mzx_p_br(context *ctx, Instruction *instr); -int stnt1d_z_p_ar(context *ctx, Instruction *instr); -int stnt1d_z_p_bi(context *ctx, Instruction *instr); -int stnt1d_z_p_br(context *ctx, Instruction *instr); -int stnt1h_mz_p_bi(context *ctx, Instruction *instr); -int stnt1h_mz_p_br(context *ctx, Instruction *instr); -int stnt1h_mzx_p_bi(context *ctx, Instruction *instr); -int stnt1h_mzx_p_br(context *ctx, Instruction *instr); -int stnt1h_z_p_ar(context *ctx, Instruction *instr); -int stnt1h_z_p_bi(context *ctx, Instruction *instr); -int stnt1h_z_p_br(context *ctx, Instruction *instr); -int stnt1w_mz_p_bi(context *ctx, Instruction *instr); -int stnt1w_mz_p_br(context *ctx, Instruction *instr); -int stnt1w_mzx_p_bi(context *ctx, Instruction *instr); -int stnt1w_mzx_p_br(context *ctx, Instruction *instr); -int stnt1w_z_p_ar(context *ctx, Instruction *instr); -int stnt1w_z_p_bi(context *ctx, Instruction *instr); -int stnt1w_z_p_br(context *ctx, Instruction *instr); -int str_p_bi(context *ctx, Instruction *instr); -int str_z_bi(context *ctx, Instruction *instr); -int str_za_ri(context *ctx, Instruction *instr); -int str_zt_br(context *ctx, Instruction *instr); -int sub_z_p_zz(context *ctx, Instruction *instr); -int sub_z_zi(context *ctx, Instruction *instr); -int sub_z_zz(context *ctx, Instruction *instr); -int sub_za_zw(context *ctx, Instruction *instr); -int sub_za_zzv(context *ctx, Instruction *instr); -int sub_za_zzw(context *ctx, Instruction *instr); -int subhnb_z_zz(context *ctx, Instruction *instr); -int subhnt_z_zz(context *ctx, Instruction *instr); -int subp_z_p_zz(context *ctx, Instruction *instr); -int subpt_z_p_zz(context *ctx, Instruction *instr); -int subpt_z_zz(context *ctx, Instruction *instr); -int subr_z_p_zz(context *ctx, Instruction *instr); -int subr_z_zi(context *ctx, Instruction *instr); -int sudot_z_zzzi(context *ctx, Instruction *instr); -int sudot_za_zzi(context *ctx, Instruction *instr); -int sudot_za_zzv(context *ctx, Instruction *instr); -int sumlall_za_zzi(context *ctx, Instruction *instr); -int sumlall_za_zzv(context *ctx, Instruction *instr); -int sumop4a_za_zz(context *ctx, Instruction *instr); -int sumop4s_za_zz(context *ctx, Instruction *instr); -int sumopa_za_pp_zz(context *ctx, Instruction *instr); -int sumops_za_pp_zz(context *ctx, Instruction *instr); -int sunpk_mz_z(context *ctx, Instruction *instr); -int sunpkhi_z_z(context *ctx, Instruction *instr); -int suqadd_z_p_zz(context *ctx, Instruction *instr); -int sutmopa_za_zzzi(context *ctx, Instruction *instr); -int suvdot_za_zzi(context *ctx, Instruction *instr); -int svdot_za32_zzi(context *ctx, Instruction *instr); -int svdot_za_zzi(context *ctx, Instruction *instr); -int sxtb_z_p_z(context *ctx, Instruction *instr); -int tbl_z_zz(context *ctx, Instruction *instr); -int tblq_z_zz(context *ctx, Instruction *instr); -int tbx_z_zz(context *ctx, Instruction *instr); -int tbxq_z_zz(context *ctx, Instruction *instr); -int trn1_p_pp(context *ctx, Instruction *instr); -int trn1_z_zz(context *ctx, Instruction *instr); -int uaba_z_zzz(context *ctx, Instruction *instr); -int uabal_z_zzz(context *ctx, Instruction *instr); -int uabalb_z_zzz(context *ctx, Instruction *instr); -int uabalt_z_zzz(context *ctx, Instruction *instr); -int uabd_z_p_zz(context *ctx, Instruction *instr); -int uabdlb_z_zz(context *ctx, Instruction *instr); -int uabdlt_z_zz(context *ctx, Instruction *instr); -int uadalp_z_p_z(context *ctx, Instruction *instr); -int uaddlb_z_zz(context *ctx, Instruction *instr); -int uaddlt_z_zz(context *ctx, Instruction *instr); -int uaddv_r_p_z(context *ctx, Instruction *instr); -int uaddwb_z_zz(context *ctx, Instruction *instr); -int uaddwt_z_zz(context *ctx, Instruction *instr); -int uclamp_mz_zz(context *ctx, Instruction *instr); -int uclamp_z_zz(context *ctx, Instruction *instr); -int ucvtf_mz_z(context *ctx, Instruction *instr); -int ucvtf_z_p_z(context *ctx, Instruction *instr); -int ucvtf_z_z(context *ctx, Instruction *instr); -int ucvtflt_z_z(context *ctx, Instruction *instr); -int udiv_z_p_zz(context *ctx, Instruction *instr); -int udivr_z_p_zz(context *ctx, Instruction *instr); -int udot_z32_zzz(context *ctx, Instruction *instr); -int udot_z32_zzzi(context *ctx, Instruction *instr); -int udot_z_zzz(context *ctx, Instruction *instr); -int udot_z_zzzi(context *ctx, Instruction *instr); -int udot_za32_zzi(context *ctx, Instruction *instr); -int udot_za32_zzv(context *ctx, Instruction *instr); -int udot_za32_zzw(context *ctx, Instruction *instr); -int udot_za_zzi(context *ctx, Instruction *instr); -int udot_za_zzv(context *ctx, Instruction *instr); -int udot_za_zzw(context *ctx, Instruction *instr); -int uhadd_z_p_zz(context *ctx, Instruction *instr); -int uhsub_z_p_zz(context *ctx, Instruction *instr); -int uhsubr_z_p_zz(context *ctx, Instruction *instr); -int umax_mz_zzv(context *ctx, Instruction *instr); -int umax_mz_zzw(context *ctx, Instruction *instr); -int umax_z_p_zz(context *ctx, Instruction *instr); -int umax_z_zi(context *ctx, Instruction *instr); -int umaxp_z_p_zz(context *ctx, Instruction *instr); -int umaxqv_z_p_z(context *ctx, Instruction *instr); -int umaxv_r_p_z(context *ctx, Instruction *instr); -int umin_mz_zzv(context *ctx, Instruction *instr); -int umin_mz_zzw(context *ctx, Instruction *instr); -int umin_z_p_zz(context *ctx, Instruction *instr); -int umin_z_zi(context *ctx, Instruction *instr); -int uminp_z_p_zz(context *ctx, Instruction *instr); -int uminqv_z_p_z(context *ctx, Instruction *instr); -int uminv_r_p_z(context *ctx, Instruction *instr); -int umlal_za_zzi(context *ctx, Instruction *instr); -int umlal_za_zzv(context *ctx, Instruction *instr); -int umlal_za_zzw(context *ctx, Instruction *instr); -int umlalb_z_zzz(context *ctx, Instruction *instr); -int umlalb_z_zzzi(context *ctx, Instruction *instr); -int umlall_za_zzi(context *ctx, Instruction *instr); -int umlall_za_zzv(context *ctx, Instruction *instr); -int umlall_za_zzw(context *ctx, Instruction *instr); -int umlalt_z_zzz(context *ctx, Instruction *instr); -int umlalt_z_zzzi(context *ctx, Instruction *instr); -int umlsl_za_zzi(context *ctx, Instruction *instr); -int umlsl_za_zzv(context *ctx, Instruction *instr); -int umlsl_za_zzw(context *ctx, Instruction *instr); -int umlslb_z_zzz(context *ctx, Instruction *instr); -int umlslb_z_zzzi(context *ctx, Instruction *instr); -int umlsll_za_zzi(context *ctx, Instruction *instr); -int umlsll_za_zzv(context *ctx, Instruction *instr); -int umlsll_za_zzw(context *ctx, Instruction *instr); -int umlslt_z_zzz(context *ctx, Instruction *instr); -int umlslt_z_zzzi(context *ctx, Instruction *instr); -int ummla_z_zzz(context *ctx, Instruction *instr); -int umop4a_za32_zz(context *ctx, Instruction *instr); -int umop4a_za_zz(context *ctx, Instruction *instr); -int umop4s_za32_zz(context *ctx, Instruction *instr); -int umop4s_za_zz(context *ctx, Instruction *instr); -int umopa_za32_pp_zz(context *ctx, Instruction *instr); -int umopa_za_pp_zz(context *ctx, Instruction *instr); -int umops_za32_pp_zz(context *ctx, Instruction *instr); -int umops_za_pp_zz(context *ctx, Instruction *instr); -int umulh_z_p_zz(context *ctx, Instruction *instr); -int umulh_z_zz(context *ctx, Instruction *instr); -int umullb_z_zz(context *ctx, Instruction *instr); -int umullb_z_zzi(context *ctx, Instruction *instr); -int umullt_z_zz(context *ctx, Instruction *instr); -int umullt_z_zzi(context *ctx, Instruction *instr); -int uqadd_z_p_zz(context *ctx, Instruction *instr); -int uqadd_z_zi(context *ctx, Instruction *instr); -int uqadd_z_zz(context *ctx, Instruction *instr); -int uqcvt_z_mz2(context *ctx, Instruction *instr); -int uqcvt_z_mz4(context *ctx, Instruction *instr); -int uqcvtn_z_mz2(context *ctx, Instruction *instr); -int uqcvtn_z_mz4(context *ctx, Instruction *instr); -int uqdecb_r_rs(context *ctx, Instruction *instr); -int uqdecd_r_rs(context *ctx, Instruction *instr); -int uqdecd_z_zs(context *ctx, Instruction *instr); -int uqdech_r_rs(context *ctx, Instruction *instr); -int uqdech_z_zs(context *ctx, Instruction *instr); -int uqdecp_r_p_r(context *ctx, Instruction *instr); -int uqdecp_z_p_z(context *ctx, Instruction *instr); -int uqdecw_r_rs(context *ctx, Instruction *instr); -int uqdecw_z_zs(context *ctx, Instruction *instr); -int uqincb_r_rs(context *ctx, Instruction *instr); -int uqincd_r_rs(context *ctx, Instruction *instr); -int uqincd_z_zs(context *ctx, Instruction *instr); -int uqinch_r_rs(context *ctx, Instruction *instr); -int uqinch_z_zs(context *ctx, Instruction *instr); -int uqincp_r_p_r(context *ctx, Instruction *instr); -int uqincp_z_p_z(context *ctx, Instruction *instr); -int uqincw_r_rs(context *ctx, Instruction *instr); -int uqincw_z_zs(context *ctx, Instruction *instr); -int uqrshl_z_p_zz(context *ctx, Instruction *instr); -int uqrshlr_z_p_zz(context *ctx, Instruction *instr); -int uqrshr_z_mz2(context *ctx, Instruction *instr); -int uqrshr_z_mz4(context *ctx, Instruction *instr); -int uqrshrn_z_mz2(context *ctx, Instruction *instr); -int uqrshrn_z_mz4(context *ctx, Instruction *instr); -int uqrshrnb_z_zi(context *ctx, Instruction *instr); -int uqrshrnt_z_zi(context *ctx, Instruction *instr); -int uqshl_z_p_zi(context *ctx, Instruction *instr); -int uqshl_z_p_zz(context *ctx, Instruction *instr); -int uqshlr_z_p_zz(context *ctx, Instruction *instr); -int uqshrn_z_mz2(context *ctx, Instruction *instr); -int uqshrnb_z_zi(context *ctx, Instruction *instr); -int uqshrnt_z_zi(context *ctx, Instruction *instr); -int uqsub_z_p_zz(context *ctx, Instruction *instr); -int uqsub_z_zi(context *ctx, Instruction *instr); -int uqsub_z_zz(context *ctx, Instruction *instr); -int uqsubr_z_p_zz(context *ctx, Instruction *instr); -int uqxtnb_z_zz(context *ctx, Instruction *instr); -int uqxtnt_z_zz(context *ctx, Instruction *instr); -int urecpe_z_p_z(context *ctx, Instruction *instr); -int urhadd_z_p_zz(context *ctx, Instruction *instr); -int urshl_mz_zzv(context *ctx, Instruction *instr); -int urshl_mz_zzw(context *ctx, Instruction *instr); -int urshl_z_p_zz(context *ctx, Instruction *instr); -int urshlr_z_p_zz(context *ctx, Instruction *instr); -int urshr_z_p_zi(context *ctx, Instruction *instr); -int ursqrte_z_p_z(context *ctx, Instruction *instr); -int ursra_z_zi(context *ctx, Instruction *instr); -int usdot_z_zzz(context *ctx, Instruction *instr); -int usdot_z_zzzi(context *ctx, Instruction *instr); -int usdot_za_zzi(context *ctx, Instruction *instr); -int usdot_za_zzv(context *ctx, Instruction *instr); -int usdot_za_zzw(context *ctx, Instruction *instr); -int ushllb_z_zi(context *ctx, Instruction *instr); -int ushllt_z_zi(context *ctx, Instruction *instr); -int usmlall_za_zzi(context *ctx, Instruction *instr); -int usmlall_za_zzv(context *ctx, Instruction *instr); -int usmlall_za_zzw(context *ctx, Instruction *instr); -int usmmla_z_zzz(context *ctx, Instruction *instr); -int usmop4a_za_zz(context *ctx, Instruction *instr); -int usmop4s_za_zz(context *ctx, Instruction *instr); -int usmopa_za_pp_zz(context *ctx, Instruction *instr); -int usmops_za_pp_zz(context *ctx, Instruction *instr); -int usqadd_z_p_zz(context *ctx, Instruction *instr); -int usra_z_zi(context *ctx, Instruction *instr); -int ustmopa_za_zzzi(context *ctx, Instruction *instr); -int usublb_z_zz(context *ctx, Instruction *instr); -int usublt_z_zz(context *ctx, Instruction *instr); -int usubwb_z_zz(context *ctx, Instruction *instr); -int usubwt_z_zz(context *ctx, Instruction *instr); -int usvdot_za_zzi(context *ctx, Instruction *instr); -int utmopa_za32_zzzi(context *ctx, Instruction *instr); -int utmopa_za_zzzi(context *ctx, Instruction *instr); -int uunpk_mz_z(context *ctx, Instruction *instr); -int uunpkhi_z_z(context *ctx, Instruction *instr); -int uvdot_za32_zzi(context *ctx, Instruction *instr); -int uvdot_za_zzi(context *ctx, Instruction *instr); -int uxtb_z_p_z(context *ctx, Instruction *instr); -int uzp1_p_pp(context *ctx, Instruction *instr); -int uzp1_z_zz(context *ctx, Instruction *instr); -int uzp_mz_z(context *ctx, Instruction *instr); -int uzp_mz_zz(context *ctx, Instruction *instr); -int uzpq1_z_zz(context *ctx, Instruction *instr); -int uzpq2_z_zz(context *ctx, Instruction *instr); -int whilege_p_p_rr(context *ctx, Instruction *instr); -int whilege_pn_rr(context *ctx, Instruction *instr); -int whilege_pp_rr(context *ctx, Instruction *instr); -int whilegt_p_p_rr(context *ctx, Instruction *instr); -int whilegt_pn_rr(context *ctx, Instruction *instr); -int whilegt_pp_rr(context *ctx, Instruction *instr); -int whilehi_p_p_rr(context *ctx, Instruction *instr); -int whilehi_pn_rr(context *ctx, Instruction *instr); -int whilehi_pp_rr(context *ctx, Instruction *instr); -int whilehs_p_p_rr(context *ctx, Instruction *instr); -int whilehs_pn_rr(context *ctx, Instruction *instr); -int whilehs_pp_rr(context *ctx, Instruction *instr); -int whilele_p_p_rr(context *ctx, Instruction *instr); -int whilele_pn_rr(context *ctx, Instruction *instr); -int whilele_pp_rr(context *ctx, Instruction *instr); -int whilelo_p_p_rr(context *ctx, Instruction *instr); -int whilelo_pn_rr(context *ctx, Instruction *instr); -int whilelo_pp_rr(context *ctx, Instruction *instr); -int whilels_p_p_rr(context *ctx, Instruction *instr); -int whilels_pn_rr(context *ctx, Instruction *instr); -int whilels_pp_rr(context *ctx, Instruction *instr); -int whilelt_p_p_rr(context *ctx, Instruction *instr); -int whilelt_pn_rr(context *ctx, Instruction *instr); -int whilelt_pp_rr(context *ctx, Instruction *instr); -int whilerw_p_rr(context *ctx, Instruction *instr); -int whilewr_p_rr(context *ctx, Instruction *instr); -int wrffr_f_p(context *ctx, Instruction *instr); -int xar_z_zzi(context *ctx, Instruction *instr); -int zero_za1_ri(context *ctx, Instruction *instr); -int zero_za2_ri(context *ctx, Instruction *instr); -int zero_za4_ri(context *ctx, Instruction *instr); -int zero_za_i(context *ctx, Instruction *instr); -int zero_zt_i(context *ctx, Instruction *instr); -int zip1_p_pp(context *ctx, Instruction *instr); -int zip1_z_zz(context *ctx, Instruction *instr); -int zip_mz_z(context *ctx, Instruction *instr); -int zip_mz_zz(context *ctx, Instruction *instr); -int zipq1_z_zz(context *ctx, Instruction *instr); -int zipq2_z_zz(context *ctx, Instruction *instr); diff --git a/arch/arm64/disassembler/decode_fields32.c b/arch/arm64/disassembler/decode_fields32.c deleted file mode 100644 index 86f08e299..000000000 --- a/arch/arm64/disassembler/decode_fields32.c +++ /dev/null @@ -1,10167 +0,0 @@ -/* GENERATED FILE */ -#include -#include -#include - -#include "decode.h" - -void decode_fields32(enum ENCODING enc, context *ctx, Instruction *instr) -{ - uint32_t insword = instr->insword; - instr->encoding = enc; /* record current path of decoding */ - switch(enc) { - case ENC_FMADD_H_FLOATDP3: - case ENC_FMADD_S_FLOATDP3: - case ENC_FMADD_D_FLOATDP3: - case ENC_FMSUB_H_FLOATDP3: - case ENC_FMSUB_S_FLOATDP3: - case ENC_FMSUB_D_FLOATDP3: - case ENC_FNMADD_H_FLOATDP3: - case ENC_FNMADD_S_FLOATDP3: - case ENC_FNMADD_D_FLOATDP3: - case ENC_FNMSUB_H_FLOATDP3: - case ENC_FNMSUB_S_FLOATDP3: - case ENC_FNMSUB_D_FLOATDP3: - // M=x|x|S=x|xxxxx|ftype=xx|o1=x|Rm=xxxxx|o0=x|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->o1 = (insword>>21)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->o0 = (insword>>15)&1; - ctx->Ra = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FRINT32X_S_FLOATDP1: - case ENC_FRINT32X_D_FLOATDP1: - case ENC_FRINT32Z_S_FLOATDP1: - case ENC_FRINT32Z_D_FLOATDP1: - case ENC_FRINT64X_S_FLOATDP1: - case ENC_FRINT64X_D_FLOATDP1: - case ENC_FRINT64Z_S_FLOATDP1: - case ENC_FRINT64Z_D_FLOATDP1: - // M=x|x|S=x|xxxxx|ftype=xx|xxxxx|op=xx|xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->op = (insword>>15)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FABS_H_FLOATDP1: - case ENC_FABS_S_FLOATDP1: - case ENC_FABS_D_FLOATDP1: - case ENC_FCVT_SH_FLOATDP1: - case ENC_FCVT_DH_FLOATDP1: - case ENC_FCVT_HS_FLOATDP1: - case ENC_FCVT_DS_FLOATDP1: - case ENC_FCVT_HD_FLOATDP1: - case ENC_FCVT_SD_FLOATDP1: - case ENC_FMOV_H_FLOATDP1: - case ENC_FMOV_S_FLOATDP1: - case ENC_FMOV_D_FLOATDP1: - case ENC_FNEG_H_FLOATDP1: - case ENC_FNEG_S_FLOATDP1: - case ENC_FNEG_D_FLOATDP1: - case ENC_FSQRT_H_FLOATDP1: - case ENC_FSQRT_S_FLOATDP1: - case ENC_FSQRT_D_FLOATDP1: - // M=x|x|S=x|xxxxx|ftype=xx|xxxxx|opc=xx|xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->opc = (insword>>15)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FRINTA_H_FLOATDP1: - case ENC_FRINTA_S_FLOATDP1: - case ENC_FRINTA_D_FLOATDP1: - case ENC_FRINTI_H_FLOATDP1: - case ENC_FRINTI_S_FLOATDP1: - case ENC_FRINTI_D_FLOATDP1: - case ENC_FRINTM_H_FLOATDP1: - case ENC_FRINTM_S_FLOATDP1: - case ENC_FRINTM_D_FLOATDP1: - case ENC_FRINTN_H_FLOATDP1: - case ENC_FRINTN_S_FLOATDP1: - case ENC_FRINTN_D_FLOATDP1: - case ENC_FRINTP_H_FLOATDP1: - case ENC_FRINTP_S_FLOATDP1: - case ENC_FRINTP_D_FLOATDP1: - case ENC_FRINTX_H_FLOATDP1: - case ENC_FRINTX_S_FLOATDP1: - case ENC_FRINTX_D_FLOATDP1: - case ENC_FRINTZ_H_FLOATDP1: - case ENC_FRINTZ_S_FLOATDP1: - case ENC_FRINTZ_D_FLOATDP1: - // M=x|x|S=x|xxxxx|ftype=xx|xxxx|rmode=xxx|xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->rmode = (insword>>15)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCSEL_H_FLOATSEL: - case ENC_FCSEL_S_FLOATSEL: - case ENC_FCSEL_D_FLOATSEL: - // M=x|x|S=x|xxxxx|ftype=xx|x|Rm=xxxxx|cond=xxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->cond = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCCMPE_H_FLOATCCMP: - case ENC_FCCMPE_S_FLOATCCMP: - case ENC_FCCMPE_D_FLOATCCMP: - case ENC_FCCMP_H_FLOATCCMP: - case ENC_FCCMP_S_FLOATCCMP: - case ENC_FCCMP_D_FLOATCCMP: - // M=x|x|S=x|xxxxx|ftype=xx|x|Rm=xxxxx|cond=xxxx|xx|Rn=xxxxx|op=x|nzcv=xxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->cond = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->op = (insword>>4)&1; - ctx->nzcv = insword&15; - break; - case ENC_FCMPE_H_FLOATCMP: - case ENC_FCMPE_HZ_FLOATCMP: - case ENC_FCMPE_S_FLOATCMP: - case ENC_FCMPE_SZ_FLOATCMP: - case ENC_FCMPE_D_FLOATCMP: - case ENC_FCMPE_DZ_FLOATCMP: - case ENC_FCMP_H_FLOATCMP: - case ENC_FCMP_HZ_FLOATCMP: - case ENC_FCMP_S_FLOATCMP: - case ENC_FCMP_SZ_FLOATCMP: - case ENC_FCMP_D_FLOATCMP: - case ENC_FCMP_DZ_FLOATCMP: - // M=x|x|S=x|xxxxx|ftype=xx|x|Rm=xxxxx|op=xx|xxxx|Rn=xxxxx|opc=xx|xxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->op = (insword>>14)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->opc = (insword>>3)&3; - break; - case ENC_FMUL_H_FLOATDP2: - case ENC_FMUL_S_FLOATDP2: - case ENC_FMUL_D_FLOATDP2: - case ENC_FNMUL_H_FLOATDP2: - case ENC_FNMUL_S_FLOATDP2: - case ENC_FNMUL_D_FLOATDP2: - // M=x|x|S=x|xxxxx|ftype=xx|x|Rm=xxxxx|op=x|xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->op = (insword>>15)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FDIV_H_FLOATDP2: - case ENC_FDIV_S_FLOATDP2: - case ENC_FDIV_D_FLOATDP2: - // M=x|x|S=x|xxxxx|ftype=xx|x|Rm=xxxxx|opcode=xxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FADD_H_FLOATDP2: - case ENC_FADD_S_FLOATDP2: - case ENC_FADD_D_FLOATDP2: - case ENC_FSUB_H_FLOATDP2: - case ENC_FSUB_S_FLOATDP2: - case ENC_FSUB_D_FLOATDP2: - // M=x|x|S=x|xxxxx|ftype=xx|x|Rm=xxxxx|xxx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMAXNM_H_FLOATDP2: - case ENC_FMAXNM_S_FLOATDP2: - case ENC_FMAXNM_D_FLOATDP2: - case ENC_FMAX_H_FLOATDP2: - case ENC_FMAX_S_FLOATDP2: - case ENC_FMAX_D_FLOATDP2: - case ENC_FMINNM_H_FLOATDP2: - case ENC_FMINNM_S_FLOATDP2: - case ENC_FMINNM_D_FLOATDP2: - case ENC_FMIN_H_FLOATDP2: - case ENC_FMIN_S_FLOATDP2: - case ENC_FMIN_D_FLOATDP2: - // M=x|x|S=x|xxxxx|ftype=xx|x|Rm=xxxxx|xx|op=xx|xx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->op = (insword>>12)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMOV_H_FLOATIMM: - case ENC_FMOV_S_FLOATIMM: - case ENC_FMOV_D_FLOATIMM: - // M=x|x|S=x|xxxxx|ftype=xx|x|imm8=xxxxxxxx|xxx|imm5=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->imm8 = (insword>>13)&0xff; - ctx->imm5 = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_BFCVT_BS_FLOATDP1: - // M=x|x|S=x|x|xxx|x|ftype=xx|x|opcode=xxxxxx|xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->M = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->opcode = (insword>>15)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_TBNZ_ONLY_TESTBRANCH: - case ENC_TBZ_ONLY_TESTBRANCH: - // b5=x|xx|xxx|x|op=x|b40=xxxxx|imm14=xxxxxxxxxxxxxx|Rt=xxxxx - ctx->b5 = insword>>31; - ctx->op = (insword>>24)&1; - ctx->b40 = (insword>>19)&0x1f; - ctx->imm14 = (insword>>5)&0x3fff; - ctx->Rt = insword&0x1f; - break; - case ENC_ADR_ONLY_PCRELADDR: - case ENC_ADRP_ONLY_PCRELADDR: - // op=x|immlo=xx|xxx|xx|immhi=xxxxxxxxxxxxxxxxxxx|Rd=xxxxx - ctx->op = insword>>31; - ctx->immlo = (insword>>29)&3; - ctx->immhi = (insword>>5)&0x7ffff; - ctx->Rd = insword&0x1f; - break; - case ENC_BL_ONLY_BRANCH_IMM: - case ENC_B_ONLY_BRANCH_IMM: - // op=x|xx|xxx|imm26=xxxxxxxxxxxxxxxxxxxxxxxxxx - ctx->op = insword>>31; - ctx->imm26 = insword&0x3ffffff; - break; - case ENC_LDNP_S_LDSTNAPAIR_OFFS: - case ENC_LDNP_D_LDSTNAPAIR_OFFS: - case ENC_LDNP_Q_LDSTNAPAIR_OFFS: - case ENC_LDNP_32_LDSTNAPAIR_OFFS: - case ENC_LDNP_64_LDSTNAPAIR_OFFS: - case ENC_LDP_S_LDSTPAIR_POST: - case ENC_LDP_D_LDSTPAIR_POST: - case ENC_LDP_Q_LDSTPAIR_POST: - case ENC_LDP_S_LDSTPAIR_PRE: - case ENC_LDP_D_LDSTPAIR_PRE: - case ENC_LDP_Q_LDSTPAIR_PRE: - case ENC_LDP_S_LDSTPAIR_OFF: - case ENC_LDP_D_LDSTPAIR_OFF: - case ENC_LDP_Q_LDSTPAIR_OFF: - case ENC_LDP_32_LDSTPAIR_POST: - case ENC_LDP_64_LDSTPAIR_POST: - case ENC_LDP_32_LDSTPAIR_PRE: - case ENC_LDP_64_LDSTPAIR_PRE: - case ENC_LDP_32_LDSTPAIR_OFF: - case ENC_LDP_64_LDSTPAIR_OFF: - case ENC_STNP_S_LDSTNAPAIR_OFFS: - case ENC_STNP_D_LDSTNAPAIR_OFFS: - case ENC_STNP_Q_LDSTNAPAIR_OFFS: - case ENC_STNP_32_LDSTNAPAIR_OFFS: - case ENC_STNP_64_LDSTNAPAIR_OFFS: - case ENC_STP_S_LDSTPAIR_POST: - case ENC_STP_D_LDSTPAIR_POST: - case ENC_STP_Q_LDSTPAIR_POST: - case ENC_STP_S_LDSTPAIR_PRE: - case ENC_STP_D_LDSTPAIR_PRE: - case ENC_STP_Q_LDSTPAIR_PRE: - case ENC_STP_S_LDSTPAIR_OFF: - case ENC_STP_D_LDSTPAIR_OFF: - case ENC_STP_Q_LDSTPAIR_OFF: - case ENC_STP_32_LDSTPAIR_POST: - case ENC_STP_64_LDSTPAIR_POST: - case ENC_STP_32_LDSTPAIR_PRE: - case ENC_STP_64_LDSTPAIR_PRE: - case ENC_STP_32_LDSTPAIR_OFF: - case ENC_STP_64_LDSTPAIR_OFF: - // opc=xx|xxx|VR=x|xxx|L=x|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx - ctx->opc = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->L = (insword>>22)&1; - ctx->imm7 = (insword>>15)&0x7f; - ctx->Rt2 = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDR_S_LOADLIT: - case ENC_LDR_D_LOADLIT: - case ENC_LDR_Q_LOADLIT: - case ENC_LDR_32_LOADLIT: - case ENC_LDR_64_LOADLIT: - // opc=xx|xxx|VR=x|xx|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx - ctx->opc = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->imm19 = (insword>>5)&0x7ffff; - ctx->Rt = insword&0x1f; - break; - case ENC_LDPSW_64_LDSTPAIR_POST: - case ENC_LDPSW_64_LDSTPAIR_PRE: - case ENC_LDPSW_64_LDSTPAIR_OFF: - case ENC_LDTNP_Q_LDSTNAPAIR_OFFS: - case ENC_LDTNP_64_LDSTNAPAIR_OFFS: - case ENC_LDTP_Q_LDSTPAIR_POST: - case ENC_LDTP_Q_LDSTPAIR_PRE: - case ENC_LDTP_Q_LDSTPAIR_OFF: - case ENC_LDTP_64_LDSTPAIR_POST: - case ENC_LDTP_64_LDSTPAIR_PRE: - case ENC_LDTP_64_LDSTPAIR_OFF: - case ENC_STTNP_Q_LDSTNAPAIR_OFFS: - case ENC_STTNP_64_LDSTNAPAIR_OFFS: - case ENC_STTP_Q_LDSTPAIR_POST: - case ENC_STTP_Q_LDSTPAIR_PRE: - case ENC_STTP_Q_LDSTPAIR_OFF: - case ENC_STTP_64_LDSTPAIR_POST: - case ENC_STTP_64_LDSTPAIR_PRE: - case ENC_STTP_64_LDSTPAIR_OFF: - // opc=xx|xx|x|VR=x|x|xx|L=x|imm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx - ctx->opc = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->L = (insword>>22)&1; - ctx->imm7 = (insword>>15)&0x7f; - ctx->Rt2 = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_STGP_64_LDSTPAIR_POST: - case ENC_STGP_64_LDSTPAIR_PRE: - case ENC_STGP_64_LDSTPAIR_OFF: - // opc=xx|xx|x|VR=x|x|xx|L=x|simm7=xxxxxxx|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx - ctx->opc = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->L = (insword>>22)&1; - ctx->simm7 = (insword>>15)&0x7f; - ctx->Rt2 = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRSW_64_LOADLIT: - case ENC_PRFM_P_LOADLIT: - // opc=xx|xx|x|VR=x|x|x|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx - ctx->opc = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->imm19 = (insword>>5)&0x7ffff; - ctx->Rt = insword&0x1f; - break; - case ENC_EXTR_32_EXTRACT: - case ENC_EXTR_64_EXTRACT: - case ENC_ROR_EXTR_32_EXTRACT: - case ENC_ROR_EXTR_64_EXTRACT: - // sf=x|op21=xx|xxxxxx|N=x|o0=x|Rm=xxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op21 = (insword>>29)&3; - ctx->N = (insword>>22)&1; - ctx->o0 = (insword>>21)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->imms = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_MADD_32A_DP_3SRC: - case ENC_MADD_64A_DP_3SRC: - case ENC_MNEG_MSUB_32A_DP_3SRC: - case ENC_MNEG_MSUB_64A_DP_3SRC: - case ENC_MSUB_32A_DP_3SRC: - case ENC_MSUB_64A_DP_3SRC: - case ENC_MUL_MADD_32A_DP_3SRC: - case ENC_MUL_MADD_64A_DP_3SRC: - // sf=x|op54=xx|xxxxx|op31=xxx|Rm=xxxxx|o0=x|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op54 = (insword>>29)&3; - ctx->op31 = (insword>>21)&7; - ctx->Rm = (insword>>16)&0x1f; - ctx->o0 = (insword>>15)&1; - ctx->Ra = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SMADDL_64WA_DP_3SRC: - case ENC_SMNEGL_SMSUBL_64WA_DP_3SRC: - case ENC_SMSUBL_64WA_DP_3SRC: - case ENC_SMULH_64_DP_3SRC: - case ENC_SMULL_SMADDL_64WA_DP_3SRC: - case ENC_UMADDL_64WA_DP_3SRC: - case ENC_UMNEGL_UMSUBL_64WA_DP_3SRC: - case ENC_UMSUBL_64WA_DP_3SRC: - case ENC_UMULH_64_DP_3SRC: - case ENC_UMULL_UMADDL_64WA_DP_3SRC: - // sf=x|op54=xx|x|xxx|x|U=x|xx|Rm=xxxxx|o0=x|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op54 = (insword>>29)&3; - ctx->U = (insword>>23)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->o0 = (insword>>15)&1; - ctx->Ra = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_MADDPT_64A_DP_3SRC: - case ENC_MSUBPT_64A_DP_3SRC: - // sf=x|op54=xx|x|xxx|x|op31=xxx|Rm=xxxxx|o0=x|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op54 = (insword>>29)&3; - ctx->op31 = (insword>>21)&7; - ctx->Rm = (insword>>16)&0x1f; - ctx->o0 = (insword>>15)&1; - ctx->Ra = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CINC_CSINC_32_CONDSEL: - case ENC_CINC_CSINC_64_CONDSEL: - case ENC_CINV_CSINV_32_CONDSEL: - case ENC_CINV_CSINV_64_CONDSEL: - case ENC_CNEG_CSNEG_32_CONDSEL: - case ENC_CNEG_CSNEG_64_CONDSEL: - case ENC_CSEL_32_CONDSEL: - case ENC_CSEL_64_CONDSEL: - case ENC_CSETM_CSINV_32_CONDSEL: - case ENC_CSETM_CSINV_64_CONDSEL: - case ENC_CSET_CSINC_32_CONDSEL: - case ENC_CSET_CSINC_64_CONDSEL: - case ENC_CSINC_32_CONDSEL: - case ENC_CSINC_64_CONDSEL: - case ENC_CSINV_32_CONDSEL: - case ENC_CSINV_64_CONDSEL: - case ENC_CSNEG_32_CONDSEL: - case ENC_CSNEG_64_CONDSEL: - // sf=x|op=x|S=x|xxxxxxxx|Rm=xxxxx|cond=xxxx|x|o2=x|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->cond = (insword>>12)&15; - ctx->o2 = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CCMN_32_CONDCMP_REG: - case ENC_CCMN_64_CONDCMP_REG: - case ENC_CCMP_32_CONDCMP_REG: - case ENC_CCMP_64_CONDCMP_REG: - // sf=x|op=x|S=x|xxxxxxxx|Rm=xxxxx|cond=xxxx|x|o2=x|Rn=xxxxx|o3=x|nzcv=xxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->cond = (insword>>12)&15; - ctx->o2 = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->o3 = (insword>>4)&1; - ctx->nzcv = insword&15; - break; - case ENC_ADC_32_ADDSUB_CARRY: - case ENC_ADC_64_ADDSUB_CARRY: - case ENC_ADCS_32_ADDSUB_CARRY: - case ENC_ADCS_64_ADDSUB_CARRY: - case ENC_NGCS_SBCS_32_ADDSUB_CARRY: - case ENC_NGCS_SBCS_64_ADDSUB_CARRY: - case ENC_NGC_SBC_32_ADDSUB_CARRY: - case ENC_NGC_SBC_64_ADDSUB_CARRY: - case ENC_SBC_32_ADDSUB_CARRY: - case ENC_SBC_64_ADDSUB_CARRY: - case ENC_SBCS_32_ADDSUB_CARRY: - case ENC_SBCS_64_ADDSUB_CARRY: - // sf=x|op=x|S=x|xxxxxxxx|Rm=xxxxx|xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CCMN_32_CONDCMP_IMM: - case ENC_CCMN_64_CONDCMP_IMM: - case ENC_CCMP_32_CONDCMP_IMM: - case ENC_CCMP_64_CONDCMP_IMM: - // sf=x|op=x|S=x|xxxxxxxx|imm5=xxxxx|cond=xxxx|x|o2=x|Rn=xxxxx|o3=x|nzcv=xxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->imm5 = (insword>>16)&0x1f; - ctx->cond = (insword>>12)&15; - ctx->o2 = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->o3 = (insword>>4)&1; - ctx->nzcv = insword&15; - break; - case ENC_SETF8_ONLY_SETF: - case ENC_SETF16_ONLY_SETF: - // sf=x|op=x|S=x|xxxxxxxx|opcode2=xxxxxx|sz=x|xxxx|Rn=xxxxx|o3=x|mask=xxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>15)&0x3f; - ctx->sz = (insword>>14)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->o3 = (insword>>4)&1; - ctx->mask = insword&15; - break; - case ENC_SMAX_32_MINMAX_IMM: - case ENC_SMAX_64_MINMAX_IMM: - case ENC_SMIN_32_MINMAX_IMM: - case ENC_SMIN_64_MINMAX_IMM: - case ENC_UMAX_32U_MINMAX_IMM: - case ENC_UMAX_64U_MINMAX_IMM: - case ENC_UMIN_32U_MINMAX_IMM: - case ENC_UMIN_64U_MINMAX_IMM: - // sf=x|op=x|S=x|xxxxxxx|opc=xxxx|imm8=xxxxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->opc = (insword>>18)&15; - ctx->imm8 = (insword>>10)&0xff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADDS_32S_ADDSUB_IMM: - case ENC_ADDS_64S_ADDSUB_IMM: - case ENC_ADD_32_ADDSUB_IMM: - case ENC_ADD_64_ADDSUB_IMM: - case ENC_CMN_ADDS_32S_ADDSUB_IMM: - case ENC_CMN_ADDS_64S_ADDSUB_IMM: - case ENC_CMP_SUBS_32S_ADDSUB_IMM: - case ENC_CMP_SUBS_64S_ADDSUB_IMM: - case ENC_MOV_ADD_32_ADDSUB_IMM: - case ENC_MOV_ADD_64_ADDSUB_IMM: - case ENC_SUBS_32S_ADDSUB_IMM: - case ENC_SUBS_64S_ADDSUB_IMM: - case ENC_SUB_32_ADDSUB_IMM: - case ENC_SUB_64_ADDSUB_IMM: - // sf=x|op=x|S=x|xxxxxx|sh=x|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->sh = (insword>>22)&1; - ctx->imm12 = (insword>>10)&0xfff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADDS_32S_ADDSUB_EXT: - case ENC_ADDS_64S_ADDSUB_EXT: - case ENC_ADD_32_ADDSUB_EXT: - case ENC_ADD_64_ADDSUB_EXT: - case ENC_CMN_ADDS_32S_ADDSUB_EXT: - case ENC_CMN_ADDS_64S_ADDSUB_EXT: - case ENC_CMP_SUBS_32S_ADDSUB_EXT: - case ENC_CMP_SUBS_64S_ADDSUB_EXT: - case ENC_SUBS_32S_ADDSUB_EXT: - case ENC_SUBS_64S_ADDSUB_EXT: - case ENC_SUB_32_ADDSUB_EXT: - case ENC_SUB_64_ADDSUB_EXT: - // sf=x|op=x|S=x|xxxxx|opt=xx|x|Rm=xxxxx|option=xxx|imm3=xxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->opt = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->option = (insword>>13)&7; - ctx->imm3 = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADDS_32_ADDSUB_SHIFT: - case ENC_ADDS_64_ADDSUB_SHIFT: - case ENC_ADD_32_ADDSUB_SHIFT: - case ENC_ADD_64_ADDSUB_SHIFT: - case ENC_CMN_ADDS_32_ADDSUB_SHIFT: - case ENC_CMN_ADDS_64_ADDSUB_SHIFT: - case ENC_CMP_SUBS_32_ADDSUB_SHIFT: - case ENC_CMP_SUBS_64_ADDSUB_SHIFT: - case ENC_NEGS_SUBS_32_ADDSUB_SHIFT: - case ENC_NEGS_SUBS_64_ADDSUB_SHIFT: - case ENC_NEG_SUB_32_ADDSUB_SHIFT: - case ENC_NEG_SUB_64_ADDSUB_SHIFT: - case ENC_SUBS_32_ADDSUB_SHIFT: - case ENC_SUBS_64_ADDSUB_SHIFT: - case ENC_SUB_32_ADDSUB_SHIFT: - case ENC_SUB_64_ADDSUB_SHIFT: - // sf=x|op=x|S=x|xxxxx|shift=xx|x|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->shift = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->imm6 = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADDG_64_ADDSUB_IMMTAGS: - case ENC_SUBG_64_ADDSUB_IMMTAGS: - // sf=x|op=x|S=x|xxx|xxxx|imm6=xxxxxx|op3=xx|imm4=xxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->imm6 = (insword>>16)&0x3f; - ctx->op3 = (insword>>14)&3; - ctx->imm4 = (insword>>10)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADDPT_64_ADDSUB_PT: - case ENC_SUBPT_64_ADDSUB_PT: - // sf=x|op=x|S=x|x|xxx|xxxx|Rm=xxxxx|xxx|imm3=xxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->imm3 = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_RMIF_ONLY_RMIF: - // sf=x|op=x|S=x|x|xxx|xxxx|imm6=xxxxxx|xxxxx|Rn=xxxxx|o2=x|mask=xxxx - ctx->sf = insword>>31; - ctx->op = (insword>>30)&1; - ctx->S = (insword>>29)&1; - ctx->imm6 = (insword>>15)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->o2 = (insword>>4)&1; - ctx->mask = insword&15; - break; - case ENC_ANDS_32S_LOG_IMM: - case ENC_ANDS_64S_LOG_IMM: - case ENC_AND_32_LOG_IMM: - case ENC_AND_64_LOG_IMM: - case ENC_ASR_SBFM_32M_BITFIELD: - case ENC_ASR_SBFM_64M_BITFIELD: - case ENC_BFC_BFM_32M_BITFIELD: - case ENC_BFC_BFM_64M_BITFIELD: - case ENC_BFI_BFM_32M_BITFIELD: - case ENC_BFI_BFM_64M_BITFIELD: - case ENC_BFM_32M_BITFIELD: - case ENC_BFM_64M_BITFIELD: - case ENC_BFXIL_BFM_32M_BITFIELD: - case ENC_BFXIL_BFM_64M_BITFIELD: - case ENC_EOR_32_LOG_IMM: - case ENC_EOR_64_LOG_IMM: - case ENC_LSL_UBFM_32M_BITFIELD: - case ENC_LSL_UBFM_64M_BITFIELD: - case ENC_LSR_UBFM_32M_BITFIELD: - case ENC_LSR_UBFM_64M_BITFIELD: - case ENC_MOV_ORR_32_LOG_IMM: - case ENC_MOV_ORR_64_LOG_IMM: - case ENC_ORR_32_LOG_IMM: - case ENC_ORR_64_LOG_IMM: - case ENC_SBFIZ_SBFM_32M_BITFIELD: - case ENC_SBFIZ_SBFM_64M_BITFIELD: - case ENC_SBFM_32M_BITFIELD: - case ENC_SBFM_64M_BITFIELD: - case ENC_SBFX_SBFM_32M_BITFIELD: - case ENC_SBFX_SBFM_64M_BITFIELD: - case ENC_SXTB_SBFM_32M_BITFIELD: - case ENC_SXTB_SBFM_64M_BITFIELD: - case ENC_SXTH_SBFM_32M_BITFIELD: - case ENC_SXTH_SBFM_64M_BITFIELD: - case ENC_TST_ANDS_32S_LOG_IMM: - case ENC_TST_ANDS_64S_LOG_IMM: - case ENC_UBFIZ_UBFM_32M_BITFIELD: - case ENC_UBFIZ_UBFM_64M_BITFIELD: - case ENC_UBFM_32M_BITFIELD: - case ENC_UBFM_64M_BITFIELD: - case ENC_UBFX_UBFM_32M_BITFIELD: - case ENC_UBFX_UBFM_64M_BITFIELD: - // sf=x|opc=xx|xxxxxx|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->opc = (insword>>29)&3; - ctx->N = (insword>>22)&1; - ctx->immr = (insword>>16)&0x3f; - ctx->imms = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_MOVK_32_MOVEWIDE: - case ENC_MOVK_64_MOVEWIDE: - case ENC_MOVN_32_MOVEWIDE: - case ENC_MOVN_64_MOVEWIDE: - case ENC_MOVZ_32_MOVEWIDE: - case ENC_MOVZ_64_MOVEWIDE: - case ENC_MOV_MOVN_32_MOVEWIDE: - case ENC_MOV_MOVN_64_MOVEWIDE: - case ENC_MOV_MOVZ_32_MOVEWIDE: - case ENC_MOV_MOVZ_64_MOVEWIDE: - // sf=x|opc=xx|xxxxxx|hw=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->opc = (insword>>29)&3; - ctx->hw = (insword>>21)&3; - ctx->imm16 = (insword>>5)&0xffff; - ctx->Rd = insword&0x1f; - break; - case ENC_ANDS_32_LOG_SHIFT: - case ENC_ANDS_64_LOG_SHIFT: - case ENC_AND_32_LOG_SHIFT: - case ENC_AND_64_LOG_SHIFT: - case ENC_BICS_32_LOG_SHIFT: - case ENC_BICS_64_LOG_SHIFT: - case ENC_BIC_32_LOG_SHIFT: - case ENC_BIC_64_LOG_SHIFT: - case ENC_EON_32_LOG_SHIFT: - case ENC_EON_64_LOG_SHIFT: - case ENC_EOR_32_LOG_SHIFT: - case ENC_EOR_64_LOG_SHIFT: - case ENC_MOV_ORR_32_LOG_SHIFT: - case ENC_MOV_ORR_64_LOG_SHIFT: - case ENC_MVN_ORN_32_LOG_SHIFT: - case ENC_MVN_ORN_64_LOG_SHIFT: - case ENC_ORN_32_LOG_SHIFT: - case ENC_ORN_64_LOG_SHIFT: - case ENC_ORR_32_LOG_SHIFT: - case ENC_ORR_64_LOG_SHIFT: - case ENC_TST_ANDS_32_LOG_SHIFT: - case ENC_TST_ANDS_64_LOG_SHIFT: - // sf=x|opc=xx|xxxxx|shift=xx|N=x|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->opc = (insword>>29)&3; - ctx->shift = (insword>>22)&3; - ctx->N = (insword>>21)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->imm6 = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SXTW_SBFM_64M_BITFIELD: - case ENC_UXTB_UBFM_32M_BITFIELD: - case ENC_UXTH_UBFM_32M_BITFIELD: - // sf=x|opc=xx|xxx|xxx|N=x|immr=xxxxxx|imms=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->opc = (insword>>29)&3; - ctx->N = (insword>>22)&1; - ctx->immr = (insword>>16)&0x3f; - ctx->imms = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CBLE_CBGE_32_REGS: - case ENC_CBLE_CBGE_64_REGS: - case ENC_CBLO_CBHI_32_REGS: - case ENC_CBLO_CBHI_64_REGS: - case ENC_CBLS_CBHS_32_REGS: - case ENC_CBLS_CBHS_64_REGS: - case ENC_CBLT_CBGT_32_REGS: - case ENC_CBLT_CBGT_64_REGS: - case ENC_CBGT_32_REGS: - case ENC_CBGE_32_REGS: - case ENC_CBHI_32_REGS: - case ENC_CBHS_32_REGS: - case ENC_CBEQ_32_REGS: - case ENC_CBNE_32_REGS: - case ENC_CBGT_64_REGS: - case ENC_CBGE_64_REGS: - case ENC_CBHI_64_REGS: - case ENC_CBHS_64_REGS: - case ENC_CBEQ_64_REGS: - case ENC_CBNE_64_REGS: - // sf=x|xxxxxxx|cc=xxx|Rm=xxxxx|xx|imm9=xxxxxxxxx|Rt=xxxxx - ctx->sf = insword>>31; - ctx->cc = (insword>>21)&7; - ctx->Rm = (insword>>16)&0x1f; - ctx->imm9 = (insword>>5)&0x1ff; - ctx->Rt = insword&0x1f; - break; - case ENC_CBGE_CBGT_32_IMM: - case ENC_CBGE_CBGT_64_IMM: - case ENC_CBHS_CBHI_32_IMM: - case ENC_CBHS_CBHI_64_IMM: - case ENC_CBLE_CBLT_32_IMM: - case ENC_CBLE_CBLT_64_IMM: - case ENC_CBLS_CBLO_32_IMM: - case ENC_CBLS_CBLO_64_IMM: - case ENC_CBGT_32_IMM: - case ENC_CBLT_32_IMM: - case ENC_CBHI_32_IMM: - case ENC_CBLO_32_IMM: - case ENC_CBEQ_32_IMM: - case ENC_CBNE_32_IMM: - case ENC_CBGT_64_IMM: - case ENC_CBLT_64_IMM: - case ENC_CBHI_64_IMM: - case ENC_CBLO_64_IMM: - case ENC_CBEQ_64_IMM: - case ENC_CBNE_64_IMM: - // sf=x|xxxxxxx|cc=xxx|imm6=xxxxxx|x|imm9=xxxxxxxxx|Rt=xxxxx - ctx->sf = insword>>31; - ctx->cc = (insword>>21)&7; - ctx->imm6 = (insword>>15)&0x3f; - ctx->imm9 = (insword>>5)&0x1ff; - ctx->Rt = insword&0x1f; - break; - case ENC_CBNZ_32_COMPBRANCH: - case ENC_CBNZ_64_COMPBRANCH: - case ENC_CBZ_32_COMPBRANCH: - case ENC_CBZ_64_COMPBRANCH: - // sf=x|xxxxxx|op=x|imm19=xxxxxxxxxxxxxxxxxxx|Rt=xxxxx - ctx->sf = insword>>31; - ctx->op = (insword>>24)&1; - ctx->imm19 = (insword>>5)&0x7ffff; - ctx->Rt = insword&0x1f; - break; - case ENC_AUTIASPPC_ONLY_DP_1SRC_IMM: - case ENC_AUTIBSPPC_ONLY_DP_1SRC_IMM: - // sf=x|xx|xxx|xxx|opc=xx|imm16=xxxxxxxxxxxxxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->opc = (insword>>21)&3; - ctx->imm16 = (insword>>5)&0xffff; - ctx->Rd = insword&0x1f; - break; - case ENC_SMAX_32_DP_2SRC: - case ENC_SMAX_64_DP_2SRC: - case ENC_SMIN_32_DP_2SRC: - case ENC_SMIN_64_DP_2SRC: - case ENC_UMAX_32_DP_2SRC: - case ENC_UMAX_64_DP_2SRC: - case ENC_UMIN_32_DP_2SRC: - case ENC_UMIN_64_DP_2SRC: - // sf=x|x|S=x|xxxxxxxx|Rm=xxxxx|opcode=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SDIV_32_DP_2SRC: - case ENC_SDIV_64_DP_2SRC: - case ENC_UDIV_32_DP_2SRC: - case ENC_UDIV_64_DP_2SRC: - // sf=x|x|S=x|xxxxxxxx|Rm=xxxxx|xxxxx|o1=x|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->o1 = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ASRV_32_DP_2SRC: - case ENC_ASRV_64_DP_2SRC: - case ENC_ASR_ASRV_32_DP_2SRC: - case ENC_ASR_ASRV_64_DP_2SRC: - case ENC_LSLV_32_DP_2SRC: - case ENC_LSLV_64_DP_2SRC: - case ENC_LSL_LSLV_32_DP_2SRC: - case ENC_LSL_LSLV_64_DP_2SRC: - case ENC_LSRV_32_DP_2SRC: - case ENC_LSRV_64_DP_2SRC: - case ENC_LSR_LSRV_32_DP_2SRC: - case ENC_LSR_LSRV_64_DP_2SRC: - case ENC_RORV_32_DP_2SRC: - case ENC_RORV_64_DP_2SRC: - case ENC_ROR_RORV_32_DP_2SRC: - case ENC_ROR_RORV_64_DP_2SRC: - // sf=x|x|S=x|xxxxxxxx|Rm=xxxxx|xxxx|op2=xx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->op2 = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CRC32B_32C_DP_2SRC: - case ENC_CRC32H_32C_DP_2SRC: - case ENC_CRC32W_32C_DP_2SRC: - case ENC_CRC32X_64C_DP_2SRC: - case ENC_CRC32CB_32C_DP_2SRC: - case ENC_CRC32CH_32C_DP_2SRC: - case ENC_CRC32CW_32C_DP_2SRC: - case ENC_CRC32CX_64C_DP_2SRC: - // sf=x|x|S=x|xxxxxxxx|Rm=xxxxx|xxx|C=x|sz=xx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->C = (insword>>12)&1; - ctx->sz = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ABS_32_DP_1SRC: - case ENC_ABS_64_DP_1SRC: - case ENC_CNT_32_DP_1SRC: - case ENC_CNT_64_DP_1SRC: - case ENC_CTZ_32_DP_1SRC: - case ENC_CTZ_64_DP_1SRC: - case ENC_RBIT_32_DP_1SRC: - case ENC_RBIT_64_DP_1SRC: - // sf=x|x|S=x|xxxxxxxx|opcode2=xxxxx|opcode=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>16)&0x1f; - ctx->opcode = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_XPACD_64Z_DP_1SRC: - case ENC_XPACI_64Z_DP_1SRC: - // sf=x|x|S=x|xxxxxxxx|opcode2=xxxxx|xxxxx|D=x|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>16)&0x1f; - ctx->D = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CLS_32_DP_1SRC: - case ENC_CLS_64_DP_1SRC: - case ENC_CLZ_32_DP_1SRC: - case ENC_CLZ_64_DP_1SRC: - // sf=x|x|S=x|xxxxxxxx|opcode2=xxxxx|xxxxx|op=x|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>16)&0x1f; - ctx->op = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_REV_32_DP_1SRC: - case ENC_REV_64_DP_1SRC: - case ENC_REV16_32_DP_1SRC: - case ENC_REV16_64_DP_1SRC: - // sf=x|x|S=x|xxxxxxxx|opcode2=xxxxx|xxxx|opc=xx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>16)&0x1f; - ctx->opc = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_AUTDA_64P_DP_1SRC: - case ENC_AUTDZA_64Z_DP_1SRC: - case ENC_AUTDB_64P_DP_1SRC: - case ENC_AUTDZB_64Z_DP_1SRC: - case ENC_AUTIA_64P_DP_1SRC: - case ENC_AUTIZA_64Z_DP_1SRC: - case ENC_AUTIB_64P_DP_1SRC: - case ENC_AUTIZB_64Z_DP_1SRC: - case ENC_PACDA_64P_DP_1SRC: - case ENC_PACDZA_64Z_DP_1SRC: - case ENC_PACDB_64P_DP_1SRC: - case ENC_PACDZB_64Z_DP_1SRC: - case ENC_PACIA_64P_DP_1SRC: - case ENC_PACIZA_64Z_DP_1SRC: - case ENC_PACIB_64P_DP_1SRC: - case ENC_PACIZB_64Z_DP_1SRC: - // sf=x|x|S=x|xxxxxxxx|opcode2=xxxxx|xx|Z=x|xxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>16)&0x1f; - ctx->Z = (insword>>13)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCVTZS_32H_FLOAT2FIX: - case ENC_FCVTZS_64H_FLOAT2FIX: - case ENC_FCVTZS_32S_FLOAT2FIX: - case ENC_FCVTZS_64S_FLOAT2FIX: - case ENC_FCVTZS_32D_FLOAT2FIX: - case ENC_FCVTZS_64D_FLOAT2FIX: - case ENC_FCVTZU_32H_FLOAT2FIX: - case ENC_FCVTZU_64H_FLOAT2FIX: - case ENC_FCVTZU_32S_FLOAT2FIX: - case ENC_FCVTZU_64S_FLOAT2FIX: - case ENC_FCVTZU_32D_FLOAT2FIX: - case ENC_FCVTZU_64D_FLOAT2FIX: - case ENC_SCVTF_H32_FLOAT2FIX: - case ENC_SCVTF_H64_FLOAT2FIX: - case ENC_SCVTF_S32_FLOAT2FIX: - case ENC_SCVTF_S64_FLOAT2FIX: - case ENC_SCVTF_D32_FLOAT2FIX: - case ENC_SCVTF_D64_FLOAT2FIX: - case ENC_UCVTF_H32_FLOAT2FIX: - case ENC_UCVTF_H64_FLOAT2FIX: - case ENC_UCVTF_S32_FLOAT2FIX: - case ENC_UCVTF_S64_FLOAT2FIX: - case ENC_UCVTF_D32_FLOAT2FIX: - case ENC_UCVTF_D64_FLOAT2FIX: - // sf=x|x|S=x|xxxxx|ftype=xx|x|rmode=xx|opcode=xxx|scale=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->rmode = (insword>>19)&3; - ctx->opcode = (insword>>16)&7; - ctx->scale = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCVTAS_32H_FLOAT2INT: - case ENC_FCVTAS_64H_FLOAT2INT: - case ENC_FCVTAS_32S_FLOAT2INT: - case ENC_FCVTAS_64S_FLOAT2INT: - case ENC_FCVTAS_32D_FLOAT2INT: - case ENC_FCVTAS_64D_FLOAT2INT: - case ENC_FCVTAS_SISD_32H: - case ENC_FCVTAS_SISD_64H: - case ENC_FCVTAS_SISD_64S: - case ENC_FCVTAS_SISD_32D: - case ENC_FCVTAU_32H_FLOAT2INT: - case ENC_FCVTAU_64H_FLOAT2INT: - case ENC_FCVTAU_32S_FLOAT2INT: - case ENC_FCVTAU_64S_FLOAT2INT: - case ENC_FCVTAU_32D_FLOAT2INT: - case ENC_FCVTAU_64D_FLOAT2INT: - case ENC_FCVTAU_SISD_32H: - case ENC_FCVTAU_SISD_64H: - case ENC_FCVTAU_SISD_64S: - case ENC_FCVTAU_SISD_32D: - case ENC_FCVTMS_32H_FLOAT2INT: - case ENC_FCVTMS_64H_FLOAT2INT: - case ENC_FCVTMS_32S_FLOAT2INT: - case ENC_FCVTMS_64S_FLOAT2INT: - case ENC_FCVTMS_32D_FLOAT2INT: - case ENC_FCVTMS_64D_FLOAT2INT: - case ENC_FCVTMS_SISD_32H: - case ENC_FCVTMS_SISD_64H: - case ENC_FCVTMS_SISD_64S: - case ENC_FCVTMS_SISD_32D: - case ENC_FCVTMU_32H_FLOAT2INT: - case ENC_FCVTMU_64H_FLOAT2INT: - case ENC_FCVTMU_32S_FLOAT2INT: - case ENC_FCVTMU_64S_FLOAT2INT: - case ENC_FCVTMU_32D_FLOAT2INT: - case ENC_FCVTMU_64D_FLOAT2INT: - case ENC_FCVTMU_SISD_32H: - case ENC_FCVTMU_SISD_64H: - case ENC_FCVTMU_SISD_64S: - case ENC_FCVTMU_SISD_32D: - case ENC_FCVTNS_32H_FLOAT2INT: - case ENC_FCVTNS_64H_FLOAT2INT: - case ENC_FCVTNS_32S_FLOAT2INT: - case ENC_FCVTNS_64S_FLOAT2INT: - case ENC_FCVTNS_32D_FLOAT2INT: - case ENC_FCVTNS_64D_FLOAT2INT: - case ENC_FCVTNS_SISD_32H: - case ENC_FCVTNS_SISD_64H: - case ENC_FCVTNS_SISD_64S: - case ENC_FCVTNS_SISD_32D: - case ENC_FCVTNU_32H_FLOAT2INT: - case ENC_FCVTNU_64H_FLOAT2INT: - case ENC_FCVTNU_32S_FLOAT2INT: - case ENC_FCVTNU_64S_FLOAT2INT: - case ENC_FCVTNU_32D_FLOAT2INT: - case ENC_FCVTNU_64D_FLOAT2INT: - case ENC_FCVTNU_SISD_32H: - case ENC_FCVTNU_SISD_64H: - case ENC_FCVTNU_SISD_64S: - case ENC_FCVTNU_SISD_32D: - case ENC_FCVTPS_32H_FLOAT2INT: - case ENC_FCVTPS_64H_FLOAT2INT: - case ENC_FCVTPS_32S_FLOAT2INT: - case ENC_FCVTPS_64S_FLOAT2INT: - case ENC_FCVTPS_32D_FLOAT2INT: - case ENC_FCVTPS_64D_FLOAT2INT: - case ENC_FCVTPS_SISD_32H: - case ENC_FCVTPS_SISD_64H: - case ENC_FCVTPS_SISD_64S: - case ENC_FCVTPS_SISD_32D: - case ENC_FCVTPU_32H_FLOAT2INT: - case ENC_FCVTPU_64H_FLOAT2INT: - case ENC_FCVTPU_32S_FLOAT2INT: - case ENC_FCVTPU_64S_FLOAT2INT: - case ENC_FCVTPU_32D_FLOAT2INT: - case ENC_FCVTPU_64D_FLOAT2INT: - case ENC_FCVTPU_SISD_32H: - case ENC_FCVTPU_SISD_64H: - case ENC_FCVTPU_SISD_64S: - case ENC_FCVTPU_SISD_32D: - case ENC_FCVTZS_32H_FLOAT2INT: - case ENC_FCVTZS_64H_FLOAT2INT: - case ENC_FCVTZS_32S_FLOAT2INT: - case ENC_FCVTZS_64S_FLOAT2INT: - case ENC_FCVTZS_32D_FLOAT2INT: - case ENC_FCVTZS_64D_FLOAT2INT: - case ENC_FCVTZS_SISD_32H: - case ENC_FCVTZS_SISD_64H: - case ENC_FCVTZS_SISD_64S: - case ENC_FCVTZS_SISD_32D: - case ENC_FCVTZU_32H_FLOAT2INT: - case ENC_FCVTZU_64H_FLOAT2INT: - case ENC_FCVTZU_32S_FLOAT2INT: - case ENC_FCVTZU_64S_FLOAT2INT: - case ENC_FCVTZU_32D_FLOAT2INT: - case ENC_FCVTZU_64D_FLOAT2INT: - case ENC_FCVTZU_SISD_32H: - case ENC_FCVTZU_SISD_64H: - case ENC_FCVTZU_SISD_64S: - case ENC_FCVTZU_SISD_32D: - case ENC_FMOV_32H_FLOAT2INT: - case ENC_FMOV_64H_FLOAT2INT: - case ENC_FMOV_H32_FLOAT2INT: - case ENC_FMOV_S32_FLOAT2INT: - case ENC_FMOV_32S_FLOAT2INT: - case ENC_FMOV_H64_FLOAT2INT: - case ENC_FMOV_D64_FLOAT2INT: - case ENC_FMOV_V64I_FLOAT2INT: - case ENC_FMOV_64D_FLOAT2INT: - case ENC_FMOV_64VX_FLOAT2INT: - case ENC_SCVTF_H32_FLOAT2INT: - case ENC_SCVTF_S32_FLOAT2INT: - case ENC_SCVTF_D32_FLOAT2INT: - case ENC_SCVTF_H64_FLOAT2INT: - case ENC_SCVTF_S64_FLOAT2INT: - case ENC_SCVTF_D64_FLOAT2INT: - case ENC_SCVTF_SISD_32H: - case ENC_SCVTF_SISD_32D: - case ENC_SCVTF_SISD_64H: - case ENC_SCVTF_SISD_64S: - case ENC_UCVTF_H32_FLOAT2INT: - case ENC_UCVTF_S32_FLOAT2INT: - case ENC_UCVTF_D32_FLOAT2INT: - case ENC_UCVTF_H64_FLOAT2INT: - case ENC_UCVTF_S64_FLOAT2INT: - case ENC_UCVTF_D64_FLOAT2INT: - case ENC_UCVTF_SISD_32H: - case ENC_UCVTF_SISD_32D: - case ENC_UCVTF_SISD_64H: - case ENC_UCVTF_SISD_64S: - // sf=x|x|S=x|xxxxx|ftype=xx|x|rmode=xx|opcode=xxx|xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->rmode = (insword>>19)&3; - ctx->opcode = (insword>>16)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CMPP_SUBPS_64S_DP_2SRC: - case ENC_GMI_64G_DP_2SRC: - case ENC_IRG_64I_DP_2SRC: - case ENC_PACGA_64P_DP_2SRC: - case ENC_SUBP_64S_DP_2SRC: - case ENC_SUBPS_64S_DP_2SRC: - // sf=x|x|S=x|x|xxx|xxxx|Rm=xxxxx|opcode=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_AUTIA171615_64LR_DP_1SRC: - case ENC_AUTIASPPCR_64LRR_DP_1SRC: - case ENC_AUTIB171615_64LR_DP_1SRC: - case ENC_AUTIBSPPCR_64LRR_DP_1SRC: - case ENC_PACIA171615_64LR_DP_1SRC: - case ENC_PACIASPPC_64LR_DP_1SRC: - case ENC_PACIB171615_64LR_DP_1SRC: - case ENC_PACIBSPPC_64LR_DP_1SRC: - case ENC_PACNBIASPPC_64LR_DP_1SRC: - case ENC_PACNBIBSPPC_64LR_DP_1SRC: - // sf=x|x|S=x|x|xxx|xxxx|opcode2=xxxxx|opcode=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>16)&0x1f; - ctx->opcode = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_REV32_64_DP_1SRC: - case ENC_REV64_REV_64_DP_1SRC: - // sf=x|x|S=x|x|xxx|xxxx|opcode2=xxxxx|xxxx|opc=xx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->opcode2 = (insword>>16)&0x1f; - ctx->opc = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FJCVTZS_32D_FLOAT2INT: - // sf=x|x|S=x|x|xxx|x|ftype=xx|x|rmode=xx|opcode=xxx|xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->sf = insword>>31; - ctx->S = (insword>>29)&1; - ctx->ftype = (insword>>22)&3; - ctx->rmode = (insword>>19)&3; - ctx->opcode = (insword>>16)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_LDAPR_32L_LDAPSTL_WRITEBACK: - case ENC_LDAPR_64L_LDAPSTL_WRITEBACK: - case ENC_STLR_32S_LDAPSTL_WRITEBACK: - case ENC_STLR_64S_LDAPSTL_WRITEBACK: - // size=xx|xxxxxxx|L=x|xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->L = (insword>>22)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_CAS_C32_COMSWAP: - case ENC_CASA_C32_COMSWAP: - case ENC_CASAL_C32_COMSWAP: - case ENC_CASL_C32_COMSWAP: - case ENC_CAS_C64_COMSWAP: - case ENC_CASA_C64_COMSWAP: - case ENC_CASAL_C64_COMSWAP: - case ENC_CASL_C64_COMSWAP: - case ENC_CASB_C32_COMSWAP: - case ENC_CASAB_C32_COMSWAP: - case ENC_CASALB_C32_COMSWAP: - case ENC_CASLB_C32_COMSWAP: - case ENC_CASH_C32_COMSWAP: - case ENC_CASAH_C32_COMSWAP: - case ENC_CASALH_C32_COMSWAP: - case ENC_CASLH_C32_COMSWAP: - case ENC_LDAR_LR32_LDSTORD: - case ENC_LDAR_LR64_LDSTORD: - case ENC_LDAXR_LR32_LDSTEXCLR: - case ENC_LDAXR_LR64_LDSTEXCLR: - case ENC_LDLAR_LR32_LDSTORD: - case ENC_LDLAR_LR64_LDSTORD: - case ENC_LDXR_LR32_LDSTEXCLR: - case ENC_LDXR_LR64_LDSTEXCLR: - case ENC_STLLR_SL32_LDSTORD: - case ENC_STLLR_SL64_LDSTORD: - case ENC_STLR_SL32_LDSTORD: - case ENC_STLR_SL64_LDSTORD: - case ENC_STLXR_SR32_LDSTEXCLR: - case ENC_STLXR_SR64_LDSTEXCLR: - case ENC_STXR_SR32_LDSTEXCLR: - case ENC_STXR_SR64_LDSTEXCLR: - // size=xx|xxxxxxx|L=x|x|Rs=xxxxx|o0=x|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->L = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->o0 = (insword>>15)&1; - ctx->Rt2 = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDIAPP_32LE_LDIAPPSTILP: - case ENC_LDIAPP_32L_LDIAPPSTILP: - case ENC_LDIAPP_64LS_LDIAPPSTILP: - case ENC_LDIAPP_64L_LDIAPPSTILP: - case ENC_STILP_32SE_LDIAPPSTILP: - case ENC_STILP_32S_LDIAPPSTILP: - case ENC_STILP_64SS_LDIAPPSTILP: - case ENC_STILP_64S_LDIAPPSTILP: - // size=xx|xxxxxxx|L=x|x|Rt2=xxxxx|opc2=xxxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->L = (insword>>22)&1; - ctx->Rt2 = (insword>>16)&0x1f; - ctx->opc2 = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDAPURSB_32_LDAPSTL_UNSCALED: - case ENC_LDAPURSB_64_LDAPSTL_UNSCALED: - case ENC_LDAPURSH_32_LDAPSTL_UNSCALED: - case ENC_LDAPURSH_64_LDAPSTL_UNSCALED: - case ENC_LDAPUR_B_LDAPSTL_SIMD: - case ENC_LDAPUR_H_LDAPSTL_SIMD: - case ENC_LDAPUR_S_LDAPSTL_SIMD: - case ENC_LDAPUR_D_LDAPSTL_SIMD: - case ENC_LDAPUR_Q_LDAPSTL_SIMD: - case ENC_LDAPUR_32_LDAPSTL_UNSCALED: - case ENC_LDAPUR_64_LDAPSTL_UNSCALED: - case ENC_STLUR_B_LDAPSTL_SIMD: - case ENC_STLUR_H_LDAPSTL_SIMD: - case ENC_STLUR_S_LDAPSTL_SIMD: - case ENC_STLUR_D_LDAPSTL_SIMD: - case ENC_STLUR_Q_LDAPSTL_SIMD: - case ENC_STLUR_32_LDAPSTL_UNSCALED: - case ENC_STLUR_64_LDAPSTL_UNSCALED: - // size=xx|xxxxxx|opc=xx|x|imm9=xxxxxxxxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->opc = (insword>>22)&3; - ctx->imm9 = (insword>>12)&0x1ff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDADD_32_MEMOP: - case ENC_LDADDA_32_MEMOP: - case ENC_LDADDAL_32_MEMOP: - case ENC_LDADDL_32_MEMOP: - case ENC_LDADD_64_MEMOP: - case ENC_LDADDA_64_MEMOP: - case ENC_LDADDAL_64_MEMOP: - case ENC_LDADDL_64_MEMOP: - case ENC_LDADDB_32_MEMOP: - case ENC_LDADDAB_32_MEMOP: - case ENC_LDADDALB_32_MEMOP: - case ENC_LDADDLB_32_MEMOP: - case ENC_LDADDH_32_MEMOP: - case ENC_LDADDAH_32_MEMOP: - case ENC_LDADDALH_32_MEMOP: - case ENC_LDADDLH_32_MEMOP: - case ENC_LDAPR_32L_MEMOP: - case ENC_LDAPR_64L_MEMOP: - case ENC_LDBFADD_16: - case ENC_LDBFADDA_16: - case ENC_LDBFADDAL_16: - case ENC_LDBFADDL_16: - case ENC_LDBFMAX_16: - case ENC_LDBFMAXA_16: - case ENC_LDBFMAXAL_16: - case ENC_LDBFMAXL_16: - case ENC_LDBFMAXNM_16: - case ENC_LDBFMAXNMA_16: - case ENC_LDBFMAXNMAL_16: - case ENC_LDBFMAXNML_16: - case ENC_LDBFMIN_16: - case ENC_LDBFMINA_16: - case ENC_LDBFMINAL_16: - case ENC_LDBFMINL_16: - case ENC_LDBFMINNM_16: - case ENC_LDBFMINNMA_16: - case ENC_LDBFMINNMAL_16: - case ENC_LDBFMINNML_16: - case ENC_LDCLR_32_MEMOP: - case ENC_LDCLRA_32_MEMOP: - case ENC_LDCLRAL_32_MEMOP: - case ENC_LDCLRL_32_MEMOP: - case ENC_LDCLR_64_MEMOP: - case ENC_LDCLRA_64_MEMOP: - case ENC_LDCLRAL_64_MEMOP: - case ENC_LDCLRL_64_MEMOP: - case ENC_LDCLRB_32_MEMOP: - case ENC_LDCLRAB_32_MEMOP: - case ENC_LDCLRALB_32_MEMOP: - case ENC_LDCLRLB_32_MEMOP: - case ENC_LDCLRH_32_MEMOP: - case ENC_LDCLRAH_32_MEMOP: - case ENC_LDCLRALH_32_MEMOP: - case ENC_LDCLRLH_32_MEMOP: - case ENC_LDEOR_32_MEMOP: - case ENC_LDEORA_32_MEMOP: - case ENC_LDEORAL_32_MEMOP: - case ENC_LDEORL_32_MEMOP: - case ENC_LDEOR_64_MEMOP: - case ENC_LDEORA_64_MEMOP: - case ENC_LDEORAL_64_MEMOP: - case ENC_LDEORL_64_MEMOP: - case ENC_LDEORB_32_MEMOP: - case ENC_LDEORAB_32_MEMOP: - case ENC_LDEORALB_32_MEMOP: - case ENC_LDEORLB_32_MEMOP: - case ENC_LDEORH_32_MEMOP: - case ENC_LDEORAH_32_MEMOP: - case ENC_LDEORALH_32_MEMOP: - case ENC_LDEORLH_32_MEMOP: - case ENC_LDFADD_16: - case ENC_LDFADDA_16: - case ENC_LDFADDAL_16: - case ENC_LDFADDL_16: - case ENC_LDFADD_32: - case ENC_LDFADDA_32: - case ENC_LDFADDAL_32: - case ENC_LDFADDL_32: - case ENC_LDFADD_64: - case ENC_LDFADDA_64: - case ENC_LDFADDAL_64: - case ENC_LDFADDL_64: - case ENC_LDFMAX_16: - case ENC_LDFMAXA_16: - case ENC_LDFMAXAL_16: - case ENC_LDFMAXL_16: - case ENC_LDFMAX_32: - case ENC_LDFMAXA_32: - case ENC_LDFMAXAL_32: - case ENC_LDFMAXL_32: - case ENC_LDFMAX_64: - case ENC_LDFMAXA_64: - case ENC_LDFMAXAL_64: - case ENC_LDFMAXL_64: - case ENC_LDFMAXNM_16: - case ENC_LDFMAXNMA_16: - case ENC_LDFMAXNMAL_16: - case ENC_LDFMAXNML_16: - case ENC_LDFMAXNM_32: - case ENC_LDFMAXNMA_32: - case ENC_LDFMAXNMAL_32: - case ENC_LDFMAXNML_32: - case ENC_LDFMAXNM_64: - case ENC_LDFMAXNMA_64: - case ENC_LDFMAXNMAL_64: - case ENC_LDFMAXNML_64: - case ENC_LDFMIN_16: - case ENC_LDFMINA_16: - case ENC_LDFMINAL_16: - case ENC_LDFMINL_16: - case ENC_LDFMIN_32: - case ENC_LDFMINA_32: - case ENC_LDFMINAL_32: - case ENC_LDFMINL_32: - case ENC_LDFMIN_64: - case ENC_LDFMINA_64: - case ENC_LDFMINAL_64: - case ENC_LDFMINL_64: - case ENC_LDFMINNM_16: - case ENC_LDFMINNMA_16: - case ENC_LDFMINNMAL_16: - case ENC_LDFMINNML_16: - case ENC_LDFMINNM_32: - case ENC_LDFMINNMA_32: - case ENC_LDFMINNMAL_32: - case ENC_LDFMINNML_32: - case ENC_LDFMINNM_64: - case ENC_LDFMINNMA_64: - case ENC_LDFMINNMAL_64: - case ENC_LDFMINNML_64: - case ENC_LDSET_32_MEMOP: - case ENC_LDSETA_32_MEMOP: - case ENC_LDSETAL_32_MEMOP: - case ENC_LDSETL_32_MEMOP: - case ENC_LDSET_64_MEMOP: - case ENC_LDSETA_64_MEMOP: - case ENC_LDSETAL_64_MEMOP: - case ENC_LDSETL_64_MEMOP: - case ENC_LDSETB_32_MEMOP: - case ENC_LDSETAB_32_MEMOP: - case ENC_LDSETALB_32_MEMOP: - case ENC_LDSETLB_32_MEMOP: - case ENC_LDSETH_32_MEMOP: - case ENC_LDSETAH_32_MEMOP: - case ENC_LDSETALH_32_MEMOP: - case ENC_LDSETLH_32_MEMOP: - case ENC_LDSMAX_32_MEMOP: - case ENC_LDSMAXA_32_MEMOP: - case ENC_LDSMAXAL_32_MEMOP: - case ENC_LDSMAXL_32_MEMOP: - case ENC_LDSMAX_64_MEMOP: - case ENC_LDSMAXA_64_MEMOP: - case ENC_LDSMAXAL_64_MEMOP: - case ENC_LDSMAXL_64_MEMOP: - case ENC_LDSMAXB_32_MEMOP: - case ENC_LDSMAXAB_32_MEMOP: - case ENC_LDSMAXALB_32_MEMOP: - case ENC_LDSMAXLB_32_MEMOP: - case ENC_LDSMAXH_32_MEMOP: - case ENC_LDSMAXAH_32_MEMOP: - case ENC_LDSMAXALH_32_MEMOP: - case ENC_LDSMAXLH_32_MEMOP: - case ENC_LDSMIN_32_MEMOP: - case ENC_LDSMINA_32_MEMOP: - case ENC_LDSMINAL_32_MEMOP: - case ENC_LDSMINL_32_MEMOP: - case ENC_LDSMIN_64_MEMOP: - case ENC_LDSMINA_64_MEMOP: - case ENC_LDSMINAL_64_MEMOP: - case ENC_LDSMINL_64_MEMOP: - case ENC_LDSMINB_32_MEMOP: - case ENC_LDSMINAB_32_MEMOP: - case ENC_LDSMINALB_32_MEMOP: - case ENC_LDSMINLB_32_MEMOP: - case ENC_LDSMINH_32_MEMOP: - case ENC_LDSMINAH_32_MEMOP: - case ENC_LDSMINALH_32_MEMOP: - case ENC_LDSMINLH_32_MEMOP: - case ENC_LDUMAX_32_MEMOP: - case ENC_LDUMAXA_32_MEMOP: - case ENC_LDUMAXAL_32_MEMOP: - case ENC_LDUMAXL_32_MEMOP: - case ENC_LDUMAX_64_MEMOP: - case ENC_LDUMAXA_64_MEMOP: - case ENC_LDUMAXAL_64_MEMOP: - case ENC_LDUMAXL_64_MEMOP: - case ENC_LDUMAXB_32_MEMOP: - case ENC_LDUMAXAB_32_MEMOP: - case ENC_LDUMAXALB_32_MEMOP: - case ENC_LDUMAXLB_32_MEMOP: - case ENC_LDUMAXH_32_MEMOP: - case ENC_LDUMAXAH_32_MEMOP: - case ENC_LDUMAXALH_32_MEMOP: - case ENC_LDUMAXLH_32_MEMOP: - case ENC_LDUMIN_32_MEMOP: - case ENC_LDUMINA_32_MEMOP: - case ENC_LDUMINAL_32_MEMOP: - case ENC_LDUMINL_32_MEMOP: - case ENC_LDUMIN_64_MEMOP: - case ENC_LDUMINA_64_MEMOP: - case ENC_LDUMINAL_64_MEMOP: - case ENC_LDUMINL_64_MEMOP: - case ENC_LDUMINB_32_MEMOP: - case ENC_LDUMINAB_32_MEMOP: - case ENC_LDUMINALB_32_MEMOP: - case ENC_LDUMINLB_32_MEMOP: - case ENC_LDUMINH_32_MEMOP: - case ENC_LDUMINAH_32_MEMOP: - case ENC_LDUMINALH_32_MEMOP: - case ENC_LDUMINLH_32_MEMOP: - case ENC_STADDB_LDADDB_32_MEMOP: - case ENC_STADDLB_LDADDLB_32_MEMOP: - case ENC_STADDH_LDADDH_32_MEMOP: - case ENC_STADDLH_LDADDLH_32_MEMOP: - case ENC_STADD_LDADD_32_MEMOP: - case ENC_STADDL_LDADDL_32_MEMOP: - case ENC_STADD_LDADD_64_MEMOP: - case ENC_STADDL_LDADDL_64_MEMOP: - case ENC_STBFADD_16: - case ENC_STBFADDL_16: - case ENC_STBFMAX_16: - case ENC_STBFMAXL_16: - case ENC_STBFMAXNM_16: - case ENC_STBFMAXNML_16: - case ENC_STBFMIN_16: - case ENC_STBFMINL_16: - case ENC_STBFMINNM_16: - case ENC_STBFMINNML_16: - case ENC_STCLRB_LDCLRB_32_MEMOP: - case ENC_STCLRLB_LDCLRLB_32_MEMOP: - case ENC_STCLRH_LDCLRH_32_MEMOP: - case ENC_STCLRLH_LDCLRLH_32_MEMOP: - case ENC_STCLR_LDCLR_32_MEMOP: - case ENC_STCLRL_LDCLRL_32_MEMOP: - case ENC_STCLR_LDCLR_64_MEMOP: - case ENC_STCLRL_LDCLRL_64_MEMOP: - case ENC_STEORB_LDEORB_32_MEMOP: - case ENC_STEORLB_LDEORLB_32_MEMOP: - case ENC_STEORH_LDEORH_32_MEMOP: - case ENC_STEORLH_LDEORLH_32_MEMOP: - case ENC_STEOR_LDEOR_32_MEMOP: - case ENC_STEORL_LDEORL_32_MEMOP: - case ENC_STEOR_LDEOR_64_MEMOP: - case ENC_STEORL_LDEORL_64_MEMOP: - case ENC_STFADD_16: - case ENC_STFADDL_16: - case ENC_STFADD_32: - case ENC_STFADDL_32: - case ENC_STFADD_64: - case ENC_STFADDL_64: - case ENC_STFMAX_16: - case ENC_STFMAXL_16: - case ENC_STFMAX_32: - case ENC_STFMAXL_32: - case ENC_STFMAX_64: - case ENC_STFMAXL_64: - case ENC_STFMAXNM_16: - case ENC_STFMAXNML_16: - case ENC_STFMAXNM_32: - case ENC_STFMAXNML_32: - case ENC_STFMAXNM_64: - case ENC_STFMAXNML_64: - case ENC_STFMIN_16: - case ENC_STFMINL_16: - case ENC_STFMIN_32: - case ENC_STFMINL_32: - case ENC_STFMIN_64: - case ENC_STFMINL_64: - case ENC_STFMINNM_16: - case ENC_STFMINNML_16: - case ENC_STFMINNM_32: - case ENC_STFMINNML_32: - case ENC_STFMINNM_64: - case ENC_STFMINNML_64: - case ENC_STSETB_LDSETB_32_MEMOP: - case ENC_STSETLB_LDSETLB_32_MEMOP: - case ENC_STSETH_LDSETH_32_MEMOP: - case ENC_STSETLH_LDSETLH_32_MEMOP: - case ENC_STSET_LDSET_32_MEMOP: - case ENC_STSETL_LDSETL_32_MEMOP: - case ENC_STSET_LDSET_64_MEMOP: - case ENC_STSETL_LDSETL_64_MEMOP: - case ENC_STSMAXB_LDSMAXB_32_MEMOP: - case ENC_STSMAXLB_LDSMAXLB_32_MEMOP: - case ENC_STSMAXH_LDSMAXH_32_MEMOP: - case ENC_STSMAXLH_LDSMAXLH_32_MEMOP: - case ENC_STSMAX_LDSMAX_32_MEMOP: - case ENC_STSMAXL_LDSMAXL_32_MEMOP: - case ENC_STSMAX_LDSMAX_64_MEMOP: - case ENC_STSMAXL_LDSMAXL_64_MEMOP: - case ENC_STSMINB_LDSMINB_32_MEMOP: - case ENC_STSMINLB_LDSMINLB_32_MEMOP: - case ENC_STSMINH_LDSMINH_32_MEMOP: - case ENC_STSMINLH_LDSMINLH_32_MEMOP: - case ENC_STSMIN_LDSMIN_32_MEMOP: - case ENC_STSMINL_LDSMINL_32_MEMOP: - case ENC_STSMIN_LDSMIN_64_MEMOP: - case ENC_STSMINL_LDSMINL_64_MEMOP: - case ENC_STUMAXB_LDUMAXB_32_MEMOP: - case ENC_STUMAXLB_LDUMAXLB_32_MEMOP: - case ENC_STUMAXH_LDUMAXH_32_MEMOP: - case ENC_STUMAXLH_LDUMAXLH_32_MEMOP: - case ENC_STUMAX_LDUMAX_32_MEMOP: - case ENC_STUMAXL_LDUMAXL_32_MEMOP: - case ENC_STUMAX_LDUMAX_64_MEMOP: - case ENC_STUMAXL_LDUMAXL_64_MEMOP: - case ENC_STUMINB_LDUMINB_32_MEMOP: - case ENC_STUMINLB_LDUMINLB_32_MEMOP: - case ENC_STUMINH_LDUMINH_32_MEMOP: - case ENC_STUMINLH_LDUMINLH_32_MEMOP: - case ENC_STUMIN_LDUMIN_32_MEMOP: - case ENC_STUMINL_LDUMINL_32_MEMOP: - case ENC_STUMIN_LDUMIN_64_MEMOP: - case ENC_STUMINL_LDUMINL_64_MEMOP: - case ENC_SWP_32_MEMOP: - case ENC_SWPA_32_MEMOP: - case ENC_SWPAL_32_MEMOP: - case ENC_SWPL_32_MEMOP: - case ENC_SWP_64_MEMOP: - case ENC_SWPA_64_MEMOP: - case ENC_SWPAL_64_MEMOP: - case ENC_SWPL_64_MEMOP: - case ENC_SWPB_32_MEMOP: - case ENC_SWPAB_32_MEMOP: - case ENC_SWPALB_32_MEMOP: - case ENC_SWPLB_32_MEMOP: - case ENC_SWPH_32_MEMOP: - case ENC_SWPAH_32_MEMOP: - case ENC_SWPALH_32_MEMOP: - case ENC_SWPLH_32_MEMOP: - // size=xx|xxx|VR=x|xx|A=x|R=x|x|Rs=xxxxx|o3=x|opc=xxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->A = (insword>>23)&1; - ctx->R = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->o3 = (insword>>15)&1; - ctx->opc = (insword>>12)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRAA_64_LDST_PAC: - case ENC_LDRAA_64W_LDST_PAC: - case ENC_LDRAB_64_LDST_PAC: - case ENC_LDRAB_64W_LDST_PAC: - // size=xx|xxx|VR=x|xx|M=x|S=x|x|imm9=xxxxxxxxx|W=x|x|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->M = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->imm9 = (insword>>12)&0x1ff; - ctx->W = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRSB_32_LDST_POS: - case ENC_LDRSB_64_LDST_POS: - case ENC_LDRSH_32_LDST_POS: - case ENC_LDRSH_64_LDST_POS: - case ENC_LDR_B_LDST_POS: - case ENC_LDR_H_LDST_POS: - case ENC_LDR_S_LDST_POS: - case ENC_LDR_D_LDST_POS: - case ENC_LDR_Q_LDST_POS: - case ENC_LDR_32_LDST_POS: - case ENC_LDR_64_LDST_POS: - case ENC_STR_B_LDST_POS: - case ENC_STR_H_LDST_POS: - case ENC_STR_S_LDST_POS: - case ENC_STR_D_LDST_POS: - case ENC_STR_Q_LDST_POS: - case ENC_STR_32_LDST_POS: - case ENC_STR_64_LDST_POS: - // size=xx|xxx|VR=x|xx|opc=xx|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->opc = (insword>>22)&3; - ctx->imm12 = (insword>>10)&0xfff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRB_32B_LDST_REGOFF: - case ENC_LDRB_32BL_LDST_REGOFF: - case ENC_LDRSB_32B_LDST_REGOFF: - case ENC_LDRSB_32BL_LDST_REGOFF: - case ENC_LDRSB_64B_LDST_REGOFF: - case ENC_LDRSB_64BL_LDST_REGOFF: - case ENC_LDRSH_32_LDST_REGOFF: - case ENC_LDRSH_64_LDST_REGOFF: - case ENC_LDR_B_LDST_REGOFF: - case ENC_LDR_BL_LDST_REGOFF: - case ENC_LDR_H_LDST_REGOFF: - case ENC_LDR_S_LDST_REGOFF: - case ENC_LDR_D_LDST_REGOFF: - case ENC_LDR_Q_LDST_REGOFF: - case ENC_LDR_32_LDST_REGOFF: - case ENC_LDR_64_LDST_REGOFF: - case ENC_STRB_32B_LDST_REGOFF: - case ENC_STRB_32BL_LDST_REGOFF: - case ENC_STR_B_LDST_REGOFF: - case ENC_STR_BL_LDST_REGOFF: - case ENC_STR_H_LDST_REGOFF: - case ENC_STR_S_LDST_REGOFF: - case ENC_STR_D_LDST_REGOFF: - case ENC_STR_Q_LDST_REGOFF: - case ENC_STR_32_LDST_REGOFF: - case ENC_STR_64_LDST_REGOFF: - // size=xx|xxx|VR=x|xx|opc=xx|x|Rm=xxxxx|option=xxx|S=x|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->opc = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->option = (insword>>13)&7; - ctx->S = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRSB_32_LDST_IMMPOST: - case ENC_LDRSB_64_LDST_IMMPOST: - case ENC_LDRSB_32_LDST_IMMPRE: - case ENC_LDRSB_64_LDST_IMMPRE: - case ENC_LDRSH_32_LDST_IMMPOST: - case ENC_LDRSH_64_LDST_IMMPOST: - case ENC_LDRSH_32_LDST_IMMPRE: - case ENC_LDRSH_64_LDST_IMMPRE: - case ENC_LDR_B_LDST_IMMPOST: - case ENC_LDR_H_LDST_IMMPOST: - case ENC_LDR_S_LDST_IMMPOST: - case ENC_LDR_D_LDST_IMMPOST: - case ENC_LDR_Q_LDST_IMMPOST: - case ENC_LDR_B_LDST_IMMPRE: - case ENC_LDR_H_LDST_IMMPRE: - case ENC_LDR_S_LDST_IMMPRE: - case ENC_LDR_D_LDST_IMMPRE: - case ENC_LDR_Q_LDST_IMMPRE: - case ENC_LDR_32_LDST_IMMPOST: - case ENC_LDR_64_LDST_IMMPOST: - case ENC_LDR_32_LDST_IMMPRE: - case ENC_LDR_64_LDST_IMMPRE: - case ENC_LDTR_32_LDST_UNPRIV: - case ENC_LDTR_64_LDST_UNPRIV: - case ENC_LDTRSB_32_LDST_UNPRIV: - case ENC_LDTRSB_64_LDST_UNPRIV: - case ENC_LDTRSH_32_LDST_UNPRIV: - case ENC_LDTRSH_64_LDST_UNPRIV: - case ENC_LDURSB_32_LDST_UNSCALED: - case ENC_LDURSB_64_LDST_UNSCALED: - case ENC_LDURSH_32_LDST_UNSCALED: - case ENC_LDURSH_64_LDST_UNSCALED: - case ENC_LDUR_B_LDST_UNSCALED: - case ENC_LDUR_H_LDST_UNSCALED: - case ENC_LDUR_S_LDST_UNSCALED: - case ENC_LDUR_D_LDST_UNSCALED: - case ENC_LDUR_Q_LDST_UNSCALED: - case ENC_LDUR_32_LDST_UNSCALED: - case ENC_LDUR_64_LDST_UNSCALED: - case ENC_STR_B_LDST_IMMPOST: - case ENC_STR_H_LDST_IMMPOST: - case ENC_STR_S_LDST_IMMPOST: - case ENC_STR_D_LDST_IMMPOST: - case ENC_STR_Q_LDST_IMMPOST: - case ENC_STR_B_LDST_IMMPRE: - case ENC_STR_H_LDST_IMMPRE: - case ENC_STR_S_LDST_IMMPRE: - case ENC_STR_D_LDST_IMMPRE: - case ENC_STR_Q_LDST_IMMPRE: - case ENC_STR_32_LDST_IMMPOST: - case ENC_STR_64_LDST_IMMPOST: - case ENC_STR_32_LDST_IMMPRE: - case ENC_STR_64_LDST_IMMPRE: - case ENC_STTR_32_LDST_UNPRIV: - case ENC_STTR_64_LDST_UNPRIV: - case ENC_STUR_B_LDST_UNSCALED: - case ENC_STUR_H_LDST_UNSCALED: - case ENC_STUR_S_LDST_UNSCALED: - case ENC_STUR_D_LDST_UNSCALED: - case ENC_STUR_Q_LDST_UNSCALED: - case ENC_STUR_32_LDST_UNSCALED: - case ENC_STUR_64_LDST_UNSCALED: - // size=xx|xxx|VR=x|xx|opc=xx|x|imm9=xxxxxxxxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->opc = (insword>>22)&3; - ctx->imm9 = (insword>>12)&0x1ff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LD64B_64L_MEMOP: - case ENC_LDAPRB_32L_MEMOP: - case ENC_LDAPRH_32L_MEMOP: - case ENC_ST64B_64L_MEMOP: - case ENC_ST64BV_64_MEMOP: - case ENC_ST64BV0_64_MEMOP: - // size=xx|xx|x|VR=x|x|x|A=x|R=x|x|Rs=xxxxx|o3=x|opc=xxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->A = (insword>>23)&1; - ctx->R = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->o3 = (insword>>15)&1; - ctx->opc = (insword>>12)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRB_32_LDST_POS: - case ENC_LDRH_32_LDST_POS: - case ENC_LDRSW_64_LDST_POS: - case ENC_PRFM_P_LDST_POS: - case ENC_STRB_32_LDST_POS: - case ENC_STRH_32_LDST_POS: - // size=xx|xx|x|VR=x|x|x|opc=xx|imm12=xxxxxxxxxxxx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->opc = (insword>>22)&3; - ctx->imm12 = (insword>>10)&0xfff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRH_32_LDST_REGOFF: - case ENC_LDRSW_64_LDST_REGOFF: - case ENC_PRFM_P_LDST_REGOFF: - case ENC_RPRFM_R_LDST_REGOFF: - case ENC_STRH_32_LDST_REGOFF: - // size=xx|xx|x|VR=x|x|x|opc=xx|x|Rm=xxxxx|option=xxx|S=x|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->opc = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->option = (insword>>13)&7; - ctx->S = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDRB_32_LDST_IMMPOST: - case ENC_LDRB_32_LDST_IMMPRE: - case ENC_LDRH_32_LDST_IMMPOST: - case ENC_LDRH_32_LDST_IMMPRE: - case ENC_LDRSW_64_LDST_IMMPOST: - case ENC_LDRSW_64_LDST_IMMPRE: - case ENC_LDTRB_32_LDST_UNPRIV: - case ENC_LDTRH_32_LDST_UNPRIV: - case ENC_LDTRSW_64_LDST_UNPRIV: - case ENC_LDURB_32_LDST_UNSCALED: - case ENC_LDURH_32_LDST_UNSCALED: - case ENC_LDURSW_64_LDST_UNSCALED: - case ENC_PRFUM_P_LDST_UNSCALED: - case ENC_STRB_32_LDST_IMMPOST: - case ENC_STRB_32_LDST_IMMPRE: - case ENC_STRH_32_LDST_IMMPOST: - case ENC_STRH_32_LDST_IMMPRE: - case ENC_STTRB_32_LDST_UNPRIV: - case ENC_STTRH_32_LDST_UNPRIV: - case ENC_STURB_32_LDST_UNSCALED: - case ENC_STURH_32_LDST_UNSCALED: - // size=xx|xx|x|VR=x|x|x|opc=xx|x|imm9=xxxxxxxxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->VR = (insword>>26)&1; - ctx->opc = (insword>>22)&3; - ctx->imm9 = (insword>>12)&0x1ff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDARB_LR32_LDSTORD: - case ENC_LDARH_LR32_LDSTORD: - case ENC_LDAXRB_LR32_LDSTEXCLR: - case ENC_LDAXRH_LR32_LDSTEXCLR: - case ENC_LDLARB_LR32_LDSTORD: - case ENC_LDLARH_LR32_LDSTORD: - case ENC_LDXRB_LR32_LDSTEXCLR: - case ENC_LDXRH_LR32_LDSTEXCLR: - case ENC_STLLRB_SL32_LDSTORD: - case ENC_STLLRH_SL32_LDSTORD: - case ENC_STLRB_SL32_LDSTORD: - case ENC_STLRH_SL32_LDSTORD: - case ENC_STLXRB_SR32_LDSTEXCLR: - case ENC_STLXRH_SR32_LDSTEXCLR: - case ENC_STXRB_SR32_LDSTEXCLR: - case ENC_STXRH_SR32_LDSTEXCLR: - // size=xx|xx|x|x|x|xx|L=x|x|Rs=xxxxx|o0=x|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->L = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->o0 = (insword>>15)&1; - ctx->Rt2 = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDAPP_64_LDIAPPSTILP: - case ENC_LDAP_64_LDIAPPSTILP: - case ENC_STLP_64_LDIAPPSTILP: - // size=xx|xx|x|x|x|xx|L=x|x|Rt2=xxxxx|opc2=xxxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->L = (insword>>22)&1; - ctx->Rt2 = (insword>>16)&0x1f; - ctx->opc2 = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDAPURB_32_LDAPSTL_UNSCALED: - case ENC_LDAPURH_32_LDAPSTL_UNSCALED: - case ENC_LDAPURSW_64_LDAPSTL_UNSCALED: - case ENC_STLURB_32_LDAPSTL_UNSCALED: - case ENC_STLURH_32_LDAPSTL_UNSCALED: - // size=xx|xx|x|x|x|x|opc=xx|x|imm9=xxxxxxxxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->size = insword>>30; - ctx->opc = (insword>>22)&3; - ctx->imm9 = (insword>>12)&0x1ff; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_CPYFP_CPY_MEMCMS: - case ENC_CPYFM_CPY_MEMCMS: - case ENC_CPYFE_CPY_MEMCMS: - case ENC_CPYFPN_CPY_MEMCMS: - case ENC_CPYFMN_CPY_MEMCMS: - case ENC_CPYFEN_CPY_MEMCMS: - case ENC_CPYFPRN_CPY_MEMCMS: - case ENC_CPYFMRN_CPY_MEMCMS: - case ENC_CPYFERN_CPY_MEMCMS: - case ENC_CPYFPRT_CPY_MEMCMS: - case ENC_CPYFMRT_CPY_MEMCMS: - case ENC_CPYFERT_CPY_MEMCMS: - case ENC_CPYFPRTN_CPY_MEMCMS: - case ENC_CPYFMRTN_CPY_MEMCMS: - case ENC_CPYFERTN_CPY_MEMCMS: - case ENC_CPYFPRTRN_CPY_MEMCMS: - case ENC_CPYFMRTRN_CPY_MEMCMS: - case ENC_CPYFERTRN_CPY_MEMCMS: - case ENC_CPYFPRTWN_CPY_MEMCMS: - case ENC_CPYFMRTWN_CPY_MEMCMS: - case ENC_CPYFERTWN_CPY_MEMCMS: - case ENC_CPYFPT_CPY_MEMCMS: - case ENC_CPYFMT_CPY_MEMCMS: - case ENC_CPYFET_CPY_MEMCMS: - case ENC_CPYFPTN_CPY_MEMCMS: - case ENC_CPYFMTN_CPY_MEMCMS: - case ENC_CPYFETN_CPY_MEMCMS: - case ENC_CPYFPTRN_CPY_MEMCMS: - case ENC_CPYFMTRN_CPY_MEMCMS: - case ENC_CPYFETRN_CPY_MEMCMS: - case ENC_CPYFPTWN_CPY_MEMCMS: - case ENC_CPYFMTWN_CPY_MEMCMS: - case ENC_CPYFETWN_CPY_MEMCMS: - case ENC_CPYFPWN_CPY_MEMCMS: - case ENC_CPYFMWN_CPY_MEMCMS: - case ENC_CPYFEWN_CPY_MEMCMS: - case ENC_CPYFPWT_CPY_MEMCMS: - case ENC_CPYFMWT_CPY_MEMCMS: - case ENC_CPYFEWT_CPY_MEMCMS: - case ENC_CPYFPWTN_CPY_MEMCMS: - case ENC_CPYFMWTN_CPY_MEMCMS: - case ENC_CPYFEWTN_CPY_MEMCMS: - case ENC_CPYFPWTRN_CPY_MEMCMS: - case ENC_CPYFMWTRN_CPY_MEMCMS: - case ENC_CPYFEWTRN_CPY_MEMCMS: - case ENC_CPYFPWTWN_CPY_MEMCMS: - case ENC_CPYFMWTWN_CPY_MEMCMS: - case ENC_CPYFEWTWN_CPY_MEMCMS: - case ENC_CPYP_CPY_MEMCMS: - case ENC_CPYM_CPY_MEMCMS: - case ENC_CPYE_CPY_MEMCMS: - case ENC_CPYPN_CPY_MEMCMS: - case ENC_CPYMN_CPY_MEMCMS: - case ENC_CPYEN_CPY_MEMCMS: - case ENC_CPYPRN_CPY_MEMCMS: - case ENC_CPYMRN_CPY_MEMCMS: - case ENC_CPYERN_CPY_MEMCMS: - case ENC_CPYPRT_CPY_MEMCMS: - case ENC_CPYMRT_CPY_MEMCMS: - case ENC_CPYERT_CPY_MEMCMS: - case ENC_CPYPRTN_CPY_MEMCMS: - case ENC_CPYMRTN_CPY_MEMCMS: - case ENC_CPYERTN_CPY_MEMCMS: - case ENC_CPYPRTRN_CPY_MEMCMS: - case ENC_CPYMRTRN_CPY_MEMCMS: - case ENC_CPYERTRN_CPY_MEMCMS: - case ENC_CPYPRTWN_CPY_MEMCMS: - case ENC_CPYMRTWN_CPY_MEMCMS: - case ENC_CPYERTWN_CPY_MEMCMS: - case ENC_CPYPT_CPY_MEMCMS: - case ENC_CPYMT_CPY_MEMCMS: - case ENC_CPYET_CPY_MEMCMS: - case ENC_CPYPTN_CPY_MEMCMS: - case ENC_CPYMTN_CPY_MEMCMS: - case ENC_CPYETN_CPY_MEMCMS: - case ENC_CPYPTRN_CPY_MEMCMS: - case ENC_CPYMTRN_CPY_MEMCMS: - case ENC_CPYETRN_CPY_MEMCMS: - case ENC_CPYPTWN_CPY_MEMCMS: - case ENC_CPYMTWN_CPY_MEMCMS: - case ENC_CPYETWN_CPY_MEMCMS: - case ENC_CPYPWN_CPY_MEMCMS: - case ENC_CPYMWN_CPY_MEMCMS: - case ENC_CPYEWN_CPY_MEMCMS: - case ENC_CPYPWT_CPY_MEMCMS: - case ENC_CPYMWT_CPY_MEMCMS: - case ENC_CPYEWT_CPY_MEMCMS: - case ENC_CPYPWTN_CPY_MEMCMS: - case ENC_CPYMWTN_CPY_MEMCMS: - case ENC_CPYEWTN_CPY_MEMCMS: - case ENC_CPYPWTRN_CPY_MEMCMS: - case ENC_CPYMWTRN_CPY_MEMCMS: - case ENC_CPYEWTRN_CPY_MEMCMS: - case ENC_CPYPWTWN_CPY_MEMCMS: - case ENC_CPYMWTWN_CPY_MEMCMS: - case ENC_CPYEWTWN_CPY_MEMCMS: - case ENC_SETGP_SET_MEMCMS: - case ENC_SETGM_SET_MEMCMS: - case ENC_SETGE_SET_MEMCMS: - case ENC_SETGPN_SET_MEMCMS: - case ENC_SETGMN_SET_MEMCMS: - case ENC_SETGEN_SET_MEMCMS: - case ENC_SETGPT_SET_MEMCMS: - case ENC_SETGMT_SET_MEMCMS: - case ENC_SETGET_SET_MEMCMS: - case ENC_SETGPTN_SET_MEMCMS: - case ENC_SETGMTN_SET_MEMCMS: - case ENC_SETGETN_SET_MEMCMS: - case ENC_SETP_SET_MEMCMS: - case ENC_SETM_SET_MEMCMS: - case ENC_SETE_SET_MEMCMS: - case ENC_SETPN_SET_MEMCMS: - case ENC_SETMN_SET_MEMCMS: - case ENC_SETEN_SET_MEMCMS: - case ENC_SETPT_SET_MEMCMS: - case ENC_SETMT_SET_MEMCMS: - case ENC_SETET_SET_MEMCMS: - case ENC_SETPTN_SET_MEMCMS: - case ENC_SETMTN_SET_MEMCMS: - case ENC_SETETN_SET_MEMCMS: - // sz=xx|xxx|o0=x|xx|op1=xx|x|Rs=xxxxx|op2=xxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->sz = insword>>30; - ctx->o0 = (insword>>26)&1; - ctx->op1 = (insword>>22)&3; - ctx->Rs = (insword>>16)&0x1f; - ctx->op2 = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_AUTIA1716_HI_HINTS: - case ENC_AUTIASP_HI_HINTS: - case ENC_AUTIAZ_HI_HINTS: - case ENC_AUTIB1716_HI_HINTS: - case ENC_AUTIBSP_HI_HINTS: - case ENC_AUTIBZ_HI_HINTS: - case ENC_PACIA1716_HI_HINTS: - case ENC_PACIASP_HI_HINTS: - case ENC_PACIAZ_HI_HINTS: - case ENC_PACIB1716_HI_HINTS: - case ENC_PACIBSP_HI_HINTS: - case ENC_PACIBZ_HI_HINTS: - // xxxxxxxxxxxxxxxxxxxx|CRm=xxxx|op2=xxx|xxxxx - ctx->CRm = (insword>>8)&15; - ctx->op2 = (insword>>5)&7; - break; - case ENC_CBBGT_8_REGS: - case ENC_CBBGE_8_REGS: - case ENC_CBBHI_8_REGS: - case ENC_CBBHS_8_REGS: - case ENC_CBBEQ_8_REGS: - case ENC_CBBNE_8_REGS: - case ENC_CBHGT_16_REGS: - case ENC_CBHGE_16_REGS: - case ENC_CBHHI_16_REGS: - case ENC_CBHHS_16_REGS: - case ENC_CBHEQ_16_REGS: - case ENC_CBHNE_16_REGS: - // xxxxxxxx|cc=xxx|Rm=xxxxx|x|H=x|imm9=xxxxxxxxx|Rt=xxxxx - ctx->cc = (insword>>21)&7; - ctx->Rm = (insword>>16)&0x1f; - ctx->H = (insword>>14)&1; - ctx->imm9 = (insword>>5)&0x1ff; - ctx->Rt = insword&0x1f; - break; - case ENC_MOV_Z_V__DUP_Z_ZI_: - case ENC_MOV_Z_ZI__DUP_Z_ZI_: - // xxxxxxxx|imm2=xx|x|tsz=xxxxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->imm2 = (insword>>22)&3; - ctx->tsz = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_RETAASPPC_ONLY_MISCBRANCH: - case ENC_RETABSPPC_ONLY_MISCBRANCH: - // xxxxxxxx|opc=xxx|imm16=xxxxxxxxxxxxxxxx|op2=xxxxx - ctx->opc = (insword>>21)&7; - ctx->imm16 = (insword>>5)&0xffff; - ctx->op2 = insword&0x1f; - break; - case ENC_BLRAA_64P_BRANCH_REG: - case ENC_BLRAAZ_64_BRANCH_REG: - case ENC_BLRAB_64P_BRANCH_REG: - case ENC_BLRABZ_64_BRANCH_REG: - case ENC_BRAA_64P_BRANCH_REG: - case ENC_BRAAZ_64_BRANCH_REG: - case ENC_BRAB_64P_BRANCH_REG: - case ENC_BRABZ_64_BRANCH_REG: - case ENC_RETAA_64E_BRANCH_REG: - case ENC_RETAB_64E_BRANCH_REG: - // xxxxxxx|Z=x|x|op=xx|op2=xxxxx|xxxx|A=x|M=x|Rn=xxxxx|Rm=xxxxx - ctx->Z = (insword>>24)&1; - ctx->op = (insword>>21)&3; - ctx->op2 = (insword>>16)&0x1f; - ctx->A = (insword>>11)&1; - ctx->M = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rm = insword&0x1f; - break; - case ENC_RETAASPPCR_64M_BRANCH_REG: - case ENC_RETABSPPCR_64M_BRANCH_REG: - // xxxxxxx|opc=xxxx|op2=xxxxx|xxxxx|M=x|Rn=xxxxx|Rm=xxxxx - ctx->opc = (insword>>21)&15; - ctx->op2 = (insword>>16)&0x1f; - ctx->M = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rm = insword&0x1f; - break; - case ENC_ERETAA_64E_BRANCH_REG: - case ENC_ERETAB_64E_BRANCH_REG: - // xxxxxxx|opc=xxxx|op2=xxxxx|xxxx|A=x|M=x|Rn=xxxxx|op4=xxxxx - ctx->opc = (insword>>21)&15; - ctx->op2 = (insword>>16)&0x1f; - ctx->A = (insword>>11)&1; - ctx->M = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->op4 = insword&0x1f; - break; - case ENC_BCAX_VVV16_CRYPTO4: - case ENC_EOR3_VVV16_CRYPTO4: - case ENC_SM3SS1_VVV4_CRYPTO4: - // xxxx|xxx|xx|Op0=xx|Rm=xxxxx|x|Ra=xxxxx|Rn=xxxxx|Rd=xxxxx - ctx->Op0 = (insword>>21)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Ra = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SHA512SU0_VV2_CRYPTOSHA512_2: - case ENC_SM4E_VV4_CRYPTOSHA512_2: - // xxxx|xxx|xx|xxxx|xxxxxxx|opcode=xx|Rn=xxxxx|Rd=xxxxx - ctx->opcode = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_XAR_VVV2_CRYPTO3_IMM6: - // xxxx|xxx|xx|xx|Rm=xxxxx|imm6=xxxxxx|Rn=xxxxx|Rd=xxxxx - ctx->Rm = (insword>>16)&0x1f; - ctx->imm6 = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SM3TT1A_VVV4_CRYPTO3_IMM2: - case ENC_SM3TT1B_VVV4_CRYPTO3_IMM2: - case ENC_SM3TT2A_VVV4_CRYPTO3_IMM2: - case ENC_SM3TT2B_VVV_CRYPTO3_IMM2: - // xxxx|xxx|xx|xx|Rm=xxxxx|xx|imm2=xx|opcode=xx|Rn=xxxxx|Rd=xxxxx - ctx->Rm = (insword>>16)&0x1f; - ctx->imm2 = (insword>>12)&3; - ctx->opcode = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_RAX1_VVV2_CRYPTOSHA512_3: - case ENC_SHA512H2_QQV_CRYPTOSHA512_3: - case ENC_SHA512H_QQV_CRYPTOSHA512_3: - case ENC_SHA512SU1_VVV2_CRYPTOSHA512_3: - case ENC_SM3PARTW1_VVV4_CRYPTOSHA512_3: - case ENC_SM3PARTW2_VVV4_CRYPTOSHA512_3: - case ENC_SM4EKEY_VVV4_CRYPTOSHA512_3: - // xxxx|xxx|xx|xx|Rm=xxxxx|x|O=x|xx|opcode=xx|Rn=xxxxx|Rd=xxxxx - ctx->Rm = (insword>>16)&0x1f; - ctx->O = (insword>>14)&1; - ctx->opcode = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SHA1H_SS_CRYPTOSHA2: - case ENC_SHA1SU1_VV_CRYPTOSHA2: - case ENC_SHA256SU0_VV_CRYPTOSHA2: - // xxxx|xxx|x|size=xx|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_AESD_B_CRYPTOAES: - case ENC_AESE_B_CRYPTOAES: - case ENC_AESIMC_B_CRYPTOAES: - case ENC_AESMC_B_CRYPTOAES: - // xxxx|xxx|x|size=xx|xxxxx|xxxx|D=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->D = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SHA1C_QSV_CRYPTOSHA3: - case ENC_SHA1M_QSV_CRYPTOSHA3: - case ENC_SHA1P_QSV_CRYPTOSHA3: - case ENC_SHA1SU0_VVV_CRYPTOSHA3: - case ENC_SHA256SU1_VVV_CRYPTOSHA3: - // xxxx|xxx|x|size=xx|x|Rm=xxxxx|x|opcode=xxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>12)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SHA256H2_QQV_CRYPTOSHA3: - case ENC_SHA256H_QQV_CRYPTOSHA3: - // xxxx|xxx|x|size=xx|x|Rm=xxxxx|x|xx|P=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->P = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_GCSSTR_64_LDST_GCS: - case ENC_GCSSTTR_64_LDST_GCS: - // xxxx|x|x|x|xxxxxxxxxx|opc=xxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->opc = (insword>>12)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDG_64LOFFSET_LDSTTAGS: - case ENC_LDGM_64BULK_LDSTTAGS: - case ENC_ST2G_64SPOST_LDSTTAGS: - case ENC_ST2G_64SPRE_LDSTTAGS: - case ENC_ST2G_64SOFFSET_LDSTTAGS: - case ENC_STG_64SPOST_LDSTTAGS: - case ENC_STG_64SPRE_LDSTTAGS: - case ENC_STG_64SOFFSET_LDSTTAGS: - case ENC_STGM_64BULK_LDSTTAGS: - case ENC_STZ2G_64SPOST_LDSTTAGS: - case ENC_STZ2G_64SPRE_LDSTTAGS: - case ENC_STZ2G_64SOFFSET_LDSTTAGS: - case ENC_STZG_64SPOST_LDSTTAGS: - case ENC_STZG_64SPRE_LDSTTAGS: - case ENC_STZG_64SOFFSET_LDSTTAGS: - case ENC_STZGM_64BULK_LDSTTAGS: - // xxxx|x|x|x|x|opc=xx|x|imm9=xxxxxxxxx|op2=xx|Rn=xxxxx|Rt=xxxxx - ctx->opc = (insword>>22)&3; - ctx->imm9 = (insword>>12)&0x1ff; - ctx->op2 = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LD1B_Z_P_BR_U8: - case ENC_LD1B_Z_P_BR_U16: - case ENC_LD1B_Z_P_BR_U32: - case ENC_LD1B_Z_P_BR_U64: - case ENC_LD1D_Z_P_BR_U64: - case ENC_LD1H_Z_P_BR_U16: - case ENC_LD1H_Z_P_BR_U32: - case ENC_LD1H_Z_P_BR_U64: - case ENC_LD1SB_Z_P_BR_S16: - case ENC_LD1SB_Z_P_BR_S32: - case ENC_LD1SB_Z_P_BR_S64: - case ENC_LD1SH_Z_P_BR_S32: - case ENC_LD1SH_Z_P_BR_S64: - case ENC_LD1SW_Z_P_BR_S64: - case ENC_LD1W_Z_P_BR_U32: - case ENC_LD1W_Z_P_BR_U64: - case ENC_LDFF1B_Z_P_BR_U8: - case ENC_LDFF1B_Z_P_BR_U16: - case ENC_LDFF1B_Z_P_BR_U32: - case ENC_LDFF1B_Z_P_BR_U64: - case ENC_LDFF1D_Z_P_BR_U64: - case ENC_LDFF1H_Z_P_BR_U16: - case ENC_LDFF1H_Z_P_BR_U32: - case ENC_LDFF1H_Z_P_BR_U64: - case ENC_LDFF1SB_Z_P_BR_S16: - case ENC_LDFF1SB_Z_P_BR_S32: - case ENC_LDFF1SB_Z_P_BR_S64: - case ENC_LDFF1SH_Z_P_BR_S32: - case ENC_LDFF1SH_Z_P_BR_S64: - case ENC_LDFF1SW_Z_P_BR_S64: - case ENC_LDFF1W_Z_P_BR_U32: - case ENC_LDFF1W_Z_P_BR_U64: - // xxx|xxxx|dtype=xxxx|Rm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->dtype = (insword>>21)&15; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1B_Z_P_BI_U8: - case ENC_LD1B_Z_P_BI_U16: - case ENC_LD1B_Z_P_BI_U32: - case ENC_LD1B_Z_P_BI_U64: - case ENC_LD1D_Z_P_BI_U64: - case ENC_LD1H_Z_P_BI_U16: - case ENC_LD1H_Z_P_BI_U32: - case ENC_LD1H_Z_P_BI_U64: - case ENC_LD1SB_Z_P_BI_S16: - case ENC_LD1SB_Z_P_BI_S32: - case ENC_LD1SB_Z_P_BI_S64: - case ENC_LD1SH_Z_P_BI_S32: - case ENC_LD1SH_Z_P_BI_S64: - case ENC_LD1SW_Z_P_BI_S64: - case ENC_LD1W_Z_P_BI_U32: - case ENC_LD1W_Z_P_BI_U64: - case ENC_LDNF1B_Z_P_BI_U8: - case ENC_LDNF1B_Z_P_BI_U16: - case ENC_LDNF1B_Z_P_BI_U32: - case ENC_LDNF1B_Z_P_BI_U64: - case ENC_LDNF1D_Z_P_BI_U64: - case ENC_LDNF1H_Z_P_BI_U16: - case ENC_LDNF1H_Z_P_BI_U32: - case ENC_LDNF1H_Z_P_BI_U64: - case ENC_LDNF1SB_Z_P_BI_S16: - case ENC_LDNF1SB_Z_P_BI_S32: - case ENC_LDNF1SB_Z_P_BI_S64: - case ENC_LDNF1SH_Z_P_BI_S32: - case ENC_LDNF1SH_Z_P_BI_S64: - case ENC_LDNF1SW_Z_P_BI_S64: - case ENC_LDNF1W_Z_P_BI_U32: - case ENC_LDNF1W_Z_P_BI_U64: - // xxx|xxxx|dtype=xxxx|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->dtype = (insword>>21)&15; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1D_Z_P_BR_U128: - case ENC_LD1W_Z_P_BR_U128: - // xxx|xxxx|dtype=xx|xx|Rm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->dtype = (insword>>23)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1D_Z_P_BI_U128: - case ENC_LD1W_Z_P_BI_U128: - // xxx|xxxx|dtype=xx|xx|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->dtype = (insword>>23)&3; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1RB_Z_P_BI_U8: - case ENC_LD1RB_Z_P_BI_U16: - case ENC_LD1RB_Z_P_BI_U32: - case ENC_LD1RB_Z_P_BI_U64: - case ENC_LD1RD_Z_P_BI_U64: - case ENC_LD1RH_Z_P_BI_U16: - case ENC_LD1RH_Z_P_BI_U32: - case ENC_LD1RH_Z_P_BI_U64: - case ENC_LD1RSB_Z_P_BI_S16: - case ENC_LD1RSB_Z_P_BI_S32: - case ENC_LD1RSB_Z_P_BI_S64: - case ENC_LD1RSH_Z_P_BI_S32: - case ENC_LD1RSH_Z_P_BI_S64: - case ENC_LD1RSW_Z_P_BI_S64: - case ENC_LD1RW_Z_P_BI_U32: - case ENC_LD1RW_Z_P_BI_U64: - // xxx|xxxx|dtypeh=xx|x|imm6=xxxxxx|x|dtypel=xx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->dtypeh = (insword>>23)&3; - ctx->imm6 = (insword>>16)&0x3f; - ctx->dtypel = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD2B_Z_P_BR_CONTIGUOUS: - case ENC_LD2D_Z_P_BR_CONTIGUOUS: - case ENC_LD2H_Z_P_BR_CONTIGUOUS: - case ENC_LD2W_Z_P_BR_CONTIGUOUS: - case ENC_LD3B_Z_P_BR_CONTIGUOUS: - case ENC_LD3D_Z_P_BR_CONTIGUOUS: - case ENC_LD3H_Z_P_BR_CONTIGUOUS: - case ENC_LD3W_Z_P_BR_CONTIGUOUS: - case ENC_LD4B_Z_P_BR_CONTIGUOUS: - case ENC_LD4D_Z_P_BR_CONTIGUOUS: - case ENC_LD4H_Z_P_BR_CONTIGUOUS: - case ENC_LD4W_Z_P_BR_CONTIGUOUS: - case ENC_ST2B_Z_P_BR_CONTIGUOUS: - case ENC_ST2D_Z_P_BR_CONTIGUOUS: - case ENC_ST2H_Z_P_BR_CONTIGUOUS: - case ENC_ST2W_Z_P_BR_CONTIGUOUS: - case ENC_ST3B_Z_P_BR_CONTIGUOUS: - case ENC_ST3D_Z_P_BR_CONTIGUOUS: - case ENC_ST3H_Z_P_BR_CONTIGUOUS: - case ENC_ST3W_Z_P_BR_CONTIGUOUS: - case ENC_ST4B_Z_P_BR_CONTIGUOUS: - case ENC_ST4D_Z_P_BR_CONTIGUOUS: - case ENC_ST4H_Z_P_BR_CONTIGUOUS: - case ENC_ST4W_Z_P_BR_CONTIGUOUS: - // xxx|xxxx|msz=xx|opc=xx|Rm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->opc = (insword>>21)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD2B_Z_P_BI_CONTIGUOUS: - case ENC_LD2D_Z_P_BI_CONTIGUOUS: - case ENC_LD2H_Z_P_BI_CONTIGUOUS: - case ENC_LD2W_Z_P_BI_CONTIGUOUS: - case ENC_LD3B_Z_P_BI_CONTIGUOUS: - case ENC_LD3D_Z_P_BI_CONTIGUOUS: - case ENC_LD3H_Z_P_BI_CONTIGUOUS: - case ENC_LD3W_Z_P_BI_CONTIGUOUS: - case ENC_LD4B_Z_P_BI_CONTIGUOUS: - case ENC_LD4D_Z_P_BI_CONTIGUOUS: - case ENC_LD4H_Z_P_BI_CONTIGUOUS: - case ENC_LD4W_Z_P_BI_CONTIGUOUS: - case ENC_ST1D_Z_P_BI_: - case ENC_ST1D_Z_P_BI_U128: - case ENC_ST1W_Z_P_BI_U128: - case ENC_ST2B_Z_P_BI_CONTIGUOUS: - case ENC_ST2D_Z_P_BI_CONTIGUOUS: - case ENC_ST2H_Z_P_BI_CONTIGUOUS: - case ENC_ST2W_Z_P_BI_CONTIGUOUS: - case ENC_ST3B_Z_P_BI_CONTIGUOUS: - case ENC_ST3D_Z_P_BI_CONTIGUOUS: - case ENC_ST3H_Z_P_BI_CONTIGUOUS: - case ENC_ST3W_Z_P_BI_CONTIGUOUS: - case ENC_ST4B_Z_P_BI_CONTIGUOUS: - case ENC_ST4D_Z_P_BI_CONTIGUOUS: - case ENC_ST4H_Z_P_BI_CONTIGUOUS: - case ENC_ST4W_Z_P_BI_CONTIGUOUS: - // xxx|xxxx|msz=xx|opc=xx|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->opc = (insword>>21)&3; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST1B_Z_P_BI_: - case ENC_ST1H_Z_P_BI_: - // xxx|xxxx|msz=xx|size=xx|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->size = (insword>>21)&3; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1ROB_Z_P_BR_CONTIGUOUS: - case ENC_LD1ROD_Z_P_BR_CONTIGUOUS: - case ENC_LD1ROH_Z_P_BR_CONTIGUOUS: - case ENC_LD1ROW_Z_P_BR_CONTIGUOUS: - case ENC_LD1RQB_Z_P_BR_CONTIGUOUS: - case ENC_LD1RQD_Z_P_BR_CONTIGUOUS: - case ENC_LD1RQH_Z_P_BR_CONTIGUOUS: - case ENC_LD1RQW_Z_P_BR_CONTIGUOUS: - // xxx|xxxx|msz=xx|ssz=xx|Rm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->ssz = (insword>>21)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1ROB_Z_P_BI_U8: - case ENC_LD1ROD_Z_P_BI_U64: - case ENC_LD1ROH_Z_P_BI_U16: - case ENC_LD1ROW_Z_P_BI_U32: - case ENC_LD1RQB_Z_P_BI_U8: - case ENC_LD1RQD_Z_P_BI_U64: - case ENC_LD1RQH_Z_P_BI_U16: - case ENC_LD1RQW_Z_P_BI_U32: - // xxx|xxxx|msz=xx|ssz=xx|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->ssz = (insword>>21)&3; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1B_Z_P_BZ_D_X32_UNSCALED: - case ENC_LD1D_Z_P_BZ_D_X32_UNSCALED: - case ENC_LD1H_Z_P_BZ_D_X32_UNSCALED: - case ENC_LD1SB_Z_P_BZ_D_X32_UNSCALED: - case ENC_LD1SH_Z_P_BZ_D_X32_UNSCALED: - case ENC_LD1SW_Z_P_BZ_D_X32_UNSCALED: - case ENC_LD1W_Z_P_BZ_D_X32_UNSCALED: - case ENC_LDFF1B_Z_P_BZ_D_X32_UNSCALED: - case ENC_LDFF1D_Z_P_BZ_D_X32_UNSCALED: - case ENC_LDFF1H_Z_P_BZ_D_X32_UNSCALED: - case ENC_LDFF1SB_Z_P_BZ_D_X32_UNSCALED: - case ENC_LDFF1SH_Z_P_BZ_D_X32_UNSCALED: - case ENC_LDFF1SW_Z_P_BZ_D_X32_UNSCALED: - case ENC_LDFF1W_Z_P_BZ_D_X32_UNSCALED: - // xxx|xxxx|msz=xx|xs=x|x|Zm=xxxxx|x|U=x|ff=x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->xs = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>14)&1; - ctx->ff = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LDNT1B_Z_P_BR_CONTIGUOUS: - case ENC_LDNT1D_Z_P_BR_CONTIGUOUS: - case ENC_LDNT1H_Z_P_BR_CONTIGUOUS: - case ENC_LDNT1W_Z_P_BR_CONTIGUOUS: - case ENC_STNT1B_Z_P_BR_CONTIGUOUS: - case ENC_STNT1D_Z_P_BR_CONTIGUOUS: - case ENC_STNT1H_Z_P_BR_CONTIGUOUS: - case ENC_STNT1W_Z_P_BR_CONTIGUOUS: - // xxx|xxxx|msz=xx|xx|Rm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_PRFB_I_P_BR_S: - case ENC_PRFD_I_P_BR_S: - case ENC_PRFH_I_P_BR_S: - case ENC_PRFW_I_P_BR_S: - // xxx|xxxx|msz=xx|xx|Rm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|x|prfop=xxxx - ctx->msz = (insword>>23)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->prfop = insword&15; - break; - case ENC_LDNT1B_Z_P_AR_S_X32_UNSCALED: - case ENC_LDNT1H_Z_P_AR_S_X32_UNSCALED: - case ENC_LDNT1SB_Z_P_AR_S_X32_UNSCALED: - case ENC_LDNT1SH_Z_P_AR_S_X32_UNSCALED: - case ENC_LDNT1W_Z_P_AR_S_X32_UNSCALED: - // xxx|xxxx|msz=xx|xx|Rm=xxxxx|xx|U=x|Pg=xxx|Zn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->U = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LDNT1B_Z_P_AR_D_64_UNSCALED: - case ENC_LDNT1D_Z_P_AR_D_64_UNSCALED: - case ENC_LDNT1H_Z_P_AR_D_64_UNSCALED: - case ENC_LDNT1SB_Z_P_AR_D_64_UNSCALED: - case ENC_LDNT1SH_Z_P_AR_D_64_UNSCALED: - case ENC_LDNT1SW_Z_P_AR_D_64_UNSCALED: - case ENC_LDNT1W_Z_P_AR_D_64_UNSCALED: - // xxx|xxxx|msz=xx|xx|Rm=xxxxx|x|U=x|x|Pg=xxx|Zn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->U = (insword>>14)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST1B_Z_P_BZ_D_64_UNSCALED: - case ENC_ST1D_Z_P_BZ_D_64_SCALED: - case ENC_ST1D_Z_P_BZ_D_64_UNSCALED: - case ENC_ST1H_Z_P_BZ_D_64_SCALED: - case ENC_ST1H_Z_P_BZ_D_64_UNSCALED: - case ENC_ST1W_Z_P_BZ_D_64_SCALED: - case ENC_ST1W_Z_P_BZ_D_64_UNSCALED: - // xxx|xxxx|msz=xx|xx|Zm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1B_Z_P_BZ_D_64_UNSCALED: - case ENC_LD1D_Z_P_BZ_D_64_UNSCALED: - case ENC_LD1H_Z_P_BZ_D_64_UNSCALED: - case ENC_LD1SB_Z_P_BZ_D_64_UNSCALED: - case ENC_LD1SH_Z_P_BZ_D_64_UNSCALED: - case ENC_LD1SW_Z_P_BZ_D_64_UNSCALED: - case ENC_LD1W_Z_P_BZ_D_64_UNSCALED: - case ENC_LDFF1B_Z_P_BZ_D_64_UNSCALED: - case ENC_LDFF1D_Z_P_BZ_D_64_UNSCALED: - case ENC_LDFF1H_Z_P_BZ_D_64_UNSCALED: - case ENC_LDFF1SB_Z_P_BZ_D_64_UNSCALED: - case ENC_LDFF1SH_Z_P_BZ_D_64_UNSCALED: - case ENC_LDFF1SW_Z_P_BZ_D_64_UNSCALED: - case ENC_LDFF1W_Z_P_BZ_D_64_UNSCALED: - // xxx|xxxx|msz=xx|xx|Zm=xxxxx|x|U=x|ff=x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>14)&1; - ctx->ff = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST1B_Z_P_BZ_D_X32_UNSCALED: - case ENC_ST1B_Z_P_BZ_S_X32_UNSCALED: - case ENC_ST1D_Z_P_BZ_D_X32_SCALED: - case ENC_ST1D_Z_P_BZ_D_X32_UNSCALED: - case ENC_ST1H_Z_P_BZ_S_X32_SCALED: - case ENC_ST1H_Z_P_BZ_D_X32_SCALED: - case ENC_ST1H_Z_P_BZ_D_X32_UNSCALED: - case ENC_ST1H_Z_P_BZ_S_X32_UNSCALED: - case ENC_ST1W_Z_P_BZ_S_X32_SCALED: - case ENC_ST1W_Z_P_BZ_D_X32_SCALED: - case ENC_ST1W_Z_P_BZ_D_X32_UNSCALED: - case ENC_ST1W_Z_P_BZ_S_X32_UNSCALED: - // xxx|xxxx|msz=xx|xx|Zm=xxxxx|x|xs=x|x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->xs = (insword>>14)&1; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST1B_Z_P_AI_S: - case ENC_ST1B_Z_P_AI_D: - case ENC_ST1D_Z_P_AI_D: - case ENC_ST1H_Z_P_AI_S: - case ENC_ST1H_Z_P_AI_D: - case ENC_ST1W_Z_P_AI_S: - case ENC_ST1W_Z_P_AI_D: - // xxx|xxxx|msz=xx|xx|imm5=xxxxx|xxx|Pg=xxx|Zn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->imm5 = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_PRFB_I_P_AI_S: - case ENC_PRFB_I_P_AI_D: - case ENC_PRFD_I_P_AI_S: - case ENC_PRFD_I_P_AI_D: - case ENC_PRFH_I_P_AI_S: - case ENC_PRFH_I_P_AI_D: - case ENC_PRFW_I_P_AI_S: - case ENC_PRFW_I_P_AI_D: - // xxx|xxxx|msz=xx|xx|imm5=xxxxx|xxx|Pg=xxx|Zn=xxxxx|x|prfop=xxxx - ctx->msz = (insword>>23)&3; - ctx->imm5 = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->prfop = insword&15; - break; - case ENC_LD1B_Z_P_AI_S: - case ENC_LD1B_Z_P_AI_D: - case ENC_LD1D_Z_P_AI_D: - case ENC_LD1H_Z_P_AI_S: - case ENC_LD1H_Z_P_AI_D: - case ENC_LD1SB_Z_P_AI_S: - case ENC_LD1SB_Z_P_AI_D: - case ENC_LD1SH_Z_P_AI_S: - case ENC_LD1SH_Z_P_AI_D: - case ENC_LD1SW_Z_P_AI_D: - case ENC_LD1W_Z_P_AI_S: - case ENC_LD1W_Z_P_AI_D: - case ENC_LDFF1B_Z_P_AI_S: - case ENC_LDFF1B_Z_P_AI_D: - case ENC_LDFF1D_Z_P_AI_D: - case ENC_LDFF1H_Z_P_AI_S: - case ENC_LDFF1H_Z_P_AI_D: - case ENC_LDFF1SB_Z_P_AI_S: - case ENC_LDFF1SB_Z_P_AI_D: - case ENC_LDFF1SH_Z_P_AI_S: - case ENC_LDFF1SH_Z_P_AI_D: - case ENC_LDFF1SW_Z_P_AI_D: - case ENC_LDFF1W_Z_P_AI_S: - case ENC_LDFF1W_Z_P_AI_D: - // xxx|xxxx|msz=xx|xx|imm5=xxxxx|x|U=x|ff=x|Pg=xxx|Zn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->imm5 = (insword>>16)&0x1f; - ctx->U = (insword>>14)&1; - ctx->ff = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LDNT1B_Z_P_BI_CONTIGUOUS: - case ENC_LDNT1D_Z_P_BI_CONTIGUOUS: - case ENC_LDNT1H_Z_P_BI_CONTIGUOUS: - case ENC_LDNT1W_Z_P_BI_CONTIGUOUS: - case ENC_STNT1B_Z_P_BI_CONTIGUOUS: - case ENC_STNT1D_Z_P_BI_CONTIGUOUS: - case ENC_STNT1H_Z_P_BI_CONTIGUOUS: - case ENC_STNT1W_Z_P_BI_CONTIGUOUS: - // xxx|xxxx|msz=xx|xx|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST1W_Z_P_BI_: - // xxx|xxxx|msz=xx|x|sz=x|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->sz = (insword>>21)&1; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_STNT1B_Z_P_AR_S_X32_UNSCALED: - case ENC_STNT1B_Z_P_AR_D_64_UNSCALED: - case ENC_STNT1D_Z_P_AR_D_64_UNSCALED: - case ENC_STNT1H_Z_P_AR_S_X32_UNSCALED: - case ENC_STNT1H_Z_P_AR_D_64_UNSCALED: - case ENC_STNT1W_Z_P_AR_S_X32_UNSCALED: - case ENC_STNT1W_Z_P_AR_D_64_UNSCALED: - // xxx|xxxx|msz=xx|x|x|Rm=xxxxx|xxx|Pg=xxx|Zn=xxxxx|Zt=xxxxx - ctx->msz = (insword>>23)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD2Q_Z_P_BR_CONTIGUOUS: - case ENC_LD3Q_Z_P_BR_CONTIGUOUS: - case ENC_LD4Q_Z_P_BR_CONTIGUOUS: - // xxx|xxxx|num=xx|xx|Rm=xxxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->num = (insword>>23)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD2Q_Z_P_BI_CONTIGUOUS: - case ENC_LD3Q_Z_P_BI_CONTIGUOUS: - case ENC_LD4Q_Z_P_BI_CONTIGUOUS: - // xxx|xxxx|num=xx|xx|x|imm4=xxxx|xxx|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->num = (insword>>23)&3; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST1D_Z_P_BR_: - case ENC_ST1D_Z_P_BR_U128: - case ENC_ST1W_Z_P_BR_U128: - // xxx|xxxx|opc=xxx|o2=x|Rm=xxxxx|x|x|x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->opc = (insword>>22)&7; - ctx->o2 = (insword>>21)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST1W_Z_P_BR_: - // xxx|xxxx|opc=xxx|sz=x|Rm=xxxxx|x|x|x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->opc = (insword>>22)&7; - ctx->sz = (insword>>21)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1B_Z_P_BZ_S_X32_UNSCALED: - case ENC_LD1D_Z_P_BZ_D_X32_SCALED: - case ENC_LD1H_Z_P_BZ_D_X32_SCALED: - case ENC_LD1H_Z_P_BZ_S_X32_UNSCALED: - case ENC_LD1SB_Z_P_BZ_S_X32_UNSCALED: - case ENC_LD1SH_Z_P_BZ_D_X32_SCALED: - case ENC_LD1SH_Z_P_BZ_S_X32_UNSCALED: - case ENC_LD1SW_Z_P_BZ_D_X32_SCALED: - case ENC_LD1W_Z_P_BZ_D_X32_SCALED: - case ENC_LD1W_Z_P_BZ_S_X32_UNSCALED: - case ENC_LDFF1B_Z_P_BZ_S_X32_UNSCALED: - case ENC_LDFF1D_Z_P_BZ_D_X32_SCALED: - case ENC_LDFF1H_Z_P_BZ_D_X32_SCALED: - case ENC_LDFF1H_Z_P_BZ_S_X32_UNSCALED: - case ENC_LDFF1SB_Z_P_BZ_S_X32_UNSCALED: - case ENC_LDFF1SH_Z_P_BZ_D_X32_SCALED: - case ENC_LDFF1SH_Z_P_BZ_S_X32_UNSCALED: - case ENC_LDFF1SW_Z_P_BZ_D_X32_SCALED: - case ENC_LDFF1W_Z_P_BZ_D_X32_SCALED: - case ENC_LDFF1W_Z_P_BZ_S_X32_UNSCALED: - // xxx|xxxx|opc=xx|xs=x|x|Zm=xxxxx|x|U=x|ff=x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->opc = (insword>>23)&3; - ctx->xs = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>14)&1; - ctx->ff = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1D_Z_P_BZ_D_64_SCALED: - case ENC_LD1H_Z_P_BZ_D_64_SCALED: - case ENC_LD1SH_Z_P_BZ_D_64_SCALED: - case ENC_LD1SW_Z_P_BZ_D_64_SCALED: - case ENC_LD1W_Z_P_BZ_D_64_SCALED: - case ENC_LDFF1D_Z_P_BZ_D_64_SCALED: - case ENC_LDFF1H_Z_P_BZ_D_64_SCALED: - case ENC_LDFF1SH_Z_P_BZ_D_64_SCALED: - case ENC_LDFF1SW_Z_P_BZ_D_64_SCALED: - case ENC_LDFF1W_Z_P_BZ_D_64_SCALED: - // xxx|xxxx|opc=xx|xx|Zm=xxxxx|x|U=x|ff=x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->opc = (insword>>23)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>14)&1; - ctx->ff = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_SDOT_Z32_ZZZ_: - case ENC_UDOT_Z32_ZZZ_: - // xxx|xxxx|xxxx|Zm=xxxxx|xxxxx|U=x|Zn=xxxxx|Zda=xxxxx - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SDOT_Z32_ZZZI_: - case ENC_UDOT_Z32_ZZZI_: - // xxx|xxxx|xxxx|i2=xx|Zm=xxx|xxxxx|U=x|Zn=xxxxx|Zda=xxxxx - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_STR_Z_BI_: - // xxx|xxxx|xxx|imm9h=xxxxxx|x|x|x|imm9l=xxx|Rn=xxxxx|Zt=xxxxx - ctx->imm9h = (insword>>16)&0x3f; - ctx->imm9l = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_STR_P_BI_: - // xxx|xxxx|xxx|imm9h=xxxxxx|x|x|x|imm9l=xxx|Rn=xxxxx|x|Pt=xxxx - ctx->imm9h = (insword>>16)&0x3f; - ctx->imm9l = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Pt = insword&15; - break; - case ENC_ST1Q_Z_P_AR_D_64_UNSCALED: - // xxx|xxxx|xxx|x|Rm=xxxxx|xxx|Pg=xxx|Zn=xxxxx|Zt=xxxxx - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_BFMMLA_Z_ZZZ_H: - case ENC_FMMLA_Z16_ZZ8Z8_: - case ENC_FMMLA_Z32_ZZ8Z8_: - case ENC_FMMLA_Z_ZZZ_H: - // xxx|xxxx|xx|op=x|x|Zm=xxxxx|xxxxxx|Zn=xxxxx|Zda=xxxxx - ctx->op = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_ST1B_Z_P_BR_: - case ENC_ST1H_Z_P_BR_: - // xxx|xxxx|xx|size=xx|Rm=xxxxx|x|x|x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->size = (insword>>21)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LD1H_Z_P_BZ_S_X32_SCALED: - case ENC_LD1SH_Z_P_BZ_S_X32_SCALED: - case ENC_LD1W_Z_P_BZ_S_X32_SCALED: - case ENC_LDFF1H_Z_P_BZ_S_X32_SCALED: - case ENC_LDFF1SH_Z_P_BZ_S_X32_SCALED: - case ENC_LDFF1W_Z_P_BZ_S_X32_SCALED: - // xxx|xxxx|xx|xs=x|x|Zm=xxxxx|x|U=x|ff=x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->xs = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>14)&1; - ctx->ff = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_PRFB_I_P_BZ_S_X32_SCALED: - case ENC_PRFB_I_P_BZ_D_X32_SCALED: - case ENC_PRFD_I_P_BZ_S_X32_SCALED: - case ENC_PRFD_I_P_BZ_D_X32_SCALED: - case ENC_PRFH_I_P_BZ_S_X32_SCALED: - case ENC_PRFH_I_P_BZ_D_X32_SCALED: - case ENC_PRFW_I_P_BZ_S_X32_SCALED: - case ENC_PRFW_I_P_BZ_D_X32_SCALED: - // xxx|xxxx|xx|xs=x|x|Zm=xxxxx|x|msz=xx|Pg=xxx|Rn=xxxxx|x|prfop=xxxx - ctx->xs = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->msz = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->prfop = insword&15; - break; - case ENC_LD1Q_Z_P_AR_D_64_UNSCALED: - // xxx|xxxx|xx|xx|Rm=xxxxx|xxx|Pg=xxx|Zn=xxxxx|Zt=xxxxx - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_PRFB_I_P_BZ_D_64_SCALED: - case ENC_PRFD_I_P_BZ_D_64_SCALED: - case ENC_PRFH_I_P_BZ_D_64_SCALED: - case ENC_PRFW_I_P_BZ_D_64_SCALED: - // xxx|xxxx|xx|xx|Zm=xxxxx|x|msz=xx|Pg=xxx|Rn=xxxxx|x|prfop=xxxx - ctx->Zm = (insword>>16)&0x1f; - ctx->msz = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->prfop = insword&15; - break; - case ENC_PRFB_I_P_BI_S: - case ENC_PRFD_I_P_BI_S: - case ENC_PRFH_I_P_BI_S: - case ENC_PRFW_I_P_BI_S: - // xxx|xxxx|xx|x|imm6=xxxxxx|x|msz=xx|Pg=xxx|Rn=xxxxx|x|prfop=xxxx - ctx->imm6 = (insword>>16)&0x3f; - ctx->msz = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->prfop = insword&15; - break; - case ENC_LDR_Z_BI_: - // xxx|xxxx|xx|x|imm9h=xxxxxx|xxx|imm9l=xxx|Rn=xxxxx|Zt=xxxxx - ctx->imm9h = (insword>>16)&0x3f; - ctx->imm9l = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_LDR_P_BI_: - // xxx|xxxx|xx|x|imm9h=xxxxxx|xxx|imm9l=xxx|Rn=xxxxx|x|Pt=xxxx - ctx->imm9h = (insword>>16)&0x3f; - ctx->imm9l = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Pt = insword&15; - break; - case ENC_TRN1_Z_ZZ_Q: - case ENC_TRN2_Z_ZZ_Q: - case ENC_UZP1_Z_ZZ_Q: - case ENC_UZP2_Z_ZZ_Q: - case ENC_ZIP2_Z_ZZ_Q: - case ENC_ZIP1_Z_ZZ_Q: - // xxx|xxxx|xx|x|x|Zm=xxxxx|xxx|opc=xx|H=x|Zn=xxxxx|Zd=xxxxx - ctx->Zm = (insword>>16)&0x1f; - ctx->opc = (insword>>11)&3; - ctx->H = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_EXT_Z_ZI_DES: - // xxx|xxxx|xx|x|x|imm8h=xxxxx|xxx|imm8l=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->imm8h = (insword>>16)&0x1f; - ctx->imm8l = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_EXT_Z_ZI_CON: - // xxx|xxxx|xx|x|x|imm8h=xxxxx|xxx|imm8l=xxx|Zn=xxxxx|Zd=xxxxx - ctx->imm8h = (insword>>16)&0x1f; - ctx->imm8l = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_BRKA_P_P_P_: - case ENC_BRKAS_P_P_P_Z: - case ENC_BRKB_P_P_P_: - case ENC_BRKBS_P_P_P_Z: - // xxx|xxxx|x|B=x|S=x|xx|xxxx|xx|Pg=xxxx|x|Pn=xxxx|M=x|Pd=xxxx - ctx->B = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->Pg = (insword>>10)&15; - ctx->Pn = (insword>>5)&15; - ctx->M = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_FMLALB_Z_Z8Z8Z8I_: - case ENC_FMLALT_Z_Z8Z8Z8I_: - // xxx|xxxx|x|T=x|xx|i4h=xx|Zm=xxx|xxxx|i4l=xx|Zn=xxxxx|Zda=xxxxx - ctx->T = (insword>>23)&1; - ctx->i4h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->i4l = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FMLALLBB_Z32_Z8Z8Z8I_: - case ENC_FMLALLBT_Z32_Z8Z8Z8I_: - case ENC_FMLALLTB_Z32_Z8Z8Z8I_: - case ENC_FMLALLTT_Z32_Z8Z8Z8I_: - // xxx|xxxx|x|TT=xx|x|i4h=xx|Zm=xxx|xxxx|i4l=xx|Zn=xxxxx|Zda=xxxxx - ctx->TT = (insword>>22)&3; - ctx->i4h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->i4l = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_PSEL_P_PPI_: - // xxx|xxxx|x|i1=x|tszh=x|x|tszl=xxx|Rv=xx|xx|Pn=xxxx|S=x|Pm=xxxx|x|Pd=xxxx - ctx->i1 = (insword>>23)&1; - ctx->tszh = (insword>>22)&1; - ctx->tszl = (insword>>18)&7; - ctx->Rv = (insword>>16)&3; - ctx->Pn = (insword>>10)&15; - ctx->S = (insword>>9)&1; - ctx->Pm = (insword>>5)&15; - ctx->Pd = insword&15; - break; - case ENC_LUTI4_Z_ZZ_8: - case ENC_LUTI6_Z_ZZZ_16: - // xxx|xxxx|x|i1=x|x|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxxx - ctx->i1 = (insword>>23)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_LUTI2_Z_ZZ_8: - // xxx|xxxx|x|i2=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxxx - ctx->i2 = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_LUTI4_Z_ZZ_2X16: - case ENC_LUTI4_Z_ZZ_1X16: - // xxx|xxxx|x|i2=xx|x|Zm=xxxxx|xxx|x|op=x|x|Zn=xxxxx|Zd=xxxxx - ctx->i2 = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>11)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_LUTI2_Z_ZZ_16: - // xxx|xxxx|x|i3h=xx|x|Zm=xxxxx|xxx|i3l=x|xx|Zn=xxxxx|Zd=xxxxx - ctx->i3h = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->i3l = (insword>>12)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_DUP_Z_ZI_: - // xxx|xxxx|x|imm2=xx|x|tsz=xxxxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->imm2 = (insword>>22)&3; - ctx->tsz = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_ST2Q_Z_P_BI_CONTIGUOUS: - case ENC_ST3Q_Z_P_BI_CONTIGUOUS: - case ENC_ST4Q_Z_P_BI_CONTIGUOUS: - // xxx|xxxx|x|num=xx|xx|imm4=xxxx|x|x|x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->num = (insword>>22)&3; - ctx->imm4 = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_ST2Q_Z_P_BR_CONTIGUOUS: - case ENC_ST3Q_Z_P_BR_CONTIGUOUS: - case ENC_ST4Q_Z_P_BR_CONTIGUOUS: - // xxx|xxxx|x|num=xx|x|Rm=xxxxx|x|x|x|Pg=xxx|Rn=xxxxx|Zt=xxxxx - ctx->num = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = insword&0x1f; - break; - case ENC_AND_P_P_PP_Z: - case ENC_ANDS_P_P_PP_Z: - case ENC_BIC_P_P_PP_Z: - case ENC_BICS_P_P_PP_Z: - case ENC_EOR_P_P_PP_Z: - case ENC_EORS_P_P_PP_Z: - case ENC_MOVZ_P_P_P__AND_P_P_PP_Z: - case ENC_MOV_P_P__ORR_P_P_PP_Z: - case ENC_MOVM_P_P_P__SEL_P_P_PP_: - case ENC_MOVZS_P_P_P__ANDS_P_P_PP_Z: - case ENC_MOVS_P_P__ORRS_P_P_PP_Z: - case ENC_NAND_P_P_PP_Z: - case ENC_NANDS_P_P_PP_Z: - case ENC_NOR_P_P_PP_Z: - case ENC_NORS_P_P_PP_Z: - case ENC_NOT_P_P_P_Z_EOR_P_P_PP_Z: - case ENC_NOTS_P_P_P_Z_EORS_P_P_PP_Z: - case ENC_ORN_P_P_PP_Z: - case ENC_ORNS_P_P_PP_Z: - case ENC_ORR_P_P_PP_Z: - case ENC_ORRS_P_P_PP_Z: - case ENC_SEL_P_P_PP_: - // xxx|xxxx|x|op=x|S=x|xx|Pm=xxxx|xx|Pg=xxxx|o2=x|Pn=xxxx|o3=x|Pd=xxxx - ctx->op = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->Pm = (insword>>16)&15; - ctx->Pg = (insword>>10)&15; - ctx->o2 = (insword>>9)&1; - ctx->Pn = (insword>>5)&15; - ctx->o3 = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_BRKPA_P_P_PP_: - case ENC_BRKPAS_P_P_PP_: - case ENC_BRKPB_P_P_PP_: - case ENC_BRKPBS_P_P_PP_: - // xxx|xxxx|x|op=x|S=x|xx|Pm=xxxx|xx|Pg=xxxx|x|Pn=xxxx|B=x|Pd=xxxx - ctx->op = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->Pm = (insword>>16)&15; - ctx->Pg = (insword>>10)&15; - ctx->Pn = (insword>>5)&15; - ctx->B = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_PTEST__P_P_: - // xxx|xxxx|x|op=x|S=x|xx|xxxx|xx|Pg=xxxx|x|Pn=xxxx|x|opc2=xxxx - ctx->op = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->Pg = (insword>>10)&15; - ctx->Pn = (insword>>5)&15; - ctx->opc2 = insword&15; - break; - case ENC_RDFFR_P_P_F_: - case ENC_RDFFRS_P_P_F_: - // xxx|xxxx|x|op=x|S=x|xx|xxxx|xx|xxx|xx|Pg=xxxx|x|Pd=xxxx - ctx->op = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->Pg = (insword>>5)&15; - ctx->Pd = insword&15; - break; - case ENC_PFIRST_P_P_P_: - // xxx|xxxx|x|op=x|S=x|xx|xxxx|xx|xxx|xx|Pg=xxxx|x|Pdn=xxxx - ctx->op = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->Pg = (insword>>5)&15; - ctx->Pdn = insword&15; - break; - case ENC_PFALSE_P_: - case ENC_RDFFR_P_F_: - // xxx|xxxx|x|op=x|S=x|xx|xxxx|xx|xxx|xx|xxxx|x|Pd=xxxx - ctx->op = (insword>>23)&1; - ctx->S = (insword>>22)&1; - ctx->Pd = insword&15; - break; - case ENC_CTERMEQ_RR_: - case ENC_CTERMNE_RR_: - // xxx|xxxx|x|op=x|sz=x|x|Rm=xxxxx|xx|xx|xx|Rn=xxxxx|ne=x|xxxx - ctx->op = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->ne = (insword>>4)&1; - break; - case ENC_BFCVTNT_Z_P_Z_S2BF: - case ENC_BFCVTNT_Z_P_Z_S2BFZ: - case ENC_FCVTLT_Z_P_Z_H2S: - case ENC_FCVTLT_Z_P_Z_H2SZ: - case ENC_FCVTLT_Z_P_Z_S2D: - case ENC_FCVTLT_Z_P_Z_S2DZ: - case ENC_FCVTNT_Z_P_Z_S2H: - case ENC_FCVTNT_Z_P_Z_S2HZ: - case ENC_FCVTNT_Z_P_Z_D2S: - case ENC_FCVTNT_Z_P_Z_D2SZ: - case ENC_FCVTXNT_Z_P_Z_D2S: - case ENC_FCVTXNT_Z_P_Z_D2SZ: - // xxx|xxxx|x|opc=xx|xxxx|opc2=xx|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->opc2 = (insword>>16)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_BFCVT_Z_P_Z_S2BFZ: - case ENC_FCVT_Z_P_Z_H2SZ: - case ENC_FCVT_Z_P_Z_H2DZ: - case ENC_FCVT_Z_P_Z_S2HZ: - case ENC_FCVT_Z_P_Z_S2DZ: - case ENC_FCVT_Z_P_Z_D2HZ: - case ENC_FCVT_Z_P_Z_D2SZ: - case ENC_FCVTX_Z_P_Z_D2SZ: - // xxx|xxxx|x|opc=xx|xxx|xxx|x|opc2=xx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->opc2 = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FCVTZS_Z_P_Z_FP162HZ: - case ENC_FCVTZS_Z_P_Z_FP162WZ: - case ENC_FCVTZS_Z_P_Z_FP162XZ: - case ENC_FCVTZS_Z_P_Z_S2WZ: - case ENC_FCVTZS_Z_P_Z_S2XZ: - case ENC_FCVTZS_Z_P_Z_D2WZ: - case ENC_FCVTZS_Z_P_Z_D2XZ: - case ENC_FCVTZU_Z_P_Z_FP162HZ: - case ENC_FCVTZU_Z_P_Z_FP162WZ: - case ENC_FCVTZU_Z_P_Z_FP162XZ: - case ENC_FCVTZU_Z_P_Z_S2WZ: - case ENC_FCVTZU_Z_P_Z_S2XZ: - case ENC_FCVTZU_Z_P_Z_D2WZ: - case ENC_FCVTZU_Z_P_Z_D2XZ: - case ENC_SCVTF_Z_P_Z_H2FP16Z: - case ENC_SCVTF_Z_P_Z_W2FP16Z: - case ENC_SCVTF_Z_P_Z_W2SZ: - case ENC_SCVTF_Z_P_Z_W2DZ: - case ENC_SCVTF_Z_P_Z_X2FP16Z: - case ENC_SCVTF_Z_P_Z_X2SZ: - case ENC_SCVTF_Z_P_Z_X2DZ: - case ENC_UCVTF_Z_P_Z_H2FP16Z: - case ENC_UCVTF_Z_P_Z_W2FP16Z: - case ENC_UCVTF_Z_P_Z_W2SZ: - case ENC_UCVTF_Z_P_Z_W2DZ: - case ENC_UCVTF_Z_P_Z_X2FP16Z: - case ENC_UCVTF_Z_P_Z_X2SZ: - case ENC_UCVTF_Z_P_Z_X2DZ: - // xxx|xxxx|x|opc=xx|xxx|xx|o2=x|x|o3=x|int_U=x|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->o2 = (insword>>16)&1; - ctx->o3 = (insword>>14)&1; - ctx->int_U = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FLOGB_Z_P_Z_Z: - // xxx|xxxx|x|opc=xx|xxx|xx|o2=x|x|size=xx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->o2 = (insword>>16)&1; - ctx->size = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FRINT32X_Z_P_Z_Z: - case ENC_FRINT32Z_Z_P_Z_Z: - case ENC_FRINT64X_Z_P_Z_Z: - case ENC_FRINT64Z_Z_P_Z_Z: - // xxx|xxxx|x|opc=xx|xxx|xx|o2=x|x|sz=x|U=x|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->o2 = (insword>>16)&1; - ctx->sz = (insword>>14)&1; - ctx->U = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_WRFFR_F_P_: - // xxx|xxxx|x|opc=xx|xxx|x|xx|xxxx|xxx|Pn=xxxx|xxxxx - ctx->opc = (insword>>22)&3; - ctx->Pn = (insword>>5)&15; - break; - case ENC_SETFFR_F_: - // xxx|xxxx|x|opc=xx|xxx|x|xx|xxxx|xxx|xxxx|xxxxx - ctx->opc = (insword>>22)&3; - break; - case ENC_AND_Z_ZI_: - case ENC_BIC_Z_ZI__AND_Z_ZI_: - case ENC_EON_Z_ZI__EOR_Z_ZI_: - case ENC_EOR_Z_ZI_: - case ENC_ORN_Z_ZI__ORR_Z_ZI_: - case ENC_ORR_Z_ZI_: - // xxx|xxxx|x|opc=xx|xx|xx|imm13=xxxxxxxxxxxxx|Zdn=xxxxx - ctx->opc = (insword>>22)&3; - ctx->imm13 = (insword>>5)&0x1fff; - ctx->Zdn = insword&0x1f; - break; - case ENC_BFMMLA_Z_ZZZ_: - case ENC_FMMLA_Z32_ZZZ_H: - case ENC_FMMLA_Z_ZZZ_S: - case ENC_FMMLA_Z_ZZZ_D: - // xxx|xxxx|x|opc=xx|x|Zm=xxxxx|xxxxxx|Zn=xxxxx|Zda=xxxxx - ctx->opc = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_ADR_Z_AZ_D_S32_SCALED: - case ENC_ADR_Z_AZ_D_U32_SCALED: - // xxx|xxxx|x|opc=xx|x|Zm=xxxxx|xxxx|msz=xx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->msz = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_MADPT_Z_ZZZ_: - // xxx|xxxx|x|opc=xx|x|Zm=xxxxx|xxxx|o2=x|x|Za=xxxxx|Zdn=xxxxx - ctx->opc = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->o2 = (insword>>11)&1; - ctx->Za = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_MLAPT_Z_ZZZ_: - // xxx|xxxx|x|opc=xx|x|Zm=xxxxx|xxxx|o2=x|x|Zn=xxxxx|Zda=xxxxx - ctx->opc = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->o2 = (insword>>11)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_AND_Z_ZZ_: - case ENC_BIC_Z_ZZ_: - case ENC_EOR_Z_ZZ_: - case ENC_MOV_Z_Z__ORR_Z_ZZ_: - case ENC_ORR_Z_ZZ_: - // xxx|xxxx|x|opc=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_BCAX_Z_ZZZ_: - case ENC_BSL1N_Z_ZZZ_: - case ENC_BSL2N_Z_ZZZ_: - case ENC_BSL_Z_ZZZ_: - case ENC_EOR3_Z_ZZZ_: - case ENC_NBSL_Z_ZZZ_: - // xxx|xxxx|x|opc=xx|x|Zm=xxxxx|xxx|xx|o2=x|Zk=xxxxx|Zdn=xxxxx - ctx->opc = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->o2 = (insword>>10)&1; - ctx->Zk = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_MOVPRFX_Z_Z_: - // xxx|xxxx|x|opc=xx|x|opc2=xxxxx|xxxx|xx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->opc2 = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_BFCVT_Z_P_Z_S2BF: - case ENC_FCVT_Z_P_Z_H2S: - case ENC_FCVT_Z_P_Z_H2D: - case ENC_FCVT_Z_P_Z_S2H: - case ENC_FCVT_Z_P_Z_S2D: - case ENC_FCVT_Z_P_Z_D2H: - case ENC_FCVT_Z_P_Z_D2S: - case ENC_FCVTX_Z_P_Z_D2S: - // xxx|xxxx|x|opc=xx|x|xxx|opc2=xx|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->opc2 = (insword>>16)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_PMOV_P_ZI_S: - // xxx|xxxx|x|opc=xx|x|xx|i2=xx|x|xxxxxx|Zn=xxxxx|x|Pd=xxxx - ctx->opc = (insword>>22)&3; - ctx->i2 = (insword>>17)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Pd = insword&15; - break; - case ENC_PMOV_Z_PI_S: - // xxx|xxxx|x|opc=xx|x|xx|i2=xx|x|xxxxxx|x|Pn=xxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->i2 = (insword>>17)&3; - ctx->Pn = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_FCVTZS_Z_P_Z_FP162H: - case ENC_FCVTZS_Z_P_Z_FP162W: - case ENC_FCVTZS_Z_P_Z_FP162X: - case ENC_FCVTZS_Z_P_Z_S2W: - case ENC_FCVTZS_Z_P_Z_S2X: - case ENC_FCVTZS_Z_P_Z_D2W: - case ENC_FCVTZS_Z_P_Z_D2X: - case ENC_FCVTZU_Z_P_Z_FP162H: - case ENC_FCVTZU_Z_P_Z_FP162W: - case ENC_FCVTZU_Z_P_Z_FP162X: - case ENC_FCVTZU_Z_P_Z_S2W: - case ENC_FCVTZU_Z_P_Z_S2X: - case ENC_FCVTZU_Z_P_Z_D2W: - case ENC_FCVTZU_Z_P_Z_D2X: - case ENC_SCVTF_Z_P_Z_H2FP16: - case ENC_SCVTF_Z_P_Z_W2FP16: - case ENC_SCVTF_Z_P_Z_W2S: - case ENC_SCVTF_Z_P_Z_W2D: - case ENC_SCVTF_Z_P_Z_X2FP16: - case ENC_SCVTF_Z_P_Z_X2S: - case ENC_SCVTF_Z_P_Z_X2D: - case ENC_UCVTF_Z_P_Z_H2FP16: - case ENC_UCVTF_Z_P_Z_W2FP16: - case ENC_UCVTF_Z_P_Z_W2S: - case ENC_UCVTF_Z_P_Z_W2D: - case ENC_UCVTF_Z_P_Z_X2FP16: - case ENC_UCVTF_Z_P_Z_X2S: - case ENC_UCVTF_Z_P_Z_X2D: - // xxx|xxxx|x|opc=xx|x|xx|opc2=xx|int_U=x|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->opc2 = (insword>>17)&3; - ctx->int_U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_PMOV_P_ZI_B: - // xxx|xxxx|x|opc=xx|x|xx|opc2=xx|x|xxxxxx|Zn=xxxxx|x|Pd=xxxx - ctx->opc = (insword>>22)&3; - ctx->opc2 = (insword>>17)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Pd = insword&15; - break; - case ENC_PMOV_Z_PI_B: - // xxx|xxxx|x|opc=xx|x|xx|opc2=xx|x|xxxxxx|x|Pn=xxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->opc2 = (insword>>17)&3; - ctx->Pn = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_FLOGB_Z_P_Z_M: - // xxx|xxxx|x|opc=xx|x|xx|size=xx|U=x|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->size = (insword>>17)&3; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_PMOV_P_ZI_H: - // xxx|xxxx|x|opc=xx|x|xx|x|i1=x|x|xxxxxx|Zn=xxxxx|x|Pd=xxxx - ctx->opc = (insword>>22)&3; - ctx->i1 = (insword>>17)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Pd = insword&15; - break; - case ENC_PMOV_Z_PI_H: - // xxx|xxxx|x|opc=xx|x|xx|x|i1=x|x|xxxxxx|x|Pn=xxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->i1 = (insword>>17)&1; - ctx->Pn = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_FRINT32X_Z_P_Z_M: - case ENC_FRINT32Z_Z_P_Z_M: - case ENC_FRINT64X_Z_P_Z_M: - case ENC_FRINT64Z_Z_P_Z_M: - // xxx|xxxx|x|opc=xx|x|xx|x|sz=x|U=x|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>22)&3; - ctx->sz = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FCADD_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|xxxxx|rot=x|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->rot = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_FADDP_Z_P_ZZ_: - case ENC_FMAXNMP_Z_P_ZZ_: - case ENC_FMAXP_Z_P_ZZ_: - case ENC_FMINNMP_Z_P_ZZ_: - case ENC_FMINP_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|xxx|opc=xxx|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_FADDQV_Z_P_Z_: - case ENC_FADDV_V_P_Z_: - case ENC_FMAXNMQV_Z_P_Z_: - case ENC_FMAXNMV_V_P_Z_: - case ENC_FMAXQV_Z_P_Z_: - case ENC_FMAXV_V_P_Z_: - case ENC_FMINNMQV_Z_P_Z_: - case ENC_FMINNMV_V_P_Z_: - case ENC_FMINQV_Z_P_Z_: - case ENC_FMINV_V_P_Z_: - // xxx|xxxx|x|size=xx|xxx|opc=xxx|xxx|Pg=xxx|Zn=xxxxx|Vd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Vd = insword&0x1f; - break; - case ENC_CNTP_R_P_P_: - case ENC_FIRSTP_R_P_P_: - case ENC_LASTP_R_P_P_: - // xxx|xxxx|x|size=xx|xxx|opc=xxx|xx|Pg=xxxx|x|Pn=xxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Pg = (insword>>10)&15; - ctx->Pn = (insword>>5)&15; - ctx->Rd = insword&0x1f; - break; - case ENC_CNTP_R_PN_: - // xxx|xxxx|x|size=xx|xxx|opc=xxx|xx|xxx|vl=x|x|PNn=xxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->vl = (insword>>10)&1; - ctx->PNn = (insword>>5)&15; - ctx->Rd = insword&0x1f; - break; - case ENC_SCVTF_Z_Z_: - case ENC_SCVTFLT_Z_Z_: - case ENC_UCVTF_Z_Z_: - case ENC_UCVTFLT_Z_Z_: - // xxx|xxxx|x|size=xx|xxx|xxx|xxxx|x|U=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FCVTZSN_Z_MZ2_: - case ENC_FCVTZUN_Z_MZ2_: - // xxx|xxxx|x|size=xx|xxx|xxx|xxxx|x|U=x|Zn=xxxx|x|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_FRECPX_Z_P_Z_Z: - case ENC_FSQRT_Z_P_Z_Z: - // xxx|xxxx|x|size=xx|xxx|xxx|x|opc=xx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FRECPE_Z_Z_: - case ENC_FRSQRTE_Z_Z_: - // xxx|xxxx|x|size=xx|xxx|xx|op=x|xxxx|xx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>16)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FRINTX_Z_P_Z_Z: - case ENC_FRINTI_Z_P_Z_Z: - case ENC_FRINTA_Z_P_Z_Z: - case ENC_FRINTN_Z_P_Z_Z: - case ENC_FRINTZ_Z_P_Z_Z: - case ENC_FRINTM_Z_P_Z_Z: - case ENC_FRINTP_Z_P_Z_Z: - // xxx|xxxx|x|size=xx|xxx|xx|op=x|x|opc2=xx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>16)&1; - ctx->opc2 = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDECP_Z_P_Z_: - case ENC_SQINCP_Z_P_Z_: - case ENC_UQDECP_Z_P_Z_: - case ENC_UQINCP_Z_P_Z_: - // xxx|xxxx|x|size=xx|xxx|x|D=x|U=x|xxxx|x|opc=xx|Pm=xxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->D = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->opc = (insword>>9)&3; - ctx->Pm = (insword>>5)&15; - ctx->Zdn = insword&0x1f; - break; - case ENC_SQDECP_R_P_R_SX: - case ENC_SQDECP_R_P_R_X: - case ENC_SQINCP_R_P_R_SX: - case ENC_SQINCP_R_P_R_X: - case ENC_UQDECP_R_P_R_UW: - case ENC_UQDECP_R_P_R_X: - case ENC_UQINCP_R_P_R_UW: - case ENC_UQINCP_R_P_R_X: - // xxx|xxxx|x|size=xx|xxx|x|D=x|U=x|xxxx|x|sf=x|op=x|Pm=xxxx|Rdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->D = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->sf = (insword>>10)&1; - ctx->op = (insword>>9)&1; - ctx->Pm = (insword>>5)&15; - ctx->Rdn = insword&0x1f; - break; - case ENC_FCMEQ_P_P_Z0_: - case ENC_FCMGT_P_P_Z0_: - case ENC_FCMGE_P_P_Z0_: - case ENC_FCMLT_P_P_Z0_: - case ENC_FCMLE_P_P_Z0_: - case ENC_FCMNE_P_P_Z0_: - // xxx|xxxx|x|size=xx|xxx|x|eq=x|lt=x|xxx|Pg=xxx|Zn=xxxxx|ne=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->eq = (insword>>17)&1; - ctx->lt = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ne = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_DECP_R_P_R_: - case ENC_INCP_R_P_R_: - // xxx|xxxx|x|size=xx|xxx|x|op=x|D=x|xxxx|x|opc2=xx|Pm=xxxx|Rdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>17)&1; - ctx->D = (insword>>16)&1; - ctx->opc2 = (insword>>9)&3; - ctx->Pm = (insword>>5)&15; - ctx->Rdn = insword&0x1f; - break; - case ENC_DECP_Z_P_Z_: - case ENC_INCP_Z_P_Z_: - // xxx|xxxx|x|size=xx|xxx|x|op=x|D=x|xxxx|x|opc2=xx|Pm=xxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>17)&1; - ctx->D = (insword>>16)&1; - ctx->opc2 = (insword>>9)&3; - ctx->Pm = (insword>>5)&15; - ctx->Zdn = insword&0x1f; - break; - case ENC_FADDA_V_P_Z_: - // xxx|xxxx|x|size=xx|xxx|x|opc=xx|xxx|Pg=xxx|Zm=xxxxx|Vdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Vdn = insword&0x1f; - break; - case ENC_FCPY_Z_P_I_: - case ENC_FMOV_Z_P_I__FCPY_Z_P_I_: - // xxx|xxxx|x|size=xx|xx|Pg=xxxx|xxx|imm8=xxxxxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Pg = (insword>>16)&15; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zd = insword&0x1f; - break; - case ENC_CPY_Z_O_I_: - case ENC_CPY_Z_P_I_: - case ENC_FMOV_Z_P_0__CPY_Z_P_I_: - case ENC_MOV_Z_O_I__CPY_Z_O_I_: - case ENC_MOV_Z_P_I__CPY_Z_P_I_: - // xxx|xxxx|x|size=xx|xx|Pg=xxxx|x|M=x|sh=x|imm8=xxxxxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Pg = (insword>>16)&15; - ctx->M = (insword>>14)&1; - ctx->sh = (insword>>13)&1; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zd = insword&0x1f; - break; - case ENC_PNEXT_P_P_P_: - // xxx|xxxx|x|size=xx|xx|xxxx|xx|xxx|xx|Pv=xxxx|x|Pdn=xxxx - ctx->size = (insword>>22)&3; - ctx->Pv = (insword>>5)&15; - ctx->Pdn = insword&15; - break; - case ENC_PTRUE_P_S_: - case ENC_PTRUES_P_S_: - // xxx|xxxx|x|size=xx|xx|xxx|S=x|xx|xxx|x|pattern=xxxxx|x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->S = (insword>>16)&1; - ctx->pattern = (insword>>5)&0x1f; - ctx->Pd = insword&15; - break; - case ENC_ABS_Z_P_Z_M: - case ENC_ABS_Z_P_Z_Z: - case ENC_CLS_Z_P_Z_M: - case ENC_CLS_Z_P_Z_Z: - case ENC_CLZ_Z_P_Z_M: - case ENC_CLZ_Z_P_Z_Z: - case ENC_CNOT_Z_P_Z_M: - case ENC_CNOT_Z_P_Z_Z: - case ENC_CNT_Z_P_Z_M: - case ENC_CNT_Z_P_Z_Z: - case ENC_FABS_Z_P_Z_M: - case ENC_FABS_Z_P_Z_Z: - case ENC_FNEG_Z_P_Z_M: - case ENC_FNEG_Z_P_Z_Z: - case ENC_NEG_Z_P_Z_M: - case ENC_NEG_Z_P_Z_Z: - case ENC_NOT_Z_P_Z_M: - case ENC_NOT_Z_P_Z_Z: - // xxx|xxxx|x|size=xx|x|M=x|x|opc=xxx|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->M = (insword>>20)&1; - ctx->opc = (insword>>16)&7; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SXTB_Z_P_Z_M: - case ENC_SXTB_Z_P_Z_Z: - case ENC_SXTH_Z_P_Z_M: - case ENC_SXTH_Z_P_Z_Z: - case ENC_SXTW_Z_P_Z_M: - case ENC_SXTW_Z_P_Z_Z: - case ENC_UXTB_Z_P_Z_M: - case ENC_UXTB_Z_P_Z_Z: - case ENC_UXTH_Z_P_Z_M: - case ENC_UXTH_Z_P_Z_Z: - case ENC_UXTW_Z_P_Z_M: - case ENC_UXTW_Z_P_Z_Z: - // xxx|xxxx|x|size=xx|x|M=x|x|xx|U=x|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->M = (insword>>20)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_INDEX_Z_RR_: - // xxx|xxxx|x|size=xx|x|Rm=xxxxx|xxxx|xx|Rn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_INDEX_Z_IR_: - // xxx|xxxx|x|size=xx|x|Rm=xxxxx|xxxx|xx|imm5=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->imm5 = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_WHILEGE_PN_RR_: - case ENC_WHILEGT_PN_RR_: - case ENC_WHILEHI_PN_RR_: - case ENC_WHILEHS_PN_RR_: - case ENC_WHILELE_PN_RR_: - case ENC_WHILELO_PN_RR_: - case ENC_WHILELS_PN_RR_: - case ENC_WHILELT_PN_RR_: - // xxx|xxxx|x|size=xx|x|Rm=xxxxx|xx|vl=x|x|U=x|lt=x|Rn=xxxxx|x|eq=x|PNd=xxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->vl = (insword>>13)&1; - ctx->U = (insword>>11)&1; - ctx->lt = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->eq = (insword>>3)&1; - ctx->PNd = insword&7; - break; - case ENC_WHILEGE_PP_RR_: - case ENC_WHILEGT_PP_RR_: - case ENC_WHILEHI_PP_RR_: - case ENC_WHILEHS_PP_RR_: - case ENC_WHILELE_PP_RR_: - case ENC_WHILELO_PP_RR_: - case ENC_WHILELS_PP_RR_: - case ENC_WHILELT_PP_RR_: - // xxx|xxxx|x|size=xx|x|Rm=xxxxx|xx|xx|U=x|lt=x|Rn=xxxxx|x|Pd=xxx|eq=x - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->U = (insword>>11)&1; - ctx->lt = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Pd = (insword>>1)&7; - ctx->eq = insword&1; - break; - case ENC_WHILERW_P_RR_: - case ENC_WHILEWR_P_RR_: - // xxx|xxxx|x|size=xx|x|Rm=xxxxx|xx|xx|xx|Rn=xxxxx|rw=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->rw = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_WHILEGE_P_P_RR_: - case ENC_WHILEGT_P_P_RR_: - case ENC_WHILEHI_P_P_RR_: - case ENC_WHILEHS_P_P_RR_: - case ENC_WHILELE_P_P_RR_: - case ENC_WHILELO_P_P_RR_: - case ENC_WHILELS_P_P_RR_: - case ENC_WHILELT_P_P_RR_: - // xxx|xxxx|x|size=xx|x|Rm=xxxxx|xx|x|sf=x|U=x|lt=x|Rn=xxxxx|eq=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->sf = (insword>>12)&1; - ctx->U = (insword>>11)&1; - ctx->lt = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->eq = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_FMAD_Z_P_ZZZ_: - case ENC_FMSB_Z_P_ZZZ_: - case ENC_FNMAD_Z_P_ZZZ_: - case ENC_FNMSB_Z_P_ZZZ_: - // xxx|xxxx|x|size=xx|x|Za=xxxxx|x|N=x|op=x|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->Za = (insword>>16)&0x1f; - ctx->N = (insword>>14)&1; - ctx->op = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_CMPGT_P_P_ZW_: - case ENC_CMPGE_P_P_ZW_: - case ENC_CMPHI_P_P_ZW_: - case ENC_CMPHS_P_P_ZW_: - case ENC_CMPLT_P_P_ZW_: - case ENC_CMPLE_P_P_ZW_: - case ENC_CMPLO_P_P_ZW_: - case ENC_CMPLS_P_P_ZW_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|U=x|x|lt=x|Pg=xxx|Zn=xxxxx|ne=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>15)&1; - ctx->lt = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ne = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_FCMEQ_P_P_ZZ_: - case ENC_FCMGT_P_P_ZZ_: - case ENC_FCMGE_P_P_ZZ_: - case ENC_FCMNE_P_P_ZZ_: - case ENC_FCMLE_P_P_ZZ__FCMGE_P_P_ZZ_: - case ENC_FCMLT_P_P_ZZ__FCMGT_P_P_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|op=x|x|cmph=x|Pg=xxx|Zn=xxxxx|cmpl=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>15)&1; - ctx->cmph = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->cmpl = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_CMPEQ_P_P_ZW_: - case ENC_CMPNE_P_P_ZW_: - case ENC_CMPEQ_P_P_ZZ_: - case ENC_CMPGT_P_P_ZZ_: - case ENC_CMPGE_P_P_ZZ_: - case ENC_CMPHI_P_P_ZZ_: - case ENC_CMPHS_P_P_ZZ_: - case ENC_CMPNE_P_P_ZZ_: - case ENC_CMPLE_P_P_ZZ__CMPGE_P_P_ZZ_: - case ENC_CMPLO_P_P_ZZ__CMPHI_P_P_ZZ_: - case ENC_CMPLS_P_P_ZZ__CMPHS_P_P_ZZ_: - case ENC_CMPLT_P_P_ZZ__CMPGT_P_P_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|op=x|x|o2=x|Pg=xxx|Zn=xxxxx|ne=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>15)&1; - ctx->o2 = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ne = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_FACGT_P_P_ZZ_: - case ENC_FACGE_P_P_ZZ_: - case ENC_FACLE_P_P_ZZ__FACGE_P_P_ZZ_: - case ENC_FACLT_P_P_ZZ__FACGT_P_P_ZZ_: - case ENC_FCMUO_P_P_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|op=x|x|o2=x|Pg=xxx|Zn=xxxxx|o3=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>15)&1; - ctx->o2 = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->o3 = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_BFCLAMP_Z_ZZ_: - case ENC_FCLAMP_Z_ZZ_: - case ENC_TBL_Z_ZZ_1: - case ENC_TBXQ_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SCLAMP_Z_ZZ_: - case ENC_UCLAMP_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxxxx|U=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_TBL_Z_ZZ_2: - case ENC_TBX_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxxxx|op=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SABAL_Z_ZZ_: - case ENC_UABAL_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxxx|U=x|x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>11)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FTSSEL_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxxx|x|op=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_HISTCNT_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_MATCH_P_P_ZZ_: - case ENC_NMATCH_P_P_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|Pg=xxx|Zn=xxxxx|op=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->op = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_ADD_Z_ZZ_: - case ENC_ADDPT_Z_ZZ_: - case ENC_BFADD_Z_ZZ_: - case ENC_BFMUL_Z_ZZ_: - case ENC_BFSUB_Z_ZZ_: - case ENC_FADD_Z_ZZ_: - case ENC_FMUL_Z_ZZ_: - case ENC_FRECPS_Z_ZZ_: - case ENC_FRSQRTS_Z_ZZ_: - case ENC_FSUB_Z_ZZ_: - case ENC_FTSMUL_Z_ZZ_: - case ENC_SUB_Z_ZZ_: - case ENC_SUBPT_Z_ZZ_: - case ENC_TBLQ_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|opc=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->opc = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_ADDQP_Z_ZZ_: - case ENC_ADDSUBP_Z_ZZ_: - case ENC_HISTSEG_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_PMULL_MZ_ZZW_1X2: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - break; - case ENC_PMLAL_MZ_ZZZW_1X2: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zda=xxxx|x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = (insword>>1)&15; - break; - case ENC_TRN1_Z_ZZ_: - case ENC_TRN2_Z_ZZ_: - case ENC_UZP1_Z_ZZ_: - case ENC_UZP2_Z_ZZ_: - case ENC_UZPQ1_Z_ZZ_: - case ENC_UZPQ2_Z_ZZ_: - case ENC_ZIP2_Z_ZZ_: - case ENC_ZIP1_Z_ZZ_: - case ENC_ZIPQ1_Z_ZZ_: - case ENC_ZIPQ2_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xx|H=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->H = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDMULH_Z_ZZ_: - case ENC_SQRDMULH_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xx|R=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->R = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQADD_Z_ZZ_: - case ENC_SQSUB_Z_ZZ_: - case ENC_UQADD_Z_ZZ_: - case ENC_UQSUB_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xx|U=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_RAX1_Z_ZZ_: - case ENC_SM4EKEY_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xx|op=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_LSL_Z_ZW_: - case ENC_MUL_Z_ZZ_: - case ENC_PMUL_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|x|opc=xx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_ASR_Z_ZW_: - case ENC_LSR_Z_ZW_: - case ENC_SMULH_Z_ZZ_: - case ENC_UMULH_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|x|x|U=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_MOV_Z_P_Z__SEL_Z_P_ZZ_: - case ENC_SEL_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xx|Pv=xxxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Pv = (insword>>10)&15; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SABA_Z_ZZZ_: - case ENC_UABA_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xx|xxx|U=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_EORBT_Z_ZZ_: - case ENC_EORTB_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xx|xxx|tb=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->tb = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SADDLBT_Z_ZZ_: - case ENC_SSUBLBT_Z_ZZ_: - case ENC_SSUBLTB_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xx|xx|S=x|tb=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->S = (insword>>11)&1; - ctx->tb = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SABALB_Z_ZZZ_: - case ENC_SABALT_Z_ZZZ_: - case ENC_UABALB_Z_ZZZ_: - case ENC_UABALT_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xx|xx|U=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_BDEP_Z_ZZ_: - case ENC_BEXT_Z_ZZ_: - case ENC_BGRP_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|xx|xx|opc=xx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FMLA_Z_P_ZZZ_: - case ENC_FMLS_Z_P_ZZZ_: - case ENC_FNMLA_Z_P_ZZZ_: - case ENC_FNMLS_Z_P_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|N=x|op=x|Pg=xxx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->N = (insword>>14)&1; - ctx->op = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FCMLA_Z_P_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|rot=xx|Pg=xxx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->rot = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_USDOT_Z_ZZZ_S: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xxxxx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SQDMLALBT_Z_ZZZ_: - case ENC_SQDMLSLBT_Z_ZZZ_: - case ENC_SQRDMLAH_Z_ZZZ_: - case ENC_SQRDMLSH_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xxxx|S=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->S = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SDOT_Z16_ZZZ_H: - case ENC_SDOT_Z_ZZZ_: - case ENC_UDOT_Z16_ZZZ_H: - case ENC_UDOT_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xxxx|U=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SQDMLALB_Z_ZZZ_: - case ENC_SQDMLALT_Z_ZZZ_: - case ENC_SQDMLSLB_Z_ZZZ_: - case ENC_SQDMLSLT_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xxx|S=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->S = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_CDOT_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xxx|rot=xx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->rot = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_ADDHNB_Z_ZZ_: - case ENC_ADDHNT_Z_ZZ_: - case ENC_RADDHNB_Z_ZZ_: - case ENC_RADDHNT_Z_ZZ_: - case ENC_RSUBHNB_Z_ZZ_: - case ENC_RSUBHNT_Z_ZZ_: - case ENC_SUBHNB_Z_ZZ_: - case ENC_SUBHNT_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xx|S=x|R=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->S = (insword>>12)&1; - ctx->R = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SADDWB_Z_ZZ_: - case ENC_SADDWT_Z_ZZ_: - case ENC_SSUBWB_Z_ZZ_: - case ENC_SSUBWT_Z_ZZ_: - case ENC_UADDWB_Z_ZZ_: - case ENC_UADDWT_Z_ZZ_: - case ENC_USUBWB_Z_ZZ_: - case ENC_USUBWT_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xx|S=x|U=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->S = (insword>>12)&1; - ctx->U = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SMLALB_Z_ZZZ_: - case ENC_SMLALT_Z_ZZZ_: - case ENC_SMLSLB_Z_ZZZ_: - case ENC_SMLSLT_Z_ZZZ_: - case ENC_UMLALB_Z_ZZZ_: - case ENC_UMLALT_Z_ZZZ_: - case ENC_UMLSLB_Z_ZZZ_: - case ENC_UMLSLT_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xx|S=x|U=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->S = (insword>>12)&1; - ctx->U = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_PMULLB_Z_ZZ_: - case ENC_PMULLB_Z_ZZ_Q: - case ENC_PMULLT_Z_ZZ_: - case ENC_PMULLT_Z_ZZ_Q: - case ENC_SMULLB_Z_ZZ_: - case ENC_SMULLT_Z_ZZ_: - case ENC_SQDMULLB_Z_ZZ_: - case ENC_SQDMULLT_Z_ZZ_: - case ENC_UMULLB_Z_ZZ_: - case ENC_UMULLT_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xx|op=x|U=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>12)&1; - ctx->U = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_CMLA_Z_ZZZ_: - case ENC_SQRDCMLAH_Z_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|xx|op=x|rot=xx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>12)&1; - ctx->rot = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_MAD_Z_P_ZZZ_: - case ENC_MSB_Z_P_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|x|op=x|Pg=xxx|Za=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Za = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_BFMLA_Z_P_ZZZ_: - case ENC_BFMLS_Z_P_ZZZ_: - case ENC_MLA_Z_P_ZZZ_: - case ENC_MLS_Z_P_ZZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|x|op=x|Pg=xxx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SABDLB_Z_ZZ_: - case ENC_SABDLT_Z_ZZ_: - case ENC_SADDLB_Z_ZZ_: - case ENC_SADDLT_Z_ZZ_: - case ENC_SSUBLB_Z_ZZ_: - case ENC_SSUBLT_Z_ZZ_: - case ENC_UABDLB_Z_ZZ_: - case ENC_UABDLT_Z_ZZ_: - case ENC_UADDLB_Z_ZZ_: - case ENC_UADDLT_Z_ZZ_: - case ENC_USUBLB_Z_ZZ_: - case ENC_USUBLT_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|Zm=xxxxx|x|x|op=x|S=x|U=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>13)&1; - ctx->S = (insword>>12)&1; - ctx->U = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_MUL_Z_ZZI_D: - // xxx|xxxx|x|size=xx|x|i1=x|Zm=xxxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDMULH_Z_ZZI_D: - case ENC_SQRDMULH_Z_ZZI_D: - // xxx|xxxx|x|size=xx|x|i1=x|Zm=xxxx|xxxxx|R=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->R = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_MLA_Z_ZZZI_D: - case ENC_MLS_Z_ZZZI_D: - case ENC_SQRDMLAH_Z_ZZZI_D: - case ENC_SQRDMLSH_Z_ZZZI_D: - // xxx|xxxx|x|size=xx|x|i1=x|Zm=xxxx|xxxxx|S=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->S = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SDOT_Z_ZZZI_D: - case ENC_UDOT_Z_ZZZI_D: - // xxx|xxxx|x|size=xx|x|i1=x|Zm=xxxx|xxxxx|U=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FMLA_Z_ZZZI_D: - case ENC_FMLS_Z_ZZZI_D: - // xxx|xxxx|x|size=xx|x|i1=x|Zm=xxxx|xxxx|o2=x|op=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->o2 = (insword>>11)&1; - ctx->op = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FMUL_Z_ZZI_D: - // xxx|xxxx|x|size=xx|x|i1=x|Zm=xxxx|xxxx|o2=x|x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->o2 = (insword>>11)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_CDOT_Z_ZZZI_D: - case ENC_CMLA_Z_ZZZI_S: - case ENC_FCMLA_Z_ZZZI_S: - case ENC_SQRDCMLAH_Z_ZZZI_S: - // xxx|xxxx|x|size=xx|x|i1=x|Zm=xxxx|xxxx|rot=xx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->rot = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_MUL_Z_ZZI_S: - // xxx|xxxx|x|size=xx|x|i2=xx|Zm=xxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDMULH_Z_ZZI_S: - case ENC_SQRDMULH_Z_ZZI_S: - // xxx|xxxx|x|size=xx|x|i2=xx|Zm=xxx|xxxxx|R=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->R = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_MLA_Z_ZZZI_S: - case ENC_MLS_Z_ZZZI_S: - case ENC_SQRDMLAH_Z_ZZZI_S: - case ENC_SQRDMLSH_Z_ZZZI_S: - // xxx|xxxx|x|size=xx|x|i2=xx|Zm=xxx|xxxxx|S=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->S = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SDOT_Z_ZZZI_S: - case ENC_SUDOT_Z_ZZZI_S: - case ENC_UDOT_Z_ZZZI_S: - case ENC_USDOT_Z_ZZZI_S: - // xxx|xxxx|x|size=xx|x|i2=xx|Zm=xxx|xxxxx|U=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FMLA_Z_ZZZI_S: - case ENC_FMLS_Z_ZZZI_S: - // xxx|xxxx|x|size=xx|x|i2=xx|Zm=xxx|xxxx|o2=x|op=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->o2 = (insword>>11)&1; - ctx->op = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FMUL_Z_ZZI_S: - // xxx|xxxx|x|size=xx|x|i2=xx|Zm=xxx|xxxx|o2=x|x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->o2 = (insword>>11)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_CDOT_Z_ZZZI_S: - case ENC_CMLA_Z_ZZZI_H: - case ENC_FCMLA_Z_ZZZI_H: - case ENC_SQRDCMLAH_Z_ZZZI_H: - // xxx|xxxx|x|size=xx|x|i2=xx|Zm=xxx|xxxx|rot=xx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->rot = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_AESD_MZ_ZZI_2X1: - case ENC_AESDIMC_MZ_ZZI_2X1: - case ENC_AESE_MZ_ZZI_2X1: - case ENC_AESEMC_MZ_ZZI_2X1: - // xxx|xxxx|x|size=xx|x|i2=xx|xx|op=x|xxx|xx|o2=x|Zm=xxxxx|Zdn=xxxx|o3=x - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->op = (insword>>16)&1; - ctx->o2 = (insword>>10)&1; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = (insword>>1)&15; - ctx->o3 = insword&1; - break; - case ENC_AESD_MZ_ZZI_4X1: - case ENC_AESDIMC_MZ_ZZI_4X1: - case ENC_AESE_MZ_ZZI_4X1: - case ENC_AESEMC_MZ_ZZI_4X1: - // xxx|xxxx|x|size=xx|x|i2=xx|xx|op=x|xxx|xx|o2=x|Zm=xxxxx|Zdn=xxx|opc3=xx - ctx->size = (insword>>22)&3; - ctx->i2 = (insword>>19)&3; - ctx->op = (insword>>16)&1; - ctx->o2 = (insword>>10)&1; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = (insword>>2)&7; - ctx->opc3 = insword&3; - break; - case ENC_SQDMULLB_Z_ZZI_D: - case ENC_SQDMULLT_Z_ZZI_D: - // xxx|xxxx|x|size=xx|x|i2h=x|Zm=xxxx|xxxx|i2l=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2h = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->i2l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDMLALB_Z_ZZZI_D: - case ENC_SQDMLALT_Z_ZZZI_D: - case ENC_SQDMLSLB_Z_ZZZI_D: - case ENC_SQDMLSLT_Z_ZZZI_D: - // xxx|xxxx|x|size=xx|x|i2h=x|Zm=xxxx|xxx|S=x|i2l=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2h = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->S = (insword>>12)&1; - ctx->i2l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SMULLB_Z_ZZI_D: - case ENC_SMULLT_Z_ZZI_D: - case ENC_UMULLB_Z_ZZI_D: - case ENC_UMULLT_Z_ZZI_D: - // xxx|xxxx|x|size=xx|x|i2h=x|Zm=xxxx|xxx|U=x|i2l=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2h = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->U = (insword>>12)&1; - ctx->i2l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SMLALB_Z_ZZZI_D: - case ENC_SMLALT_Z_ZZZI_D: - case ENC_SMLSLB_Z_ZZZI_D: - case ENC_SMLSLT_Z_ZZZI_D: - case ENC_UMLALB_Z_ZZZI_D: - case ENC_UMLALT_Z_ZZZI_D: - case ENC_UMLSLB_Z_ZZZI_D: - case ENC_UMLSLT_Z_ZZZI_D: - // xxx|xxxx|x|size=xx|x|i2h=x|Zm=xxxx|xx|S=x|U=x|i2l=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i2h = (insword>>20)&1; - ctx->Zm = (insword>>16)&15; - ctx->S = (insword>>13)&1; - ctx->U = (insword>>12)&1; - ctx->i2l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SQDMULLB_Z_ZZI_S: - case ENC_SQDMULLT_Z_ZZI_S: - // xxx|xxxx|x|size=xx|x|i3h=xx|Zm=xxx|xxxx|i3l=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i3h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->i3l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDMLALB_Z_ZZZI_S: - case ENC_SQDMLALT_Z_ZZZI_S: - case ENC_SQDMLSLB_Z_ZZZI_S: - case ENC_SQDMLSLT_Z_ZZZI_S: - // xxx|xxxx|x|size=xx|x|i3h=xx|Zm=xxx|xxx|S=x|i3l=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i3h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->S = (insword>>12)&1; - ctx->i3l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SMULLB_Z_ZZI_S: - case ENC_SMULLT_Z_ZZI_S: - case ENC_UMULLB_Z_ZZI_S: - case ENC_UMULLT_Z_ZZI_S: - // xxx|xxxx|x|size=xx|x|i3h=xx|Zm=xxx|xxx|U=x|i3l=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->i3h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->U = (insword>>12)&1; - ctx->i3l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SMLALB_Z_ZZZI_S: - case ENC_SMLALT_Z_ZZZI_S: - case ENC_SMLSLB_Z_ZZZI_S: - case ENC_SMLSLT_Z_ZZZI_S: - case ENC_UMLALB_Z_ZZZI_S: - case ENC_UMLALT_Z_ZZZI_S: - case ENC_UMLSLB_Z_ZZZI_S: - case ENC_UMLSLT_Z_ZZZI_S: - // xxx|xxxx|x|size=xx|x|i3h=xx|Zm=xxx|xx|S=x|U=x|i3l=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->i3h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->S = (insword>>13)&1; - ctx->U = (insword>>12)&1; - ctx->i3l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_CMPGT_P_P_ZI_: - case ENC_CMPGE_P_P_ZI_: - case ENC_CMPLT_P_P_ZI_: - case ENC_CMPLE_P_P_ZI_: - // xxx|xxxx|x|size=xx|x|imm5=xxxxx|op=x|x|lt=x|Pg=xxx|Zn=xxxxx|ne=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->imm5 = (insword>>16)&0x1f; - ctx->op = (insword>>15)&1; - ctx->lt = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ne = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_CMPEQ_P_P_ZI_: - case ENC_CMPNE_P_P_ZI_: - // xxx|xxxx|x|size=xx|x|imm5=xxxxx|op=x|x|o2=x|Pg=xxx|Zn=xxxxx|ne=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->imm5 = (insword>>16)&0x1f; - ctx->op = (insword>>15)&1; - ctx->o2 = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ne = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_INDEX_Z_RI_: - // xxx|xxxx|x|size=xx|x|imm5=xxxxx|xxxx|xx|Rn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->imm5 = (insword>>16)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_INDEX_Z_II_: - // xxx|xxxx|x|size=xx|x|imm5b=xxxxx|xxxx|xx|imm5=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->imm5b = (insword>>16)&0x1f; - ctx->imm5 = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_CMPHI_P_P_ZI_: - case ENC_CMPHS_P_P_ZI_: - case ENC_CMPLO_P_P_ZI_: - case ENC_CMPLS_P_P_ZI_: - // xxx|xxxx|x|size=xx|x|imm7=xxxxxxx|lt=x|Pg=xxx|Zn=xxxxx|ne=x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->imm7 = (insword>>14)&0x7f; - ctx->lt = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ne = (insword>>4)&1; - ctx->Pd = insword&15; - break; - case ENC_FEXPA_Z_Z_: - // xxx|xxxx|x|size=xx|x|opc=xxxxx|xxxx|xx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDECB_R_RS_SX: - case ENC_SQDECB_R_RS_X: - case ENC_SQDECD_R_RS_SX: - case ENC_SQDECD_R_RS_X: - case ENC_SQDECH_R_RS_SX: - case ENC_SQDECH_R_RS_X: - case ENC_SQDECW_R_RS_SX: - case ENC_SQDECW_R_RS_X: - case ENC_SQINCB_R_RS_SX: - case ENC_SQINCB_R_RS_X: - case ENC_SQINCD_R_RS_SX: - case ENC_SQINCD_R_RS_X: - case ENC_SQINCH_R_RS_SX: - case ENC_SQINCH_R_RS_X: - case ENC_SQINCW_R_RS_SX: - case ENC_SQINCW_R_RS_X: - case ENC_UQDECB_R_RS_UW: - case ENC_UQDECB_R_RS_X: - case ENC_UQDECD_R_RS_UW: - case ENC_UQDECD_R_RS_X: - case ENC_UQDECH_R_RS_UW: - case ENC_UQDECH_R_RS_X: - case ENC_UQDECW_R_RS_UW: - case ENC_UQDECW_R_RS_X: - case ENC_UQINCB_R_RS_UW: - case ENC_UQINCB_R_RS_X: - case ENC_UQINCD_R_RS_UW: - case ENC_UQINCD_R_RS_X: - case ENC_UQINCH_R_RS_UW: - case ENC_UQINCH_R_RS_X: - case ENC_UQINCW_R_RS_UW: - case ENC_UQINCW_R_RS_X: - // xxx|xxxx|x|size=xx|x|sf=x|imm4=xxxx|xx|xx|D=x|U=x|pattern=xxxxx|Rdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->sf = (insword>>20)&1; - ctx->imm4 = (insword>>16)&15; - ctx->D = (insword>>11)&1; - ctx->U = (insword>>10)&1; - ctx->pattern = (insword>>5)&0x1f; - ctx->Rdn = insword&0x1f; - break; - case ENC_REV_P_P_: - // xxx|xxxx|x|size=xx|x|xxxxx|xxx|xxxx|Pn=xxxx|x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Pn = (insword>>5)&15; - ctx->Pd = insword&15; - break; - case ENC_PTRUE_PN_I_: - // xxx|xxxx|x|size=xx|x|xxxxx|xx|xxx|xxxxxx|x|x|PNd=xxx - ctx->size = (insword>>22)&3; - ctx->PNd = insword&7; - break; - case ENC_PEXT_PP_RR_: - // xxx|xxxx|x|size=xx|x|xxxxx|xx|xxx|xx|i1=x|PNn=xxx|x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->i1 = (insword>>8)&1; - ctx->PNn = (insword>>5)&7; - ctx->Pd = insword&15; - break; - case ENC_PEXT_PN_RR_: - // xxx|xxxx|x|size=xx|x|xxxxx|xx|xxx|x|imm2=xx|PNn=xxx|x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->imm2 = (insword>>8)&3; - ctx->PNn = (insword>>5)&7; - ctx->Pd = insword&15; - break; - case ENC_SADALP_Z_P_Z_: - case ENC_UADALP_Z_P_Z_: - // xxx|xxxx|x|size=xx|x|xxxx|U=x|xx|x|Pg=xxx|Zn=xxxxx|Zda=xxxxx - ctx->size = (insword>>22)&3; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_CADD_Z_ZZ_: - case ENC_SQCADD_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|xxxx|op=x|xx|xxx|rot=x|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>16)&1; - ctx->rot = (insword>>10)&1; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_MUL_Z_P_ZZ_: - case ENC_SMULH_Z_P_ZZ_: - case ENC_UMULH_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xxx|H=x|U=x|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->H = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_SDIV_Z_P_ZZ_: - case ENC_SDIVR_Z_P_ZZ_: - case ENC_UDIV_Z_P_ZZ_: - case ENC_UDIVR_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xxx|R=x|U=x|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->R = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_ADDQV_Z_P_Z_: - case ENC_SADDV_R_P_Z_: - case ENC_SMAXQV_Z_P_Z_: - case ENC_SMAXV_R_P_Z_: - case ENC_SMINQV_Z_P_Z_: - case ENC_SMINV_R_P_Z_: - case ENC_UADDV_R_P_Z_: - case ENC_UMAXQV_Z_P_Z_: - case ENC_UMAXV_R_P_Z_: - case ENC_UMINQV_Z_P_Z_: - case ENC_UMINV_R_P_Z_: - // xxx|xxxx|x|size=xx|x|xxx|op=x|U=x|xxx|Pg=xxx|Zn=xxxxx|Vd=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Vd = insword&0x1f; - break; - case ENC_ANDQV_Z_P_Z_: - case ENC_ANDV_R_P_Z_: - case ENC_EORQV_Z_P_Z_: - case ENC_EORV_R_P_Z_: - case ENC_ORQV_Z_P_Z_: - case ENC_ORV_R_P_Z_: - // xxx|xxxx|x|size=xx|x|xxx|opc=xx|xxx|Pg=xxx|Zn=xxxxx|Vd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Vd = insword&0x1f; - break; - case ENC_FRECPX_Z_P_Z_M: - case ENC_FSQRT_Z_P_Z_M: - // xxx|xxxx|x|size=xx|x|xxx|opc=xx|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_AESIMC_Z_Z_: - case ENC_AESMC_Z_Z_: - // xxx|xxxx|x|size=xx|x|xxx|xx|xxx|xx|op=x|xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>10)&1; - ctx->Zdn = insword&0x1f; - break; - case ENC_AESD_Z_ZZ_: - case ENC_AESE_Z_ZZ_: - case ENC_SM4E_Z_ZZ_: - // xxx|xxxx|x|size=xx|x|xxx|x|op=x|xxx|xx|o2=x|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>16)&1; - ctx->o2 = (insword>>10)&1; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_ASR_Z_P_ZW_: - case ENC_ASR_Z_P_ZZ_: - case ENC_ASRR_Z_P_ZZ_: - case ENC_LSL_Z_P_ZW_: - case ENC_LSL_Z_P_ZZ_: - case ENC_LSLR_Z_P_ZZ_: - case ENC_LSR_Z_P_ZW_: - case ENC_LSR_Z_P_ZZ_: - case ENC_LSRR_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xx|R=x|L=x|U=x|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->R = (insword>>18)&1; - ctx->L = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_SHADD_Z_P_ZZ_: - case ENC_SHSUB_Z_P_ZZ_: - case ENC_SHSUBR_Z_P_ZZ_: - case ENC_SRHADD_Z_P_ZZ_: - case ENC_UHADD_Z_P_ZZ_: - case ENC_UHSUB_Z_P_ZZ_: - case ENC_UHSUBR_Z_P_ZZ_: - case ENC_URHADD_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xx|R=x|S=x|U=x|xx|x|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->R = (insword>>18)&1; - ctx->S = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_FTMAD_Z_ZZI_: - // xxx|xxxx|x|size=xx|x|xx|imm3=xxx|xxx|xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->imm3 = (insword>>16)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_SQADD_Z_P_ZZ_: - case ENC_SQSUB_Z_P_ZZ_: - case ENC_SQSUBR_Z_P_ZZ_: - case ENC_SUQADD_Z_P_ZZ_: - case ENC_UQADD_Z_P_ZZ_: - case ENC_UQSUB_Z_P_ZZ_: - case ENC_UQSUBR_Z_P_ZZ_: - case ENC_USQADD_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xx|op=x|S=x|U=x|xx|x|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->op = (insword>>18)&1; - ctx->S = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_ADD_Z_P_ZZ_: - case ENC_ADDPT_Z_P_ZZ_: - case ENC_AND_Z_P_ZZ_: - case ENC_BIC_Z_P_ZZ_: - case ENC_EOR_Z_P_ZZ_: - case ENC_ORR_Z_P_ZZ_: - case ENC_SUB_Z_P_ZZ_: - case ENC_SUBPT_Z_P_ZZ_: - case ENC_SUBR_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xx|opc=xxx|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_FRINTX_Z_P_Z_M: - case ENC_FRINTI_Z_P_Z_M: - case ENC_FRINTA_Z_P_Z_M: - case ENC_FRINTN_Z_P_Z_M: - case ENC_FRINTZ_Z_P_Z_M: - case ENC_FRINTM_Z_P_Z_M: - case ENC_FRINTP_Z_P_Z_M: - // xxx|xxxx|x|size=xx|x|xx|opc=xxx|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_FADD_Z_P_ZS_: - case ENC_FMAX_Z_P_ZS_: - case ENC_FMAXNM_Z_P_ZS_: - case ENC_FMIN_Z_P_ZS_: - case ENC_FMINNM_Z_P_ZS_: - case ENC_FMUL_Z_P_ZS_: - case ENC_FSUB_Z_P_ZS_: - case ENC_FSUBR_Z_P_ZS_: - // xxx|xxxx|x|size=xx|x|xx|opc=xxx|xxx|Pg=xxx|xxxx|i1=x|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Pg = (insword>>10)&7; - ctx->i1 = (insword>>5)&1; - ctx->Zdn = insword&0x1f; - break; - case ENC_MUL_Z_ZI_: - // xxx|xxxx|x|size=xx|x|xx|opc=xxx|xx|o2=x|imm8=xxxxxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->o2 = (insword>>13)&1; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zdn = insword&0x1f; - break; - case ENC_ADD_Z_ZI_: - case ENC_SUB_Z_ZI_: - case ENC_SUBR_Z_ZI_: - // xxx|xxxx|x|size=xx|x|xx|opc=xxx|xx|sh=x|imm8=xxxxxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->sh = (insword>>13)&1; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zdn = insword&0x1f; - break; - case ENC_MOVPRFX_Z_P_Z_: - // xxx|xxxx|x|size=xx|x|xx|opc=xx|M=x|xxx|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>17)&3; - ctx->M = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SABD_Z_P_ZZ_: - case ENC_SMAX_Z_P_ZZ_: - case ENC_SMIN_Z_P_ZZ_: - case ENC_UABD_Z_P_ZZ_: - case ENC_UMAX_Z_P_ZZ_: - case ENC_UMIN_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xx|opc=xx|U=x|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>17)&3; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_ADDP_Z_P_ZZ_: - case ENC_SMAXP_Z_P_ZZ_: - case ENC_SMINP_Z_P_ZZ_: - case ENC_SUBP_Z_P_ZZ_: - case ENC_UMAXP_Z_P_ZZ_: - case ENC_UMINP_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|xx|opc=xx|U=x|xx|x|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>17)&3; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_FDUP_Z_I_: - case ENC_FMOV_Z_I__FDUP_Z_I_: - // xxx|xxxx|x|size=xx|x|xx|opc=xx|x|xx|o2=x|imm8=xxxxxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>17)&3; - ctx->o2 = (insword>>13)&1; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zd = insword&0x1f; - break; - case ENC_DUP_Z_I_: - case ENC_FMOV_Z_0__DUP_Z_I_: - case ENC_MOV_Z_I__DUP_Z_I_: - // xxx|xxxx|x|size=xx|x|xx|opc=xx|x|xx|sh=x|imm8=xxxxxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>17)&3; - ctx->sh = (insword>>13)&1; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zd = insword&0x1f; - break; - case ENC_INSR_Z_R_: - // xxx|xxxx|x|size=xx|x|xx|xxx|xxxxxx|Rm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_DUP_Z_R_: - case ENC_MOV_Z_R__DUP_Z_R_: - // xxx|xxxx|x|size=xx|x|xx|xxx|xxxxxx|Rn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_INSR_Z_V_: - // xxx|xxxx|x|size=xx|x|xx|xxx|xxxxxx|Vm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->Vm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_REV_Z_Z_: - // xxx|xxxx|x|size=xx|x|xx|xxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SMAX_Z_ZI_: - case ENC_SMIN_Z_ZI_: - case ENC_UMAX_Z_ZI_: - case ENC_UMIN_Z_ZI_: - // xxx|xxxx|x|size=xx|x|xx|xx|U=x|xx|o2=x|imm8=xxxxxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->U = (insword>>16)&1; - ctx->o2 = (insword>>13)&1; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zdn = insword&0x1f; - break; - case ENC_SQADD_Z_ZI_: - case ENC_SQSUB_Z_ZI_: - case ENC_UQADD_Z_ZI_: - case ENC_UQSUB_Z_ZI_: - // xxx|xxxx|x|size=xx|x|xx|xx|U=x|xx|sh=x|imm8=xxxxxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->U = (insword>>16)&1; - ctx->sh = (insword>>13)&1; - ctx->imm8 = (insword>>5)&0xff; - ctx->Zdn = insword&0x1f; - break; - case ENC_SUNPKHI_Z_Z_: - case ENC_SUNPKLO_Z_Z_: - case ENC_UUNPKHI_Z_Z_: - case ENC_UUNPKLO_Z_Z_: - // xxx|xxxx|x|size=xx|x|xx|x|U=x|H=x|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->U = (insword>>17)&1; - ctx->H = (insword>>16)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_TRN1_P_PP_: - case ENC_TRN2_P_PP_: - case ENC_UZP1_P_PP_: - case ENC_UZP2_P_PP_: - case ENC_ZIP2_P_PP_: - case ENC_ZIP1_P_PP_: - // xxx|xxxx|x|size=xx|x|x|Pm=xxxx|xxx|opc=xx|H=x|x|Pn=xxxx|x|Pd=xxxx - ctx->size = (insword>>22)&3; - ctx->Pm = (insword>>16)&15; - ctx->opc = (insword>>11)&3; - ctx->H = (insword>>10)&1; - ctx->Pn = (insword>>5)&15; - ctx->Pd = insword&15; - break; - case ENC_SQRSHL_Z_P_ZZ_: - case ENC_SQRSHLR_Z_P_ZZ_: - case ENC_SQSHL_Z_P_ZZ_: - case ENC_SQSHLR_Z_P_ZZ_: - case ENC_SRSHL_Z_P_ZZ_: - case ENC_SRSHLR_Z_P_ZZ_: - case ENC_UQRSHL_Z_P_ZZ_: - case ENC_UQRSHLR_Z_P_ZZ_: - case ENC_UQSHL_Z_P_ZZ_: - case ENC_UQSHLR_Z_P_ZZ_: - case ENC_URSHL_Z_P_ZZ_: - case ENC_URSHLR_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|x|Q=x|R=x|N=x|U=x|xx|x|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>19)&1; - ctx->R = (insword>>18)&1; - ctx->N = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_SQABS_Z_P_Z_M: - case ENC_SQABS_Z_P_Z_Z: - case ENC_SQNEG_Z_P_Z_M: - case ENC_SQNEG_Z_P_Z_Z: - case ENC_URECPE_Z_P_Z_M: - case ENC_URECPE_Z_P_Z_Z: - case ENC_URSQRTE_Z_P_Z_M: - case ENC_URSQRTE_Z_P_Z_Z: - // xxx|xxxx|x|size=xx|x|x|Q=x|x|Z=x|op=x|xx|x|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>19)&1; - ctx->Z = (insword>>17)&1; - ctx->op = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_DECB_R_RS_: - case ENC_DECD_R_RS_: - case ENC_DECH_R_RS_: - case ENC_DECW_R_RS_: - case ENC_INCB_R_RS_: - case ENC_INCD_R_RS_: - case ENC_INCH_R_RS_: - case ENC_INCW_R_RS_: - // xxx|xxxx|x|size=xx|x|x|imm4=xxxx|xx|xxx|D=x|pattern=xxxxx|Rdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->imm4 = (insword>>16)&15; - ctx->D = (insword>>10)&1; - ctx->pattern = (insword>>5)&0x1f; - ctx->Rdn = insword&0x1f; - break; - case ENC_DECD_Z_ZS_: - case ENC_DECH_Z_ZS_: - case ENC_DECW_Z_ZS_: - case ENC_INCD_Z_ZS_: - case ENC_INCH_Z_ZS_: - case ENC_INCW_Z_ZS_: - // xxx|xxxx|x|size=xx|x|x|imm4=xxxx|xx|xxx|D=x|pattern=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->imm4 = (insword>>16)&15; - ctx->D = (insword>>10)&1; - ctx->pattern = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_CNTB_R_S_: - case ENC_CNTD_R_S_: - case ENC_CNTH_R_S_: - case ENC_CNTW_R_S_: - // xxx|xxxx|x|size=xx|x|x|imm4=xxxx|xx|xxx|op=x|pattern=xxxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->imm4 = (insword>>16)&15; - ctx->op = (insword>>10)&1; - ctx->pattern = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQDECD_Z_ZS_: - case ENC_SQDECH_Z_ZS_: - case ENC_SQDECW_Z_ZS_: - case ENC_SQINCD_Z_ZS_: - case ENC_SQINCH_Z_ZS_: - case ENC_SQINCW_Z_ZS_: - case ENC_UQDECD_Z_ZS_: - case ENC_UQDECH_Z_ZS_: - case ENC_UQDECW_Z_ZS_: - case ENC_UQINCD_Z_ZS_: - case ENC_UQINCH_Z_ZS_: - case ENC_UQINCW_Z_ZS_: - // xxx|xxxx|x|size=xx|x|x|imm4=xxxx|xx|xx|D=x|U=x|pattern=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->imm4 = (insword>>16)&15; - ctx->D = (insword>>11)&1; - ctx->U = (insword>>10)&1; - ctx->pattern = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_BFADD_Z_P_ZZ_: - case ENC_BFMAX_Z_P_ZZ_: - case ENC_BFMAXNM_Z_P_ZZ_: - case ENC_BFMIN_Z_P_ZZ_: - case ENC_BFMINNM_Z_P_ZZ_: - case ENC_BFMUL_Z_P_ZZ_: - case ENC_BFSCALE_Z_P_ZZ_: - case ENC_BFSUB_Z_P_ZZ_: - case ENC_FABD_Z_P_ZZ_: - case ENC_FADD_Z_P_ZZ_: - case ENC_FAMAX_Z_P_ZZ_: - case ENC_FAMIN_Z_P_ZZ_: - case ENC_FDIV_Z_P_ZZ_: - case ENC_FDIVR_Z_P_ZZ_: - case ENC_FMAX_Z_P_ZZ_: - case ENC_FMAXNM_Z_P_ZZ_: - case ENC_FMIN_Z_P_ZZ_: - case ENC_FMINNM_Z_P_ZZ_: - case ENC_FMUL_Z_P_ZZ_: - case ENC_FMULX_Z_P_ZZ_: - case ENC_FSCALE_Z_P_ZZ_: - case ENC_FSUB_Z_P_ZZ_: - case ENC_FSUBR_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|x|opc=xxxx|xxx|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&15; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_CLASTA_R_P_Z_: - case ENC_CLASTB_R_P_Z_: - // xxx|xxxx|x|size=xx|x|x|xxx|B=x|xx|x|Pg=xxx|Zm=xxxxx|Rdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->B = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Rdn = insword&0x1f; - break; - case ENC_CLASTA_V_P_Z_: - case ENC_CLASTB_V_P_Z_: - // xxx|xxxx|x|size=xx|x|x|xxx|B=x|xx|x|Pg=xxx|Zm=xxxxx|Vdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->B = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Vdn = insword&0x1f; - break; - case ENC_CLASTA_Z_P_ZZ_: - case ENC_CLASTB_Z_P_ZZ_: - // xxx|xxxx|x|size=xx|x|x|xxx|B=x|xx|x|Pg=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->B = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_LASTA_R_P_Z_: - case ENC_LASTB_R_P_Z_: - // xxx|xxxx|x|size=xx|x|x|xxx|B=x|xx|x|Pg=xxx|Zn=xxxxx|Rd=xxxxx - ctx->size = (insword>>22)&3; - ctx->B = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_LASTA_V_P_Z_: - case ENC_LASTB_V_P_Z_: - // xxx|xxxx|x|size=xx|x|x|xxx|B=x|xx|x|Pg=xxx|Zn=xxxxx|Vd=xxxxx - ctx->size = (insword>>22)&3; - ctx->B = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Vd = insword&0x1f; - break; - case ENC_REVD_Z_P_Z_M: - case ENC_REVD_Z_P_Z_Z: - // xxx|xxxx|x|size=xx|x|x|xxx|x|xx|Z=x|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Z = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_CPY_Z_P_R_: - case ENC_MOV_Z_P_R__CPY_Z_P_R_: - // xxx|xxxx|x|size=xx|x|x|xxx|x|xx|x|Pg=xxx|Rn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_CPY_Z_P_V_: - case ENC_MOV_Z_P_V__CPY_Z_P_V_: - // xxx|xxxx|x|size=xx|x|x|xxx|x|xx|x|Pg=xxx|Vn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Pg = (insword>>10)&7; - ctx->Vn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_EXPAND_Z_P_Z_: - // xxx|xxxx|x|size=xx|x|x|xxx|x|xx|x|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SPLICE_Z_P_ZZ_DES: - // xxx|xxxx|x|size=xx|x|x|xxx|x|xx|x|Pv=xxx|Zm=xxxxx|Zdn=xxxxx - ctx->size = (insword>>22)&3; - ctx->Pv = (insword>>10)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_SPLICE_Z_P_ZZ_CON: - // xxx|xxxx|x|size=xx|x|x|xxx|x|xx|x|Pv=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Pv = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_RBIT_Z_P_Z_M: - case ENC_RBIT_Z_P_Z_Z: - case ENC_REVB_Z_Z_M: - case ENC_REVB_Z_Z_Z: - case ENC_REVH_Z_Z_M: - case ENC_REVH_Z_Z_Z: - case ENC_REVW_Z_Z_M: - case ENC_REVW_Z_Z_Z: - // xxx|xxxx|x|size=xx|x|x|xx|opc=xx|xx|Z=x|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&3; - ctx->Z = (insword>>13)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_XAR_Z_ZZI_: - // xxx|xxxx|x|tszh=xx|x|tszl=xx|imm3=xxx|xxx|xxx|Zm=xxxxx|Zdn=xxxxx - ctx->tszh = (insword>>22)&3; - ctx->tszl = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_LSL_Z_ZI_: - // xxx|xxxx|x|tszh=xx|x|tszl=xx|imm3=xxx|xxx|x|opc=xx|Zn=xxxxx|Zd=xxxxx - ctx->tszh = (insword>>22)&3; - ctx->tszl = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_ASR_Z_ZI_: - case ENC_LSR_Z_ZI_: - // xxx|xxxx|x|tszh=xx|x|tszl=xx|imm3=xxx|xxx|x|x|U=x|Zn=xxxxx|Zd=xxxxx - ctx->tszh = (insword>>22)&3; - ctx->tszl = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SLI_Z_ZZI_: - case ENC_SRI_Z_ZZI_: - // xxx|xxxx|x|tszh=xx|x|tszl=xx|imm3=xxx|xx|xxx|op=x|Zn=xxxxx|Zd=xxxxx - ctx->tszh = (insword>>22)&3; - ctx->tszl = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->op = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SRSRA_Z_ZI_: - case ENC_SSRA_Z_ZI_: - case ENC_URSRA_Z_ZI_: - case ENC_USRA_Z_ZI_: - // xxx|xxxx|x|tszh=xx|x|tszl=xx|imm3=xxx|xx|xx|R=x|U=x|Zn=xxxxx|Zda=xxxxx - ctx->tszh = (insword>>22)&3; - ctx->tszl = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->R = (insword>>11)&1; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_ASR_Z_P_ZI_: - case ENC_ASRD_Z_P_ZI_: - case ENC_LSL_Z_P_ZI_: - case ENC_LSR_Z_P_ZI_: - case ENC_SQSHL_Z_P_ZI_: - case ENC_SQSHLU_Z_P_ZI_: - case ENC_SRSHR_Z_P_ZI_: - case ENC_UQSHL_Z_P_ZI_: - case ENC_URSHR_Z_P_ZI_: - // xxx|xxxx|x|tszh=xx|x|x|opc=xx|L=x|U=x|xxx|Pg=xxx|tszl=xx|imm3=xxx|Zdn=xxxxx - ctx->tszh = (insword>>22)&3; - ctx->opc = (insword>>18)&3; - ctx->L = (insword>>17)&1; - ctx->U = (insword>>16)&1; - ctx->Pg = (insword>>10)&7; - ctx->tszl = (insword>>8)&3; - ctx->imm3 = (insword>>5)&7; - ctx->Zdn = insword&0x1f; - break; - case ENC_SMMLA_Z_ZZZ_: - case ENC_UMMLA_Z_ZZZ_: - case ENC_USMMLA_Z_ZZZ_: - // xxx|xxxx|x|uns=xx|x|Zm=xxxxx|xx|xxxx|Zn=xxxxx|Zda=xxxxx - ctx->uns = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FCVTNB_Z8_MZ2_S2B: - case ENC_FCVTNT_Z8_MZ2_S2B: - // xxx|xxxx|x|xx|xxx|xxx|xxxx|T=x|x|Zn=xxxx|x|Zd=xxxxx - ctx->T = (insword>>11)&1; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_BFCVTN_Z8_MZ2_BF2B: - case ENC_FCVTN_Z8_MZ2_H2B: - // xxx|xxxx|x|xx|xxx|xxx|xxxx|opc=xx|Zn=xxxx|x|Zd=xxxxx - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_BF1CVT_Z_Z8_B2BF: - case ENC_BF2CVT_Z_Z8_B2BF: - case ENC_BF1CVTLT_Z_Z8_B2BF: - case ENC_BF2CVTLT_Z_Z8_B2BF: - case ENC_F1CVT_Z_Z8_B2H: - case ENC_F2CVT_Z_Z8_B2H: - case ENC_F1CVTLT_Z_Z8_B2H: - case ENC_F2CVTLT_Z_Z8_B2H: - // xxx|xxxx|x|xx|xxx|xx|L=x|xxxx|opc=xx|Zn=xxxxx|Zd=xxxxx - ctx->L = (insword>>16)&1; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_DUPM_Z_I_: - case ENC_MOV_Z_M__DUPM_Z_I_: - // xxx|xxxx|x|xx|xx|xx|imm13=xxxxxxxxxxxxx|Zd=xxxxx - ctx->imm13 = (insword>>5)&0x1fff; - ctx->Zd = insword&0x1f; - break; - case ENC_DUPQ_Z_ZI_: - // xxx|xxxx|x|xx|x|i1=x|tsz=xxxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->i1 = (insword>>20)&1; - ctx->tsz = (insword>>16)&15; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_PUNPKHI_P_P_: - case ENC_PUNPKLO_P_P_: - // xxx|xxxx|x|xx|x|xxxx|H=x|xxx|xxxx|Pn=xxxx|x|Pd=xxxx - ctx->H = (insword>>16)&1; - ctx->Pn = (insword>>5)&15; - ctx->Pd = insword&15; - break; - case ENC_EXTQ_Z_ZI_DES: - // xxx|xxxx|x|xx|x|x|imm4=xxxx|xxxxxx|Zm=xxxxx|Zdn=xxxxx - ctx->imm4 = (insword>>16)&15; - ctx->Zm = (insword>>5)&0x1f; - ctx->Zdn = insword&0x1f; - break; - case ENC_BRKN_P_P_PP_: - case ENC_BRKNS_P_P_PP_: - // xxx|xxxx|x|x|S=x|xx|xxxx|xx|Pg=xxxx|x|Pn=xxxx|x|Pdm=xxxx - ctx->S = (insword>>22)&1; - ctx->Pg = (insword>>10)&15; - ctx->Pn = (insword>>5)&15; - ctx->Pdm = insword&15; - break; - case ENC_MUL_Z_ZZI_H: - // xxx|xxxx|x|x|i3h=x|x|i3l=xx|Zm=xxx|xxxxxx|Zn=xxxxx|Zd=xxxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQDMULH_Z_ZZI_H: - case ENC_SQRDMULH_Z_ZZI_H: - // xxx|xxxx|x|x|i3h=x|x|i3l=xx|Zm=xxx|xxxxx|R=x|Zn=xxxxx|Zd=xxxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->R = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_MLA_Z_ZZZI_H: - case ENC_MLS_Z_ZZZI_H: - case ENC_SQRDMLAH_Z_ZZZI_H: - case ENC_SQRDMLSH_Z_ZZZI_H: - // xxx|xxxx|x|x|i3h=x|x|i3l=xx|Zm=xxx|xxxxx|S=x|Zn=xxxxx|Zda=xxxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->S = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SDOT_Z16_ZZZI_H: - case ENC_UDOT_Z16_ZZZI_H: - // xxx|xxxx|x|x|i3h=x|x|i3l=xx|Zm=xxx|xxxxx|U=x|Zn=xxxxx|Zda=xxxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->U = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_BFMLA_Z_ZZZI_H: - case ENC_BFMLS_Z_ZZZI_H: - case ENC_FMLA_Z_ZZZI_H: - case ENC_FMLS_Z_ZZZI_H: - // xxx|xxxx|x|x|i3h=x|x|i3l=xx|Zm=xxx|xxxx|o2=x|op=x|Zn=xxxxx|Zda=xxxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->o2 = (insword>>11)&1; - ctx->op = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_BFMUL_Z_ZZI_H: - case ENC_FMUL_Z_ZZI_H: - // xxx|xxxx|x|x|i3h=x|x|i3l=xx|Zm=xxx|xxxx|o2=x|x|Zn=xxxxx|Zd=xxxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->o2 = (insword>>11)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_PMOV_P_ZI_D: - // xxx|xxxx|x|x|i3h=x|x|xx|i3l=xx|x|xxxxxx|Zn=xxxxx|x|Pd=xxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>17)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Pd = insword&15; - break; - case ENC_PMOV_Z_PI_D: - // xxx|xxxx|x|x|i3h=x|x|xx|i3l=xx|x|xxxxxx|x|Pn=xxxx|Zd=xxxxx - ctx->i3h = (insword>>22)&1; - ctx->i3l = (insword>>17)&3; - ctx->Pn = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_BFMLALB_Z_ZZZ_: - case ENC_BFMLALT_Z_ZZZ_: - case ENC_BFMLSLB_Z_ZZZ_: - case ENC_BFMLSLT_Z_ZZZ_: - case ENC_FMLALB_Z_ZZZ_: - case ENC_FMLALT_Z_ZZZ_: - case ENC_FMLSLB_Z_ZZZ_: - case ENC_FMLSLT_Z_ZZZ_: - // xxx|xxxx|x|x|o2=x|x|Zm=xxxxx|xx|op=x|xx|T=x|Zn=xxxxx|Zda=xxxxx - ctx->o2 = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->op = (insword>>13)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_BFMLALB_Z_ZZZI_: - case ENC_BFMLALT_Z_ZZZI_: - case ENC_BFMLSLB_Z_ZZZI_: - case ENC_BFMLSLT_Z_ZZZI_: - case ENC_FMLALB_Z_ZZZI_S: - case ENC_FMLALT_Z_ZZZI_S: - case ENC_FMLSLB_Z_ZZZI_S: - case ENC_FMLSLT_Z_ZZZI_S: - // xxx|xxxx|x|x|o2=x|x|i3h=xx|Zm=xxx|xx|op=x|x|i3l=x|T=x|Zn=xxxxx|Zda=xxxxx - ctx->o2 = (insword>>22)&1; - ctx->i3h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->op = (insword>>13)&1; - ctx->i3l = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_SQSHRN_Z_MZ2_: - case ENC_SQSHRUN_Z_MZ2_: - case ENC_UQSHRN_Z_MZ2_: - // xxx|xxxx|x|x|op0=x|x|tsize=xx|imm3=xxx|x|x|op1=x|U=x|R=x|x|Zn=xxxx|x|Zd=xxxxx - ctx->op0 = (insword>>22)&1; - ctx->tsize = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->op1 = (insword>>13)&1; - ctx->U = (insword>>12)&1; - ctx->R = (insword>>11)&1; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_SQRSHRN_Z_MZ2_B: - case ENC_SQRSHRUN_Z_MZ2_B: - case ENC_UQRSHRN_Z_MZ2_B: - // xxx|xxxx|x|x|op0=x|x|xx|imm3=xxx|x|x|op1=x|U=x|R=x|x|Zn=xxxx|x|Zd=xxxxx - ctx->op0 = (insword>>22)&1; - ctx->imm3 = (insword>>16)&7; - ctx->op1 = (insword>>13)&1; - ctx->U = (insword>>12)&1; - ctx->R = (insword>>11)&1; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_SQRSHRN_Z_MZ2_: - case ENC_SQRSHRUN_Z_MZ2_: - case ENC_UQRSHRN_Z_MZ2_: - // xxx|xxxx|x|x|op0=x|x|x|imm4=xxxx|x|x|op1=x|U=x|R=x|x|Zn=xxxx|x|Zd=xxxxx - ctx->op0 = (insword>>22)&1; - ctx->imm4 = (insword>>16)&15; - ctx->op1 = (insword>>13)&1; - ctx->U = (insword>>12)&1; - ctx->R = (insword>>11)&1; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_ADDPL_R_RI_: - case ENC_ADDSPL_R_RI_: - case ENC_ADDSVL_R_RI_: - case ENC_ADDVL_R_RI_: - // xxx|xxxx|x|x|op=x|x|Rn=xxxxx|xxxx|x|imm6=xxxxxx|Rd=xxxxx - ctx->op = (insword>>22)&1; - ctx->Rn = (insword>>16)&0x1f; - ctx->imm6 = (insword>>5)&0x3f; - ctx->Rd = insword&0x1f; - break; - case ENC_BFDOT_Z_ZZZ_: - case ENC_FDOT_Z32_ZZ8Z8_: - case ENC_FDOT_Z_ZZ8Z8_: - case ENC_FDOT_Z_ZZZ_: - // xxx|xxxx|x|x|op=x|x|Zm=xxxxx|xx|x|xx|o2=x|Zn=xxxxx|Zda=xxxxx - ctx->op = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->o2 = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_BFDOT_Z_ZZZI_: - case ENC_FDOT_Z32_ZZ8Z8I_: - case ENC_FDOT_Z_ZZZI_: - // xxx|xxxx|x|x|op=x|x|i2=xx|Zm=xxx|xx|x|x|opc2=xx|Zn=xxxxx|Zda=xxxxx - ctx->op = (insword>>22)&1; - ctx->i2 = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FDOT_Z_ZZ8Z8I_: - // xxx|xxxx|x|x|op=x|x|i3h=xx|Zm=xxx|xx|x|x|i3l=x|x|Zn=xxxxx|Zda=xxxxx - ctx->op = (insword>>22)&1; - ctx->i3h = (insword>>19)&3; - ctx->Zm = (insword>>16)&7; - ctx->i3l = (insword>>11)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_RDSVL_R_I_: - case ENC_RDVL_R_I_: - // xxx|xxxx|x|x|op=x|x|opc2=xxxxx|xxxx|x|imm6=xxxxxx|Rd=xxxxx - ctx->op = (insword>>22)&1; - ctx->opc2 = (insword>>16)&0x1f; - ctx->imm6 = (insword>>5)&0x3f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADR_Z_AZ_SD_SAME_SCALED: - // xxx|xxxx|x|x|sz=x|x|Zm=xxxxx|xxxx|msz=xx|Zn=xxxxx|Zd=xxxxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->msz = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_ADCLB_Z_ZZZ_: - case ENC_ADCLT_Z_ZZZ_: - case ENC_SBCLB_Z_ZZZ_: - case ENC_SBCLT_Z_ZZZ_: - // xxx|xxxx|x|x|sz=x|x|Zm=xxxxx|xx|xxx|T=x|Zn=xxxxx|Zda=xxxxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_COMPACT_Z_P_Z_S: - case ENC_COMPACT_Z_P_Z_: - // xxx|xxxx|x|x|sz=x|x|x|xxx|x|xx|x|Pg=xxx|Zn=xxxxx|Zd=xxxxx - ctx->sz = (insword>>22)&1; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SSHLLB_Z_ZI_: - case ENC_SSHLLT_Z_ZI_: - case ENC_USHLLB_Z_ZI_: - case ENC_USHLLT_Z_ZI_: - // xxx|xxxx|x|x|tszh=x|x|tszl=xx|imm3=xxx|xx|xx|U=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->tszh = (insword>>22)&1; - ctx->tszl = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->U = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_RSHRNB_Z_ZI_: - case ENC_RSHRNT_Z_ZI_: - case ENC_SHRNB_Z_ZI_: - case ENC_SHRNT_Z_ZI_: - case ENC_SQRSHRNB_Z_ZI_: - case ENC_SQRSHRNT_Z_ZI_: - case ENC_SQRSHRUNB_Z_ZI_: - case ENC_SQRSHRUNT_Z_ZI_: - case ENC_SQSHRNB_Z_ZI_: - case ENC_SQSHRNT_Z_ZI_: - case ENC_SQSHRUNB_Z_ZI_: - case ENC_SQSHRUNT_Z_ZI_: - case ENC_UQRSHRNB_Z_ZI_: - case ENC_UQRSHRNT_Z_ZI_: - case ENC_UQSHRNB_Z_ZI_: - case ENC_UQSHRNT_Z_ZI_: - // xxx|xxxx|x|x|tszh=x|x|tszl=xx|imm3=xxx|x|x|op=x|U=x|R=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->tszh = (insword>>22)&1; - ctx->tszl = (insword>>19)&3; - ctx->imm3 = (insword>>16)&7; - ctx->op = (insword>>13)&1; - ctx->U = (insword>>12)&1; - ctx->R = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQXTUNB_Z_ZZ_: - case ENC_SQXTUNT_Z_ZZ_: - // xxx|xxxx|x|x|tszh=x|x|tszl=xx|xx|x|x|xx|opc=xx|T=x|Zn=xxxxx|Zd=xxxxx - ctx->tszh = (insword>>22)&1; - ctx->tszl = (insword>>19)&3; - ctx->opc = (insword>>11)&3; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQCVTUN_Z_MZ2_: - // xxx|xxxx|x|x|tszh=x|x|tszl=xx|xx|x|x|xx|opc=xx|x|Zn=xxxx|x|Zd=xxxxx - ctx->tszh = (insword>>22)&1; - ctx->tszl = (insword>>19)&3; - ctx->opc = (insword>>11)&3; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_SQXTNB_Z_ZZ_: - case ENC_SQXTNT_Z_ZZ_: - case ENC_UQXTNB_Z_ZZ_: - case ENC_UQXTNT_Z_ZZ_: - // xxx|xxxx|x|x|tszh=x|x|tszl=xx|xx|x|x|xx|x|U=x|T=x|Zn=xxxxx|Zd=xxxxx - ctx->tszh = (insword>>22)&1; - ctx->tszl = (insword>>19)&3; - ctx->U = (insword>>11)&1; - ctx->T = (insword>>10)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SQCVTN_Z_MZ2_: - case ENC_UQCVTN_Z_MZ2_: - // xxx|xxxx|x|x|tszh=x|x|tszl=xx|xx|x|x|xx|x|U=x|x|Zn=xxxx|x|Zd=xxxxx - ctx->tszh = (insword>>22)&1; - ctx->tszl = (insword>>19)&3; - ctx->U = (insword>>11)&1; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_FMLALLBB_Z32_Z8Z8Z8_: - case ENC_FMLALLBT_Z32_Z8Z8Z8_: - case ENC_FMLALLTB_Z32_Z8Z8Z8_: - case ENC_FMLALLTT_Z32_Z8Z8Z8_: - // xxx|xxxx|x|x|xx|Zm=xxxxx|xx|TT=xx|xx|Zn=xxxxx|Zda=xxxxx - ctx->Zm = (insword>>16)&0x1f; - ctx->TT = (insword>>12)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_FMLALB_Z_Z8Z8Z8_: - case ENC_FMLALT_Z_Z8Z8Z8_: - // xxx|xxxx|x|x|xx|Zm=xxxxx|xx|x|T=x|xx|Zn=xxxxx|Zda=xxxxx - ctx->Zm = (insword>>16)&0x1f; - ctx->T = (insword>>12)&1; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zda = insword&0x1f; - break; - case ENC_LUTI6_Z_ZZZ_8: - // xxx|xxxx|x|x|x|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxxx - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_WFET_ONLY_SYSTEMINSTRSWITHREG: - case ENC_WFIT_ONLY_SYSTEMINSTRSWITHREG: - // xxx|xxx|xxxxxxxxxxxxxx|CRm=xxxx|op2=xxx|Rd=xxxxx - ctx->CRm = (insword>>8)&15; - ctx->op2 = (insword>>5)&7; - ctx->Rd = insword&0x1f; - break; - case ENC_CLREX_BN_BARRIERS: - // xxx|xxx|xxxxxxxxxxxxxx|CRm=xxxx|op2=xxx|Rt=xxxxx - ctx->CRm = (insword>>8)&15; - ctx->op2 = (insword>>5)&7; - ctx->Rt = insword&0x1f; - break; - case ENC_BTI_HB_HINTS: - case ENC_CHKFEAT_HF_HINTS: - case ENC_CLRBHB_HI_HINTS: - case ENC_CSDB_HI_HINTS: - case ENC_DGH_HI_HINTS: - case ENC_ESB_HI_HINTS: - case ENC_GCSB_HD_HINTS: - case ENC_HINT_HM_HINTS: - case ENC_NOP_HI_HINTS: - case ENC_PACM_HI_HINTS: - case ENC_PSB_HC_HINTS: - case ENC_SEV_HI_HINTS: - case ENC_SEVL_HI_HINTS: - case ENC_SHUH_HI_HINTS: - case ENC_STCPH_HI_HINTS: - case ENC_STSHH_HI_HINTS: - case ENC_TSB_HC_HINTS: - case ENC_WFE_HI_HINTS: - case ENC_WFI_HI_HINTS: - case ENC_XPACLRI_HI_HINTS: - case ENC_YIELD_HI_HINTS: - // xxx|xxx|xxxxxxxxxxxxxx|CRm=xxxx|op2=xxx|xxxxx - ctx->CRm = (insword>>8)&15; - ctx->op2 = (insword>>5)&7; - break; - case ENC_DMB_BO_BARRIERS: - case ENC_DSB_BO_BARRIERS: - case ENC_ISB_BI_BARRIERS: - case ENC_PSSBB_DSB_BO_BARRIERS: - case ENC_SB_ONLY_BARRIERS: - case ENC_SSBB_DSB_BO_BARRIERS: - // xxx|xxx|xxxxxxxxxxxxxx|CRm=xxxx|x|opc=xx|Rt=xxxxx - ctx->CRm = (insword>>8)&15; - ctx->opc = (insword>>5)&3; - ctx->Rt = insword&0x1f; - break; - case ENC_DSB_BON_BARRIERS: - // xxx|xxx|xxxxxxxxxxxxxx|imm2=xx|xx|op2=xxx|Rt=xxxxx - ctx->imm2 = (insword>>10)&3; - ctx->op2 = (insword>>5)&7; - ctx->Rt = insword&0x1f; - break; - case ENC_AXFLAG_M_PSTATE: - case ENC_CFINV_M_PSTATE: - case ENC_MSR_SI_PSTATE: - case ENC_SMSTART_MSR_SI_PSTATE: - case ENC_SMSTOP_MSR_SI_PSTATE: - case ENC_XAFLAG_M_PSTATE: - // xxx|xxx|xxxxxxx|op1=xxx|xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx - ctx->op1 = (insword>>16)&7; - ctx->CRm = (insword>>8)&15; - ctx->op2 = (insword>>5)&7; - ctx->Rt = insword&0x1f; - break; - case ENC_APAS_SYS_CR_SYSTEMINSTRS: - case ENC_AT_SYS_CR_SYSTEMINSTRS: - case ENC_BRB_SYS_CR_SYSTEMINSTRS: - case ENC_CFP_SYS_CR_SYSTEMINSTRS: - case ENC_COSP_SYS_CR_SYSTEMINSTRS: - case ENC_CPP_SYS_CR_SYSTEMINSTRS: - case ENC_DC_SYS_CR_SYSTEMINSTRS: - case ENC_DVP_SYS_CR_SYSTEMINSTRS: - case ENC_GCSPOPCX_SYS_CR_SYSTEMINSTRS: - case ENC_GCSPOPM_SYSL_RC_SYSTEMINSTRS: - case ENC_GCSPOPX_SYS_CR_SYSTEMINSTRS: - case ENC_GCSPUSHM_SYS_CR_SYSTEMINSTRS: - case ENC_GCSPUSHX_SYS_CR_SYSTEMINSTRS: - case ENC_GCSSS1_SYS_CR_SYSTEMINSTRS: - case ENC_GCSSS2_SYSL_RC_SYSTEMINSTRS: - case ENC_GICR_SYSL_RC_SYSTEMINSTRS: - case ENC_GIC_SYS_CR_SYSTEMINSTRS: - case ENC_GSB_SYS_CR_SYSTEMINSTRS: - case ENC_IC_SYS_CR_SYSTEMINSTRS: - case ENC_MLBI_SYS_CR_SYSTEMINSTRS: - case ENC_SYS_CR_SYSTEMINSTRS: - case ENC_SYSL_RC_SYSTEMINSTRS: - case ENC_SYSP_CR_SYSPAIRINSTRS: - case ENC_TLBIP_SYSP_CR_SYSPAIRINSTRS: - case ENC_TLBI_SYS_CR_SYSTEMINSTRS: - case ENC_TRCIT_SYS_CR_SYSTEMINSTRS: - // xxx|xxx|xxxx|L=x|xx|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx - ctx->L = (insword>>21)&1; - ctx->op1 = (insword>>16)&7; - ctx->CRn = (insword>>12)&15; - ctx->CRm = (insword>>8)&15; - ctx->op2 = (insword>>5)&7; - ctx->Rt = insword&0x1f; - break; - case ENC_MRRS_RS_SYSTEMMOVEPR: - case ENC_MRS_RS_SYSTEMMOVE: - case ENC_MSRR_SR_SYSTEMMOVEPR: - case ENC_MSR_SR_SYSTEMMOVE: - // xxx|xxx|xxxx|L=x|x|o0=x|op1=xxx|CRn=xxxx|CRm=xxxx|op2=xxx|Rt=xxxxx - ctx->L = (insword>>21)&1; - ctx->o0 = (insword>>19)&1; - ctx->op1 = (insword>>16)&7; - ctx->CRn = (insword>>12)&15; - ctx->CRm = (insword>>8)&15; - ctx->op2 = (insword>>5)&7; - ctx->Rt = insword&0x1f; - break; - case ENC_CBBLE_CBBGE_8_REGS: - case ENC_CBBLO_CBBHI_8_REGS: - case ENC_CBBLS_CBBHS_8_REGS: - case ENC_CBBLT_CBBGT_8_REGS: - case ENC_CBHLE_CBHGE_16_REGS: - case ENC_CBHLO_CBHHI_16_REGS: - case ENC_CBHLS_CBHHS_16_REGS: - case ENC_CBHLT_CBHGT_16_REGS: - // xxx|xxx|xx|cc=xxx|Rm=xxxxx|x|H=x|imm9=xxxxxxxxx|Rt=xxxxx - ctx->cc = (insword>>21)&7; - ctx->Rm = (insword>>16)&0x1f; - ctx->H = (insword>>14)&1; - ctx->imm9 = (insword>>5)&0x1ff; - ctx->Rt = insword&0x1f; - break; - case ENC_BC_ONLY_CONDBRANCH: - case ENC_B_ONLY_CONDBRANCH: - // xxx|xxx|xx|imm19=xxxxxxxxxxxxxxxxxxx|o0=x|cond=xxxx - ctx->imm19 = (insword>>5)&0x7ffff; - ctx->o0 = (insword>>4)&1; - ctx->cond = insword&15; - break; - case ENC_BRK_EX_EXCEPTION: - case ENC_DCPS1_DC_EXCEPTION: - case ENC_DCPS2_DC_EXCEPTION: - case ENC_DCPS3_DC_EXCEPTION: - case ENC_HLT_EX_EXCEPTION: - case ENC_HVC_EX_EXCEPTION: - case ENC_SMC_EX_EXCEPTION: - case ENC_SVC_EX_EXCEPTION: - // xxx|xxx|xx|opc=xxx|imm16=xxxxxxxxxxxxxxxx|op2=xxx|LL=xx - ctx->opc = (insword>>21)&7; - ctx->imm16 = (insword>>5)&0xffff; - ctx->op2 = (insword>>2)&7; - ctx->LL = insword&3; - break; - case ENC_BLR_64_BRANCH_REG: - case ENC_BR_64_BRANCH_REG: - case ENC_RET_64R_BRANCH_REG: - // xxx|xxx|x|Z=x|x|op=xx|op2=xxxxx|xxxx|A=x|M=x|Rn=xxxxx|Rm=xxxxx - ctx->Z = (insword>>24)&1; - ctx->op = (insword>>21)&3; - ctx->op2 = (insword>>16)&0x1f; - ctx->A = (insword>>11)&1; - ctx->M = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rm = insword&0x1f; - break; - case ENC_DRPS_64E_BRANCH_REG: - // xxx|xxx|x|opc=xxxx|op2=xxxxx|op3=xxxxxx|Rn=xxxxx|op4=xxxxx - ctx->opc = (insword>>21)&15; - ctx->op2 = (insword>>16)&0x1f; - ctx->op3 = (insword>>10)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->op4 = insword&0x1f; - break; - case ENC_ERET_64E_BRANCH_REG: - // xxx|xxx|x|opc=xxxx|op2=xxxxx|xxxx|A=x|M=x|Rn=xxxxx|op4=xxxxx - ctx->opc = (insword>>21)&15; - ctx->op2 = (insword>>16)&0x1f; - ctx->A = (insword>>11)&1; - ctx->M = (insword>>10)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->op4 = insword&0x1f; - break; - case ENC_FCVTZS_ASISDSHF_C: - case ENC_FCVTZU_ASISDSHF_C: - case ENC_SCVTF_ASISDSHF_C: - case ENC_SHL_ASISDSHF_R: - case ENC_SLI_ASISDSHF_R: - case ENC_SRI_ASISDSHF_R: - case ENC_UCVTF_ASISDSHF_C: - // xx|U=x|x|xxx|xx|immh=xxxx|immb=xxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQRSHRN_ASISDSHF_N: - case ENC_SQRSHRUN_ASISDSHF_N: - case ENC_SQSHRN_ASISDSHF_N: - case ENC_SQSHRUN_ASISDSHF_N: - case ENC_UQRSHRN_ASISDSHF_N: - case ENC_UQSHRN_ASISDSHF_N: - // xx|U=x|x|xxx|xx|immh=xxxx|immb=xxx|xxxx|op=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->op = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQSHLU_ASISDSHF_R: - case ENC_SQSHL_ASISDSHF_R: - case ENC_UQSHL_ASISDSHF_R: - // xx|U=x|x|xxx|xx|immh=xxxx|immb=xxx|xxx|op=x|x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SRSHR_ASISDSHF_R: - case ENC_SRSRA_ASISDSHF_R: - case ENC_SSHR_ASISDSHF_R: - case ENC_SSRA_ASISDSHF_R: - case ENC_URSHR_ASISDSHF_R: - case ENC_URSRA_ASISDSHF_R: - case ENC_USHR_ASISDSHF_R: - case ENC_USRA_ASISDSHF_R: - // xx|U=x|x|xxx|xx|immh=xxxx|immb=xxx|xx|o1=x|o0=x|x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->o1 = (insword>>13)&1; - ctx->o0 = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FACGE_ASISDSAME_ONLY: - case ENC_FACGT_ASISDSAME_ONLY: - case ENC_FCMEQ_ASISDSAME_ONLY: - case ENC_FCMGE_ASISDSAME_ONLY: - case ENC_FCMGT_ASISDSAME_ONLY: - // xx|U=x|x|xxx|x|E=x|sz=x|x|Rm=xxxxx|xxxx|ac=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->E = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->ac = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FACGE_ASISDSAMEFP16_ONLY: - case ENC_FACGT_ASISDSAMEFP16_ONLY: - case ENC_FCMEQ_ASISDSAMEFP16_ONLY: - case ENC_FCMGE_ASISDSAMEFP16_ONLY: - case ENC_FCMGT_ASISDSAMEFP16_ONLY: - // xx|U=x|x|xxx|x|E=x|xx|Rm=xxxxx|xx|xx|ac=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->E = (insword>>23)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->ac = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCMLT_ASISDMISCFP16_FZ: - case ENC_FCVTAS_ASISDMISCFP16_R: - case ENC_FCVTAU_ASISDMISCFP16_R: - case ENC_FRECPE_ASISDMISCFP16_R: - case ENC_FRECPX_ASISDMISCFP16_R: - case ENC_FRSQRTE_ASISDMISCFP16_R: - case ENC_SCVTF_ASISDMISCFP16_R: - case ENC_UCVTF_ASISDMISCFP16_R: - // xx|U=x|x|xxx|x|a=x|xxxx|xx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->a = (insword>>23)&1; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCMEQ_ASISDMISCFP16_FZ: - case ENC_FCMGE_ASISDMISCFP16_FZ: - case ENC_FCMGT_ASISDMISCFP16_FZ: - case ENC_FCMLE_ASISDMISCFP16_FZ: - // xx|U=x|x|xxx|x|a=x|xxxx|xx|xxxx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->a = (insword>>23)&1; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FABD_ASISDSAMEFP16_ONLY: - case ENC_FMULX_ASISDSAMEFP16_ONLY: - case ENC_FRECPS_ASISDSAMEFP16_ONLY: - case ENC_FRSQRTS_ASISDSAMEFP16_ONLY: - // xx|U=x|x|xxx|x|a=x|xx|Rm=xxxxx|xx|opcode=xxx|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->a = (insword>>23)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMAXNMP_ASISDPAIR_ONLY_H: - case ENC_FMAXNMP_ASISDPAIR_ONLY_SD: - case ENC_FMAXP_ASISDPAIR_ONLY_H: - case ENC_FMAXP_ASISDPAIR_ONLY_SD: - case ENC_FMINNMP_ASISDPAIR_ONLY_H: - case ENC_FMINNMP_ASISDPAIR_ONLY_SD: - case ENC_FMINP_ASISDPAIR_ONLY_H: - case ENC_FMINP_ASISDPAIR_ONLY_SD: - // xx|U=x|x|xxx|x|o1=x|sz=x|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->o1 = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCVTMS_ASISDMISC_R: - case ENC_FCVTMU_ASISDMISC_R: - case ENC_FCVTNS_ASISDMISC_R: - case ENC_FCVTNU_ASISDMISC_R: - case ENC_FCVTPS_ASISDMISC_R: - case ENC_FCVTPU_ASISDMISC_R: - case ENC_FCVTZS_ASISDMISC_R: - case ENC_FCVTZU_ASISDMISC_R: - // xx|U=x|x|xxx|x|o2=x|sz=x|xxxxx|xxxx|o1=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->o2 = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->o1 = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCVTMS_ASISDMISCFP16_R: - case ENC_FCVTMU_ASISDMISCFP16_R: - case ENC_FCVTNS_ASISDMISCFP16_R: - case ENC_FCVTNU_ASISDMISCFP16_R: - case ENC_FCVTPS_ASISDMISCFP16_R: - case ENC_FCVTPU_ASISDMISCFP16_R: - case ENC_FCVTZS_ASISDMISCFP16_R: - case ENC_FCVTZU_ASISDMISCFP16_R: - // xx|U=x|x|xxx|x|o2=x|xxxx|xx|xxxx|o1=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->o2 = (insword>>23)&1; - ctx->o1 = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMULX_ASISDELEM_RH_H: - case ENC_FMUL_ASISDELEM_RH_H: - case ENC_SQDMULL_ASISDELEM_L: - // xx|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|opcode=xxxx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->opcode = (insword>>12)&15; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQDMULH_ASISDELEM_R: - case ENC_SQRDMULH_ASISDELEM_R: - // xx|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|xxx|op=x|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->op = (insword>>12)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQRDMLAH_ASISDELEM_R: - case ENC_SQRDMLSH_ASISDELEM_R: - // xx|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|xx|S=x|x|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->S = (insword>>13)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLA_ASISDELEM_RH_H: - case ENC_FMLS_ASISDELEM_RH_H: - case ENC_SQDMLAL_ASISDELEM_L: - case ENC_SQDMLSL_ASISDELEM_L: - // xx|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|x|o2=x|xx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->o2 = (insword>>14)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ABS_ASISDMISC_R: - case ENC_ADDP_ASISDPAIR_ONLY: - case ENC_CMLT_ASISDMISC_Z: - case ENC_FCVTXN_ASISDMISC_N: - case ENC_NEG_ASISDMISC_R: - case ENC_SQABS_ASISDMISC_R: - case ENC_SQNEG_ASISDMISC_R: - case ENC_SQXTN_ASISDMISC_N: - case ENC_SQXTUN_ASISDMISC_N: - case ENC_SUQADD_ASISDMISC_R: - case ENC_UQXTN_ASISDMISC_N: - case ENC_USQADD_ASISDMISC_R: - // xx|U=x|x|xxx|x|size=xx|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CMEQ_ASISDMISC_Z: - case ENC_CMGE_ASISDMISC_Z: - case ENC_CMGT_ASISDMISC_Z: - case ENC_CMLE_ASISDMISC_Z: - // xx|U=x|x|xxx|x|size=xx|xxxxx|xxxx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADD_ASISDSAME_ONLY: - case ENC_CMEQ_ASISDSAME_ONLY: - case ENC_CMTST_ASISDSAME_ONLY: - case ENC_SQADD_ASISDSAME_ONLY: - case ENC_SQDMULH_ASISDSAME_ONLY: - case ENC_SQRDMULH_ASISDSAME_ONLY: - case ENC_SQSUB_ASISDSAME_ONLY: - case ENC_SUB_ASISDSAME_ONLY: - case ENC_UQADD_ASISDSAME_ONLY: - case ENC_UQSUB_ASISDSAME_ONLY: - // xx|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQDMULL_ASISDDIFF_ONLY: - // xx|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|opcode=xxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CMGE_ASISDSAME_ONLY: - case ENC_CMGT_ASISDSAME_ONLY: - case ENC_CMHI_ASISDSAME_ONLY: - case ENC_CMHS_ASISDSAME_ONLY: - // xx|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xxxx|eq=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->eq = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQRSHL_ASISDSAME_ONLY: - case ENC_SQSHL_ASISDSAME_ONLY: - case ENC_SRSHL_ASISDSAME_ONLY: - case ENC_SSHL_ASISDSAME_ONLY: - case ENC_UQRSHL_ASISDSAME_ONLY: - case ENC_UQSHL_ASISDSAME_ONLY: - case ENC_URSHL_ASISDSAME_ONLY: - case ENC_USHL_ASISDSAME_ONLY: - // xx|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xxx|R=x|S=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->R = (insword>>12)&1; - ctx->S = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQDMLAL_ASISDDIFF_ONLY: - case ENC_SQDMLSL_ASISDDIFF_ONLY: - // xx|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xx|o1=x|x|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->o1 = (insword>>13)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQRDMLAH_ASISDSAME2_ONLY: - case ENC_SQRDMLSH_ASISDSAME2_ONLY: - // xx|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|x|xxx|S=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->S = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMULX_ASISDELEM_R_SD: - case ENC_FMUL_ASISDELEM_R_SD: - // xx|U=x|x|xxx|x|x|sz=x|L=x|M=x|Rm=xxxx|opcode=xxxx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->opcode = (insword>>12)&15; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLA_ASISDELEM_R_SD: - case ENC_FMLS_ASISDELEM_R_SD: - // xx|U=x|x|xxx|x|x|sz=x|L=x|M=x|Rm=xxxx|x|o2=x|xx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->o2 = (insword>>14)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FADDP_ASISDPAIR_ONLY_H: - case ENC_FADDP_ASISDPAIR_ONLY_SD: - case ENC_FCMLT_ASISDMISC_FZ: - case ENC_FCVTAS_ASISDMISC_R: - case ENC_FCVTAU_ASISDMISC_R: - case ENC_FRECPE_ASISDMISC_R: - case ENC_FRECPX_ASISDMISC_R: - case ENC_FRSQRTE_ASISDMISC_R: - case ENC_SCVTF_ASISDMISC_R: - case ENC_UCVTF_ASISDMISC_R: - // xx|U=x|x|xxx|x|x|sz=x|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCMEQ_ASISDMISC_FZ: - case ENC_FCMGE_ASISDMISC_FZ: - case ENC_FCMGT_ASISDMISC_FZ: - case ENC_FCMLE_ASISDMISC_FZ: - // xx|U=x|x|xxx|x|x|sz=x|xxxxx|xxxx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FABD_ASISDSAME_ONLY: - case ENC_FMULX_ASISDSAME_ONLY: - case ENC_FRECPS_ASISDSAME_ONLY: - case ENC_FRSQRTS_ASISDSAME_ONLY: - // xx|U=x|x|xxx|x|x|sz=x|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_DUP_ASISDONE_ONLY: - case ENC_MOV_DUP_ASISDONE_ONLY: - // xx|op=x|x|xxx|xx|xx|imm5=xxxxx|x|imm4=xxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->op = (insword>>29)&1; - ctx->imm5 = (insword>>16)&0x1f; - ctx->imm4 = (insword>>11)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLALB_ASIMDELEM_H: - case ENC_FMLALT_ASIMDELEM_H: - case ENC_FMLALLBB_ASIMDELEM_J: - case ENC_FMLALLBT_ASIMDELEM_J: - case ENC_FMLALLTB_ASIMDELEM_J: - case ENC_FMLALLTT_ASIMDELEM_J: - // x|Q=x|U=x|xxxxx|size=xx|L=x|M=x|Rm=xxxx|opcode=xxxx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->opcode = (insword>>12)&15; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_BF1CVTL_ASIMDMISC_V: - case ENC_BF2CVTL_ASIMDMISC_V: - case ENC_F1CVTL_ASIMDMISC_V: - case ENC_F2CVTL_ASIMDMISC_V: - // x|Q=x|U=x|xxxxx|size=xx|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLALB_ASIMDSAME2_J: - case ENC_FMLALT_ASIMDSAME2_J: - case ENC_FMLALLBB_ASIMDSAME2_G: - case ENC_FMLALLBT_ASIMDSAME2_G: - case ENC_FMLALLTB_ASIMDSAME2_G: - case ENC_FMLALLTT_ASIMDSAME2_G: - // x|Q=x|U=x|xxxxx|size=xx|x|Rm=xxxxx|x|opcode=xxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCVTZS_ASIMDSHF_C: - case ENC_FCVTZU_ASIMDSHF_C: - case ENC_SCVTF_ASIMDSHF_C: - case ENC_SHL_ASIMDSHF_R: - case ENC_SLI_ASIMDSHF_R: - case ENC_SRI_ASIMDSHF_R: - case ENC_SSHLL_ASIMDSHF_L: - case ENC_SXTL_SSHLL_ASIMDSHF_L: - case ENC_UCVTF_ASIMDSHF_C: - case ENC_USHLL_ASIMDSHF_L: - case ENC_UXTL_USHLL_ASIMDSHF_L: - // x|Q=x|U=x|x|xxx|xx|immh=xxxx|immb=xxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_RSHRN_ASIMDSHF_N: - case ENC_SHRN_ASIMDSHF_N: - case ENC_SQRSHRN_ASIMDSHF_N: - case ENC_SQRSHRUN_ASIMDSHF_N: - case ENC_SQSHRN_ASIMDSHF_N: - case ENC_SQSHRUN_ASIMDSHF_N: - case ENC_UQRSHRN_ASIMDSHF_N: - case ENC_UQSHRN_ASIMDSHF_N: - // x|Q=x|U=x|x|xxx|xx|immh=xxxx|immb=xxx|xxxx|op=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->op = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQSHLU_ASIMDSHF_R: - case ENC_SQSHL_ASIMDSHF_R: - case ENC_UQSHL_ASIMDSHF_R: - // x|Q=x|U=x|x|xxx|xx|immh=xxxx|immb=xxx|xxx|op=x|x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SRSHR_ASIMDSHF_R: - case ENC_SRSRA_ASIMDSHF_R: - case ENC_SSHR_ASIMDSHF_R: - case ENC_SSRA_ASIMDSHF_R: - case ENC_URSHR_ASIMDSHF_R: - case ENC_URSRA_ASIMDSHF_R: - case ENC_USHR_ASIMDSHF_R: - case ENC_USRA_ASIMDSHF_R: - // x|Q=x|U=x|x|xxx|xx|immh=xxxx|immb=xxx|xx|o1=x|o0=x|x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->immh = (insword>>19)&15; - ctx->immb = (insword>>16)&7; - ctx->o1 = (insword>>13)&1; - ctx->o0 = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FACGE_ASIMDSAME_ONLY: - case ENC_FACGT_ASIMDSAME_ONLY: - case ENC_FCMEQ_ASIMDSAME_ONLY: - case ENC_FCMGE_ASIMDSAME_ONLY: - case ENC_FCMGT_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|E=x|sz=x|x|Rm=xxxxx|xxxx|ac=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->E = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->ac = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FACGE_ASIMDSAMEFP16_ONLY: - case ENC_FACGT_ASIMDSAMEFP16_ONLY: - case ENC_FCMEQ_ASIMDSAMEFP16_ONLY: - case ENC_FCMGE_ASIMDSAMEFP16_ONLY: - case ENC_FCMGT_ASIMDSAMEFP16_ONLY: - // x|Q=x|U=x|x|xxx|x|E=x|xx|Rm=xxxxx|xx|xx|ac=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->E = (insword>>23)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->ac = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLAL_ASIMDSAME_F: - case ENC_FMLAL2_ASIMDSAME_F: - case ENC_FMLSL_ASIMDSAME_F: - case ENC_FMLSL2_ASIMDSAME_F: - // x|Q=x|U=x|x|xxx|x|S=x|sz=x|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->S = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SUDOT_ASIMDELEM_D: - case ENC_USDOT_ASIMDELEM_D: - // x|Q=x|U=x|x|xxx|x|US=x|x|L=x|M=x|Rm=xxxx|opcode=xxxx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->US = (insword>>23)&1; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->opcode = (insword>>12)&15; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FABS_ASIMDMISCFP16_R: - case ENC_FCMLT_ASIMDMISCFP16_FZ: - case ENC_FCVTAS_ASIMDMISCFP16_R: - case ENC_FCVTAU_ASIMDMISCFP16_R: - case ENC_FNEG_ASIMDMISCFP16_R: - case ENC_FRECPE_ASIMDMISCFP16_R: - case ENC_FRSQRTE_ASIMDMISCFP16_R: - case ENC_FSQRT_ASIMDMISCFP16_R: - case ENC_SCVTF_ASIMDMISCFP16_R: - case ENC_UCVTF_ASIMDMISCFP16_R: - // x|Q=x|U=x|x|xxx|x|a=x|xxxx|xx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->a = (insword>>23)&1; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCMEQ_ASIMDMISCFP16_FZ: - case ENC_FCMGE_ASIMDMISCFP16_FZ: - case ENC_FCMGT_ASIMDMISCFP16_FZ: - case ENC_FCMLE_ASIMDMISCFP16_FZ: - // x|Q=x|U=x|x|xxx|x|a=x|xxxx|xx|xxxx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->a = (insword>>23)&1; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FABD_ASIMDSAMEFP16_ONLY: - case ENC_FADDP_ASIMDSAMEFP16_ONLY: - case ENC_FADD_ASIMDSAMEFP16_ONLY: - case ENC_FAMAX_ASIMDSAMEFP16_ONLY: - case ENC_FAMIN_ASIMDSAMEFP16_ONLY: - case ENC_FDIV_ASIMDSAMEFP16_ONLY: - case ENC_FMAXNMP_ASIMDSAMEFP16_ONLY: - case ENC_FMAXNM_ASIMDSAMEFP16_ONLY: - case ENC_FMINNMP_ASIMDSAMEFP16_ONLY: - case ENC_FMINNM_ASIMDSAMEFP16_ONLY: - case ENC_FMLA_ASIMDSAMEFP16_ONLY: - case ENC_FMLS_ASIMDSAMEFP16_ONLY: - case ENC_FMULX_ASIMDSAMEFP16_ONLY: - case ENC_FMUL_ASIMDSAMEFP16_ONLY: - case ENC_FRECPS_ASIMDSAMEFP16_ONLY: - case ENC_FRSQRTS_ASIMDSAMEFP16_ONLY: - case ENC_FSCALE_ASIMDSAMEFP16_ONLY: - case ENC_FSUB_ASIMDSAMEFP16_ONLY: - // x|Q=x|U=x|x|xxx|x|a=x|xx|Rm=xxxxx|xx|opcode=xxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->a = (insword>>23)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMAXNMV_ASIMDALL_ONLY_SD: - case ENC_FMAXV_ASIMDALL_ONLY_SD: - case ENC_FMINNMV_ASIMDALL_ONLY_SD: - case ENC_FMINV_ASIMDALL_ONLY_SD: - // x|Q=x|U=x|x|xxx|x|o1=x|sz=x|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->o1 = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMAXNMP_ASIMDSAME_ONLY: - case ENC_FMAXNM_ASIMDSAME_ONLY: - case ENC_FMAXP_ASIMDSAME_ONLY: - case ENC_FMAX_ASIMDSAME_ONLY: - case ENC_FMINNMP_ASIMDSAME_ONLY: - case ENC_FMINNM_ASIMDSAME_ONLY: - case ENC_FMINP_ASIMDSAME_ONLY: - case ENC_FMIN_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|o1=x|sz=x|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->o1 = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMAXP_ASIMDSAMEFP16_ONLY: - case ENC_FMAX_ASIMDSAMEFP16_ONLY: - case ENC_FMINP_ASIMDSAMEFP16_ONLY: - case ENC_FMIN_ASIMDSAMEFP16_ONLY: - // x|Q=x|U=x|x|xxx|x|o1=x|xx|Rm=xxxxx|xx|opcode=xxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->o1 = (insword>>23)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMAXNMV_ASIMDALL_ONLY_H: - case ENC_FMAXV_ASIMDALL_ONLY_H: - case ENC_FMINNMV_ASIMDALL_ONLY_H: - case ENC_FMINV_ASIMDALL_ONLY_H: - // x|Q=x|U=x|x|xxx|x|o1=x|x|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->o1 = (insword>>23)&1; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCVTMS_ASIMDMISC_R: - case ENC_FCVTMU_ASIMDMISC_R: - case ENC_FCVTNS_ASIMDMISC_R: - case ENC_FCVTNU_ASIMDMISC_R: - case ENC_FCVTPS_ASIMDMISC_R: - case ENC_FCVTPU_ASIMDMISC_R: - case ENC_FCVTZS_ASIMDMISC_R: - case ENC_FCVTZU_ASIMDMISC_R: - case ENC_FRINTA_ASIMDMISC_R: - case ENC_FRINTI_ASIMDMISC_R: - case ENC_FRINTM_ASIMDMISC_R: - case ENC_FRINTN_ASIMDMISC_R: - case ENC_FRINTP_ASIMDMISC_R: - case ENC_FRINTX_ASIMDMISC_R: - case ENC_FRINTZ_ASIMDMISC_R: - // x|Q=x|U=x|x|xxx|x|o2=x|sz=x|xxxxx|xxxx|o1=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->o2 = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->o1 = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCVTMS_ASIMDMISCFP16_R: - case ENC_FCVTMU_ASIMDMISCFP16_R: - case ENC_FCVTNS_ASIMDMISCFP16_R: - case ENC_FCVTNU_ASIMDMISCFP16_R: - case ENC_FCVTPS_ASIMDMISCFP16_R: - case ENC_FCVTPU_ASIMDMISCFP16_R: - case ENC_FCVTZS_ASIMDMISCFP16_R: - case ENC_FCVTZU_ASIMDMISCFP16_R: - case ENC_FRINTA_ASIMDMISCFP16_R: - case ENC_FRINTI_ASIMDMISCFP16_R: - case ENC_FRINTM_ASIMDMISCFP16_R: - case ENC_FRINTN_ASIMDMISCFP16_R: - case ENC_FRINTP_ASIMDMISCFP16_R: - case ENC_FRINTX_ASIMDMISCFP16_R: - case ENC_FRINTZ_ASIMDMISCFP16_R: - // x|Q=x|U=x|x|xxx|x|o2=x|xxxx|xx|xxxx|o1=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->o2 = (insword>>23)&1; - ctx->o1 = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLA_ASIMDSAME_ONLY: - case ENC_FMLS_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|op=x|sz=x|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->op = (insword>>23)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_BIF_ASIMDSAME_ONLY: - case ENC_BIT_ASIMDSAME_ONLY: - case ENC_BSL_ASIMDSAME_ONLY: - case ENC_EOR_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|opc2=xx|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->opc2 = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_BFDOT_ASIMDELEM_E: - case ENC_BFMLAL_ASIMDELEM_F: - case ENC_FDOT_ASIMDELEM_G: - case ENC_FDOT_ASIMDELEM_D: - case ENC_FDOT_ASIMDELEM_FP16FP32: - case ENC_FMULX_ASIMDELEM_RH_H: - case ENC_FMUL_ASIMDELEM_RH_H: - case ENC_MUL_ASIMDELEM_R: - case ENC_SDOT_ASIMDELEM_D: - case ENC_SMULL_ASIMDELEM_L: - case ENC_SQDMULL_ASIMDELEM_L: - case ENC_UDOT_ASIMDELEM_D: - case ENC_UMULL_ASIMDELEM_L: - // x|Q=x|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|opcode=xxxx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->opcode = (insword>>12)&15; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQDMULH_ASIMDELEM_R: - case ENC_SQRDMULH_ASIMDELEM_R: - // x|Q=x|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|xxx|op=x|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->op = (insword>>12)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQRDMLAH_ASIMDELEM_R: - case ENC_SQRDMLSH_ASIMDELEM_R: - // x|Q=x|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|xx|S=x|x|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->S = (insword>>13)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLA_ASIMDELEM_RH_H: - case ENC_FMLS_ASIMDELEM_RH_H: - case ENC_MLA_ASIMDELEM_R: - case ENC_MLS_ASIMDELEM_R: - case ENC_SMLAL_ASIMDELEM_L: - case ENC_SMLSL_ASIMDELEM_L: - case ENC_SQDMLAL_ASIMDELEM_L: - case ENC_SQDMLSL_ASIMDELEM_L: - case ENC_UMLAL_ASIMDELEM_L: - case ENC_UMLSL_ASIMDELEM_L: - // x|Q=x|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|x|o2=x|xx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->o2 = (insword>>14)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCMLA_ADVSIMD_ELT: - // x|Q=x|U=x|x|xxx|x|size=xx|L=x|M=x|Rm=xxxx|x|rot=xx|x|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->rot = (insword>>13)&3; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SMAXV_ASIMDALL_ONLY: - case ENC_SMINV_ASIMDALL_ONLY: - case ENC_UMAXV_ASIMDALL_ONLY: - case ENC_UMINV_ASIMDALL_ONLY: - // x|Q=x|U=x|x|xxx|x|size=xx|xxxxx|op=x|xxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->op = (insword>>16)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ABS_ASIMDMISC_R: - case ENC_ADDV_ASIMDALL_ONLY: - case ENC_BFCVTN_ASIMDMISC_4S: - case ENC_CLS_ASIMDMISC_R: - case ENC_CLZ_ASIMDMISC_R: - case ENC_CMLT_ASIMDMISC_Z: - case ENC_CNT_ASIMDMISC_R: - case ENC_FCVTXN_ASIMDMISC_N: - case ENC_MVN_NOT_ASIMDMISC_R: - case ENC_NEG_ASIMDMISC_R: - case ENC_NOT_ASIMDMISC_R: - case ENC_RBIT_ASIMDMISC_R: - case ENC_SADDLV_ASIMDALL_ONLY: - case ENC_SHLL_ASIMDMISC_S: - case ENC_SQABS_ASIMDMISC_R: - case ENC_SQNEG_ASIMDMISC_R: - case ENC_SQXTN_ASIMDMISC_N: - case ENC_SQXTUN_ASIMDMISC_N: - case ENC_SUQADD_ASIMDMISC_R: - case ENC_UADDLV_ASIMDALL_ONLY: - case ENC_UQXTN_ASIMDMISC_N: - case ENC_USQADD_ASIMDMISC_R: - case ENC_XTN_ASIMDMISC_N: - // x|Q=x|U=x|x|xxx|x|size=xx|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_REV16_ASIMDMISC_R: - case ENC_REV32_ASIMDMISC_R: - case ENC_REV64_ASIMDMISC_R: - // x|Q=x|U=x|x|xxx|x|size=xx|xxxxx|xxxx|o0=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->o0 = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CMEQ_ASIMDMISC_Z: - case ENC_CMGE_ASIMDMISC_Z: - case ENC_CMGT_ASIMDMISC_Z: - case ENC_CMLE_ASIMDMISC_Z: - // x|Q=x|U=x|x|xxx|x|size=xx|xxxxx|xxxx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SADALP_ASIMDMISC_P: - case ENC_SADDLP_ASIMDMISC_P: - case ENC_UADALP_ASIMDMISC_P: - case ENC_UADDLP_ASIMDMISC_P: - // x|Q=x|U=x|x|xxx|x|size=xx|xxxxx|xx|op=x|xx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->op = (insword>>14)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADDP_ASIMDSAME_ONLY: - case ENC_ADD_ASIMDSAME_ONLY: - case ENC_AND_ASIMDSAME_ONLY: - case ENC_BIC_ASIMDSAME_ONLY: - case ENC_CMEQ_ASIMDSAME_ONLY: - case ENC_CMTST_ASIMDSAME_ONLY: - case ENC_FAMAX_ASIMDSAME_ONLY: - case ENC_FAMIN_ASIMDSAME_ONLY: - case ENC_FSCALE_ASIMDSAME_ONLY: - case ENC_MLA_ASIMDSAME_ONLY: - case ENC_MLS_ASIMDSAME_ONLY: - case ENC_MOV_ORR_ASIMDSAME_ONLY: - case ENC_MUL_ASIMDSAME_ONLY: - case ENC_ORN_ASIMDSAME_ONLY: - case ENC_ORR_ASIMDSAME_ONLY: - case ENC_PMUL_ASIMDSAME_ONLY: - case ENC_SHADD_ASIMDSAME_ONLY: - case ENC_SHSUB_ASIMDSAME_ONLY: - case ENC_SQADD_ASIMDSAME_ONLY: - case ENC_SQDMULH_ASIMDSAME_ONLY: - case ENC_SQRDMULH_ASIMDSAME_ONLY: - case ENC_SQSUB_ASIMDSAME_ONLY: - case ENC_SRHADD_ASIMDSAME_ONLY: - case ENC_SUB_ASIMDSAME_ONLY: - case ENC_UHADD_ASIMDSAME_ONLY: - case ENC_UHSUB_ASIMDSAME_ONLY: - case ENC_UQADD_ASIMDSAME_ONLY: - case ENC_UQSUB_ASIMDSAME_ONLY: - case ENC_URHADD_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_PMULL_ASIMDDIFF_L: - case ENC_SMULL_ASIMDDIFF_L: - case ENC_SQDMULL_ASIMDDIFF_L: - case ENC_UMULL_ASIMDDIFF_L: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|opcode=xxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>12)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SABA_ASIMDSAME_ONLY: - case ENC_SABD_ASIMDSAME_ONLY: - case ENC_UABA_ASIMDSAME_ONLY: - case ENC_UABD_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xxxx|ac=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->ac = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_CMGE_ASIMDSAME_ONLY: - case ENC_CMGT_ASIMDSAME_ONLY: - case ENC_CMHI_ASIMDSAME_ONLY: - case ENC_CMHS_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xxxx|eq=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->eq = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SMAXP_ASIMDSAME_ONLY: - case ENC_SMAX_ASIMDSAME_ONLY: - case ENC_SMINP_ASIMDSAME_ONLY: - case ENC_SMIN_ASIMDSAME_ONLY: - case ENC_UMAXP_ASIMDSAME_ONLY: - case ENC_UMAX_ASIMDSAME_ONLY: - case ENC_UMINP_ASIMDSAME_ONLY: - case ENC_UMIN_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xxxx|o1=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->o1 = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQRSHL_ASIMDSAME_ONLY: - case ENC_SQSHL_ASIMDSAME_ONLY: - case ENC_SRSHL_ASIMDSAME_ONLY: - case ENC_SSHL_ASIMDSAME_ONLY: - case ENC_UQRSHL_ASIMDSAME_ONLY: - case ENC_UQSHL_ASIMDSAME_ONLY: - case ENC_URSHL_ASIMDSAME_ONLY: - case ENC_USHL_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xxx|R=x|S=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->R = (insword>>12)&1; - ctx->S = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_ADDHN_ASIMDDIFF_N: - case ENC_RADDHN_ASIMDDIFF_N: - case ENC_RSUBHN_ASIMDDIFF_N: - case ENC_SADDL_ASIMDDIFF_L: - case ENC_SADDW_ASIMDDIFF_W: - case ENC_SMLAL_ASIMDDIFF_L: - case ENC_SMLSL_ASIMDDIFF_L: - case ENC_SQDMLAL_ASIMDDIFF_L: - case ENC_SQDMLSL_ASIMDDIFF_L: - case ENC_SSUBL_ASIMDDIFF_L: - case ENC_SSUBW_ASIMDDIFF_W: - case ENC_SUBHN_ASIMDDIFF_N: - case ENC_UADDL_ASIMDDIFF_L: - case ENC_UADDW_ASIMDDIFF_W: - case ENC_UMLAL_ASIMDDIFF_L: - case ENC_UMLSL_ASIMDDIFF_L: - case ENC_USUBL_ASIMDDIFF_L: - case ENC_USUBW_ASIMDDIFF_W: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xx|o1=x|x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->o1 = (insword>>13)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SABAL_ASIMDDIFF_L: - case ENC_SABDL_ASIMDDIFF_L: - case ENC_UABAL_ASIMDDIFF_L: - case ENC_UABDL_ASIMDDIFF_L: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|xx|op=x|x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->op = (insword>>13)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_BFDOT_ASIMDSAME2_D: - case ENC_BFMLAL_ASIMDSAME2_F_: - case ENC_BFMMLA_ASIMDSAME2_E: - case ENC_FCVTN_ASIMDSAME2_D: - case ENC_FCVTN_ASIMDSAME2_H: - case ENC_FDOT_ASIMDSAME2_D: - case ENC_FDOT_ASIMDSAME2_DD: - case ENC_FDOT_ASIMDSAME2_FP16FP32: - case ENC_FMMLA_ASIMD_FP8FP16: - case ENC_FMMLA_ASIMD_FP8FP32: - case ENC_FMMLA_ASIMD_FP16FP16: - case ENC_FMMLA_ASIMD_FP16FP32: - case ENC_SDOT_ASIMDSAME2_D: - case ENC_UDOT_ASIMDSAME2_D: - case ENC_USDOT_ASIMDSAME2_D: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|x|opcode=xxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SMMLA_ASIMDSAME2_G: - case ENC_UMMLA_ASIMDSAME2_G: - case ENC_USMMLA_ASIMDSAME2_G: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|x|xxx|B=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->B = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_SQRDMLAH_ASIMDSAME2_ONLY: - case ENC_SQRDMLSH_ASIMDSAME2_ONLY: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|x|xxx|S=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->S = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCMLA_ASIMDSAME2_C: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|x|xx|rot=xx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->rot = (insword>>11)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCADD_ASIMDSAME2_C: - // x|Q=x|U=x|x|xxx|x|size=xx|x|Rm=xxxxx|x|xx|rot=x|x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->rot = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMULX_ASIMDELEM_R_SD: - case ENC_FMUL_ASIMDELEM_R_SD: - // x|Q=x|U=x|x|xxx|x|x|sz=x|L=x|M=x|Rm=xxxx|opcode=xxxx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->opcode = (insword>>12)&15; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLAL_ASIMDELEM_LH: - case ENC_FMLAL2_ASIMDELEM_LH: - case ENC_FMLSL_ASIMDELEM_LH: - case ENC_FMLSL2_ASIMDELEM_LH: - // x|Q=x|U=x|x|xxx|x|x|sz=x|L=x|M=x|Rm=xxxx|x|S=x|xx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->S = (insword>>14)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMLA_ASIMDELEM_R_SD: - case ENC_FMLS_ASIMDELEM_R_SD: - // x|Q=x|U=x|x|xxx|x|x|sz=x|L=x|M=x|Rm=xxxx|x|o2=x|xx|H=x|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->L = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Rm = (insword>>16)&15; - ctx->o2 = (insword>>14)&1; - ctx->H = (insword>>11)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FABS_ASIMDMISC_R: - case ENC_FCMLT_ASIMDMISC_FZ: - case ENC_FCVTAS_ASIMDMISC_R: - case ENC_FCVTAU_ASIMDMISC_R: - case ENC_FCVTL_ASIMDMISC_L: - case ENC_FCVTN_ASIMDMISC_N: - case ENC_FNEG_ASIMDMISC_R: - case ENC_FRECPE_ASIMDMISC_R: - case ENC_FRSQRTE_ASIMDMISC_R: - case ENC_FSQRT_ASIMDMISC_R: - case ENC_SCVTF_ASIMDMISC_R: - case ENC_UCVTF_ASIMDMISC_R: - case ENC_URECPE_ASIMDMISC_R: - case ENC_URSQRTE_ASIMDMISC_R: - // x|Q=x|U=x|x|xxx|x|x|sz=x|xxxxx|opcode=xxxxx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->opcode = (insword>>12)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FCMEQ_ASIMDMISC_FZ: - case ENC_FCMGE_ASIMDMISC_FZ: - case ENC_FCMGT_ASIMDMISC_FZ: - case ENC_FCMLE_ASIMDMISC_FZ: - case ENC_FRINT32X_ASIMDMISC_R: - case ENC_FRINT32Z_ASIMDMISC_R: - case ENC_FRINT64X_ASIMDMISC_R: - case ENC_FRINT64Z_ASIMDMISC_R: - // x|Q=x|U=x|x|xxx|x|x|sz=x|xxxxx|xxxx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FABD_ASIMDSAME_ONLY: - case ENC_FADDP_ASIMDSAME_ONLY: - case ENC_FADD_ASIMDSAME_ONLY: - case ENC_FDIV_ASIMDSAME_ONLY: - case ENC_FMULX_ASIMDSAME_ONLY: - case ENC_FMUL_ASIMDSAME_ONLY: - case ENC_FRECPS_ASIMDSAME_ONLY: - case ENC_FRSQRTS_ASIMDSAME_ONLY: - case ENC_FSUB_ASIMDSAME_ONLY: - // x|Q=x|U=x|x|xxx|x|x|sz=x|x|Rm=xxxxx|opcode=xxxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->U = (insword>>29)&1; - ctx->sz = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>11)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_BIC_ASIMDIMM_L_HL: - case ENC_BIC_ASIMDIMM_L_SL: - case ENC_FMOV_ASIMDIMM_S_S: - case ENC_FMOV_ASIMDIMM_D2_D: - case ENC_MOVI_ASIMDIMM_N_B: - case ENC_MOVI_ASIMDIMM_L_HL: - case ENC_MOVI_ASIMDIMM_L_SL: - case ENC_MOVI_ASIMDIMM_M_SM: - case ENC_MOVI_ASIMDIMM_D_DS: - case ENC_MOVI_ASIMDIMM_D2_D: - case ENC_MVNI_ASIMDIMM_L_HL: - case ENC_MVNI_ASIMDIMM_L_SL: - case ENC_MVNI_ASIMDIMM_M_SM: - case ENC_ORR_ASIMDIMM_L_HL: - case ENC_ORR_ASIMDIMM_L_SL: - // x|Q=x|op=x|xxxxxxxxxx|a=x|b=x|c=x|cmode=xxxx|o2=x|x|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->op = (insword>>29)&1; - ctx->a = (insword>>18)&1; - ctx->b = (insword>>17)&1; - ctx->c = (insword>>16)&1; - ctx->cmode = (insword>>12)&15; - ctx->o2 = (insword>>11)&1; - ctx->d = (insword>>9)&1; - ctx->e = (insword>>8)&1; - ctx->f = (insword>>7)&1; - ctx->g = (insword>>6)&1; - ctx->h = (insword>>5)&1; - ctx->Rd = insword&0x1f; - break; - case ENC_MOV_UMOV_ASIMDINS_W_W: - case ENC_MOV_UMOV_ASIMDINS_X_X: - case ENC_SMOV_ASIMDINS_W_W: - case ENC_SMOV_ASIMDINS_X_X: - case ENC_UMOV_ASIMDINS_W_W: - case ENC_UMOV_ASIMDINS_X_X: - // x|Q=x|op=x|xxxxxxxx|imm5=xxxxx|x|imm4=xxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->op = (insword>>29)&1; - ctx->imm5 = (insword>>16)&0x1f; - ctx->imm4 = (insword>>11)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_FMOV_ASIMDIMM_H_H: - // x|Q=x|op=x|x|xxx|xx|xxxx|a=x|b=x|c=x|cmode=xxxx|o2=x|x|d=x|e=x|f=x|g=x|h=x|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->op = (insword>>29)&1; - ctx->a = (insword>>18)&1; - ctx->b = (insword>>17)&1; - ctx->c = (insword>>16)&1; - ctx->cmode = (insword>>12)&15; - ctx->o2 = (insword>>11)&1; - ctx->d = (insword>>9)&1; - ctx->e = (insword>>8)&1; - ctx->f = (insword>>7)&1; - ctx->g = (insword>>6)&1; - ctx->h = (insword>>5)&1; - ctx->Rd = insword&0x1f; - break; - case ENC_DUP_ASIMDINS_DV_V: - case ENC_DUP_ASIMDINS_DR_R: - case ENC_INS_ASIMDINS_IV_V: - case ENC_INS_ASIMDINS_IR_R: - case ENC_MOV_INS_ASIMDINS_IV_V: - case ENC_MOV_INS_ASIMDINS_IR_R: - // x|Q=x|op=x|x|xxx|xx|xx|imm5=xxxxx|x|imm4=xxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->op = (insword>>29)&1; - ctx->imm5 = (insword>>16)&0x1f; - ctx->imm4 = (insword>>11)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_LD1R_ASISDLSOP_R1_I: - case ENC_LD1R_ASISDLSOP_RX1_R: - case ENC_LD1_ASISDLSOP_B1_I1B: - case ENC_LD1_ASISDLSOP_BX1_R1B: - case ENC_LD1_ASISDLSOP_D1_I1D: - case ENC_LD1_ASISDLSOP_DX1_R1D: - case ENC_LD1_ASISDLSOP_H1_I1H: - case ENC_LD1_ASISDLSOP_HX1_R1H: - case ENC_LD1_ASISDLSOP_S1_I1S: - case ENC_LD1_ASISDLSOP_SX1_R1S: - case ENC_LD2R_ASISDLSOP_R2_I: - case ENC_LD2R_ASISDLSOP_RX2_R: - case ENC_LD2_ASISDLSOP_B2_I2B: - case ENC_LD2_ASISDLSOP_BX2_R2B: - case ENC_LD2_ASISDLSOP_H2_I2H: - case ENC_LD2_ASISDLSOP_HX2_R2H: - case ENC_LD2_ASISDLSOP_S2_I2S: - case ENC_LD2_ASISDLSOP_SX2_R2S: - case ENC_LD2_ASISDLSOP_D2_I2D: - case ENC_LD2_ASISDLSOP_DX2_R2D: - case ENC_LD3R_ASISDLSOP_R3_I: - case ENC_LD3R_ASISDLSOP_RX3_R: - case ENC_LD3_ASISDLSOP_B3_I3B: - case ENC_LD3_ASISDLSOP_BX3_R3B: - case ENC_LD3_ASISDLSOP_H3_I3H: - case ENC_LD3_ASISDLSOP_HX3_R3H: - case ENC_LD3_ASISDLSOP_S3_I3S: - case ENC_LD3_ASISDLSOP_SX3_R3S: - case ENC_LD3_ASISDLSOP_D3_I3D: - case ENC_LD3_ASISDLSOP_DX3_R3D: - case ENC_LD4R_ASISDLSOP_R4_I: - case ENC_LD4R_ASISDLSOP_RX4_R: - case ENC_LD4_ASISDLSOP_B4_I4B: - case ENC_LD4_ASISDLSOP_BX4_R4B: - case ENC_LD4_ASISDLSOP_H4_I4H: - case ENC_LD4_ASISDLSOP_HX4_R4H: - case ENC_LD4_ASISDLSOP_S4_I4S: - case ENC_LD4_ASISDLSOP_SX4_R4S: - case ENC_LD4_ASISDLSOP_D4_I4D: - case ENC_LD4_ASISDLSOP_DX4_R4D: - case ENC_ST1_ASISDLSOP_B1_I1B: - case ENC_ST1_ASISDLSOP_BX1_R1B: - case ENC_ST1_ASISDLSOP_H1_I1H: - case ENC_ST1_ASISDLSOP_HX1_R1H: - case ENC_ST1_ASISDLSOP_S1_I1S: - case ENC_ST1_ASISDLSOP_SX1_R1S: - case ENC_ST1_ASISDLSOP_D1_I1D: - case ENC_ST1_ASISDLSOP_DX1_R1D: - case ENC_ST2_ASISDLSOP_B2_I2B: - case ENC_ST2_ASISDLSOP_BX2_R2B: - case ENC_ST2_ASISDLSOP_H2_I2H: - case ENC_ST2_ASISDLSOP_HX2_R2H: - case ENC_ST2_ASISDLSOP_S2_I2S: - case ENC_ST2_ASISDLSOP_SX2_R2S: - case ENC_ST2_ASISDLSOP_D2_I2D: - case ENC_ST2_ASISDLSOP_DX2_R2D: - case ENC_ST3_ASISDLSOP_B3_I3B: - case ENC_ST3_ASISDLSOP_BX3_R3B: - case ENC_ST3_ASISDLSOP_H3_I3H: - case ENC_ST3_ASISDLSOP_HX3_R3H: - case ENC_ST3_ASISDLSOP_S3_I3S: - case ENC_ST3_ASISDLSOP_SX3_R3S: - case ENC_ST3_ASISDLSOP_D3_I3D: - case ENC_ST3_ASISDLSOP_DX3_R3D: - case ENC_ST4_ASISDLSOP_B4_I4B: - case ENC_ST4_ASISDLSOP_BX4_R4B: - case ENC_ST4_ASISDLSOP_H4_I4H: - case ENC_ST4_ASISDLSOP_HX4_R4H: - case ENC_ST4_ASISDLSOP_S4_I4S: - case ENC_ST4_ASISDLSOP_SX4_R4S: - case ENC_ST4_ASISDLSOP_D4_I4D: - case ENC_ST4_ASISDLSOP_DX4_R4D: - // x|Q=x|xxxxxxx|L=x|R=x|Rm=xxxxx|opcode=xxx|S=x|size=xx|Rn=xxxxx|Rt=xxxxx - ctx->Q = (insword>>30)&1; - ctx->L = (insword>>22)&1; - ctx->R = (insword>>21)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>13)&7; - ctx->S = (insword>>12)&1; - ctx->size = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LD1_ASISDLSO_B1_1B: - case ENC_LD1_ASISDLSO_H1_1H: - case ENC_LD1_ASISDLSO_S1_1S: - case ENC_LD1_ASISDLSO_D1_1D: - case ENC_LD2_ASISDLSO_B2_2B: - case ENC_LD2_ASISDLSO_H2_2H: - case ENC_LD2_ASISDLSO_S2_2S: - case ENC_LD2_ASISDLSO_D2_2D: - case ENC_LD3_ASISDLSO_B3_3B: - case ENC_LD3_ASISDLSO_H3_3H: - case ENC_LD3_ASISDLSO_S3_3S: - case ENC_LD3_ASISDLSO_D3_3D: - case ENC_LD4_ASISDLSO_B4_4B: - case ENC_LD4_ASISDLSO_H4_4H: - case ENC_LD4_ASISDLSO_S4_4S: - case ENC_LD4_ASISDLSO_D4_4D: - case ENC_ST1_ASISDLSO_B1_1B: - case ENC_ST1_ASISDLSO_H1_1H: - case ENC_ST1_ASISDLSO_S1_1S: - case ENC_ST1_ASISDLSO_D1_1D: - case ENC_ST2_ASISDLSO_B2_2B: - case ENC_ST2_ASISDLSO_H2_2H: - case ENC_ST2_ASISDLSO_S2_2S: - case ENC_ST2_ASISDLSO_D2_2D: - case ENC_ST3_ASISDLSO_B3_3B: - case ENC_ST3_ASISDLSO_H3_3H: - case ENC_ST3_ASISDLSO_S3_3S: - case ENC_ST3_ASISDLSO_D3_3D: - case ENC_ST4_ASISDLSO_B4_4B: - case ENC_ST4_ASISDLSO_H4_4H: - case ENC_ST4_ASISDLSO_S4_4S: - case ENC_ST4_ASISDLSO_D4_4D: - // x|Q=x|xxxxxxx|L=x|R=x|xxxx|o2=x|opcode=xxx|S=x|size=xx|Rn=xxxxx|Rt=xxxxx - ctx->Q = (insword>>30)&1; - ctx->L = (insword>>22)&1; - ctx->R = (insword>>21)&1; - ctx->o2 = (insword>>16)&1; - ctx->opcode = (insword>>13)&7; - ctx->S = (insword>>12)&1; - ctx->size = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LD1_ASISDLSE_R1_1V: - case ENC_LD1_ASISDLSE_R2_2V: - case ENC_LD1_ASISDLSE_R3_3V: - case ENC_LD1_ASISDLSE_R4_4V: - case ENC_ST1_ASISDLSE_R1_1V: - case ENC_ST1_ASISDLSE_R2_2V: - case ENC_ST1_ASISDLSE_R3_3V: - case ENC_ST1_ASISDLSE_R4_4V: - // x|Q=x|xxxxxxx|L=x|xxxxxx|opcode=xxxx|size=xx|Rn=xxxxx|Rt=xxxxx - ctx->Q = (insword>>30)&1; - ctx->L = (insword>>22)&1; - ctx->opcode = (insword>>12)&15; - ctx->size = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LD1_ASISDLSEP_I1_I1: - case ENC_LD1_ASISDLSEP_R1_R1: - case ENC_LD1_ASISDLSEP_I2_I2: - case ENC_LD1_ASISDLSEP_R2_R2: - case ENC_LD1_ASISDLSEP_I3_I3: - case ENC_LD1_ASISDLSEP_R3_R3: - case ENC_LD1_ASISDLSEP_I4_I4: - case ENC_LD1_ASISDLSEP_R4_R4: - case ENC_LD2_ASISDLSEP_I2_I: - case ENC_LD2_ASISDLSEP_R2_R: - case ENC_LD3_ASISDLSEP_I3_I: - case ENC_LD3_ASISDLSEP_R3_R: - case ENC_LD4_ASISDLSEP_I4_I: - case ENC_LD4_ASISDLSEP_R4_R: - case ENC_ST1_ASISDLSEP_I1_I1: - case ENC_ST1_ASISDLSEP_R1_R1: - case ENC_ST1_ASISDLSEP_I2_I2: - case ENC_ST1_ASISDLSEP_R2_R2: - case ENC_ST1_ASISDLSEP_I3_I3: - case ENC_ST1_ASISDLSEP_R3_R3: - case ENC_ST1_ASISDLSEP_I4_I4: - case ENC_ST1_ASISDLSEP_R4_R4: - case ENC_ST2_ASISDLSEP_I2_I: - case ENC_ST2_ASISDLSEP_R2_R: - case ENC_ST3_ASISDLSEP_I3_I: - case ENC_ST3_ASISDLSEP_R3_R: - case ENC_ST4_ASISDLSEP_I4_I: - case ENC_ST4_ASISDLSEP_R4_R: - // x|Q=x|xxxxxxx|L=x|x|Rm=xxxxx|opcode=xxxx|size=xx|Rn=xxxxx|Rt=xxxxx - ctx->Q = (insword>>30)&1; - ctx->L = (insword>>22)&1; - ctx->Rm = (insword>>16)&0x1f; - ctx->opcode = (insword>>12)&15; - ctx->size = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LUTI2_ASIMDTBL_L5: - case ENC_LUTI2_ASIMDTBL_L6: - case ENC_LUTI4_ASIMDTBL_L5: - case ENC_LUTI4_ASIMDTBL_L7: - case ENC_TBL_ASIMDTBL_L1_1: - case ENC_TBL_ASIMDTBL_L2_2: - case ENC_TBL_ASIMDTBL_L3_3: - case ENC_TBL_ASIMDTBL_L4_4: - case ENC_TBX_ASIMDTBL_L1_1: - case ENC_TBX_ASIMDTBL_L2_2: - case ENC_TBX_ASIMDTBL_L3_3: - case ENC_TBX_ASIMDTBL_L4_4: - // x|Q=x|xxxxxx|op2=xx|x|Rm=xxxxx|x|len=xx|op=x|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->op2 = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->len = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_EXT_ASIMDEXT_ONLY: - // x|Q=x|xx|xxx|x|op2=xx|x|Rm=xxxxx|x|imm4=xxxx|x|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->op2 = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->imm4 = (insword>>11)&15; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_TRN1_ASIMDPERM_ONLY: - case ENC_TRN2_ASIMDPERM_ONLY: - case ENC_UZP1_ASIMDPERM_ONLY: - case ENC_UZP2_ASIMDPERM_ONLY: - case ENC_ZIP1_ASIMDPERM_ONLY: - case ENC_ZIP2_ASIMDPERM_ONLY: - // x|Q=x|xx|xxx|x|size=xx|x|Rm=xxxxx|x|op=x|xx|xx|Rn=xxxxx|Rd=xxxxx - ctx->Q = (insword>>30)&1; - ctx->size = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->op = (insword>>14)&1; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rd = insword&0x1f; - break; - case ENC_LD1R_ASISDLSO_R1: - case ENC_LD2R_ASISDLSO_R2: - case ENC_LD3R_ASISDLSO_R3: - case ENC_LD4R_ASISDLSO_R4: - case ENC_LDAP1_ASISDLSO_D1: - case ENC_STL1_ASISDLSO_D1: - // x|Q=x|xx|x|x|x|xx|L=x|R=x|xxxx|o2=x|opcode=xxx|S=x|size=xx|Rn=xxxxx|Rt=xxxxx - ctx->Q = (insword>>30)&1; - ctx->L = (insword>>22)&1; - ctx->R = (insword>>21)&1; - ctx->o2 = (insword>>16)&1; - ctx->opcode = (insword>>13)&7; - ctx->S = (insword>>12)&1; - ctx->size = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LD2_ASISDLSE_R2: - case ENC_LD3_ASISDLSE_R3: - case ENC_LD4_ASISDLSE_R4: - case ENC_ST2_ASISDLSE_R2: - case ENC_ST3_ASISDLSE_R3: - case ENC_ST4_ASISDLSE_R4: - // x|Q=x|xx|x|x|x|xx|L=x|xxxxxx|opcode=xxxx|size=xx|Rn=xxxxx|Rt=xxxxx - ctx->Q = (insword>>30)&1; - ctx->L = (insword>>22)&1; - ctx->opcode = (insword>>12)&15; - ctx->size = (insword>>10)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_RCWCAS_C64_RCWCOMSWAP: - case ENC_RCWCASA_C64_RCWCOMSWAP: - case ENC_RCWCASAL_C64_RCWCOMSWAP: - case ENC_RCWCASL_C64_RCWCOMSWAP: - case ENC_RCWCASP_C64_RCWCOMSWAPPR: - case ENC_RCWCASPA_C64_RCWCOMSWAPPR: - case ENC_RCWCASPAL_C64_RCWCOMSWAPPR: - case ENC_RCWCASPL_C64_RCWCOMSWAPPR: - case ENC_RCWSCAS_C64_RCWCOMSWAP: - case ENC_RCWSCASA_C64_RCWCOMSWAP: - case ENC_RCWSCASAL_C64_RCWCOMSWAP: - case ENC_RCWSCASL_C64_RCWCOMSWAP: - case ENC_RCWSCASP_C64_RCWCOMSWAPPR: - case ENC_RCWSCASPA_C64_RCWCOMSWAPPR: - case ENC_RCWSCASPAL_C64_RCWCOMSWAPPR: - case ENC_RCWSCASPL_C64_RCWCOMSWAPPR: - // x|S=x|xxxxxx|A=x|R=x|x|Rs=xxxxx|xxxxxx|Rn=xxxxx|Rt=xxxxx - ctx->S = (insword>>30)&1; - ctx->A = (insword>>23)&1; - ctx->R = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDCLRP_128_MEMOP_128: - case ENC_LDCLRPA_128_MEMOP_128: - case ENC_LDCLRPAL_128_MEMOP_128: - case ENC_LDCLRPL_128_MEMOP_128: - case ENC_LDSETP_128_MEMOP_128: - case ENC_LDSETPA_128_MEMOP_128: - case ENC_LDSETPAL_128_MEMOP_128: - case ENC_LDSETPL_128_MEMOP_128: - case ENC_RCWCLRP_128_MEMOP_128: - case ENC_RCWCLRPA_128_MEMOP_128: - case ENC_RCWCLRPAL_128_MEMOP_128: - case ENC_RCWCLRPL_128_MEMOP_128: - case ENC_RCWSCLRP_128_MEMOP_128: - case ENC_RCWSCLRPA_128_MEMOP_128: - case ENC_RCWSCLRPAL_128_MEMOP_128: - case ENC_RCWSCLRPL_128_MEMOP_128: - case ENC_RCWSETP_128_MEMOP_128: - case ENC_RCWSETPA_128_MEMOP_128: - case ENC_RCWSETPAL_128_MEMOP_128: - case ENC_RCWSETPL_128_MEMOP_128: - case ENC_RCWSSETP_128_MEMOP_128: - case ENC_RCWSSETPA_128_MEMOP_128: - case ENC_RCWSSETPAL_128_MEMOP_128: - case ENC_RCWSSETPL_128_MEMOP_128: - case ENC_RCWSSWPP_128_MEMOP_128: - case ENC_RCWSSWPPA_128_MEMOP_128: - case ENC_RCWSSWPPAL_128_MEMOP_128: - case ENC_RCWSSWPPL_128_MEMOP_128: - case ENC_RCWSWPP_128_MEMOP_128: - case ENC_RCWSWPPA_128_MEMOP_128: - case ENC_RCWSWPPAL_128_MEMOP_128: - case ENC_RCWSWPPL_128_MEMOP_128: - case ENC_SWPP_128_MEMOP_128: - case ENC_SWPPA_128_MEMOP_128: - case ENC_SWPPAL_128_MEMOP_128: - case ENC_SWPPL_128_MEMOP_128: - // x|S=x|xxxxxx|A=x|R=x|x|Rt2=xxxxx|o3=x|opc=xxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->S = (insword>>30)&1; - ctx->A = (insword>>23)&1; - ctx->R = (insword>>22)&1; - ctx->Rt2 = (insword>>16)&0x1f; - ctx->o3 = (insword>>15)&1; - ctx->opc = (insword>>12)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_RCWCLR_64_MEMOP: - case ENC_RCWCLRA_64_MEMOP: - case ENC_RCWCLRAL_64_MEMOP: - case ENC_RCWCLRL_64_MEMOP: - case ENC_RCWSCLR_64_MEMOP: - case ENC_RCWSCLRA_64_MEMOP: - case ENC_RCWSCLRAL_64_MEMOP: - case ENC_RCWSCLRL_64_MEMOP: - case ENC_RCWSET_64_MEMOP: - case ENC_RCWSETA_64_MEMOP: - case ENC_RCWSETAL_64_MEMOP: - case ENC_RCWSETL_64_MEMOP: - case ENC_RCWSSET_64_MEMOP: - case ENC_RCWSSETA_64_MEMOP: - case ENC_RCWSSETAL_64_MEMOP: - case ENC_RCWSSETL_64_MEMOP: - case ENC_RCWSSWP_64_MEMOP: - case ENC_RCWSSWPA_64_MEMOP: - case ENC_RCWSSWPAL_64_MEMOP: - case ENC_RCWSSWPL_64_MEMOP: - case ENC_RCWSWP_64_MEMOP: - case ENC_RCWSWPA_64_MEMOP: - case ENC_RCWSWPAL_64_MEMOP: - case ENC_RCWSWPL_64_MEMOP: - // x|S=x|xxx|VR=x|xx|A=x|R=x|x|Rs=xxxxx|o3=x|opc=xxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->S = (insword>>30)&1; - ctx->VR = (insword>>26)&1; - ctx->A = (insword>>23)&1; - ctx->R = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->o3 = (insword>>15)&1; - ctx->opc = (insword>>12)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_CASP_CP32_COMSWAPPR: - case ENC_CASPA_CP32_COMSWAPPR: - case ENC_CASPAL_CP32_COMSWAPPR: - case ENC_CASPL_CP32_COMSWAPPR: - case ENC_CASP_CP64_COMSWAPPR: - case ENC_CASPA_CP64_COMSWAPPR: - case ENC_CASPAL_CP64_COMSWAPPR: - case ENC_CASPL_CP64_COMSWAPPR: - case ENC_CASPT_CP64_COMSWAPPR_UNPRIV: - case ENC_CASPAT_CP64_COMSWAPPR_UNPRIV: - case ENC_CASPALT_CP64_COMSWAPPR_UNPRIV: - case ENC_CASPLT_CP64_COMSWAPPR_UNPRIV: - case ENC_CAST_C64_COMSWAP_UNPRIV: - case ENC_CASAT_C64_COMSWAP_UNPRIV: - case ENC_CASALT_C64_COMSWAP_UNPRIV: - case ENC_CASLT_C64_COMSWAP_UNPRIV: - case ENC_LDATXR_LR32_LDSTEXCLR_UNPRIV: - case ENC_LDATXR_LR64_LDSTEXCLR_UNPRIV: - case ENC_LDAXP_LP32_LDSTEXCLP: - case ENC_LDAXP_LP64_LDSTEXCLP: - case ENC_LDTXR_LR32_LDSTEXCLR_UNPRIV: - case ENC_LDTXR_LR64_LDSTEXCLR_UNPRIV: - case ENC_LDXP_LP32_LDSTEXCLP: - case ENC_LDXP_LP64_LDSTEXCLP: - case ENC_STLTXR_SR32_LDSTEXCLR_UNPRIV: - case ENC_STLTXR_SR64_LDSTEXCLR_UNPRIV: - case ENC_STLXP_SP32_LDSTEXCLP: - case ENC_STLXP_SP64_LDSTEXCLP: - case ENC_STTXR_SR32_LDSTEXCLR_UNPRIV: - case ENC_STTXR_SR64_LDSTEXCLR_UNPRIV: - case ENC_STXP_SP32_LDSTEXCLP: - case ENC_STXP_SP64_LDSTEXCLP: - // x|sz=x|xxxxxxx|L=x|x|Rs=xxxxx|o0=x|Rt2=xxxxx|Rn=xxxxx|Rt=xxxxx - ctx->sz = (insword>>30)&1; - ctx->L = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->o0 = (insword>>15)&1; - ctx->Rt2 = (insword>>10)&0x1f; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_LDTADD_32_MEMOP_UNPRIV: - case ENC_LDTADDA_32_MEMOP_UNPRIV: - case ENC_LDTADDAL_32_MEMOP_UNPRIV: - case ENC_LDTADDL_32_MEMOP_UNPRIV: - case ENC_LDTADD_64_MEMOP_UNPRIV: - case ENC_LDTADDA_64_MEMOP_UNPRIV: - case ENC_LDTADDAL_64_MEMOP_UNPRIV: - case ENC_LDTADDL_64_MEMOP_UNPRIV: - case ENC_LDTCLR_32_MEMOP_UNPRIV: - case ENC_LDTCLRA_32_MEMOP_UNPRIV: - case ENC_LDTCLRAL_32_MEMOP_UNPRIV: - case ENC_LDTCLRL_32_MEMOP_UNPRIV: - case ENC_LDTCLR_64_MEMOP_UNPRIV: - case ENC_LDTCLRA_64_MEMOP_UNPRIV: - case ENC_LDTCLRAL_64_MEMOP_UNPRIV: - case ENC_LDTCLRL_64_MEMOP_UNPRIV: - case ENC_LDTSET_32_MEMOP_UNPRIV: - case ENC_LDTSETA_32_MEMOP_UNPRIV: - case ENC_LDTSETAL_32_MEMOP_UNPRIV: - case ENC_LDTSETL_32_MEMOP_UNPRIV: - case ENC_LDTSET_64_MEMOP_UNPRIV: - case ENC_LDTSETA_64_MEMOP_UNPRIV: - case ENC_LDTSETAL_64_MEMOP_UNPRIV: - case ENC_LDTSETL_64_MEMOP_UNPRIV: - case ENC_STTADD_LDTADD_32_MEMOP_UNPRIV: - case ENC_STTADDL_LDTADDL_32_MEMOP_UNPRIV: - case ENC_STTADD_LDTADD_64_MEMOP_UNPRIV: - case ENC_STTADDL_LDTADDL_64_MEMOP_UNPRIV: - case ENC_STTCLR_LDTCLR_32_MEMOP_UNPRIV: - case ENC_STTCLRL_LDTCLRL_32_MEMOP_UNPRIV: - case ENC_STTCLR_LDTCLR_64_MEMOP_UNPRIV: - case ENC_STTCLRL_LDTCLRL_64_MEMOP_UNPRIV: - case ENC_STTSET_LDTSET_32_MEMOP_UNPRIV: - case ENC_STTSETL_LDTSETL_32_MEMOP_UNPRIV: - case ENC_STTSET_LDTSET_64_MEMOP_UNPRIV: - case ENC_STTSETL_LDTSETL_64_MEMOP_UNPRIV: - case ENC_SWPT_32_MEMOP_UNPRIV: - case ENC_SWPTA_32_MEMOP_UNPRIV: - case ENC_SWPTAL_32_MEMOP_UNPRIV: - case ENC_SWPTL_32_MEMOP_UNPRIV: - case ENC_SWPT_64_MEMOP_UNPRIV: - case ENC_SWPTA_64_MEMOP_UNPRIV: - case ENC_SWPTAL_64_MEMOP_UNPRIV: - case ENC_SWPTL_64_MEMOP_UNPRIV: - // x|sz=x|xxxxxx|A=x|R=x|x|Rs=xxxxx|o3=x|opc=xxx|xx|Rn=xxxxx|Rt=xxxxx - ctx->sz = (insword>>30)&1; - ctx->A = (insword>>23)&1; - ctx->R = (insword>>22)&1; - ctx->Rs = (insword>>16)&0x1f; - ctx->o3 = (insword>>15)&1; - ctx->opc = (insword>>12)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Rt = insword&0x1f; - break; - case ENC_SMOP4A_ZA_ZZ_B1X2: - case ENC_SMOP4A_ZA_ZZ_B1X1: - case ENC_SMOP4A_ZA_ZZ_B2X1: - case ENC_SMOP4A_ZA_ZZ_B2X2: - case ENC_SMOP4S_ZA_ZZ_B1X2: - case ENC_SMOP4S_ZA_ZZ_B1X1: - case ENC_SMOP4S_ZA_ZZ_B2X1: - case ENC_SMOP4S_ZA_ZZ_B2X2: - case ENC_SUMOP4A_ZA_ZZ_B1X2: - case ENC_SUMOP4A_ZA_ZZ_B1X1: - case ENC_SUMOP4A_ZA_ZZ_B2X1: - case ENC_SUMOP4A_ZA_ZZ_B2X2: - case ENC_SUMOP4S_ZA_ZZ_B1X2: - case ENC_SUMOP4S_ZA_ZZ_B1X1: - case ENC_SUMOP4S_ZA_ZZ_B2X1: - case ENC_SUMOP4S_ZA_ZZ_B2X2: - case ENC_UMOP4A_ZA_ZZ_B1X2: - case ENC_UMOP4A_ZA_ZZ_B1X1: - case ENC_UMOP4A_ZA_ZZ_B2X1: - case ENC_UMOP4A_ZA_ZZ_B2X2: - case ENC_UMOP4S_ZA_ZZ_B1X2: - case ENC_UMOP4S_ZA_ZZ_B1X1: - case ENC_UMOP4S_ZA_ZZ_B2X1: - case ENC_UMOP4S_ZA_ZZ_B2X2: - case ENC_USMOP4A_ZA_ZZ_B1X2: - case ENC_USMOP4A_ZA_ZZ_B1X1: - case ENC_USMOP4A_ZA_ZZ_B2X1: - case ENC_USMOP4A_ZA_ZZ_B2X2: - case ENC_USMOP4S_ZA_ZZ_B1X2: - case ENC_USMOP4S_ZA_ZZ_B1X1: - case ENC_USMOP4S_ZA_ZZ_B2X1: - case ENC_USMOP4S_ZA_ZZ_B2X2: - // x|xx|xxxx|u0=x|xx|u1=x|M=x|Zm=xxx|x|x|xxxxx|N=x|Zn=xxx|x|S=x|x|x|ZAda=xx - ctx->u0 = (insword>>24)&1; - ctx->u1 = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&3; - break; - case ENC_SMOPA_ZA_PP_ZZ_32: - case ENC_SMOPS_ZA_PP_ZZ_32: - case ENC_SUMOPA_ZA_PP_ZZ_32: - case ENC_SUMOPS_ZA_PP_ZZ_32: - case ENC_UMOPA_ZA_PP_ZZ_32: - case ENC_UMOPS_ZA_PP_ZZ_32: - case ENC_USMOPA_ZA_PP_ZZ_32: - case ENC_USMOPS_ZA_PP_ZZ_32: - // x|xx|xxxx|u0=x|xx|u1=x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=x|x|x|ZAda=xx - ctx->u0 = (insword>>24)&1; - ctx->u1 = (insword>>21)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&3; - break; - case ENC_STMOPA_ZA_ZZZI_B2X1: - case ENC_SUTMOPA_ZA_ZZZI_B2X1: - case ENC_USTMOPA_ZA_ZZZI_B2X1: - case ENC_UTMOPA_ZA_ZZZI_B2X1: - // x|xx|xxxx|u0=x|xx|u1=x|Zm=xxxxx|x|x|x|K=x|Zk=xx|Zn=xxxx|i2=xx|x|x|ZAda=xx - ctx->u0 = (insword>>24)&1; - ctx->u1 = (insword>>21)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->K = (insword>>12)&1; - ctx->Zk = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->i2 = (insword>>4)&3; - ctx->ZAda = insword&3; - break; - case ENC_SMOP4A_ZA32_ZZ_H1X2: - case ENC_SMOP4A_ZA32_ZZ_H1X1: - case ENC_SMOP4A_ZA32_ZZ_H2X1: - case ENC_SMOP4A_ZA32_ZZ_H2X2: - case ENC_SMOP4S_ZA32_ZZ_H1X2: - case ENC_SMOP4S_ZA32_ZZ_H1X1: - case ENC_SMOP4S_ZA32_ZZ_H2X1: - case ENC_SMOP4S_ZA32_ZZ_H2X2: - case ENC_UMOP4A_ZA32_ZZ_H1X2: - case ENC_UMOP4A_ZA32_ZZ_H1X1: - case ENC_UMOP4A_ZA32_ZZ_H2X1: - case ENC_UMOP4A_ZA32_ZZ_H2X2: - case ENC_UMOP4S_ZA32_ZZ_H1X2: - case ENC_UMOP4S_ZA32_ZZ_H1X1: - case ENC_UMOP4S_ZA32_ZZ_H2X1: - case ENC_UMOP4S_ZA32_ZZ_H2X2: - // x|xx|xxxx|u0=x|xx|x|M=x|Zm=xxx|x|x|xxxxx|N=x|Zn=xxx|x|S=x|x|x|ZAda=xx - ctx->u0 = (insword>>24)&1; - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&3; - break; - case ENC_SMOPA_ZA32_PP_ZZ_16: - case ENC_SMOPS_ZA32_PP_ZZ_16: - case ENC_UMOPA_ZA32_PP_ZZ_16: - case ENC_UMOPS_ZA32_PP_ZZ_16: - // x|xx|xxxx|u0=x|xx|x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=x|x|x|ZAda=xx - ctx->u0 = (insword>>24)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&3; - break; - case ENC_STMOPA_ZA32_ZZZI_H2X1: - case ENC_UTMOPA_ZA32_ZZZI_H2X1: - // x|xx|xxxx|u0=x|xx|x|Zm=xxxxx|x|x|x|K=x|Zk=xx|Zn=xxxx|i2=xx|x|x|ZAda=xx - ctx->u0 = (insword>>24)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->K = (insword>>12)&1; - ctx->Zk = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->i2 = (insword>>4)&3; - ctx->ZAda = insword&3; - break; - case ENC_UDF_ONLY_PERM_UNDEF: - // x|xx|xxxx|xxxxxxxxx|imm16=xxxxxxxxxxxxxxxx - ctx->imm16 = insword&0xffff; - break; - case ENC_ZERO_ZA1_RI_2: - case ENC_ZERO_ZA1_RI_4: - case ENC_ZERO_ZA2_RI_1: - // x|xx|xxxx|xxxxxxx|opc=xxx|Rv=xx|xxxxxxxxxx|off3=xxx - ctx->opc = (insword>>15)&7; - ctx->Rv = (insword>>13)&3; - ctx->off3 = insword&7; - break; - case ENC_ZERO_ZA4_RI_2: - case ENC_ZERO_ZA4_RI_4: - // x|xx|xxxx|xxxxxxx|opc=xxx|Rv=xx|xxxxxxxxxx|xx|o1=x - ctx->opc = (insword>>15)&7; - ctx->Rv = (insword>>13)&3; - ctx->o1 = insword&1; - break; - case ENC_ZERO_ZA2_RI_2: - case ENC_ZERO_ZA2_RI_4: - case ENC_ZERO_ZA4_RI_1: - // x|xx|xxxx|xxxxxxx|opc=xxx|Rv=xx|xxxxxxxxxx|x|off2=xx - ctx->opc = (insword>>15)&7; - ctx->Rv = (insword>>13)&3; - ctx->off2 = insword&3; - break; - case ENC_ZERO_ZT_I_: - // x|xx|xxxx|xxxxxxx|xxxxxxxxxxxxxx|opc=xxxx - ctx->opc = insword&15; - break; - case ENC_ZERO_ZA_I_: - // x|xx|xxxx|xxxxxxx|xxxxxxxxxx|imm8=xxxxxxxx - ctx->imm8 = insword&0xff; - break; - case ENC_MOVT_R_ZT_: - case ENC_MOVT_ZT_R_: - // x|xx|xxxx|xxxxxxx|x|xx|off3=xxx|opc=xxxxxxx|Rt=xxxxx - ctx->off3 = (insword>>12)&7; - ctx->opc = (insword>>5)&0x7f; - ctx->Rt = insword&0x1f; - break; - case ENC_MOVT_ZT_Z_: - // x|xx|xxxx|xxxxxxx|x|xx|x|off2=xx|opc=xxxxxxx|Zt=xxxxx - ctx->off2 = (insword>>12)&3; - ctx->opc = (insword>>5)&0x7f; - ctx->Zt = insword&0x1f; - break; - case ENC_LUTI4_MZ4_ZTMZ2_4: - // x|xx|xxxx|xxxxxx|xxx|xx|size=xx|opc=xx|Zn=xxxx|x|D=x|xx|Zd=xx - ctx->size = (insword>>12)&3; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->D = (insword>>4)&1; - ctx->Zd = insword&3; - break; - case ENC_LUTI6_MZ4_ZTMZ3_4: - // x|xx|xxxx|xxxxxx|xxx|xx|size=xx|opc=xx|Zn=xxx|x|x|D=x|xx|Zd=xx - ctx->size = (insword>>12)&3; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->D = (insword>>4)&1; - ctx->Zd = insword&3; - break; - case ENC_LUTI4_MZ4_ZTZ_4: - // x|xx|xxxx|xxxxxx|xx|i1=x|xx|size=xx|opc2=xx|Zn=xxxxx|D=x|xx|Zd=xx - ctx->i1 = (insword>>16)&1; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->D = (insword>>4)&1; - ctx->Zd = insword&3; - break; - case ENC_LUTI4_MZ2_ZTZ_8: - // x|xx|xxxx|xxxxxx|xx|i2=xx|x|size=xx|opc2=xx|Zn=xxxxx|D=x|x|Zd=xxx - ctx->i2 = (insword>>15)&3; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->D = (insword>>4)&1; - ctx->Zd = insword&7; - break; - case ENC_LUTI2_MZ4_ZTZ_4: - // x|xx|xxxx|xxxxxx|x|i2=xx|xx|size=xx|opc2=xx|Zn=xxxxx|D=x|xx|Zd=xx - ctx->i2 = (insword>>16)&3; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->D = (insword>>4)&1; - ctx->Zd = insword&3; - break; - case ENC_LUTI2_MZ2_ZTZ_8: - // x|xx|xxxx|xxxxxx|x|i3=xxx|x|size=xx|opc2=xx|Zn=xxxxx|D=x|x|Zd=xxx - ctx->i3 = (insword>>15)&7; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->D = (insword>>4)&1; - ctx->Zd = insword&7; - break; - case ENC_LD1Q_ZA_P_RRR_: - case ENC_ST1Q_ZA_P_RRR_: - // x|xx|xxxx|xxxx|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|x|ZAt=xxxx - ctx->Rm = (insword>>16)&0x1f; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->ZAt = insword&15; - break; - case ENC_LDR_ZA_RI_: - case ENC_STR_ZA_RI_: - // x|xx|xxxx|xxx|op=x|xxxxx|x|Rv=xx|xxx|Rn=xxxxx|x|off4=xxxx - ctx->op = (insword>>21)&1; - ctx->Rv = (insword>>13)&3; - ctx->Rn = (insword>>5)&0x1f; - ctx->off4 = insword&15; - break; - case ENC_LDR_ZT_BR_: - case ENC_STR_ZT_BR_: - // x|xx|xxxx|xxx|opc=xxxxxx|x|xxxxx|Rn=xxxxx|xxx|opc2=xx - ctx->opc = (insword>>16)&0x3f; - ctx->Rn = (insword>>5)&0x1f; - ctx->opc2 = insword&3; - break; - case ENC_LUTI6_MZ4_ZMZ2_4: - // x|xx|xxxx|xx|i1=x|x|Zm=xxxxx|xxxx|xx|Zn=xxxxx|D=x|xx|Zd=xx - ctx->i1 = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->D = (insword>>4)&1; - ctx->Zd = insword&3; - break; - case ENC_LUTI6_MZ4_ZMZ2_1: - // x|xx|xxxx|xx|i1=x|x|Zm=xxxxx|xxxx|xx|Zn=xxxxx|Zd=xxx|xx - ctx->i1 = (insword>>22)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>2)&7; - break; - case ENC_SMLALL_ZA_ZZV_1: - case ENC_SMLSLL_ZA_ZZV_1: - case ENC_UMLALL_ZA_ZZV_1: - case ENC_UMLSLL_ZA_ZZV_1: - case ENC_USMLALL_ZA_ZZV_S: - // x|xx|xxxx|xx|sz=x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|U=x|S=x|op=x|off2=xx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->op = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_SMLALL_ZA_ZZV_2X1: - case ENC_SMLALL_ZA_ZZV_4X1: - case ENC_SMLSLL_ZA_ZZV_2X1: - case ENC_SMLSLL_ZA_ZZV_4X1: - case ENC_SUMLALL_ZA_ZZV_S2X1: - case ENC_SUMLALL_ZA_ZZV_S4X1: - case ENC_UMLALL_ZA_ZZV_2X1: - case ENC_UMLALL_ZA_ZZV_4X1: - case ENC_UMLSLL_ZA_ZZV_2X1: - case ENC_UMLSLL_ZA_ZZV_4X1: - case ENC_USMLALL_ZA_ZZV_S2X1: - case ENC_USMLALL_ZA_ZZV_S4X1: - // x|xx|xxxx|xx|sz=x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|U=x|S=x|op=x|x|o1=x - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->op = (insword>>2)&1; - ctx->o1 = insword&1; - break; - case ENC_SDOT_ZA_ZZV_2X1: - case ENC_SDOT_ZA_ZZV_4X1: - case ENC_UDOT_ZA_ZZV_2X1: - case ENC_UDOT_ZA_ZZV_4X1: - // x|xx|xxxx|xx|sz=x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|U=x|x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_ADD_ZA_ZZV_2X1: - case ENC_ADD_ZA_ZZV_4X1: - case ENC_BFMLA_ZA_ZZV_2X1_16: - case ENC_BFMLA_ZA_ZZV_4X1_16: - case ENC_BFMLS_ZA_ZZV_2X1_16: - case ENC_BFMLS_ZA_ZZV_4X1_16: - case ENC_FMLA_ZA_ZZV_2X1: - case ENC_FMLA_ZA_ZZV_2X1_16: - case ENC_FMLA_ZA_ZZV_4X1: - case ENC_FMLA_ZA_ZZV_4X1_16: - case ENC_FMLS_ZA_ZZV_2X1: - case ENC_FMLS_ZA_ZZV_2X1_16: - case ENC_FMLS_ZA_ZZV_4X1: - case ENC_FMLS_ZA_ZZV_4X1_16: - case ENC_SUB_ZA_ZZV_2X1: - case ENC_SUB_ZA_ZZV_4X1: - // x|xx|xxxx|xx|sz=x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|x|S=x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_BFMLA_ZA_ZZW_2X2_16: - case ENC_BFMLS_ZA_ZZW_2X2_16: - case ENC_FMLA_ZA_ZZW_2X2_16: - case ENC_FMLS_ZA_ZZW_2X2_16: - // x|xx|xxxx|xx|sz=x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|S=x|x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->S = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLALL_ZA_ZZW_2X2: - case ENC_SMLSLL_ZA_ZZW_2X2: - case ENC_UMLALL_ZA_ZZW_2X2: - case ENC_UMLSLL_ZA_ZZW_2X2: - case ENC_USMLALL_ZA_ZZW_S2X2: - // x|xx|xxxx|xx|sz=x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|U=x|S=x|op=x|x|o1=x - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->op = (insword>>2)&1; - ctx->o1 = insword&1; - break; - case ENC_SDOT_ZA_ZZW_2X2: - case ENC_UDOT_ZA_ZZW_2X2: - // x|xx|xxxx|xx|sz=x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|U=x|x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_ADD_ZA_ZZW_2X2: - case ENC_FMLA_ZA_ZZW_2X2: - case ENC_FMLS_ZA_ZZW_2X2: - case ENC_SUB_ZA_ZZW_2X2: - // x|xx|xxxx|xx|sz=x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|x|S=x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_BFMLA_ZA_ZZW_4X4_16: - case ENC_BFMLS_ZA_ZZW_4X4_16: - case ENC_FMLA_ZA_ZZW_4X4_16: - case ENC_FMLS_ZA_ZZW_4X4_16: - // x|xx|xxxx|xx|sz=x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|S=x|x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->S = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLALL_ZA_ZZW_4X4: - case ENC_SMLSLL_ZA_ZZW_4X4: - case ENC_UMLALL_ZA_ZZW_4X4: - case ENC_UMLSLL_ZA_ZZW_4X4: - case ENC_USMLALL_ZA_ZZW_S4X4: - // x|xx|xxxx|xx|sz=x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|U=x|S=x|op=x|x|o1=x - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->op = (insword>>2)&1; - ctx->o1 = insword&1; - break; - case ENC_SDOT_ZA_ZZW_4X4: - case ENC_UDOT_ZA_ZZW_4X4: - // x|xx|xxxx|xx|sz=x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|U=x|x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_ADD_ZA_ZZW_4X4: - case ENC_FMLA_ZA_ZZW_4X4: - case ENC_FMLS_ZA_ZZW_4X4: - case ENC_SUB_ZA_ZZW_4X4: - // x|xx|xxxx|xx|sz=x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|x|S=x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_ADD_ZA_ZW_2X2: - case ENC_BFADD_ZA_ZW_2X2_16: - case ENC_BFSUB_ZA_ZW_2X2_16: - case ENC_FADD_ZA_ZW_2X2: - case ENC_FADD_ZA_ZW_2X2_16: - case ENC_FSUB_ZA_ZW_2X2: - case ENC_FSUB_ZA_ZW_2X2_16: - case ENC_SUB_ZA_ZW_2X2: - // x|xx|xxxx|xx|sz=x|x|xx|xx|xx|Rv=xx|xxx|Zm=xxxx|x|x|S=x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Rv = (insword>>13)&3; - ctx->Zm = (insword>>6)&15; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_ADD_ZA_ZW_4X4: - case ENC_BFADD_ZA_ZW_4X4_16: - case ENC_BFSUB_ZA_ZW_4X4_16: - case ENC_FADD_ZA_ZW_4X4: - case ENC_FADD_ZA_ZW_4X4_16: - case ENC_FSUB_ZA_ZW_4X4: - case ENC_FSUB_ZA_ZW_4X4_16: - case ENC_SUB_ZA_ZW_4X4: - // x|xx|xxxx|xx|sz=x|x|xx|xx|xx|Rv=xx|xxx|Zm=xxx|xx|x|S=x|off3=xxx - ctx->sz = (insword>>22)&1; - ctx->Rv = (insword>>13)&3; - ctx->Zm = (insword>>7)&7; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_LD1B_MZX_P_BI_2X8: - case ENC_LD1D_MZX_P_BI_2X8: - case ENC_LD1H_MZX_P_BI_2X8: - case ENC_LD1W_MZX_P_BI_2X8: - case ENC_LDNT1B_MZX_P_BI_2X8: - case ENC_LDNT1D_MZX_P_BI_2X8: - case ENC_LDNT1H_MZX_P_BI_2X8: - case ENC_LDNT1W_MZX_P_BI_2X8: - case ENC_ST1B_MZX_P_BI_2X8: - case ENC_ST1D_MZX_P_BI_2X8: - case ENC_ST1H_MZX_P_BI_2X8: - case ENC_ST1W_MZX_P_BI_2X8: - case ENC_STNT1B_MZX_P_BI_2X8: - case ENC_STNT1D_MZX_P_BI_2X8: - case ENC_STNT1H_MZX_P_BI_2X8: - case ENC_STNT1W_MZX_P_BI_2X8: - // x|xx|xxxx|xx|xxx|imm4=xxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|T=x|N=x|Zt=xxx - ctx->imm4 = (insword>>16)&15; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->T = (insword>>4)&1; - ctx->N = (insword>>3)&1; - ctx->Zt = insword&7; - break; - case ENC_LD1B_MZX_P_BI_4X4: - case ENC_LD1D_MZX_P_BI_4X4: - case ENC_LD1H_MZX_P_BI_4X4: - case ENC_LD1W_MZX_P_BI_4X4: - case ENC_LDNT1B_MZX_P_BI_4X4: - case ENC_LDNT1D_MZX_P_BI_4X4: - case ENC_LDNT1H_MZX_P_BI_4X4: - case ENC_LDNT1W_MZX_P_BI_4X4: - case ENC_ST1B_MZX_P_BI_4X4: - case ENC_ST1D_MZX_P_BI_4X4: - case ENC_ST1H_MZX_P_BI_4X4: - case ENC_ST1W_MZX_P_BI_4X4: - case ENC_STNT1B_MZX_P_BI_4X4: - case ENC_STNT1D_MZX_P_BI_4X4: - case ENC_STNT1H_MZX_P_BI_4X4: - case ENC_STNT1W_MZX_P_BI_4X4: - // x|xx|xxxx|xx|xxx|imm4=xxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|T=x|N=x|x|Zt=xx - ctx->imm4 = (insword>>16)&15; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->T = (insword>>4)&1; - ctx->N = (insword>>3)&1; - ctx->Zt = insword&3; - break; - case ENC_LD1B_MZ_P_BI_2: - case ENC_LD1D_MZ_P_BI_2: - case ENC_LD1H_MZ_P_BI_2: - case ENC_LD1W_MZ_P_BI_2: - case ENC_LDNT1B_MZ_P_BI_2: - case ENC_LDNT1D_MZ_P_BI_2: - case ENC_LDNT1H_MZ_P_BI_2: - case ENC_LDNT1W_MZ_P_BI_2: - case ENC_ST1B_MZ_P_BI_2: - case ENC_ST1D_MZ_P_BI_2: - case ENC_ST1H_MZ_P_BI_2: - case ENC_ST1W_MZ_P_BI_2: - case ENC_STNT1B_MZ_P_BI_2: - case ENC_STNT1D_MZ_P_BI_2: - case ENC_STNT1H_MZ_P_BI_2: - case ENC_STNT1W_MZ_P_BI_2: - // x|xx|xxxx|xx|xxx|imm4=xxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=x - ctx->imm4 = (insword>>16)&15; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = (insword>>1)&15; - ctx->N = insword&1; - break; - case ENC_LD1B_MZ_P_BI_4: - case ENC_LD1D_MZ_P_BI_4: - case ENC_LD1H_MZ_P_BI_4: - case ENC_LD1W_MZ_P_BI_4: - case ENC_LDNT1B_MZ_P_BI_4: - case ENC_LDNT1D_MZ_P_BI_4: - case ENC_LDNT1H_MZ_P_BI_4: - case ENC_LDNT1W_MZ_P_BI_4: - case ENC_ST1B_MZ_P_BI_4: - case ENC_ST1D_MZ_P_BI_4: - case ENC_ST1H_MZ_P_BI_4: - case ENC_ST1W_MZ_P_BI_4: - case ENC_STNT1B_MZ_P_BI_4: - case ENC_STNT1D_MZ_P_BI_4: - case ENC_STNT1H_MZ_P_BI_4: - case ENC_STNT1W_MZ_P_BI_4: - // x|xx|xxxx|xx|xxx|imm4=xxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|Zt=xxx|x|N=x - ctx->imm4 = (insword>>16)&15; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = (insword>>2)&7; - ctx->N = insword&1; - break; - case ENC_LD1B_MZX_P_BR_2X8: - case ENC_LD1D_MZX_P_BR_2X8: - case ENC_LD1H_MZX_P_BR_2X8: - case ENC_LD1W_MZX_P_BR_2X8: - case ENC_LDNT1B_MZX_P_BR_2X8: - case ENC_LDNT1D_MZX_P_BR_2X8: - case ENC_LDNT1H_MZX_P_BR_2X8: - case ENC_LDNT1W_MZX_P_BR_2X8: - case ENC_ST1B_MZX_P_BR_2X8: - case ENC_ST1D_MZX_P_BR_2X8: - case ENC_ST1H_MZX_P_BR_2X8: - case ENC_ST1W_MZX_P_BR_2X8: - case ENC_STNT1B_MZX_P_BR_2X8: - case ENC_STNT1D_MZX_P_BR_2X8: - case ENC_STNT1H_MZX_P_BR_2X8: - case ENC_STNT1W_MZX_P_BR_2X8: - // x|xx|xxxx|xx|xx|Rm=xxxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|T=x|N=x|Zt=xxx - ctx->Rm = (insword>>16)&0x1f; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->T = (insword>>4)&1; - ctx->N = (insword>>3)&1; - ctx->Zt = insword&7; - break; - case ENC_LD1B_MZX_P_BR_4X4: - case ENC_LD1D_MZX_P_BR_4X4: - case ENC_LD1H_MZX_P_BR_4X4: - case ENC_LD1W_MZX_P_BR_4X4: - case ENC_LDNT1B_MZX_P_BR_4X4: - case ENC_LDNT1D_MZX_P_BR_4X4: - case ENC_LDNT1H_MZX_P_BR_4X4: - case ENC_LDNT1W_MZX_P_BR_4X4: - case ENC_ST1B_MZX_P_BR_4X4: - case ENC_ST1D_MZX_P_BR_4X4: - case ENC_ST1H_MZX_P_BR_4X4: - case ENC_ST1W_MZX_P_BR_4X4: - case ENC_STNT1B_MZX_P_BR_4X4: - case ENC_STNT1D_MZX_P_BR_4X4: - case ENC_STNT1H_MZX_P_BR_4X4: - case ENC_STNT1W_MZX_P_BR_4X4: - // x|xx|xxxx|xx|xx|Rm=xxxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|T=x|N=x|x|Zt=xx - ctx->Rm = (insword>>16)&0x1f; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->T = (insword>>4)&1; - ctx->N = (insword>>3)&1; - ctx->Zt = insword&3; - break; - case ENC_LD1B_MZ_P_BR_2: - case ENC_LD1D_MZ_P_BR_2: - case ENC_LD1H_MZ_P_BR_2: - case ENC_LD1W_MZ_P_BR_2: - case ENC_LDNT1B_MZ_P_BR_2: - case ENC_LDNT1D_MZ_P_BR_2: - case ENC_LDNT1H_MZ_P_BR_2: - case ENC_LDNT1W_MZ_P_BR_2: - case ENC_ST1B_MZ_P_BR_2: - case ENC_ST1D_MZ_P_BR_2: - case ENC_ST1H_MZ_P_BR_2: - case ENC_ST1W_MZ_P_BR_2: - case ENC_STNT1B_MZ_P_BR_2: - case ENC_STNT1D_MZ_P_BR_2: - case ENC_STNT1H_MZ_P_BR_2: - case ENC_STNT1W_MZ_P_BR_2: - // x|xx|xxxx|xx|xx|Rm=xxxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|Zt=xxxx|N=x - ctx->Rm = (insword>>16)&0x1f; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = (insword>>1)&15; - ctx->N = insword&1; - break; - case ENC_LD1B_MZ_P_BR_4: - case ENC_LD1D_MZ_P_BR_4: - case ENC_LD1H_MZ_P_BR_4: - case ENC_LD1W_MZ_P_BR_4: - case ENC_LDNT1B_MZ_P_BR_4: - case ENC_LDNT1D_MZ_P_BR_4: - case ENC_LDNT1H_MZ_P_BR_4: - case ENC_LDNT1W_MZ_P_BR_4: - case ENC_ST1B_MZ_P_BR_4: - case ENC_ST1D_MZ_P_BR_4: - case ENC_ST1H_MZ_P_BR_4: - case ENC_ST1W_MZ_P_BR_4: - case ENC_STNT1B_MZ_P_BR_4: - case ENC_STNT1D_MZ_P_BR_4: - case ENC_STNT1H_MZ_P_BR_4: - case ENC_STNT1W_MZ_P_BR_4: - // x|xx|xxxx|xx|xx|Rm=xxxxx|x|msz=xx|PNg=xxx|Rn=xxxxx|Zt=xxx|x|N=x - ctx->Rm = (insword>>16)&0x1f; - ctx->msz = (insword>>13)&3; - ctx->PNg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->Zt = (insword>>2)&7; - ctx->N = insword&1; - break; - case ENC_LUTI6_Z_ZTZ_: - // x|xx|xxxx|xx|x|xxx|opc=xxxxx|size=xx|opc2=xx|Zn=xxxxx|Zd=xxxxx - ctx->opc = (insword>>14)&0x1f; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_LUTI4_MZ4_ZTMZ2_1: - // x|xx|xxxx|xx|x|xxx|xxxxx|size=xx|opc=xx|Zn=xxxx|x|Zd=xxx|xx - ctx->size = (insword>>12)&3; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->Zd = (insword>>2)&7; - break; - case ENC_LUTI6_MZ4_ZTMZ3_1: - // x|xx|xxxx|xx|x|xxx|xxxxx|size=xx|opc=xx|Zn=xxx|x|x|Zd=xxx|xx - ctx->size = (insword>>12)&3; - ctx->opc = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->Zd = (insword>>2)&7; - break; - case ENC_LUTI4_MZ4_ZTZ_1: - // x|xx|xxxx|xx|x|xxx|xx|i1=x|xx|size=xx|opc2=xx|Zn=xxxxx|Zd=xxx|xx - ctx->i1 = (insword>>16)&1; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>2)&7; - break; - case ENC_LUTI4_MZ2_ZTZ_1: - // x|xx|xxxx|xx|x|xxx|xx|i2=xx|x|size=xx|opc2=xx|Zn=xxxxx|Zd=xxxx|x - ctx->i2 = (insword>>15)&3; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - break; - case ENC_LUTI4_Z_ZTZ_: - // x|xx|xxxx|xx|x|xxx|xx|i3=xxx|size=xx|opc2=xx|Zn=xxxxx|Zd=xxxxx - ctx->i3 = (insword>>14)&7; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_LUTI2_MZ4_ZTZ_1: - // x|xx|xxxx|xx|x|xxx|x|i2=xx|xx|size=xx|opc2=xx|Zn=xxxxx|Zd=xxx|xx - ctx->i2 = (insword>>16)&3; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>2)&7; - break; - case ENC_LUTI2_MZ2_ZTZ_1: - // x|xx|xxxx|xx|x|xxx|x|i3=xxx|x|size=xx|opc2=xx|Zn=xxxxx|Zd=xxxx|x - ctx->i3 = (insword>>15)&7; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - break; - case ENC_LUTI2_Z_ZTZ_: - // x|xx|xxxx|xx|x|xxx|x|i4=xxxx|size=xx|opc2=xx|Zn=xxxxx|Zd=xxxxx - ctx->i4 = (insword>>14)&15; - ctx->size = (insword>>12)&3; - ctx->opc2 = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = insword&0x1f; - break; - case ENC_SMLAL_ZA_ZZV_1: - case ENC_SMLSL_ZA_ZZV_1: - case ENC_UMLAL_ZA_ZZV_1: - case ENC_UMLSL_ZA_ZZV_1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|U=x|S=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLAL_ZA_ZZV_2X1: - case ENC_SMLAL_ZA_ZZV_4X1: - case ENC_SMLSL_ZA_ZZV_2X1: - case ENC_SMLSL_ZA_ZZV_4X1: - case ENC_UMLAL_ZA_ZZV_2X1: - case ENC_UMLAL_ZA_ZZV_4X1: - case ENC_UMLSL_ZA_ZZV_2X1: - case ENC_UMLSL_ZA_ZZV_4X1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|U=x|S=x|op=x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->op = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_SDOT_ZA32_ZZV_2X1: - case ENC_SDOT_ZA32_ZZV_4X1: - case ENC_SUDOT_ZA_ZZV_S2X1: - case ENC_SUDOT_ZA_ZZV_S4X1: - case ENC_UDOT_ZA32_ZZV_2X1: - case ENC_UDOT_ZA32_ZZV_4X1: - case ENC_USDOT_ZA_ZZV_S2X1: - case ENC_USDOT_ZA_ZZV_S4X1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|U=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_BFMLAL_ZA_ZZV_2X1: - case ENC_BFMLAL_ZA_ZZV_4X1: - case ENC_BFMLSL_ZA_ZZV_2X1: - case ENC_BFMLSL_ZA_ZZV_4X1: - case ENC_FMLAL_ZA_Z8Z8V_2X1: - case ENC_FMLAL_ZA_Z8Z8V_4X1: - case ENC_FMLAL_ZA_ZZV_2X1: - case ENC_FMLAL_ZA_ZZV_4X1: - case ENC_FMLSL_ZA_ZZV_2X1: - case ENC_FMLSL_ZA_ZZV_4X1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|op=x|S=x|o2=x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->op = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->o2 = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_BFMLAL_ZA_ZZV_1: - case ENC_BFMLSL_ZA_ZZV_1: - case ENC_FMLAL_ZA_ZZV_1: - case ENC_FMLSL_ZA_ZZV_1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|op=x|S=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->op = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_BFDOT_ZA_ZZV_2X1: - case ENC_BFDOT_ZA_ZZV_4X1: - case ENC_FDOT_ZA32_Z8Z8V_2X1: - case ENC_FDOT_ZA32_Z8Z8V_4X1: - case ENC_FDOT_ZA_Z8Z8V_2X1: - case ENC_FDOT_ZA_Z8Z8V_4X1: - case ENC_FDOT_ZA_ZZV_2X1: - case ENC_FDOT_ZA_ZZV_4X1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|opc=xx|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->opc = (insword>>3)&3; - ctx->off3 = insword&7; - break; - case ENC_FMLALL_ZA32_Z8Z8V_1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|xxx|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->off2 = insword&3; - break; - case ENC_FMLALL_ZA32_Z8Z8V_2X1: - case ENC_FMLALL_ZA32_Z8Z8V_4X1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|xxx|x|o1=x - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->o1 = insword&1; - break; - case ENC_FMLAL_ZA_Z8Z8V_1: - // x|xx|xxxx|xx|x|xx|Zm=xxxx|x|Rv=xx|xxx|Zn=xxxxx|xx|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->off3 = insword&7; - break; - case ENC_BFDOT_ZA_ZZW_2X2: - case ENC_FDOT_ZA32_Z8Z8W_2X2: - case ENC_FDOT_ZA_Z8Z8W_2X2: - case ENC_FDOT_ZA_ZZW_2X2: - // x|xx|xxxx|xx|x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|opc=xx|x|off3=xxx - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->opc = (insword>>4)&3; - ctx->off3 = insword&7; - break; - case ENC_SMLAL_ZA_ZZW_2X2: - case ENC_SMLSL_ZA_ZZW_2X2: - case ENC_UMLAL_ZA_ZZW_2X2: - case ENC_UMLSL_ZA_ZZW_2X2: - // x|xx|xxxx|xx|x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|U=x|S=x|x|off2=xx - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off2 = insword&3; - break; - case ENC_SDOT_ZA32_ZZW_2X2: - case ENC_UDOT_ZA32_ZZW_2X2: - // x|xx|xxxx|xx|x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|U=x|x|off3=xxx - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_BFMLAL_ZA_ZZW_2X2: - case ENC_BFMLSL_ZA_ZZW_2X2: - case ENC_FMLAL_ZA_ZZW_2X2: - case ENC_FMLSL_ZA_ZZW_2X2: - // x|xx|xxxx|xx|x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|op=x|S=x|x|off2=xx - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->op = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off2 = insword&3; - break; - case ENC_FMLAL_ZA_Z8Z8W_2X2: - // x|xx|xxxx|xx|x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|xxx|off2=xx - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->off2 = insword&3; - break; - case ENC_FMLALL_ZA32_Z8Z8W_2X2: - // x|xx|xxxx|xx|x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|xxx|x|o1=x - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->o1 = insword&1; - break; - case ENC_USDOT_ZA_ZZW_S2X2: - // x|xx|xxxx|xx|x|x|Zm=xxxx|xx|Rv=xx|xxx|Zn=xxxx|x|xx|off3=xxx - ctx->Zm = (insword>>17)&15; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->off3 = insword&7; - break; - case ENC_SMLAL_ZA_ZZW_4X4: - case ENC_SMLSL_ZA_ZZW_4X4: - case ENC_UMLAL_ZA_ZZW_4X4: - case ENC_UMLSL_ZA_ZZW_4X4: - // x|xx|xxxx|xx|x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|U=x|S=x|x|off2=xx - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off2 = insword&3; - break; - case ENC_SDOT_ZA32_ZZW_4X4: - case ENC_UDOT_ZA32_ZZW_4X4: - // x|xx|xxxx|xx|x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|U=x|x|off3=xxx - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_BFMLAL_ZA_ZZW_4X4: - case ENC_BFMLSL_ZA_ZZW_4X4: - case ENC_FMLAL_ZA_ZZW_4X4: - case ENC_FMLSL_ZA_ZZW_4X4: - // x|xx|xxxx|xx|x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|op=x|S=x|x|off2=xx - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->op = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off2 = insword&3; - break; - case ENC_FMLAL_ZA_Z8Z8W_4X4: - // x|xx|xxxx|xx|x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|xxx|off2=xx - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->off2 = insword&3; - break; - case ENC_FMLALL_ZA32_Z8Z8W_4X4: - // x|xx|xxxx|xx|x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|xxx|x|o1=x - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->o1 = insword&1; - break; - case ENC_USDOT_ZA_ZZW_S4X4: - // x|xx|xxxx|xx|x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|xx|xx|off3=xxx - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->off3 = insword&7; - break; - case ENC_BFDOT_ZA_ZZW_4X4: - case ENC_FDOT_ZA32_Z8Z8W_4X4: - case ENC_FDOT_ZA_Z8Z8W_4X4: - case ENC_FDOT_ZA_ZZW_4X4: - // x|xx|xxxx|xx|x|x|Zm=xxx|x|xx|Rv=xx|xxx|Zn=xxx|x|opc=xx|x|off3=xxx - ctx->Zm = (insword>>18)&7; - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->opc = (insword>>4)&3; - ctx->off3 = insword&7; - break; - case ENC_LD1D_ZA_P_RRR_: - case ENC_ST1D_ZA_P_RRR_: - // x|xx|xxxx|x|msz=xx|x|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|x|ZAt=xxx|o1=x - ctx->msz = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->ZAt = (insword>>1)&7; - ctx->o1 = insword&1; - break; - case ENC_LD1W_ZA_P_RRR_: - case ENC_ST1W_ZA_P_RRR_: - // x|xx|xxxx|x|msz=xx|x|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|x|ZAt=xx|off2=xx - ctx->msz = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->ZAt = (insword>>2)&3; - ctx->off2 = insword&3; - break; - case ENC_LD1H_ZA_P_RRR_: - case ENC_ST1H_ZA_P_RRR_: - // x|xx|xxxx|x|msz=xx|x|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|x|ZAt=x|off3=xxx - ctx->msz = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->ZAt = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_LD1B_ZA_P_RRR_: - case ENC_ST1B_ZA_P_RRR_: - // x|xx|xxxx|x|msz=xx|x|Rm=xxxxx|V=x|Rs=xx|Pg=xxx|Rn=xxxxx|x|off4=xxxx - ctx->msz = (insword>>22)&3; - ctx->Rm = (insword>>16)&0x1f; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Rn = (insword>>5)&0x1f; - ctx->off4 = insword&15; - break; - case ENC_BF1CVT_MZ2_Z8_: - case ENC_BF2CVT_MZ2_Z8_: - case ENC_BF1CVTL_MZ2_Z8_: - case ENC_BF2CVTL_MZ2_Z8_: - case ENC_F1CVT_MZ2_Z8_: - case ENC_F2CVT_MZ2_Z8_: - case ENC_F1CVTL_MZ2_Z8_: - case ENC_F2CVTL_MZ2_Z8_: - // x|xx|xxxx|x|opc=xx|x|xxx|xx|xxxxxx|Zn=xxxxx|Zd=xxxx|L=x - ctx->opc = (insword>>22)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - ctx->L = insword&1; - break; - case ENC_MOV_ZA_P_RZ_Q_MOVA_ZA_P_RZ_Q: - case ENC_MOVA_ZA_P_RZ_Q: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|x|ZAd=xxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAd = insword&15; - break; - case ENC_MOV_ZA_P_RZ_D_MOVA_ZA_P_RZ_D: - case ENC_MOVA_ZA_P_RZ_D: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|x|ZAd=xxx|o1=x - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAd = (insword>>1)&7; - ctx->o1 = insword&1; - break; - case ENC_MOV_ZA_P_RZ_W_MOVA_ZA_P_RZ_W: - case ENC_MOVA_ZA_P_RZ_W: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|x|ZAd=xx|off2=xx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAd = (insword>>2)&3; - ctx->off2 = insword&3; - break; - case ENC_MOV_ZA_P_RZ_H_MOVA_ZA_P_RZ_H: - case ENC_MOVA_ZA_P_RZ_H: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|x|ZAd=x|off3=xxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAd = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_MOV_ZA_P_RZ_B_MOVA_ZA_P_RZ_B: - case ENC_MOVA_ZA_P_RZ_B: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|Zn=xxxxx|x|off4=xxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->off4 = insword&15; - break; - case ENC_MOV_Z_P_RZA_Q_MOVA_Z_P_RZA_Q: - case ENC_MOVA_Z_P_RZA_Q: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|x|ZAn=xxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->ZAn = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_MOV_Z_P_RZA_D_MOVA_Z_P_RZA_D: - case ENC_MOVA_Z_P_RZA_D: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|x|ZAn=xxx|o1=x|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->ZAn = (insword>>6)&7; - ctx->o1 = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_MOV_Z_P_RZA_W_MOVA_Z_P_RZA_W: - case ENC_MOVA_Z_P_RZA_W: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|x|ZAn=xx|off2=xx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->ZAn = (insword>>7)&3; - ctx->off2 = (insword>>5)&3; - ctx->Zd = insword&0x1f; - break; - case ENC_MOV_Z_P_RZA_H_MOVA_Z_P_RZA_H: - case ENC_MOVA_Z_P_RZA_H: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|x|ZAn=x|off3=xxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->ZAn = (insword>>8)&1; - ctx->off3 = (insword>>5)&7; - ctx->Zd = insword&0x1f; - break; - case ENC_MOV_Z_P_RZA_B_MOVA_Z_P_RZA_B: - case ENC_MOVA_Z_P_RZA_B: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|Pg=xxx|x|off4=xxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Pg = (insword>>10)&7; - ctx->off4 = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_MOVAZ_Z_RZA_Q: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|xxx|x|ZAn=xxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_MOVAZ_Z_RZA_D: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|xxx|x|ZAn=xxx|o1=x|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>6)&7; - ctx->o1 = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_MOVAZ_Z_RZA_W: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|xxx|x|ZAn=xx|off2=xx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>7)&3; - ctx->off2 = (insword>>5)&3; - ctx->Zd = insword&0x1f; - break; - case ENC_MOVAZ_Z_RZA_H: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|xxx|x|ZAn=x|off3=xxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>8)&1; - ctx->off3 = (insword>>5)&7; - ctx->Zd = insword&0x1f; - break; - case ENC_MOVAZ_Z_RZA_B: - // x|xx|xxxx|x|size=xx|xxx|x|x|Q=x|V=x|Rs=xx|xxx|x|off4=xxxx|Zd=xxxxx - ctx->size = (insword>>22)&3; - ctx->Q = (insword>>16)&1; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->off4 = (insword>>5)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_MOV_ZA2_Z_D1_MOVA_ZA2_Z_D1: - case ENC_MOVA_ZA2_Z_D1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxxx|x|x|x|ZAd=xxx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->ZAd = insword&7; - break; - case ENC_MOV_ZA2_Z_W1_MOVA_ZA2_Z_W1: - case ENC_MOVA_ZA2_Z_W1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxxx|x|x|x|ZAd=xx|o1=x - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->ZAd = (insword>>1)&3; - ctx->o1 = insword&1; - break; - case ENC_MOV_ZA2_Z_H1_MOVA_ZA2_Z_H1: - case ENC_MOVA_ZA2_Z_H1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxxx|x|x|x|ZAd=x|off2=xx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->ZAd = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_MOV_ZA2_Z_B1_MOVA_ZA2_Z_B1: - case ENC_MOVA_ZA2_Z_B1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxxx|x|x|x|off3=xxx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->off3 = insword&7; - break; - case ENC_MOV_ZA4_Z_D1_MOVA_ZA4_Z_D1: - case ENC_MOVA_ZA4_Z_D1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxx|xx|x|x|ZAd=xxx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->ZAd = insword&7; - break; - case ENC_MOV_ZA4_Z_W1_MOVA_ZA4_Z_W1: - case ENC_MOVA_ZA4_Z_W1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxx|xx|x|x|x|ZAd=xx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->ZAd = insword&3; - break; - case ENC_MOV_ZA4_Z_H1_MOVA_ZA4_Z_H1: - case ENC_MOVA_ZA4_Z_H1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxx|xx|x|x|x|ZAd=x|o1=x - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->ZAd = (insword>>1)&1; - ctx->o1 = insword&1; - break; - case ENC_MOV_ZA4_Z_B1_MOVA_ZA4_Z_B1: - case ENC_MOVA_ZA4_Z_B1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|Zn=xxx|xx|x|x|x|off2=xx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->off2 = insword&3; - break; - case ENC_MOV_MZ2_ZA_D1_MOVA_MZ2_ZA_D1: - case ENC_MOVA_MZ2_ZA_D1: - case ENC_MOVAZ_MZ2_ZA_D1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|ZAn=xxx|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>5)&7; - ctx->Zd = (insword>>1)&15; - break; - case ENC_MOV_MZ4_ZA_D1_MOVA_MZ4_ZA_D1: - case ENC_MOVA_MZ4_ZA_D1: - case ENC_MOVAZ_MZ4_ZA_D1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|ZAn=xxx|Zd=xxx|xx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>5)&7; - ctx->Zd = (insword>>2)&7; - break; - case ENC_MOV_MZ2_ZA_W1_MOVA_MZ2_ZA_W1: - case ENC_MOVA_MZ2_ZA_W1: - case ENC_MOVAZ_MZ2_ZA_W1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|ZAn=xx|o1=x|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>6)&3; - ctx->o1 = (insword>>5)&1; - ctx->Zd = (insword>>1)&15; - break; - case ENC_MOV_MZ2_ZA_H1_MOVA_MZ2_ZA_H1: - case ENC_MOVA_MZ2_ZA_H1: - case ENC_MOVAZ_MZ2_ZA_H1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|ZAn=x|off2=xx|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>7)&1; - ctx->off2 = (insword>>5)&3; - ctx->Zd = (insword>>1)&15; - break; - case ENC_MOV_MZ2_ZA_B1_MOVA_MZ2_ZA_B1: - case ENC_MOVA_MZ2_ZA_B1: - case ENC_MOVAZ_MZ2_ZA_B1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|off3=xxx|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->off3 = (insword>>5)&7; - ctx->Zd = (insword>>1)&15; - break; - case ENC_MOV_MZ4_ZA_W1_MOVA_MZ4_ZA_W1: - case ENC_MOVA_MZ4_ZA_W1: - case ENC_MOVAZ_MZ4_ZA_W1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|x|ZAn=xx|Zd=xxx|xx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>5)&3; - ctx->Zd = (insword>>2)&7; - break; - case ENC_MOV_MZ4_ZA_H1_MOVA_MZ4_ZA_H1: - case ENC_MOVA_MZ4_ZA_H1: - case ENC_MOVAZ_MZ4_ZA_H1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|x|ZAn=x|o1=x|Zd=xxx|xx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->ZAn = (insword>>6)&1; - ctx->o1 = (insword>>5)&1; - ctx->Zd = (insword>>2)&7; - break; - case ENC_MOV_MZ4_ZA_B1_MOVA_MZ4_ZA_B1: - case ENC_MOVA_MZ4_ZA_B1: - case ENC_MOVAZ_MZ4_ZA_B1: - // x|xx|xxxx|x|size=xx|xxx|x|x|x|V=x|Rs=xx|xxx|xx|x|off2=xx|Zd=xxx|xx - ctx->size = (insword>>22)&3; - ctx->V = (insword>>15)&1; - ctx->Rs = (insword>>13)&3; - ctx->off2 = (insword>>5)&3; - ctx->Zd = (insword>>2)&7; - break; - case ENC_SRSHL_MZ_ZZV_2X1: - case ENC_URSHL_MZ_ZZV_2X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|opc=xxx|Zdn=xxxx|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->opc = (insword>>5)&7; - ctx->Zdn = (insword>>1)&15; - ctx->U = insword&1; - break; - case ENC_SRSHL_MZ_ZZV_4X1: - case ENC_URSHL_MZ_ZZV_4X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|opc=xxx|Zdn=xxx|x|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->opc = (insword>>5)&7; - ctx->Zdn = (insword>>2)&7; - ctx->U = insword&1; - break; - case ENC_ADD_MZ_ZZV_2X1: - case ENC_BFSCALE_MZ_ZZV_2X1: - case ENC_FSCALE_MZ_ZZV_2X1: - case ENC_SQDMULH_MZ_ZZV_2X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|xxx|Zdn=xxxx|op=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->Zdn = (insword>>1)&15; - ctx->op = insword&1; - break; - case ENC_ADD_MZ_ZZV_4X1: - case ENC_BFSCALE_MZ_ZZV_4X1: - case ENC_FSCALE_MZ_ZZV_4X1: - case ENC_SQDMULH_MZ_ZZV_4X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|xxx|Zdn=xxx|x|op=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->Zdn = (insword>>2)&7; - ctx->op = insword&1; - break; - case ENC_SMAX_MZ_ZZV_2X1: - case ENC_SMIN_MZ_ZZV_2X1: - case ENC_UMAX_MZ_ZZV_2X1: - case ENC_UMIN_MZ_ZZV_2X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|xx|op=x|Zdn=xxxx|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->op = (insword>>5)&1; - ctx->Zdn = (insword>>1)&15; - ctx->U = insword&1; - break; - case ENC_BFMAX_MZ_ZZV_2X1: - case ENC_BFMAXNM_MZ_ZZV_2X1: - case ENC_BFMIN_MZ_ZZV_2X1: - case ENC_BFMINNM_MZ_ZZV_2X1: - case ENC_FMAX_MZ_ZZV_2X1: - case ENC_FMAXNM_MZ_ZZV_2X1: - case ENC_FMIN_MZ_ZZV_2X1: - case ENC_FMINNM_MZ_ZZV_2X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|xx|op=x|Zdn=xxxx|o2=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->op = (insword>>5)&1; - ctx->Zdn = (insword>>1)&15; - ctx->o2 = insword&1; - break; - case ENC_SMAX_MZ_ZZV_4X1: - case ENC_SMIN_MZ_ZZV_4X1: - case ENC_UMAX_MZ_ZZV_4X1: - case ENC_UMIN_MZ_ZZV_4X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|xx|op=x|Zdn=xxx|x|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->op = (insword>>5)&1; - ctx->Zdn = (insword>>2)&7; - ctx->U = insword&1; - break; - case ENC_BFMAX_MZ_ZZV_4X1: - case ENC_BFMAXNM_MZ_ZZV_4X1: - case ENC_BFMIN_MZ_ZZV_4X1: - case ENC_BFMINNM_MZ_ZZV_4X1: - case ENC_FMAX_MZ_ZZV_4X1: - case ENC_FMAXNM_MZ_ZZV_4X1: - case ENC_FMIN_MZ_ZZV_4X1: - case ENC_FMINNM_MZ_ZZV_4X1: - // x|xx|xxxx|x|size=xx|xx|Zm=xxxx|xxxxx|x|xx|xx|op=x|Zdn=xxx|x|o2=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&15; - ctx->op = (insword>>5)&1; - ctx->Zdn = (insword>>2)&7; - ctx->o2 = insword&1; - break; - case ENC_SCLAMP_MZ_ZZ_2: - case ENC_UCLAMP_MZ_ZZ_2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxx|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - ctx->U = insword&1; - break; - case ENC_BFCLAMP_MZ_ZZ_2: - case ENC_FCLAMP_MZ_ZZ_2: - case ENC_UZP_MZ_ZZ_2: - case ENC_ZIP_MZ_ZZ_2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxx|op=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - ctx->op = insword&1; - break; - case ENC_SCLAMP_MZ_ZZ_4: - case ENC_UCLAMP_MZ_ZZ_4: - // x|xx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxx|x|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>2)&7; - ctx->U = insword&1; - break; - case ENC_BFCLAMP_MZ_ZZ_4: - case ENC_FCLAMP_MZ_ZZ_4: - // x|xx|xxxx|x|size=xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxx|x|op=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>2)&7; - ctx->op = insword&1; - break; - case ENC_SQDMULH_MZ_ZZW_2X2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxx|xxxxxxx|xxxxx|Zdn=xxxx|op=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>17)&15; - ctx->Zdn = (insword>>1)&15; - ctx->op = insword&1; - break; - case ENC_SMAX_MZ_ZZW_2X2: - case ENC_SMIN_MZ_ZZW_2X2: - case ENC_UMAX_MZ_ZZW_2X2: - case ENC_UMIN_MZ_ZZW_2X2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxx|xxxxxxx|xxx|opc=xx|Zdn=xxxx|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>17)&15; - ctx->opc = (insword>>5)&3; - ctx->Zdn = (insword>>1)&15; - ctx->U = insword&1; - break; - case ENC_BFMAX_MZ_ZZW_2X2: - case ENC_BFMAXNM_MZ_ZZW_2X2: - case ENC_BFMIN_MZ_ZZW_2X2: - case ENC_BFMINNM_MZ_ZZW_2X2: - case ENC_BFSCALE_MZ_ZZW_2X2: - case ENC_FAMAX_MZ_ZZW_2X2: - case ENC_FAMIN_MZ_ZZW_2X2: - case ENC_FMAX_MZ_ZZW_2X2: - case ENC_FMAXNM_MZ_ZZW_2X2: - case ENC_FMIN_MZ_ZZW_2X2: - case ENC_FMINNM_MZ_ZZW_2X2: - case ENC_FSCALE_MZ_ZZW_2X2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxx|xxxxxxx|xxx|opc=xx|Zdn=xxxx|o2=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>17)&15; - ctx->opc = (insword>>5)&3; - ctx->Zdn = (insword>>1)&15; - ctx->o2 = insword&1; - break; - case ENC_SRSHL_MZ_ZZW_2X2: - case ENC_URSHL_MZ_ZZW_2X2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxx|xxxxxxx|xx|opc=xxx|Zdn=xxxx|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>17)&15; - ctx->opc = (insword>>5)&7; - ctx->Zdn = (insword>>1)&15; - ctx->U = insword&1; - break; - case ENC_BFMUL_MZ_ZZV_2X1: - case ENC_BFMUL_MZ_ZZW_2X2: - case ENC_FMUL_MZ_ZZV_2X1: - case ENC_FMUL_MZ_ZZW_2X2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxx|x|xxxxxx|Zn=xxxx|x|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>17)&15; - ctx->Zn = (insword>>6)&15; - ctx->Zd = (insword>>1)&15; - break; - case ENC_BFMUL_MZ_ZZV_4X1: - case ENC_FMUL_MZ_ZZV_4X1: - // x|xx|xxxx|x|size=xx|x|Zm=xxxx|x|xxxxxx|Zn=xxx|x|x|Zd=xxx|x|x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>17)&15; - ctx->Zn = (insword>>7)&7; - ctx->Zd = (insword>>2)&7; - break; - case ENC_SEL_MZ_P_ZZ_2: - // x|xx|xxxx|x|size=xx|x|Zm=xxxx|x|xxx|PNg=xxx|Zn=xxxx|x|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>17)&15; - ctx->PNg = (insword>>10)&7; - ctx->Zn = (insword>>6)&15; - ctx->Zd = (insword>>1)&15; - break; - case ENC_SQDMULH_MZ_ZZW_4X4: - // x|xx|xxxx|x|size=xx|x|Zm=xxx|xxxxxxxx|xxxxx|Zdn=xxx|x|op=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>18)&7; - ctx->Zdn = (insword>>2)&7; - ctx->op = insword&1; - break; - case ENC_SMAX_MZ_ZZW_4X4: - case ENC_SMIN_MZ_ZZW_4X4: - case ENC_UMAX_MZ_ZZW_4X4: - case ENC_UMIN_MZ_ZZW_4X4: - // x|xx|xxxx|x|size=xx|x|Zm=xxx|xxxxxxxx|xxx|opc=xx|Zdn=xxx|x|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>18)&7; - ctx->opc = (insword>>5)&3; - ctx->Zdn = (insword>>2)&7; - ctx->U = insword&1; - break; - case ENC_BFMAX_MZ_ZZW_4X4: - case ENC_BFMAXNM_MZ_ZZW_4X4: - case ENC_BFMIN_MZ_ZZW_4X4: - case ENC_BFMINNM_MZ_ZZW_4X4: - case ENC_BFSCALE_MZ_ZZW_4X4: - case ENC_FAMAX_MZ_ZZW_4X4: - case ENC_FAMIN_MZ_ZZW_4X4: - case ENC_FMAX_MZ_ZZW_4X4: - case ENC_FMAXNM_MZ_ZZW_4X4: - case ENC_FMIN_MZ_ZZW_4X4: - case ENC_FMINNM_MZ_ZZW_4X4: - case ENC_FSCALE_MZ_ZZW_4X4: - // x|xx|xxxx|x|size=xx|x|Zm=xxx|xxxxxxxx|xxx|opc=xx|Zdn=xxx|x|o2=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>18)&7; - ctx->opc = (insword>>5)&3; - ctx->Zdn = (insword>>2)&7; - ctx->o2 = insword&1; - break; - case ENC_SRSHL_MZ_ZZW_4X4: - case ENC_URSHL_MZ_ZZW_4X4: - // x|xx|xxxx|x|size=xx|x|Zm=xxx|xxxxxxxx|xx|opc=xxx|Zdn=xxx|x|U=x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>18)&7; - ctx->opc = (insword>>5)&7; - ctx->Zdn = (insword>>2)&7; - ctx->U = insword&1; - break; - case ENC_BFMUL_MZ_ZZW_4X4: - case ENC_FMUL_MZ_ZZW_4X4: - // x|xx|xxxx|x|size=xx|x|Zm=xxx|xx|xxxxxx|Zn=xxx|x|x|Zd=xxx|x|x - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>18)&7; - ctx->Zn = (insword>>7)&7; - ctx->Zd = (insword>>2)&7; - break; - case ENC_SEL_MZ_P_ZZ_4: - // x|xx|xxxx|x|size=xx|x|Zm=xxx|xx|xxx|PNg=xxx|Zn=xxx|xx|Zd=xxx|xx - ctx->size = (insword>>22)&3; - ctx->Zm = (insword>>18)&7; - ctx->PNg = (insword>>10)&7; - ctx->Zn = (insword>>7)&7; - ctx->Zd = (insword>>2)&7; - break; - case ENC_SUNPK_MZ_Z_2: - case ENC_UUNPK_MZ_Z_2: - // x|xx|xxxx|x|size=xx|x|xxx|xx|xxxxxx|Zn=xxxxx|Zd=xxxx|U=x - ctx->size = (insword>>22)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - ctx->U = insword&1; - break; - case ENC_SUNPK_MZ_Z_4: - case ENC_UUNPK_MZ_Z_4: - // x|xx|xxxx|x|size=xx|x|xxx|xx|xxxxxx|Zn=xxxx|x|Zd=xxx|x|U=x - ctx->size = (insword>>22)&3; - ctx->Zn = (insword>>6)&15; - ctx->Zd = (insword>>2)&7; - ctx->U = insword&1; - break; - case ENC_UZP_MZ_Z_4: - case ENC_ZIP_MZ_Z_4: - // x|xx|xxxx|x|size=xx|x|xxx|xx|xxxxxx|Zn=xxx|xx|Zd=xxx|op=x|x - ctx->size = (insword>>22)&3; - ctx->Zn = (insword>>7)&7; - ctx->Zd = (insword>>2)&7; - ctx->op = (insword>>1)&1; - break; - case ENC_FRINTA_MZ_Z_2: - case ENC_FRINTM_MZ_Z_2: - case ENC_FRINTN_MZ_Z_2: - case ENC_FRINTP_MZ_Z_2: - // x|xx|xxxx|x|size=xx|x|xx|opc=xxx|xxxxxx|Zn=xxxx|x|Zd=xxxx|x - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Zn = (insword>>6)&15; - ctx->Zd = (insword>>1)&15; - break; - case ENC_FRINTA_MZ_Z_4: - case ENC_FRINTM_MZ_Z_4: - case ENC_FRINTN_MZ_Z_4: - case ENC_FRINTP_MZ_Z_4: - // x|xx|xxxx|x|size=xx|x|xx|opc=xxx|xxxxxx|Zn=xxx|xx|Zd=xxx|xx - ctx->size = (insword>>22)&3; - ctx->opc = (insword>>16)&7; - ctx->Zn = (insword>>7)&7; - ctx->Zd = (insword>>2)&7; - break; - case ENC_SQCVT_Z_MZ4_: - case ENC_SQCVTN_Z_MZ4_: - case ENC_SQCVTU_Z_MZ4_: - case ENC_SQCVTUN_Z_MZ4_: - case ENC_UQCVT_Z_MZ4_: - case ENC_UQCVTN_Z_MZ4_: - // x|xx|xxxx|x|sz=x|op=x|x|xxx|xx|xxxxxx|Zn=xxx|N=x|U=x|Zd=xxxxx - ctx->sz = (insword>>23)&1; - ctx->op = (insword>>22)&1; - ctx->Zn = (insword>>7)&7; - ctx->N = (insword>>6)&1; - ctx->U = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_SQRSHR_Z_MZ4_: - case ENC_SQRSHRN_Z_MZ4_: - case ENC_SQRSHRU_Z_MZ4_: - case ENC_SQRSHRUN_Z_MZ4_: - case ENC_UQRSHR_Z_MZ4_: - case ENC_UQRSHRN_Z_MZ4_: - // x|xx|xxxx|x|tsize=xx|x|imm5=xxxxx|xxx|xx|N=x|Zn=xxx|op=x|U=x|Zd=xxxxx - ctx->tsize = (insword>>22)&3; - ctx->imm5 = (insword>>16)&0x1f; - ctx->N = (insword>>10)&1; - ctx->Zn = (insword>>7)&7; - ctx->op = (insword>>6)&1; - ctx->U = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_MOV_ZA_MZ2_1_MOVA_ZA_MZ2_1: - case ENC_MOVA_ZA_MZ2_1: - // x|xx|xxxx|x|xx|xxx|x|x|xx|Rv=xx|xxx|Zn=xxxx|x|x|x|off3=xxx - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>6)&15; - ctx->off3 = insword&7; - break; - case ENC_MOV_ZA_MZ4_1_MOVA_ZA_MZ4_1: - case ENC_MOVA_ZA_MZ4_1: - // x|xx|xxxx|x|xx|xxx|x|x|xx|Rv=xx|xxx|Zn=xxx|xx|x|x|off3=xxx - ctx->Rv = (insword>>13)&3; - ctx->Zn = (insword>>7)&7; - ctx->off3 = insword&7; - break; - case ENC_MOV_MZ_ZA2_1_MOVA_MZ_ZA2_1: - case ENC_MOVA_MZ_ZA2_1: - case ENC_MOVAZ_MZ_ZA2_1: - // x|xx|xxxx|x|xx|xxx|x|x|xx|Rv=xx|xxx|xx|off3=xxx|Zd=xxxx|x - ctx->Rv = (insword>>13)&3; - ctx->off3 = (insword>>5)&7; - ctx->Zd = (insword>>1)&15; - break; - case ENC_MOV_MZ_ZA4_1_MOVA_MZ_ZA4_1: - case ENC_MOVA_MZ_ZA4_1: - case ENC_MOVAZ_MZ_ZA4_1: - // x|xx|xxxx|x|xx|xxx|x|x|xx|Rv=xx|xxx|xx|off3=xxx|Zd=xxx|xx - ctx->Rv = (insword>>13)&3; - ctx->off3 = (insword>>5)&7; - ctx->Zd = (insword>>2)&7; - break; - case ENC_SMLAL_ZA_ZZI_1: - case ENC_SMLSL_ZA_ZZI_1: - case ENC_UMLAL_ZA_ZZI_1: - case ENC_UMLSL_ZA_ZZI_1: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|i3h=x|Rv=xx|x|i3l=xx|Zn=xxxxx|U=x|S=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->i3h = (insword>>15)&1; - ctx->Rv = (insword>>13)&3; - ctx->i3l = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLALL_ZA_ZZI_D: - case ENC_SMLSLL_ZA_ZZI_D: - case ENC_UMLALL_ZA_ZZI_D: - case ENC_UMLSLL_ZA_ZZI_D: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|i3h=x|Rv=xx|x|i3l=xx|Zn=xxxxx|U=x|S=x|x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->i3h = (insword>>15)&1; - ctx->Rv = (insword>>13)&3; - ctx->i3l = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off2 = insword&3; - break; - case ENC_BFMLAL_ZA_ZZI_1: - case ENC_BFMLSL_ZA_ZZI_1: - case ENC_FMLAL_ZA_ZZI_1: - case ENC_FMLSL_ZA_ZZI_1: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|i3h=x|Rv=xx|x|i3l=xx|Zn=xxxxx|op=x|S=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->i3h = (insword>>15)&1; - ctx->Rv = (insword>>13)&3; - ctx->i3l = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->op = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_FMLAL_ZA_Z8Z8I_1: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|i4A=x|Rv=xx|x|i4B=xx|Zn=xxxxx|x|i4C=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->i4A = (insword>>15)&1; - ctx->Rv = (insword>>13)&3; - ctx->i4B = (insword>>10)&3; - ctx->Zn = (insword>>5)&0x1f; - ctx->i4C = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLALL_ZA_ZZI_S: - case ENC_SMLSLL_ZA_ZZI_S: - case ENC_SUMLALL_ZA_ZZI_S: - case ENC_UMLALL_ZA_ZZI_S: - case ENC_UMLSLL_ZA_ZZI_S: - case ENC_USMLALL_ZA_ZZI_S: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|U=x|S=x|op=x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->i4h = (insword>>15)&1; - ctx->Rv = (insword>>13)&3; - ctx->i4l = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->op = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_FMLALL_ZA32_Z8Z8I_1: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|i4h=x|Rv=xx|i4l=xxx|Zn=xxxxx|xxx|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->i4h = (insword>>15)&1; - ctx->Rv = (insword>>13)&3; - ctx->i4l = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->off2 = insword&3; - break; - case ENC_BFDOT_ZA_ZZI_2XI: - case ENC_BFVDOT_ZA_ZZI_2XI: - case ENC_FDOT_ZA32_Z8Z8I_2XI: - case ENC_FDOT_ZA_ZZI_2XI: - case ENC_FVDOT_ZA_ZZI_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|op=x|i2=xx|Zn=xxxx|opc2=xxx|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->i2 = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->opc2 = (insword>>3)&7; - ctx->off3 = insword&7; - break; - case ENC_FMLA_ZA_ZZI_S2XI: - case ENC_FMLS_ZA_ZZI_S2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|op=x|i2=xx|Zn=xxxx|x|S=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->i2 = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->S = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_SDOT_ZA32_ZZI_2XI: - case ENC_SDOT_ZA_ZZI_S2XI: - case ENC_SUDOT_ZA_ZZI_S2XI: - case ENC_SVDOT_ZA32_ZZI_2XI: - case ENC_UDOT_ZA32_ZZI_2XI: - case ENC_UDOT_ZA_ZZI_S2XI: - case ENC_USDOT_ZA_ZZI_S2XI: - case ENC_UVDOT_ZA32_ZZI_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|op=x|i2=xx|Zn=xxxx|x|U=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->i2 = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_BFDOT_ZA_ZZI_4XI: - case ENC_FDOT_ZA32_Z8Z8I_4XI: - case ENC_FDOT_ZA_ZZI_4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|op=x|i2=xx|Zn=xxx|x|opc2=xxx|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->i2 = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->opc2 = (insword>>3)&7; - ctx->off3 = insword&7; - break; - case ENC_FMLA_ZA_ZZI_S4XI: - case ENC_FMLS_ZA_ZZI_S4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|op=x|i2=xx|Zn=xxx|x|x|S=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->i2 = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->S = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_SDOT_ZA32_ZZI_4XI: - case ENC_SDOT_ZA_ZZI_S4XI: - case ENC_SUDOT_ZA_ZZI_S4XI: - case ENC_SUVDOT_ZA_ZZI_S4XI: - case ENC_SVDOT_ZA_ZZI_S4XI: - case ENC_UDOT_ZA32_ZZI_4XI: - case ENC_UDOT_ZA_ZZI_S4XI: - case ENC_USDOT_ZA_ZZI_S4XI: - case ENC_USVDOT_ZA_ZZI_S4XI: - case ENC_UVDOT_ZA_ZZI_S4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|op=x|i2=xx|Zn=xxx|x|x|U=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->i2 = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_FDOT_ZA_Z8Z8I_2XI: - case ENC_FVDOT_ZA_Z8Z8I_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|op=x|i3h=xx|Zn=xxxx|x|x|i3l=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>12)&1; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->i3l = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_FMLA_ZA_ZZI_D2XI: - case ENC_FMLS_ZA_ZZI_D2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|xx|i1=x|Zn=xxxx|x|S=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i1 = (insword>>10)&1; - ctx->Zn = (insword>>6)&15; - ctx->S = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_SDOT_ZA_ZZI_D2XI: - case ENC_UDOT_ZA_ZZI_D2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|xx|i1=x|Zn=xxxx|x|U=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i1 = (insword>>10)&1; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_FVDOTB_ZA32_Z8Z8I_2XI: - case ENC_FVDOTT_ZA32_Z8Z8I_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|xx|i2h=x|Zn=xxxx|x|T=x|i2l=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i2h = (insword>>10)&1; - ctx->Zn = (insword>>6)&15; - ctx->T = (insword>>4)&1; - ctx->i2l = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLALL_ZA_ZZI_D2XI: - case ENC_SMLSLL_ZA_ZZI_D2XI: - case ENC_UMLALL_ZA_ZZI_D2XI: - case ENC_UMLSLL_ZA_ZZI_D2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|xx|i3h=x|Zn=xxxx|x|U=x|S=x|i3l=xx|o1=x - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&1; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i3l = (insword>>1)&3; - ctx->o1 = insword&1; - break; - case ENC_SMLALL_ZA_ZZI_D4XI: - case ENC_SMLSLL_ZA_ZZI_D4XI: - case ENC_UMLALL_ZA_ZZI_D4XI: - case ENC_UMLSLL_ZA_ZZI_D4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|xx|i3h=x|Zn=xxx|xx|U=x|S=x|i3l=xx|o1=x - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&1; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i3l = (insword>>1)&3; - ctx->o1 = insword&1; - break; - case ENC_BFMLA_ZA_ZZI_H2XI: - case ENC_BFMLS_ZA_ZZI_H2XI: - case ENC_FMLA_ZA_ZZI_H2XI: - case ENC_FMLS_ZA_ZZI_H2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i3h=xx|Zn=xxxx|op=x|S=x|i3l=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->op = (insword>>5)&1; - ctx->S = (insword>>4)&1; - ctx->i3l = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLAL_ZA_ZZI_2XI: - case ENC_SMLSL_ZA_ZZI_2XI: - case ENC_UMLAL_ZA_ZZI_2XI: - case ENC_UMLSL_ZA_ZZI_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i3h=xx|Zn=xxxx|x|U=x|S=x|i3l=x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i3l = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_BFMLAL_ZA_ZZI_2XI: - case ENC_BFMLSL_ZA_ZZI_2XI: - case ENC_FMLAL_ZA_ZZI_2XI: - case ENC_FMLSL_ZA_ZZI_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i3h=xx|Zn=xxxx|x|op=x|S=x|i3l=x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->op = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i3l = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_FDOT_ZA_Z8Z8I_4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i3h=xx|Zn=xxx|xxx|i3l=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->i3l = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLAL_ZA_ZZI_4XI: - case ENC_SMLSL_ZA_ZZI_4XI: - case ENC_UMLAL_ZA_ZZI_4XI: - case ENC_UMLSL_ZA_ZZI_4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i3h=xx|Zn=xxx|xx|U=x|S=x|i3l=x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i3l = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_BFMLAL_ZA_ZZI_4XI: - case ENC_BFMLSL_ZA_ZZI_4XI: - case ENC_FMLAL_ZA_ZZI_4XI: - case ENC_FMLSL_ZA_ZZI_4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i3h=xx|Zn=xxx|xx|op=x|S=x|i3l=x|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->op = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i3l = (insword>>2)&1; - ctx->off2 = insword&3; - break; - case ENC_BFMLA_ZA_ZZI_H4XI: - case ENC_BFMLS_ZA_ZZI_H4XI: - case ENC_FMLA_ZA_ZZI_H4XI: - case ENC_FMLS_ZA_ZZI_H4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i3h=xx|Zn=xxx|x|op=x|S=x|i3l=x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i3h = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->op = (insword>>5)&1; - ctx->S = (insword>>4)&1; - ctx->i3l = (insword>>3)&1; - ctx->off3 = insword&7; - break; - case ENC_SMLALL_ZA_ZZI_S2XI: - case ENC_SMLSLL_ZA_ZZI_S2XI: - case ENC_SUMLALL_ZA_ZZI_S2XI: - case ENC_UMLALL_ZA_ZZI_S2XI: - case ENC_UMLSLL_ZA_ZZI_S2XI: - case ENC_USMLALL_ZA_ZZI_S2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i4h=xx|Zn=xxxx|op=x|U=x|S=x|i4l=xx|o1=x - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i4h = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->op = (insword>>5)&1; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i4l = (insword>>1)&3; - ctx->o1 = insword&1; - break; - case ENC_FMLALL_ZA32_Z8Z8I_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i4h=xx|Zn=xxxx|x|xx|i4l=xx|o1=x - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i4h = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->i4l = (insword>>1)&3; - ctx->o1 = insword&1; - break; - case ENC_FMLAL_ZA_Z8Z8I_2XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i4h=xx|Zn=xxxx|x|x|i4l=xx|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i4h = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->i4l = (insword>>2)&3; - ctx->off2 = insword&3; - break; - case ENC_FMLAL_ZA_Z8Z8I_4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i4h=xx|Zn=xxx|xxx|i4l=xx|off2=xx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i4h = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->i4l = (insword>>2)&3; - ctx->off2 = insword&3; - break; - case ENC_FMLALL_ZA32_Z8Z8I_4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i4h=xx|Zn=xxx|xxx|x|i4l=xx|o1=x - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i4h = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->i4l = (insword>>1)&3; - ctx->o1 = insword&1; - break; - case ENC_SMLALL_ZA_ZZI_S4XI: - case ENC_SMLSLL_ZA_ZZI_S4XI: - case ENC_SUMLALL_ZA_ZZI_S4XI: - case ENC_UMLALL_ZA_ZZI_S4XI: - case ENC_UMLSLL_ZA_ZZI_S4XI: - case ENC_USMLALL_ZA_ZZI_S4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|i4h=xx|Zn=xxx|x|op=x|U=x|S=x|i4l=xx|o1=x - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->i4h = (insword>>10)&3; - ctx->Zn = (insword>>7)&7; - ctx->op = (insword>>5)&1; - ctx->U = (insword>>4)&1; - ctx->S = (insword>>3)&1; - ctx->i4l = (insword>>1)&3; - ctx->o1 = insword&1; - break; - case ENC_FMLA_ZA_ZZI_D4XI: - case ENC_FMLS_ZA_ZZI_D4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|op=x|i1=x|Zn=xxx|xx|S=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>11)&1; - ctx->i1 = (insword>>10)&1; - ctx->Zn = (insword>>7)&7; - ctx->S = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_SDOT_ZA_ZZI_D4XI: - case ENC_SVDOT_ZA_ZZI_D4XI: - case ENC_UDOT_ZA_ZZI_D4XI: - case ENC_UVDOT_ZA_ZZI_D4XI: - // x|xx|xxxx|x|xx|xx|Zm=xxxx|x|Rv=xx|x|op=x|i1=x|Zn=xxx|xx|U=x|x|off3=xxx - ctx->Zm = (insword>>16)&15; - ctx->Rv = (insword>>13)&3; - ctx->op = (insword>>11)&1; - ctx->i1 = (insword>>10)&1; - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>4)&1; - ctx->off3 = insword&7; - break; - case ENC_BFMOP4A_ZA32_ZZ_H1X2: - case ENC_BFMOP4A_ZA32_ZZ_H1X1: - case ENC_BFMOP4A_ZA32_ZZ_H2X1: - case ENC_BFMOP4A_ZA32_ZZ_H2X2: - case ENC_BFMOP4S_ZA32_ZZ_H1X2: - case ENC_BFMOP4S_ZA32_ZZ_H1X1: - case ENC_BFMOP4S_ZA32_ZZ_H2X1: - case ENC_BFMOP4S_ZA32_ZZ_H2X2: - case ENC_FMOP4A_ZA32_ZZ_H1X2: - case ENC_FMOP4A_ZA32_ZZ_H1X1: - case ENC_FMOP4A_ZA32_ZZ_H2X1: - case ENC_FMOP4A_ZA32_ZZ_H2X2: - case ENC_FMOP4A_ZA_ZZ_S1X2: - case ENC_FMOP4A_ZA_ZZ_S1X1: - case ENC_FMOP4A_ZA_ZZ_S2X1: - case ENC_FMOP4A_ZA_ZZ_S2X2: - case ENC_FMOP4S_ZA32_ZZ_H1X2: - case ENC_FMOP4S_ZA32_ZZ_H1X1: - case ENC_FMOP4S_ZA32_ZZ_H2X1: - case ENC_FMOP4S_ZA32_ZZ_H2X2: - case ENC_FMOP4S_ZA_ZZ_S1X2: - case ENC_FMOP4S_ZA_ZZ_S1X1: - case ENC_FMOP4S_ZA_ZZ_S2X1: - case ENC_FMOP4S_ZA_ZZ_S2X2: - // x|xx|xxxx|x|xx|x|M=x|Zm=xxx|x|x|xxxxx|N=x|Zn=xxx|x|S=x|x|x|ZAda=xx - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&3; - break; - case ENC_BFMOP4A_ZA_ZZ_H1X2: - case ENC_BFMOP4A_ZA_ZZ_H1X1: - case ENC_BFMOP4A_ZA_ZZ_H2X1: - case ENC_BFMOP4A_ZA_ZZ_H2X2: - case ENC_BFMOP4S_ZA_ZZ_H1X2: - case ENC_BFMOP4S_ZA_ZZ_H1X1: - case ENC_BFMOP4S_ZA_ZZ_H2X1: - case ENC_BFMOP4S_ZA_ZZ_H2X2: - case ENC_FMOP4A_ZA_ZZ_H1X2: - case ENC_FMOP4A_ZA_ZZ_H1X1: - case ENC_FMOP4A_ZA_ZZ_H2X1: - case ENC_FMOP4A_ZA_ZZ_H2X2: - case ENC_FMOP4S_ZA_ZZ_H1X2: - case ENC_FMOP4S_ZA_ZZ_H1X1: - case ENC_FMOP4S_ZA_ZZ_H2X1: - case ENC_FMOP4S_ZA_ZZ_H2X2: - // x|xx|xxxx|x|xx|x|M=x|Zm=xxx|x|x|xxxxx|N=x|Zn=xxx|x|S=x|x|x|x|ZAda=x - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&1; - break; - case ENC_FMOP4A_ZA32_Z8Z8_B1X2: - case ENC_FMOP4A_ZA32_Z8Z8_B1X1: - case ENC_FMOP4A_ZA32_Z8Z8_B2X1: - case ENC_FMOP4A_ZA32_Z8Z8_B2X2: - // x|xx|xxxx|x|xx|x|M=x|Zm=xxx|x|x|xxxxx|N=x|Zn=xxx|x|xx|x|ZAda=xx - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->ZAda = insword&3; - break; - case ENC_FMOP4A_ZA16_Z8Z8_B1X2: - case ENC_FMOP4A_ZA16_Z8Z8_B1X1: - case ENC_FMOP4A_ZA16_Z8Z8_B2X1: - case ENC_FMOP4A_ZA16_Z8Z8_B2X2: - // x|xx|xxxx|x|xx|x|M=x|Zm=xxx|x|x|xxxxx|N=x|Zn=xxx|x|xx|x|x|ZAda=x - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->ZAda = insword&1; - break; - case ENC_BFMOPA_ZA32_PP_ZZ_: - case ENC_BFMOPS_ZA32_PP_ZZ_: - case ENC_BMOPA_ZA_PP_ZZ_32: - case ENC_BMOPS_ZA_PP_ZZ_32: - case ENC_FMOPA_ZA32_PP_ZZ_16: - case ENC_FMOPA_ZA_PP_ZZ_32: - case ENC_FMOPS_ZA32_PP_ZZ_16: - case ENC_FMOPS_ZA_PP_ZZ_32: - // x|xx|xxxx|x|xx|x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=x|xx|ZAda=xx - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&3; - break; - case ENC_BFMOPA_ZA_PP_ZZ_16: - case ENC_BFMOPS_ZA_PP_ZZ_16: - case ENC_FMOPA_ZA_PP_ZZ_16: - case ENC_FMOPS_ZA_PP_ZZ_16: - // x|xx|xxxx|x|xx|x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=x|xx|x|ZAda=x - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&1; - break; - case ENC_FMOPA_ZA32_PP_Z8Z8_8: - // x|xx|xxxx|x|xx|x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|x|xx|ZAda=xx - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAda = insword&3; - break; - case ENC_FMOPA_ZA16_PP_Z8Z8_8: - // x|xx|xxxx|x|xx|x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|x|xx|x|ZAda=x - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAda = insword&1; - break; - case ENC_UZP_MZ_ZZ_2Q: - case ENC_ZIP_MZ_ZZ_2Q: - // x|xx|xxxx|x|xx|x|Zm=xxxxx|xxx|xxx|Zn=xxxxx|Zd=xxxx|op=x - ctx->Zm = (insword>>16)&0x1f; - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - ctx->op = insword&1; - break; - case ENC_BFTMOPA_ZA32_ZZZI_H2X1: - case ENC_FTMOPA_ZA32_Z8Z8ZI_B2X1: - case ENC_FTMOPA_ZA32_ZZZI_H2X1: - case ENC_FTMOPA_ZA_ZZZI_S2X1: - // x|xx|xxxx|x|xx|x|Zm=xxxxx|x|x|x|K=x|Zk=xx|Zn=xxxx|i2=xx|x|x|ZAda=xx - ctx->Zm = (insword>>16)&0x1f; - ctx->K = (insword>>12)&1; - ctx->Zk = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->i2 = (insword>>4)&3; - ctx->ZAda = insword&3; - break; - case ENC_BFTMOPA_ZA_ZZZI_H2X1: - case ENC_FTMOPA_ZA16_Z8Z8ZI_B2X1: - case ENC_FTMOPA_ZA_ZZZI_H2X1: - // x|xx|xxxx|x|xx|x|Zm=xxxxx|x|x|x|K=x|Zk=xx|Zn=xxxx|i2=xx|x|x|x|ZAda=x - ctx->Zm = (insword>>16)&0x1f; - ctx->K = (insword>>12)&1; - ctx->Zk = (insword>>10)&3; - ctx->Zn = (insword>>6)&15; - ctx->i2 = (insword>>4)&3; - ctx->ZAda = insword&1; - break; - case ENC_SQRSHR_Z_MZ2_: - case ENC_SQRSHRU_Z_MZ2_: - case ENC_UQRSHR_Z_MZ2_: - // x|xx|xxxx|x|xx|x|op=x|imm4=xxxx|xxx|xxx|Zn=xxxx|U=x|Zd=xxxxx - ctx->op = (insword>>20)&1; - ctx->imm4 = (insword>>16)&15; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_FCVT_MZ2_Z_: - case ENC_FCVTL_MZ2_Z_: - // x|xx|xxxx|x|xx|x|xxx|xx|xxxxxx|Zn=xxxxx|Zd=xxxx|L=x - ctx->Zn = (insword>>5)&0x1f; - ctx->Zd = (insword>>1)&15; - ctx->L = insword&1; - break; - case ENC_FCVTZS_MZ_Z_2: - case ENC_FCVTZU_MZ_Z_2: - case ENC_SCVTF_MZ_Z_2: - case ENC_UCVTF_MZ_Z_2: - // x|xx|xxxx|x|xx|x|xxx|xx|xxxxxx|Zn=xxxx|U=x|Zd=xxxx|x - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>5)&1; - ctx->Zd = (insword>>1)&15; - break; - case ENC_UZP_MZ_Z_4Q: - case ENC_ZIP_MZ_Z_4Q: - // x|xx|xxxx|x|xx|x|xxx|xx|xxxxxx|Zn=xxx|xx|Zd=xxx|op=x|x - ctx->Zn = (insword>>7)&7; - ctx->Zd = (insword>>2)&7; - ctx->op = (insword>>1)&1; - break; - case ENC_FCVT_Z8_MZ4_: - case ENC_FCVTN_Z8_MZ4_: - // x|xx|xxxx|x|xx|x|xxx|xx|xxxxxx|Zn=xxx|x|N=x|Zd=xxxxx - ctx->Zn = (insword>>7)&7; - ctx->N = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_FCVTZS_MZ_Z_4: - case ENC_FCVTZU_MZ_Z_4: - case ENC_SCVTF_MZ_Z_4: - case ENC_UCVTF_MZ_Z_4: - // x|xx|xxxx|x|xx|x|xxx|xx|xxxxxx|Zn=xxx|x|U=x|Zd=xxx|xx - ctx->Zn = (insword>>7)&7; - ctx->U = (insword>>5)&1; - ctx->Zd = (insword>>2)&7; - break; - case ENC_ADDHA_ZA_PP_Z_64: - case ENC_ADDVA_ZA_PP_Z_64: - // x|xx|xxxx|x|x|op=x|xxx|xx|V=x|Pm=xxx|Pn=xxx|Zn=xxxxx|x|x|ZAda=xxx - ctx->op = (insword>>22)&1; - ctx->V = (insword>>16)&1; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAda = insword&7; - break; - case ENC_ADDHA_ZA_PP_Z_32: - case ENC_ADDVA_ZA_PP_Z_32: - // x|xx|xxxx|x|x|op=x|xxx|xx|V=x|Pm=xxx|Pn=xxx|Zn=xxxxx|x|x|x|ZAda=xx - ctx->op = (insword>>22)&1; - ctx->V = (insword>>16)&1; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->ZAda = insword&3; - break; - case ENC_BFCVT_Z_MZ2_: - case ENC_BFCVTN_Z_MZ2_: - case ENC_FCVT_Z_MZ2_: - case ENC_FCVTN_Z_MZ2_: - // x|xx|xxxx|x|x|op=x|x|xxx|xx|xxxxxx|Zn=xxxx|N=x|Zd=xxxxx - ctx->op = (insword>>22)&1; - ctx->Zn = (insword>>6)&15; - ctx->N = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_SQCVT_Z_MZ2_: - case ENC_SQCVTU_Z_MZ2_: - case ENC_UQCVT_Z_MZ2_: - // x|xx|xxxx|x|x|op=x|x|xxx|xx|xxxxxx|Zn=xxxx|U=x|Zd=xxxxx - ctx->op = (insword>>22)&1; - ctx->Zn = (insword>>6)&15; - ctx->U = (insword>>5)&1; - ctx->Zd = insword&0x1f; - break; - case ENC_BFCVT_Z8_MZ2_: - case ENC_FCVT_Z8_MZ2_: - // x|xx|xxxx|x|x|op=x|x|xxx|xx|xxxxxx|Zn=xxxx|x|Zd=xxxxx - ctx->op = (insword>>22)&1; - ctx->Zn = (insword>>6)&15; - ctx->Zd = insword&0x1f; - break; - case ENC_SMOP4A_ZA_ZZ_H1X2: - case ENC_SMOP4A_ZA_ZZ_H1X1: - case ENC_SMOP4A_ZA_ZZ_H2X1: - case ENC_SMOP4A_ZA_ZZ_H2X2: - case ENC_SMOP4S_ZA_ZZ_H1X2: - case ENC_SMOP4S_ZA_ZZ_H1X1: - case ENC_SMOP4S_ZA_ZZ_H2X1: - case ENC_SMOP4S_ZA_ZZ_H2X2: - case ENC_SUMOP4A_ZA_ZZ_H1X2: - case ENC_SUMOP4A_ZA_ZZ_H1X1: - case ENC_SUMOP4A_ZA_ZZ_H2X1: - case ENC_SUMOP4A_ZA_ZZ_H2X2: - case ENC_SUMOP4S_ZA_ZZ_H1X2: - case ENC_SUMOP4S_ZA_ZZ_H1X1: - case ENC_SUMOP4S_ZA_ZZ_H2X1: - case ENC_SUMOP4S_ZA_ZZ_H2X2: - case ENC_UMOP4A_ZA_ZZ_H1X2: - case ENC_UMOP4A_ZA_ZZ_H1X1: - case ENC_UMOP4A_ZA_ZZ_H2X1: - case ENC_UMOP4A_ZA_ZZ_H2X2: - case ENC_UMOP4S_ZA_ZZ_H1X2: - case ENC_UMOP4S_ZA_ZZ_H1X1: - case ENC_UMOP4S_ZA_ZZ_H2X1: - case ENC_UMOP4S_ZA_ZZ_H2X2: - case ENC_USMOP4A_ZA_ZZ_H1X2: - case ENC_USMOP4A_ZA_ZZ_H1X1: - case ENC_USMOP4A_ZA_ZZ_H2X1: - case ENC_USMOP4A_ZA_ZZ_H2X2: - case ENC_USMOP4S_ZA_ZZ_H1X2: - case ENC_USMOP4S_ZA_ZZ_H1X1: - case ENC_USMOP4S_ZA_ZZ_H2X1: - case ENC_USMOP4S_ZA_ZZ_H2X2: - // x|x|x|xxxx|u0=x|xx|u1=x|M=x|Zm=xxx|xxxxxxx|N=x|Zn=xxx|x|S=x|x|ZAda=xxx - ctx->u0 = (insword>>24)&1; - ctx->u1 = (insword>>21)&1; - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&7; - break; - case ENC_SMOPA_ZA_PP_ZZ_64: - case ENC_SMOPS_ZA_PP_ZZ_64: - case ENC_SUMOPA_ZA_PP_ZZ_64: - case ENC_SUMOPS_ZA_PP_ZZ_64: - case ENC_UMOPA_ZA_PP_ZZ_64: - case ENC_UMOPS_ZA_PP_ZZ_64: - case ENC_USMOPA_ZA_PP_ZZ_64: - case ENC_USMOPS_ZA_PP_ZZ_64: - // x|x|x|xxxx|u0=x|xx|u1=x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=x|x|ZAda=xxx - ctx->u0 = (insword>>24)&1; - ctx->u1 = (insword>>21)&1; - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&7; - break; - case ENC_FMOP4A_ZA_ZZ_D1X2: - case ENC_FMOP4A_ZA_ZZ_D1X1: - case ENC_FMOP4A_ZA_ZZ_D2X1: - case ENC_FMOP4A_ZA_ZZ_D2X2: - case ENC_FMOP4S_ZA_ZZ_D1X2: - case ENC_FMOP4S_ZA_ZZ_D1X1: - case ENC_FMOP4S_ZA_ZZ_D2X1: - case ENC_FMOP4S_ZA_ZZ_D2X2: - // x|x|x|xxxx|x|xx|x|M=x|Zm=xxx|xxxxxxx|N=x|Zn=xxx|x|S=x|x|ZAda=xxx - ctx->M = (insword>>20)&1; - ctx->Zm = (insword>>17)&7; - ctx->N = (insword>>9)&1; - ctx->Zn = (insword>>6)&7; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&7; - break; - case ENC_FMOPA_ZA_PP_ZZ_64: - case ENC_FMOPS_ZA_PP_ZZ_64: - // x|x|x|xxxx|x|xx|x|Zm=xxxxx|Pm=xxx|Pn=xxx|Zn=xxxxx|S=x|x|ZAda=xxx - ctx->Zm = (insword>>16)&0x1f; - ctx->Pm = (insword>>13)&7; - ctx->Pn = (insword>>10)&7; - ctx->Zn = (insword>>5)&0x1f; - ctx->S = (insword>>4)&1; - ctx->ZAda = insword&7; - break; - default: - break; - } -} diff --git a/arch/arm64/disassembler/decode_fields32.h b/arch/arm64/disassembler/decode_fields32.h deleted file mode 100644 index bc49bed0e..000000000 --- a/arch/arm64/disassembler/decode_fields32.h +++ /dev/null @@ -1,3 +0,0 @@ -/* GENERATED FILE */ -#pragma once -void decode_fields32(enum ENCODING enc, context *ctx, Instruction *dec); diff --git a/arch/arm64/disassembler/decode_scratchpad.c b/arch/arm64/disassembler/decode_scratchpad.c deleted file mode 100644 index d49ef7aff..000000000 --- a/arch/arm64/disassembler/decode_scratchpad.c +++ /dev/null @@ -1,11247 +0,0 @@ -#include "decode.h" -#include "pcode.h" -#include -#include -#include - -#if defined(_MSC_VER) -// Disable warning: Unary minus operator applied to unsigned type, result still unsigned. -// This warning is treated as an error with the /sdl flag. -#pragma warning(disable:4146) -#endif - -//----------------------------------------------------------------------------- -// registers -//----------------------------------------------------------------------------- - -// regMap[0][?][?] uses SP for R31 -// regMap[1][?][?] uses ZR for R31 -static const Register regMap[2][10][32] = { - { - { - REG_W0, - REG_W1, - REG_W2, - REG_W3, - REG_W4, - REG_W5, - REG_W6, - REG_W7, - REG_W8, - REG_W9, - REG_W10, - REG_W11, - REG_W12, - REG_W13, - REG_W14, - REG_W15, - REG_W16, - REG_W17, - REG_W18, - REG_W19, - REG_W20, - REG_W21, - REG_W22, - REG_W23, - REG_W24, - REG_W25, - REG_W26, - REG_W27, - REG_W28, - REG_W29, - REG_W30, - REG_WSP, - }, - {REG_X0, REG_X1, REG_X2, REG_X3, REG_X4, REG_X5, REG_X6, REG_X7, REG_X8, REG_X9, REG_X10, - REG_X11, REG_X12, REG_X13, REG_X14, REG_X15, REG_X16, REG_X17, REG_X18, REG_X19, - REG_X20, REG_X21, REG_X22, REG_X23, REG_X24, REG_X25, REG_X26, REG_X27, REG_X28, - REG_X29, REG_X30, REG_SP}, - {REG_V0, REG_V1, REG_V2, REG_V3, REG_V4, REG_V5, REG_V6, REG_V7, REG_V8, REG_V9, REG_V10, - REG_V11, REG_V12, REG_V13, REG_V14, REG_V15, REG_V16, REG_V17, REG_V18, REG_V19, - REG_V20, REG_V21, REG_V22, REG_V23, REG_V24, REG_V25, REG_V26, REG_V27, REG_V28, - REG_V29, REG_V30, REG_V31}, - {REG_B0, REG_B1, REG_B2, REG_B3, REG_B4, REG_B5, REG_B6, REG_B7, REG_B8, REG_B9, REG_B10, - REG_B11, REG_B12, REG_B13, REG_B14, REG_B15, REG_B16, REG_B17, REG_B18, REG_B19, - REG_B20, REG_B21, REG_B22, REG_B23, REG_B24, REG_B25, REG_B26, REG_B27, REG_B28, - REG_B29, REG_B30, REG_B31}, - {REG_H0, REG_H1, REG_H2, REG_H3, REG_H4, REG_H5, REG_H6, REG_H7, REG_H8, REG_H9, REG_H10, - REG_H11, REG_H12, REG_H13, REG_H14, REG_H15, REG_H16, REG_H17, REG_H18, REG_H19, - REG_H20, REG_H21, REG_H22, REG_H23, REG_H24, REG_H25, REG_H26, REG_H27, REG_H28, - REG_H29, REG_H30, REG_H31}, - {REG_S0, REG_S1, REG_S2, REG_S3, REG_S4, REG_S5, REG_S6, REG_S7, REG_S8, REG_S9, REG_S10, - REG_S11, REG_S12, REG_S13, REG_S14, REG_S15, REG_S16, REG_S17, REG_S18, REG_S19, - REG_S20, REG_S21, REG_S22, REG_S23, REG_S24, REG_S25, REG_S26, REG_S27, REG_S28, - REG_S29, REG_S30, REG_S31}, - {REG_D0, REG_D1, REG_D2, REG_D3, REG_D4, REG_D5, REG_D6, REG_D7, REG_D8, REG_D9, REG_D10, - REG_D11, REG_D12, REG_D13, REG_D14, REG_D15, REG_D16, REG_D17, REG_D18, REG_D19, - REG_D20, REG_D21, REG_D22, REG_D23, REG_D24, REG_D25, REG_D26, REG_D27, REG_D28, - REG_D29, REG_D30, REG_D31}, - {REG_Q0, REG_Q1, REG_Q2, REG_Q3, REG_Q4, REG_Q5, REG_Q6, REG_Q7, REG_Q8, REG_Q9, REG_Q10, - REG_Q11, REG_Q12, REG_Q13, REG_Q14, REG_Q15, REG_Q16, REG_Q17, REG_Q18, REG_Q19, - REG_Q20, REG_Q21, REG_Q22, REG_Q23, REG_Q24, REG_Q25, REG_Q26, REG_Q27, REG_Q28, - REG_Q29, REG_Q30, REG_Q31}, - {REG_Z0, REG_Z1, REG_Z2, REG_Z3, REG_Z4, REG_Z5, REG_Z6, REG_Z7, REG_Z8, REG_Z9, REG_Z10, - REG_Z11, REG_Z12, REG_Z13, REG_Z14, REG_Z15, REG_Z16, REG_Z17, REG_Z18, REG_Z19, - REG_Z20, REG_Z21, REG_Z22, REG_Z23, REG_Z24, REG_Z25, REG_Z26, REG_Z27, REG_Z28, - REG_Z29, REG_Z30, REG_Z31}, - {REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_P6, REG_P7, REG_P8, REG_P9, REG_P10, - REG_P11, REG_P12, REG_P13, REG_P14, REG_P15, REG_P16, REG_P17, REG_P18, REG_P19, - REG_P20, REG_P21, REG_P22, REG_P23, REG_P24, REG_P25, REG_P26, REG_P27, REG_P28, - REG_P29, REG_P30, REG_P31}, - }, - {{ - REG_W0, - REG_W1, - REG_W2, - REG_W3, - REG_W4, - REG_W5, - REG_W6, - REG_W7, - REG_W8, - REG_W9, - REG_W10, - REG_W11, - REG_W12, - REG_W13, - REG_W14, - REG_W15, - REG_W16, - REG_W17, - REG_W18, - REG_W19, - REG_W20, - REG_W21, - REG_W22, - REG_W23, - REG_W24, - REG_W25, - REG_W26, - REG_W27, - REG_W28, - REG_W29, - REG_W30, - REG_WZR, - }, - { - REG_X0, - REG_X1, - REG_X2, - REG_X3, - REG_X4, - REG_X5, - REG_X6, - REG_X7, - REG_X8, - REG_X9, - REG_X10, - REG_X11, - REG_X12, - REG_X13, - REG_X14, - REG_X15, - REG_X16, - REG_X17, - REG_X18, - REG_X19, - REG_X20, - REG_X21, - REG_X22, - REG_X23, - REG_X24, - REG_X25, - REG_X26, - REG_X27, - REG_X28, - REG_X29, - REG_X30, - REG_XZR, - }, - { - REG_V0, - REG_V1, - REG_V2, - REG_V3, - REG_V4, - REG_V5, - REG_V6, - REG_V7, - REG_V8, - REG_V9, - REG_V10, - REG_V11, - REG_V12, - REG_V13, - REG_V14, - REG_V15, - REG_V16, - REG_V17, - REG_V18, - REG_V19, - REG_V20, - REG_V21, - REG_V22, - REG_V23, - REG_V24, - REG_V25, - REG_V26, - REG_V27, - REG_V28, - REG_V29, - REG_V30, - REG_V31, - }, - { - REG_B0, - REG_B1, - REG_B2, - REG_B3, - REG_B4, - REG_B5, - REG_B6, - REG_B7, - REG_B8, - REG_B9, - REG_B10, - REG_B11, - REG_B12, - REG_B13, - REG_B14, - REG_B15, - REG_B16, - REG_B17, - REG_B18, - REG_B19, - REG_B20, - REG_B21, - REG_B22, - REG_B23, - REG_B24, - REG_B25, - REG_B26, - REG_B27, - REG_B28, - REG_B29, - REG_B30, - REG_B31, - }, - { - REG_H0, - REG_H1, - REG_H2, - REG_H3, - REG_H4, - REG_H5, - REG_H6, - REG_H7, - REG_H8, - REG_H9, - REG_H10, - REG_H11, - REG_H12, - REG_H13, - REG_H14, - REG_H15, - REG_H16, - REG_H17, - REG_H18, - REG_H19, - REG_H20, - REG_H21, - REG_H22, - REG_H23, - REG_H24, - REG_H25, - REG_H26, - REG_H27, - REG_H28, - REG_H29, - REG_H30, - REG_H31, - }, - { - REG_S0, - REG_S1, - REG_S2, - REG_S3, - REG_S4, - REG_S5, - REG_S6, - REG_S7, - REG_S8, - REG_S9, - REG_S10, - REG_S11, - REG_S12, - REG_S13, - REG_S14, - REG_S15, - REG_S16, - REG_S17, - REG_S18, - REG_S19, - REG_S20, - REG_S21, - REG_S22, - REG_S23, - REG_S24, - REG_S25, - REG_S26, - REG_S27, - REG_S28, - REG_S29, - REG_S30, - REG_S31, - }, - { - REG_D0, - REG_D1, - REG_D2, - REG_D3, - REG_D4, - REG_D5, - REG_D6, - REG_D7, - REG_D8, - REG_D9, - REG_D10, - REG_D11, - REG_D12, - REG_D13, - REG_D14, - REG_D15, - REG_D16, - REG_D17, - REG_D18, - REG_D19, - REG_D20, - REG_D21, - REG_D22, - REG_D23, - REG_D24, - REG_D25, - REG_D26, - REG_D27, - REG_D28, - REG_D29, - REG_D30, - REG_D31, - }, - {REG_Q0, REG_Q1, REG_Q2, REG_Q3, REG_Q4, REG_Q5, REG_Q6, REG_Q7, REG_Q8, REG_Q9, REG_Q10, - REG_Q11, REG_Q12, REG_Q13, REG_Q14, REG_Q15, REG_Q16, REG_Q17, REG_Q18, REG_Q19, - REG_Q20, REG_Q21, REG_Q22, REG_Q23, REG_Q24, REG_Q25, REG_Q26, REG_Q27, REG_Q28, - REG_Q29, REG_Q30, REG_Q31}, - {REG_Z0, REG_Z1, REG_Z2, REG_Z3, REG_Z4, REG_Z5, REG_Z6, REG_Z7, REG_Z8, REG_Z9, REG_Z10, - REG_Z11, REG_Z12, REG_Z13, REG_Z14, REG_Z15, REG_Z16, REG_Z17, REG_Z18, REG_Z19, - REG_Z20, REG_Z21, REG_Z22, REG_Z23, REG_Z24, REG_Z25, REG_Z26, REG_Z27, REG_Z28, - REG_Z29, REG_Z30, REG_Z31}, - {REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_P6, REG_P7, REG_P8, REG_P9, REG_P10, - REG_P11, REG_P12, REG_P13, REG_P14, REG_P15, REG_P16, REG_P17, REG_P18, REG_P19, - REG_P20, REG_P21, REG_P22, REG_P23, REG_P24, REG_P25, REG_P26, REG_P27, REG_P28, - REG_P29, REG_P30, REG_P31}, - }}; - -/* first coordinate into regMap */ -#define REGSET_SP 0 -#define REGSET_ZR 1 - -/* second coordinate into regMap */ -#define REG_W_BASE 0 -#define REG_X_BASE 1 -#define REG_V_BASE 2 -#define REG_B_BASE 3 -#define REG_H_BASE 4 -#define REG_S_BASE 5 -#define REG_D_BASE 6 -#define REG_Q_BASE 7 -#define REG_Z_BASE 8 -#define REG_P_BASE 9 - -/* third coordinate into regMap is [0,31] */ - -static const int table_wbase_xbase[2] = {REG_W_BASE, REG_X_BASE}; - -#define REG(SP_OR_ZR, REG_BASE, REG_NUM) regMap[(SP_OR_ZR)][(REG_BASE)][(REG_NUM)] - -/* prefetch operation */ -static const char* prfop_lookup(unsigned prfop) -{ - switch (prfop) - { - case 0b00000: - return "pldl1keep"; - case 0b00001: - return "pldl1strm"; - case 0b00010: - return "pldl2keep"; - case 0b00011: - return "pldl2strm"; - case 0b00100: - return "pldl3keep"; - case 0b00101: - return "pldl3strm"; - case 0b00110: - return "#6"; - case 0b00111: - return "#7"; - case 0b01000: - return "plil1keep"; - case 0b01001: - return "plil1strm"; - case 0b01010: - return "plil2keep"; - case 0b01011: - return "plil2strm"; - case 0b01100: - return "plil3keep"; - case 0b01101: - return "plil3strm"; - case 0b01110: - return "#14"; - case 0b01111: - return "#15"; - case 0b10000: - return "pstl1keep"; - case 0b10001: - return "pstl1strm"; - case 0b10010: - return "pstl2keep"; - case 0b10011: - return "pstl2strm"; - case 0b10100: - return "pstl3keep"; - case 0b10101: - return "pstl3strm"; - case 0b10110: - return "#22"; - case 0b10111: - return "#23"; - case 0b11000: - return "#24"; - case 0b11001: - return "#25"; - case 0b11010: - return "#26"; - case 0b11011: - return "#27"; - case 0b11100: - return "#28"; - case 0b11101: - return "#29"; - case 0b11110: - return "#30"; - case 0b11111: - return "#31"; - default: - return "error"; - } -} - -/* prefetch operation */ -static const char* prfop_lookup_4(unsigned prfop) -{ - switch (prfop) - { - case 0b0000: - return "pldl1keep"; - case 0b0001: - return "pldl1strm"; - case 0b0010: - return "pldl2keep"; - case 0b0011: - return "pldl2strm"; - case 0b0100: - return "pldl3keep"; - case 0b0101: - return "pldl3strm"; - case 0b0110: - return "#6"; - case 0b0111: - return "#7"; - case 0b1000: - return "pstl1keep"; - case 0b1001: - return "pstl1strm"; - case 0b1010: - return "pstl2keep"; - case 0b1011: - return "pstl2strm"; - case 0b1100: - return "pstl3keep"; - case 0b1101: - return "pstl3strm"; - case 0b1110: - return "#14"; - case 0b1111: - return "#15"; - default: - return "error"; - } -} - -static const char* pattern_lookup(unsigned pattern, unsigned uimm5) -{ - switch (pattern & 0x1f) - { - case 0b00000: - return "pow2"; - case 0b00001: - return "vl1"; - case 0b00010: - return "vl2"; - case 0b00011: - return "vl3"; - case 0b00100: - return "vl4"; - case 0b00101: - return "vl5"; - case 0b00110: - return "vl6"; - case 0b00111: - return "vl7"; - case 0b01000: - return "vl8"; - case 0b01001: - return "vl16"; - case 0b01010: - return "vl32"; - case 0b01011: - return "vl64"; - case 0b01100: - return "vl128"; - case 0b01101: - return "vl256"; - case 0b11101: - return "mul4"; - case 0b11110: - return "mul3"; - case 0b11111: - return "all"; - default: - return "error"; - } -} - -//----------------------------------------------------------------------------- -// arrangement specifiers and lookups (usually fills in a ".", ".", "<.Tb>") -//----------------------------------------------------------------------------- - -#define _1B ARRSPEC_1BYTE -#define _1H ARRSPEC_1HALF -#define _1S ARRSPEC_1SINGLE -#define _1D ARRSPEC_1DOUBLE -#define _1Q ARRSPEC_FULL -#define _2H ARRSPEC_2HALVES -#define _2S ARRSPEC_2SINGLES -#define _2D ARRSPEC_2DOUBLES -#define _4B ARRSPEC_4BYTES -#define _4H ARRSPEC_4HALVES -#define _4S ARRSPEC_4SINGLES -#define _8B ARRSPEC_8BYTES -#define _8H ARRSPEC_8HALVES -#define _16B ARRSPEC_16BYTES - -/* arrangement specifiers -0000 x SEE Advanced SIMD modified immediate -0001 0 8B -0001 1 16B -001x 0 4H -001x 1 8H -01xx 0 2S -01xx 1 4S -1xxx x RESERVED -*/ -static ArrangementSpec arr_spec_method0(uint32_t imm5, uint32_t Q) -{ - if (Q == 0) - { - if (imm5 & 1) - return _8B; - if (imm5 & 2) - return _4H; - if (imm5 & 4) - return _2S; - } - else - { - if (imm5 & 1) - return _16B; - if (imm5 & 2) - return _8H; - if (imm5 & 4) - return _4S; - if (imm5 & 8) - return _2D; - } - return ARRSPEC_NONE; -} - -static ArrangementSpec arr_spec_method1(unsigned key) -{ - // 00000 RESERVED - // xxxx1 B - // xxx10 H - // xx100 S - // x1000 D - // 10000 Q - // if((key & 0b01111) == 0b00000) return ARRSPEC_NONE; // x0000 RESERVED - if ((key & 0b00001) == 0b00001) - return _1B; // xxxx1 B - if ((key & 0b00011) == 0b00010) - return _1H; // xxx10 H - if ((key & 0b00111) == 0b00100) - return _1S; // xx100 S - if ((key & 0b01111) == 0b01000) - return _1D; // x1000 D - if ((key & 0b11111) == 0b10000) - return _1Q; // 10000 Q - return ARRSPEC_NONE; -} - -static ArrangementSpec arr_spec_method2(unsigned immh) -{ - // 0000 SEE Advanced SIMD modified immediate - if (immh == 1) - return _8H; // 0001 8H - if ((immh & 0b1110) == 0b0010) - return _4S; // 001x 4S - if ((immh & 0b1100) == 0b0100) - return _2D; // 01xx 2D - return ARRSPEC_NONE; // 1xxx RESERVED -} - -static ArrangementSpec arr_spec_method3(unsigned immh, unsigned q) -{ - switch ((immh << 1) | q) - { - // 0000 x SEE Advanced SIMD modified immediate - case 0b00010: - return _8B; // 0001 0 8B - case 0b00011: - return _16B; // 0001 1 16B - case 0b00100: - case 0b00110: - return _4H; // 001x 0 4H - case 0b00101: - case 0b00111: - return _8H; // 001x 1 8H - case 0b01000: - case 0b01010: - case 0b01100: - case 0b01110: - return _2S; // 01xx 0 2S - case 0b01001: - case 0b01011: - case 0b01101: - case 0b01111: - return _4S; // 01xx 1 4S - case 0b10001: - case 0b10011: - case 0b10101: - case 0b10111: - case 0b11001: - case 0b11011: - case 0b11101: - case 0b11111: - return _2D; - default: - break; // 1xxx 1 RESERVED - } - return ARRSPEC_NONE; -} - -static ArrangementSpec arr_spec_method4(unsigned imm5, unsigned q) -{ - unsigned key = (imm5 << 1) | q; - // if((key & 0b011110) == 0b000000) return RESERVED; // x0000 x RESERVED - if ((key & 0b000011) == 0b000010) - return _8B; // xxxx1 0 8B - if ((key & 0b000011) == 0b000011) - return _16B; // xxxx1 1 16B - if ((key & 0b000111) == 0b000100) - return _4H; // xxx10 0 4H - if ((key & 0b000111) == 0b000101) - return _8H; // xxx10 1 8H - if ((key & 0b001111) == 0b001000) - return _2S; // xx100 0 2S - if ((key & 0b001111) == 0b001001) - return _4S; // xx100 1 4S - // if((key & 0b011111) == 0b010000) return RESERVED; // x1000 0 RESERVED - if ((key & 0b011111) == 0b010001) - return _2D; // x1000 1 2D - return ARRSPEC_NONE; -} - -static const ArrangementSpec table_1s_1d[2] = {_1S, _1D}; -static const ArrangementSpec table_2s_4s[2] = {_2S, _4S}; -static const ArrangementSpec table_2s_2d[2] = {_2S, _2D}; -static const ArrangementSpec table_2h_4h[2] = {_2H, _4H}; -static const ArrangementSpec table_4h_8h[2] = {_4H, _8H}; -static const ArrangementSpec table_4s_2d[2] = {_4S, _2D}; -static const ArrangementSpec table_8b_16b[2] = {_8B, _16B}; -static const ArrangementSpec table_2s_r_4s_2d[4] = {_2S, ARRSPEC_NONE, _4S, _2D}; -static const ArrangementSpec table_2s_4s_r_2d[4] = {_2S, _4S, ARRSPEC_NONE, _2D}; -static const ArrangementSpec table_8h_4s_2d_1q[4] = {_8H, _4S, _2D, _1Q}; -static const ArrangementSpec table_r_h_s_r_d[5] = { ARRSPEC_NONE, _1H, _1S, ARRSPEC_NONE, _1D}; -static const ArrangementSpec table_r_b_h_r_s[5] = { ARRSPEC_NONE, _1B, _1H, ARRSPEC_NONE, _1S}; -static const ArrangementSpec table_4h_8h_2s_4s_1d_2d_r_r[8] = { - _4H, _8H, _2S, _4S, _1D, _2D, ARRSPEC_NONE, ARRSPEC_NONE}; -static const ArrangementSpec table_8b_16b_4h_8h_2s_4s_1d_2d[8] = {_8B, _16B, _4H, _8H, _2S, _4S, _1D, _2D}; -static const ArrangementSpec table_r_b_h_r_r_s_r_r[8] = { - ARRSPEC_NONE, _1B, _1H, ARRSPEC_NONE, ARRSPEC_NONE, _1S, ARRSPEC_NONE, ARRSPEC_NONE}; -static const ArrangementSpec table_r_h_s_r_r_d_r_r[8] = { - ARRSPEC_NONE, _1H, _1S, ARRSPEC_NONE, ARRSPEC_NONE, _1D, ARRSPEC_NONE, ARRSPEC_NONE}; -static ArrangementSpec table16_r_b_h_s_d[16] = { - ARRSPEC_NONE, _1B, _1H, _1H, _1S, _1S, _1S, _1S, _1D, _1D, _1D, _1D, _1D, _1D, _1D, _1D}; - -//----------------------------------------------------------------------------- -// element size (usually to fill in a ".") -//----------------------------------------------------------------------------- - -static ArrangementSpec size_spec_method0(uint8_t /*bit*/ a, uint8_t /*bit(6)*/ b) -{ - if (a == 0) - { - if ((b & 0x20) == 0) - return _1S; - if ((b & 0x30) == 0x20) - return _1H; - if ((b & 0x38) == 0x30) - return _1B; - if ((b & 0x3C) == 0x38) - return _1B; - if ((b & 0x3E) == 0x3C) - return _1B; - return ARRSPEC_NONE; - } - else - { - return _1D; - } -} - -static ArrangementSpec size_spec_method1(unsigned imm13) -{ - unsigned key = (((imm13 >> 12) & 1) << 6) | (imm13 & 0b111111); - - if ((key & 0b1100000) == 0b0000000) - return _1S; // 0 0xxxxx S - if ((key & 0b1110000) == 0b0100000) - return _1H; // 0 10xxxx H - if ((key & 0b1111000) == 0b0110000) - return _1B; // 0 110xxx B - if ((key & 0b1111100) == 0b0111000) - return _1B; // 0 1110xx B - if ((key & 0b1111110) == 0b0111100) - return _1B; // 0 11110x B - // if((key & 0b1111111) == 0b0111110) return "RESERVED"; // 0 111110 RESERVED - // if((key & 0b1111111) == 0b0111111) return "RESERVED"; // 0 111111 RESERVED - if ((key & 0b1000000) == 0b1000000) - return _1D; // 1 xxxxxx D - return ARRSPEC_NONE; -} - -static ArrangementSpec size_spec_method3(int x) -{ - if ((x & 0b01111) == 0b00000) - return ARRSPEC_NONE; // x0000 RESERVED - if ((x & 0b00001) == 0b00001) - return _1B; // xxxx1 B - if ((x & 0b00011) == 0b00010) - return _1H; // xxx10 H - if ((x & 0b00111) == 0b00100) - return _1S; // xx100 S - if ((x & 0b01111) == 0b01000) - return _1D; // x1000 D - return ARRSPEC_NONE; -} - -static const ArrangementSpec table_b_h[2] = {_1B, _1H}; -static const ArrangementSpec table_s_d[2] = {_1S, _1D}; -static const ArrangementSpec table_b_d_h_s[4] = {_1B, _1D, _1H, _1S}; -static const ArrangementSpec table_b_h_s_d[4] = {_1B, _1H, _1S, _1D}; -static const ArrangementSpec table_d_b_h_s[4] = {_1D, _1B, _1H, _1S}; -static const ArrangementSpec table_q_h_s_d[4] = {_1Q, _1H, _1S, _1D}; -static const ArrangementSpec table_r_h_s_d[4] = {ARRSPEC_NONE, _1H, _1S, _1D}; -static const ArrangementSpec table_r_b_h_s[4] = {ARRSPEC_NONE, _1B, _1H, _1S}; - -//----------------------------------------------------------------------------- -// other tables -//----------------------------------------------------------------------------- - - -static const enum Condition table_cond[16] = {COND_EQ, COND_NE, COND_CS, COND_CC, COND_MI, COND_PL, COND_VS, - COND_VC, COND_HI, COND_LS, COND_GE, COND_LT, COND_GT, COND_LE, COND_AL, COND_NV}; -static const enum Condition table_cond_neg[16] = {COND_NE, COND_EQ, COND_CC, COND_CS, COND_PL, COND_MI, COND_VC, - COND_VS, COND_LS, COND_HI, COND_LT, COND_GE, COND_LE, COND_GT, COND_NV, COND_AL}; - -static const float table_imm8_to_float[256] = { - 2.000000000000000000e+00, 2.125000000000000000e+00, - 2.250000000000000000e+00, 2.375000000000000000e+00, 2.500000000000000000e+00, - 2.625000000000000000e+00, 2.750000000000000000e+00, 2.875000000000000000e+00, - 3.000000000000000000e+00, 3.125000000000000000e+00, 3.250000000000000000e+00, - 3.375000000000000000e+00, 3.500000000000000000e+00, 3.625000000000000000e+00, - 3.750000000000000000e+00, 3.875000000000000000e+00, 4.000000000000000000e+00, - 4.250000000000000000e+00, 4.500000000000000000e+00, 4.750000000000000000e+00, - 5.000000000000000000e+00, 5.250000000000000000e+00, 5.500000000000000000e+00, - 5.750000000000000000e+00, 6.000000000000000000e+00, 6.250000000000000000e+00, - 6.500000000000000000e+00, 6.750000000000000000e+00, 7.000000000000000000e+00, - 7.250000000000000000e+00, 7.500000000000000000e+00, 7.750000000000000000e+00, - 8.000000000000000000e+00, 8.500000000000000000e+00, 9.000000000000000000e+00, - 9.500000000000000000e+00, 1.000000000000000000e+01, 1.050000000000000000e+01, - 1.100000000000000000e+01, 1.150000000000000000e+01, 1.200000000000000000e+01, - 1.250000000000000000e+01, 1.300000000000000000e+01, 1.350000000000000000e+01, - 1.400000000000000000e+01, 1.450000000000000000e+01, 1.500000000000000000e+01, - 1.550000000000000000e+01, 1.600000000000000000e+01, 1.700000000000000000e+01, - 1.800000000000000000e+01, 1.900000000000000000e+01, 2.000000000000000000e+01, - 2.100000000000000000e+01, 2.200000000000000000e+01, 2.300000000000000000e+01, - 2.400000000000000000e+01, 2.500000000000000000e+01, 2.600000000000000000e+01, - 2.700000000000000000e+01, 2.800000000000000000e+01, 2.900000000000000000e+01, - 3.000000000000000000e+01, 3.100000000000000000e+01, 1.250000000000000000e-01, - 1.328125000000000000e-01, 1.406250000000000000e-01, 1.484375000000000000e-01, - 1.562500000000000000e-01, 1.640625000000000000e-01, 1.718750000000000000e-01, - 1.796875000000000000e-01, 1.875000000000000000e-01, 1.953125000000000000e-01, - 2.031250000000000000e-01, 2.109375000000000000e-01, 2.187500000000000000e-01, - 2.265625000000000000e-01, 2.343750000000000000e-01, 2.421875000000000000e-01, - 2.500000000000000000e-01, 2.656250000000000000e-01, 2.812500000000000000e-01, - 2.968750000000000000e-01, 3.125000000000000000e-01, 3.281250000000000000e-01, - 3.437500000000000000e-01, 3.593750000000000000e-01, 3.750000000000000000e-01, - 3.906250000000000000e-01, 4.062500000000000000e-01, 4.218750000000000000e-01, - 4.375000000000000000e-01, 4.531250000000000000e-01, 4.687500000000000000e-01, - 4.843750000000000000e-01, 5.000000000000000000e-01, 5.312500000000000000e-01, - 5.625000000000000000e-01, 5.937500000000000000e-01, 6.250000000000000000e-01, - 6.562500000000000000e-01, 6.875000000000000000e-01, 7.187500000000000000e-01, - 7.500000000000000000e-01, 7.812500000000000000e-01, 8.125000000000000000e-01, - 8.437500000000000000e-01, 8.750000000000000000e-01, 9.062500000000000000e-01, - 9.375000000000000000e-01, 9.687500000000000000e-01, 1.000000000000000000e+00, - 1.062500000000000000e+00, 1.125000000000000000e+00, 1.187500000000000000e+00, - 1.250000000000000000e+00, 1.312500000000000000e+00, 1.375000000000000000e+00, - 1.437500000000000000e+00, 1.500000000000000000e+00, 1.562500000000000000e+00, - 1.625000000000000000e+00, 1.687500000000000000e+00, 1.750000000000000000e+00, - 1.812500000000000000e+00, 1.875000000000000000e+00, 1.937500000000000000e+00, - -2.000000000000000000e+00, -2.125000000000000000e+00, -2.250000000000000000e+00, - -2.375000000000000000e+00, -2.500000000000000000e+00, -2.625000000000000000e+00, - -2.750000000000000000e+00, -2.875000000000000000e+00, -3.000000000000000000e+00, - -3.125000000000000000e+00, -3.250000000000000000e+00, -3.375000000000000000e+00, - -3.500000000000000000e+00, -3.625000000000000000e+00, -3.750000000000000000e+00, - -3.875000000000000000e+00, -4.000000000000000000e+00, -4.250000000000000000e+00, - -4.500000000000000000e+00, -4.750000000000000000e+00, -5.000000000000000000e+00, - -5.250000000000000000e+00, -5.500000000000000000e+00, -5.750000000000000000e+00, - -6.000000000000000000e+00, -6.250000000000000000e+00, -6.500000000000000000e+00, - -6.750000000000000000e+00, -7.000000000000000000e+00, -7.250000000000000000e+00, - -7.500000000000000000e+00, -7.750000000000000000e+00, -8.000000000000000000e+00, - -8.500000000000000000e+00, -9.000000000000000000e+00, -9.500000000000000000e+00, - -1.000000000000000000e+01, -1.050000000000000000e+01, -1.100000000000000000e+01, - -1.150000000000000000e+01, -1.200000000000000000e+01, -1.250000000000000000e+01, - -1.300000000000000000e+01, -1.350000000000000000e+01, -1.400000000000000000e+01, - -1.450000000000000000e+01, -1.500000000000000000e+01, -1.550000000000000000e+01, - -1.600000000000000000e+01, -1.700000000000000000e+01, -1.800000000000000000e+01, - -1.900000000000000000e+01, -2.000000000000000000e+01, -2.100000000000000000e+01, - -2.200000000000000000e+01, -2.300000000000000000e+01, -2.400000000000000000e+01, - -2.500000000000000000e+01, -2.600000000000000000e+01, -2.700000000000000000e+01, - -2.800000000000000000e+01, -2.900000000000000000e+01, -3.000000000000000000e+01, - -3.100000000000000000e+01, -1.250000000000000000e-01, -1.328125000000000000e-01, - -1.406250000000000000e-01, -1.484375000000000000e-01, -1.562500000000000000e-01, - -1.640625000000000000e-01, -1.718750000000000000e-01, -1.796875000000000000e-01, - -1.875000000000000000e-01, -1.953125000000000000e-01, -2.031250000000000000e-01, - -2.109375000000000000e-01, -2.187500000000000000e-01, -2.265625000000000000e-01, - -2.343750000000000000e-01, -2.421875000000000000e-01, -2.500000000000000000e-01, - -2.656250000000000000e-01, -2.812500000000000000e-01, -2.968750000000000000e-01, - -3.125000000000000000e-01, -3.281250000000000000e-01, -3.437500000000000000e-01, - -3.593750000000000000e-01, -3.750000000000000000e-01, -3.906250000000000000e-01, - -4.062500000000000000e-01, -4.218750000000000000e-01, -4.375000000000000000e-01, - -4.531250000000000000e-01, -4.687500000000000000e-01, -4.843750000000000000e-01, - -5.000000000000000000e-01, -5.312500000000000000e-01, -5.625000000000000000e-01, - -5.937500000000000000e-01, -6.250000000000000000e-01, -6.562500000000000000e-01, - -6.875000000000000000e-01, -7.187500000000000000e-01, -7.500000000000000000e-01, - -7.812500000000000000e-01, -8.125000000000000000e-01, -8.437500000000000000e-01, - -8.750000000000000000e-01, -9.062500000000000000e-01, -9.375000000000000000e-01, - -9.687500000000000000e-01, -1.000000000000000000e+00, -1.062500000000000000e+00, - -1.125000000000000000e+00, -1.187500000000000000e+00, -1.250000000000000000e+00, - -1.312500000000000000e+00, -1.375000000000000000e+00, -1.437500000000000000e+00, - -1.500000000000000000e+00, -1.562500000000000000e+00, -1.625000000000000000e+00, - -1.687500000000000000e+00, -1.750000000000000000e+00, -1.812500000000000000e+00, - -1.875000000000000000e+00, -1.937500000000000000e+00}; - -static const char* const reg_lookup_c[16] = {"c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", - "c11", "c12", "c13", "c14", "c15"}; - -#define ABCDEFGH \ - ((ctx->a << 7) | (ctx->b << 6) | (ctx->c << 5) | (ctx->d << 4) | (ctx->e << 3) | (ctx->f << 2) | \ - (ctx->g << 1) | ctx->h) -#define IMMR ctx->immr -#define IMMS ctx->imms -#define INDEX ctx->index - -/* register operand macros */ -#define ADD_OPERAND_REG(REGSET, BASE, REGNUM) \ - instr->operands[i].operandClass = REG; \ - instr->operands[i].reg[0] = REG(REGSET, BASE, REGNUM); \ - i++; - -#define ADD_OPERAND_BT ADD_OPERAND_REG(REGSET_ZR, REG_B_BASE, ctx->t); - -#define ADD_OPERAND_DA ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->a); -#define ADD_OPERAND_DD ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); -#define ADD_OPERAND_DN ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->n); -#define ADD_OPERAND_DM ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->m); -#define ADD_OPERAND_DT ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->t); -#define ADD_OPERAND_DT1 ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->t); -#define ADD_OPERAND_DT2 ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->t2); - -#define ADD_OPERAND_HA ADD_OPERAND_REG(REGSET_ZR, REG_H_BASE, ctx->a); -#define ADD_OPERAND_HD ADD_OPERAND_REG(REGSET_ZR, REG_H_BASE, ctx->d); -#define ADD_OPERAND_HN ADD_OPERAND_REG(REGSET_ZR, REG_H_BASE, ctx->n); -#define ADD_OPERAND_HM ADD_OPERAND_REG(REGSET_ZR, REG_H_BASE, ctx->m); -#define ADD_OPERAND_HT ADD_OPERAND_REG(REGSET_ZR, REG_H_BASE, ctx->t); - -#define ADD_OPERAND_QA ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->a); -#define ADD_OPERAND_QD ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->d); -#define ADD_OPERAND_QDN ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->n); -#define ADD_OPERAND_QN ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->n); -#define ADD_OPERAND_QM ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->m); -#define ADD_OPERAND_QS ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->s); -#define ADD_OPERAND_QT ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->t); -#define ADD_OPERAND_QT1 ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->t); -#define ADD_OPERAND_QT2 ADD_OPERAND_REG(REGSET_ZR, REG_Q_BASE, ctx->t2); - -#define ADD_OPERAND_SA ADD_OPERAND_REG(REGSET_ZR, REG_S_BASE, ctx->a); -#define ADD_OPERAND_SD ADD_OPERAND_REG(REGSET_ZR, REG_S_BASE, ctx->d); -#define ADD_OPERAND_SN ADD_OPERAND_REG(REGSET_ZR, REG_S_BASE, ctx->n); -#define ADD_OPERAND_SM ADD_OPERAND_REG(REGSET_ZR, REG_S_BASE, ctx->m); -#define ADD_OPERAND_ST ADD_OPERAND_REG(REGSET_ZR, REG_S_BASE, ctx->t); -#define ADD_OPERAND_ST1 ADD_OPERAND_REG(REGSET_ZR, REG_S_BASE, ctx->t); -#define ADD_OPERAND_ST2 ADD_OPERAND_REG(REGSET_ZR, REG_S_BASE, ctx->t2); - -#define ADD_OPERAND_WA ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->a); -#define ADD_OPERAND_WD ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->d); -#define ADD_OPERAND_WDN ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->dn); -#define ADD_OPERAND_WN ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->n); -#define ADD_OPERAND_WM ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->m); -#define ADD_OPERAND_WS ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->s); -#define ADD_OPERAND_WT \ - ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->t); \ - ; -#define ADD_OPERAND_WT1 ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->t); -#define ADD_OPERAND_WT2 ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, ctx->t2); - -#define ADD_OPERAND_WS_PLUS_1 ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, (ctx->s + 1) % 32); -#define ADD_OPERAND_WT_PLUS_1 ADD_OPERAND_REG(REGSET_ZR, REG_W_BASE, (ctx->t + 1) % 32); - -#define ADD_OPERAND_WD_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->d); -#define ADD_OPERAND_WN_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->n); -#define ADD_OPERAND_WM_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->m); -#define ADD_OPERAND_WT_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->n); - -#define ADD_OPERAND_XA ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->a); -#define ADD_OPERAND_XD ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->d); -#define ADD_OPERAND_XDN ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->Rdn); -#define ADD_OPERAND_XN ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->n); -#define ADD_OPERAND_XM ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->m); -#define ADD_OPERAND_XS ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->s); -#define ADD_OPERAND_XT ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->t); -#define ADD_OPERAND_XT1 ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->t); -#define ADD_OPERAND_XT2 ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, ctx->t2); - -#define ADD_OPERAND_XS_PLUS_1 ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, (ctx->s + 1) % 32); -#define ADD_OPERAND_XT_PLUS_1 ADD_OPERAND_REG(REGSET_ZR, REG_X_BASE, (ctx->t + 1) % 32); - -#define ADD_OPERAND_XD_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->d); -#define ADD_OPERAND_XN_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->n); -#define ADD_OPERAND_XDN_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->n); -#define ADD_OPERAND_XM_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->m); -#define ADD_OPERAND_XT_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->t); -#define ADD_OPERAND_XT2_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->t2); - -#define ADD_OPERAND_ZD ADD_OPERAND_REG(REGSET_ZR, REG_Z_BASE, ctx->d); -#define ADD_OPERAND_ZM ADD_OPERAND_REG(REGSET_ZR, REG_Z_BASE, ctx->m); -#define ADD_OPERAND_ZN ADD_OPERAND_REG(REGSET_ZR, REG_Z_BASE, ctx->n); -#define ADD_OPERAND_ZT ADD_OPERAND_REG(REGSET_ZR, REG_Z_BASE, ctx->t); - -#define ADD_OPERAND_ZT0 \ - instr->operands[i].operandClass = REG; \ - instr->operands[i].reg[0] = REG_ZT0; \ - i++; - -#define ADD_OPERAND_PRED_REG(REGNUM) ADD_OPERAND_REG(REGSET_ZR, REG_P_BASE, REGNUM); - -#define ADD_OPERAND_PRED_REG_T(REGNUM, ARR_SPEC) \ - ADD_OPERAND_PRED_REG(REGNUM); \ - instr->operands[i - 1].arrSpec = (ArrangementSpec)(ARR_SPEC); - -#define ADD_OPERAND_PRED_REG_QUAL(REGNUM, QUALIFIER) \ - ADD_OPERAND_PRED_REG(REGNUM); \ - instr->operands[i - 1].pred_qual = QUALIFIER; - -/* indexed element */ -// .[{, #}] -#define ADD_INDEXED_ELEMENT(REGNUM, ARRSPEC, REGINDEX, IMM) \ - instr->operands[i].operandClass = INDEXED_ELEMENT; \ - instr->operands[i].reg[0] = REG(REGSET_ZR, REG_P_BASE, (REGNUM)); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARRSPEC); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, REG_W_BASE, (REGINDEX)); \ - instr->operands[i].immediate = (IMM); \ - i++ - -/* register indirect adder */ -#define ADD_OPERAND_MEM_REG(REGSET, BASE, REGNUM) \ - instr->operands[i].operandClass = MEM_REG; \ - instr->operands[i].reg[0] = REG(REGSET, BASE, REGNUM); \ - i++ - -#define ADD_OPERAND_MEM_XN_SP ADD_OPERAND_MEM_REG(REGSET_SP, REG_X_BASE, ctx->n); - -/* general register indirect + offset adder */ -// [{, #}] -#define ADD_OPERAND_MEM_REG_OFFSET(REGSET, BASE, REGNUM, OFFSET) \ - instr->operands[i].operandClass = MEM_OFFSET; \ - instr->operands[i].reg[0] = REG(REGSET, BASE, REGNUM); \ - instr->operands[i].immediate = OFFSET; \ - instr->operands[i].signedImm = 1; \ - i++; - -// [.X{, #}] -#define ADD_OPERAND_MEM_REG_OFFSET_T(REGSET, BASE, REGNUM, OFFSET, ARR_SPEC) \ - instr->operands[i].operandClass = MEM_OFFSET; \ - instr->operands[i].reg[0] = REG(REGSET, BASE, REGNUM); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARR_SPEC); \ - instr->operands[i].immediate = OFFSET; \ - instr->operands[i].signedImm = 1; \ - i++; - -// [{, #, MUL VL}] -#define ADD_OPERAND_MEM_REG_OFFSET_VL(REGSET, BASE, REGNUM, OFFSET) \ - ADD_OPERAND_MEM_REG_OFFSET(REGSET, BASE, REGNUM, OFFSET); \ - instr->operands[i - 1].mul_vl = 1; - -/* general mem post index */ -// [], # -#define ADD_OPERAND_MEM_POST_INDEX(REGSET, BASE, REGNUM, OFFSET) \ - instr->operands[i].operandClass = MEM_POST_IDX; \ - instr->operands[i].reg[0] = REG(REGSET, BASE, REGNUM); \ - instr->operands[i].immediate = OFFSET; \ - instr->operands[i].signedImm = 1; - -// [], -#define ADD_OPERAND_MEM_POST_INDEX_REG(REGSET, BASE, REGNUM, REG_PIDX) \ - instr->operands[i].operandClass = MEM_POST_IDX; \ - instr->operands[i].reg[0] = REG(REGSET, BASE, REGNUM); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, REG_X_BASE, REG_PIDX); - -/* mem pre index */ -// [, #] -#define ADD_OPERAND_MEM_PRE_INDEX(REGSET, BASE, REGNUM, OFFSET) \ - instr->operands[i].operandClass = MEM_PRE_IDX; \ - instr->operands[i].reg[0] = REG(REGSET, BASE, REGNUM); \ - instr->operands[i].immediate = OFFSET; \ - instr->operands[i].signedImm = 1; - -/* mem extended */ -// [, ] -// [,{, LSL #0}] with optional LSL -#define ADD_OPERAND_MEM_EXTENDED(BASE, REGNUM0, REGNUM1) \ - instr->operands[i].operandClass = MEM_EXTENDED; \ - instr->operands[i].reg[0] = REG(REGSET_SP, REG_X_BASE, REGNUM0); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, BASE, REGNUM1); \ - i++; - -#define ADD_OPERAND_XN_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->n); -#define ADD_OPERAND_XM_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->m); -#define ADD_OPERAND_XT_SP ADD_OPERAND_REG(REGSET_SP, REG_X_BASE, ctx->t); - -#define ADD_OPERAND_WD_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->d); -#define ADD_OPERAND_WN_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->n); -#define ADD_OPERAND_WM_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->m); -#define ADD_OPERAND_WT_SP ADD_OPERAND_REG(REGSET_SP, REG_W_BASE, ctx->n); - -#define ADD_OPERAND_MEM_EXTENDED_T(BASE0, REGNUM0, BASE1, REGNUM1, ARR_SPEC) \ - instr->operands[i].operandClass = MEM_EXTENDED; \ - instr->operands[i].reg[0] = REG(REGSET_SP, BASE0, REGNUM0); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, BASE1, REGNUM1); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARR_SPEC); \ - i++; - -#define ADD_OPERAND_MEM_EXTENDED_T_SHIFT( \ - BASE0, REGNUM0, SZ0, BASE1, REGNUM1, SZ1, SHIFT_TYPE, SHIFT_AMT, SHIFT_USED) \ - instr->operands[i].operandClass = MEM_EXTENDED; \ - instr->operands[i].reg[0] = REG(REGSET_SP, BASE0, REGNUM0); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, BASE1, REGNUM1); \ - instr->operands[i].arrSpec = (ArrangementSpec)(SZ1); \ - instr->operands[i].shiftType = SHIFT_TYPE; \ - instr->operands[i].shiftValue = SHIFT_AMT; \ - instr->operands[i].shiftValueUsed = SHIFT_USED; \ - i += 1; - -/* general immediate operand adder */ -#define ADD_OPERAND_IMM32(VALUE, SIGNED) \ - instr->operands[i].operandClass = IMM32; \ - instr->operands[i].signedImm = SIGNED; \ - instr->operands[i].immediate = VALUE; \ - i++; - -#define ADD_OPERAND_IMM64(VALUE, SIGNED) \ - instr->operands[i].operandClass = IMM64; \ - instr->operands[i].signedImm = SIGNED; \ - instr->operands[i].immediate = VALUE; \ - i++; - -#define ADD_OPERAND_FLOAT32(VALUE) \ - do { \ - float value = VALUE; \ - instr->operands[i].operandClass = FIMM32; \ - memcpy(&instr->operands[i].immediate, &value, sizeof(float)); \ - i++; \ - } while (0) - -#define ADD_OPERAND_CONST ADD_OPERAND_IMM64(const_, 0) -#define ADD_OPERAND_FBITS ADD_OPERAND_IMM32(fbits, 0) -#define ADD_OPERAND_FIMM ADD_OPERAND_FLOAT32(fimm) -#define ADD_OPERAND_IMM0 ADD_OPERAND_IMM32(0, 0) -#define ADD_OPERAND_IMM1 ADD_OPERAND_IMM32(imm1, 0) -#define ADD_OPERAND_IMM2 ADD_OPERAND_IMM32(imm2, 0) -#define ADD_OPERAND_IMM6 ADD_OPERAND_IMM32(imm6, 0) -#define ADD_OPERAND_IMM8 ADD_OPERAND_IMM32(imm8, 0) -#define ADD_OPERAND_LSB ADD_OPERAND_IMM32(lsb, 0) -#define ADD_OPERAND_NZCV ADD_OPERAND_IMM32(ctx->nzcv, 0) -#define ADD_OPERAND_ROTATE ADD_OPERAND_IMM32(rotate, 0) -#define ADD_OPERAND_WIDTH ADD_OPERAND_IMM32(width, 0) - -//#define SEXT4(x) (x & 0x - -#define Z_M_OPERAND (ctx->Z ? 'z' : 'm') - -/* string immediate (like "mul #0x12") */ -#define ADD_OPERAND_STR_IMM(STRING, VALUE) \ - instr->operands[i].operandClass = STR_IMM; \ - instr->operands[i].immediate = VALUE; \ - instr->operands[i].signedImm = 0; \ - strcpy(instr->operands[i].name, STRING); \ - i++; - -/* specialized immediate operands */ -#define ADD_OPERAND_NAME(VALUE) \ - instr->operands[i].operandClass = NAME; \ - strcpy(instr->operands[i].name, VALUE); \ - i++; - -/* multi reg stuff, like {v0.b, v1.b} */ -#define ADD_OPERAND_MULTIREG_1(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - instr->operands[i].operandClass = MULTI_REG; \ - instr->operands[i].reg[0] = REG(REGSET_ZR, REG_BASE, REGNUM); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARR_SPEC); \ - i++; - -#define ADD_OPERAND_MULTIREG_2(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - instr->operands[i].operandClass = MULTI_REG; \ - instr->operands[i].reg[0] = REG(REGSET_ZR, REG_BASE, REGNUM); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, REG_BASE, (REGNUM + 1) % 32); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARR_SPEC); \ - i++; - -#define ADD_OPERAND_MULTIREG_3(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - instr->operands[i].operandClass = MULTI_REG; \ - instr->operands[i].reg[0] = REG(REGSET_ZR, REG_BASE, REGNUM); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, REG_BASE, (REGNUM + 1) % 32); \ - instr->operands[i].reg[2] = REG(REGSET_ZR, REG_BASE, (REGNUM + 2) % 32); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARR_SPEC); \ - i++; - -#define ADD_OPERAND_MULTIREG_4(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - instr->operands[i].operandClass = MULTI_REG; \ - instr->operands[i].reg[0] = REG(REGSET_ZR, REG_BASE, REGNUM); \ - instr->operands[i].reg[1] = REG(REGSET_ZR, REG_BASE, (REGNUM + 1) % 32); \ - instr->operands[i].reg[2] = REG(REGSET_ZR, REG_BASE, (REGNUM + 2) % 32); \ - instr->operands[i].reg[3] = REG(REGSET_ZR, REG_BASE, (REGNUM + 3) % 32); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARR_SPEC); \ - i++; - -#define ADD_OPERAND_MULTIREG_1_LANE(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - ADD_OPERAND_MULTIREG_1(REG_BASE, ARR_SPEC, REGNUM); \ - instr->operands[i - 1].laneUsed = 1; \ - instr->operands[i - 1].lane = ctx->index; - -#define ADD_OPERAND_MULTIREG_2_LANE(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - ADD_OPERAND_MULTIREG_2(REG_BASE, ARR_SPEC, REGNUM); \ - instr->operands[i - 1].laneUsed = 1; \ - instr->operands[i - 1].lane = ctx->index; - -#define ADD_OPERAND_MULTIREG_3_LANE(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - ADD_OPERAND_MULTIREG_3(REG_BASE, ARR_SPEC, REGNUM) \ - instr->operands[i - 1].laneUsed = 1; \ - instr->operands[i - 1].lane = ctx->index; - -#define ADD_OPERAND_MULTIREG_4_LANE(REG_BASE, ARR_SPEC, REGNUM) \ - ; \ - ADD_OPERAND_MULTIREG_4(REG_BASE, ARR_SPEC, REGNUM) \ - instr->operands[i - 1].laneUsed = 1; \ - instr->operands[i - 1].lane = ctx->index; - -/* v register plus ARRANGEMENT specifier: {1,2,4,8,16} x {b,h,s,d,q} */ -#define ADD_OPERAND_REG_T(BASE, ARR_SPEC, REGNUM) \ - instr->operands[i].operandClass = REG; \ - instr->operands[i].reg[0] = REG(REGSET_ZR, BASE, REGNUM); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARR_SPEC); \ - i++; - -#define ADD_OPERAND_VREG_T(REGNUM, ARR_SPEC) ADD_OPERAND_REG_T(REG_V_BASE, ARR_SPEC, REGNUM) - -#define ADD_OPERAND_ZREG_T(REGNUM, ARR_SPEC) ADD_OPERAND_REG_T(REG_Z_BASE, ARR_SPEC, REGNUM) - -/* and with lane */ -#define ADD_OPERAND_VREG_T_LANE(REGNUM, ARR_SPEC, INDEX_VALUE) \ - ADD_OPERAND_VREG_T(REGNUM, ARR_SPEC) \ - instr->operands[i - 1].lane = INDEX_VALUE; \ - instr->operands[i - 1].laneUsed = 1; - -#define ADD_OPERAND_ZREG_T_LANE(REGNUM, ARR_SPEC, INDEX_VALUE) \ - ADD_OPERAND_ZREG_T(REGNUM, ARR_SPEC) \ - instr->operands[i - 1].lane = INDEX_VALUE; \ - instr->operands[i - 1].laneUsed = 1; - -/* */ -#define ADD_OPERAND_COND \ - instr->operands[i].operandClass = CONDITION; \ - instr->operands[i].cond = table_cond[ctx->condition]; \ - i++; - -#define ADD_OPERAND_COND_NEG \ - instr->operands[i].operandClass = CONDITION; \ - instr->operands[i].cond = table_cond_neg[ctx->condition]; \ - i++; - -#define ADD_OPERAND_LABEL \ - instr->operands[i].operandClass = LABEL; \ - instr->operands[i].immediate = eaddr; \ - i++; - -#define ADD_OPERAND_SYSTEMREG_IMPL_SPEC(SR) \ - instr->operands[i].operandClass = IMPLEMENTATION_SPECIFIC; \ - instr->operands[i].implspec[0] = ctx->sys_op0; \ - instr->operands[i].implspec[1] = ctx->sys_op1; \ - instr->operands[i].implspec[2] = ctx->sys_crn; \ - instr->operands[i].implspec[3] = ctx->sys_crm; \ - instr->operands[i].implspec[4] = ctx->sys_op2; \ - instr->operands[i].sysreg = (SR); \ - i++; - -#define ADD_OPERAND_SYSTEMREG(R) \ - instr->operands[i].operandClass = SYS_REG; \ - instr->operands[i].implspec[0] = ctx->sys_op0; \ - instr->operands[i].implspec[1] = ctx->sys_op1; \ - instr->operands[i].implspec[2] = ctx->sys_crn; \ - instr->operands[i].implspec[3] = ctx->sys_crm; \ - instr->operands[i].implspec[4] = ctx->sys_op2; \ - instr->operands[i].sysreg = (R); \ - i++; - -#define ADD_OPERAND_SYSTEMREG_SENSE \ - { \ - SystemReg sr = (SystemReg)(((ctx->sys_op0 << 14) | (ctx->sys_op1 << 11) | (ctx->sys_crn << 7) | \ - (ctx->sys_crm << 3) | ctx->sys_op2)); \ - if (has_system_register_name(sr)) \ - { \ - ADD_OPERAND_SYSTEMREG(sr); \ - } \ - else \ - { \ - ADD_OPERAND_SYSTEMREG_IMPL_SPEC(sr); \ - } \ - } - -#define ADD_OPERAND_PATTERN \ - if (ctx->pattern > 0b1101 && ctx->pattern < 0b11101) \ - { \ - ADD_OPERAND_IMM32(ctx->pattern, 0); \ - } \ - else \ - { \ - ADD_OPERAND_NAME(pattern_lookup(ctx->pattern, ctx->imm)); \ - } - -/* SME */ -#define ADD_OPERAND_SME_TILE(TILE_NUM, SLICE_INDICATOR, ARRSPEC, BASEREG, OFFSET) \ - instr->operands[i].operandClass = SME_TILE; \ - instr->operands[i].tile = (TILE_NUM); \ - instr->operands[i].slice = (SliceIndicator)(SLICE_INDICATOR); \ - instr->operands[i].arrSpec = (ArrangementSpec)(ARRSPEC); \ - instr->operands[i].reg[0] = (Register)(BASEREG); \ - instr->operands[i].immediate = (OFFSET); \ - instr->operands[i].signedImm = true; \ - i++; - -#define ADD_OPERAND_ACCUM_ARRAY(BASEREG, OFFSET) \ - instr->operands[i].operandClass = ACCUM_ARRAY; \ - instr->operands[i].reg[0] = (Register)(BASEREG); \ - instr->operands[i].immediate = (OFFSET); \ - i++; - -//----------------------------------------------------------------------------- -// register base lookups -//----------------------------------------------------------------------------- - -static unsigned rwwwx_0123x_reg(int x, int r) -{ - if ((x & 0b01111) == 0b00000) - return 0; // x0000 RESERVED - if ((x & 0b00001) == 0b00001) - return REG_W_BASE; // xxxx1 W - if ((x & 0b00011) == 0b00010) - return REG_W_BASE; // xxx10 W - if ((x & 0b00111) == 0b00100) - return REG_W_BASE; // xx100 W - if ((x & 0b01111) == 0b01000) - return REG_X_BASE; // x1000 X - return 0; -} - -static unsigned rbhsdq_5bit_reg(unsigned key) -{ - // if((key & 0b01111) == 0b00000) return 0; // x0000 RESERVED - if (key == 0) - return 0; // x0000 RESERVED - if ((key & 0b00001) == 0b00001) - return REG_B_BASE; // xxxx1 B - if ((key & 0b00011) == 0b00010) - return REG_H_BASE; // xxx10 H - if ((key & 0b00111) == 0b00100) - return REG_S_BASE; // xx100 S - if ((key & 0b01111) == 0b01000) - return REG_D_BASE; // xx100 D - if ((key & 0b11111) == 0b10000) - return REG_Q_BASE; // xx100 Q - return 0; -} - -static unsigned wwwx_0123_reg(unsigned size) -{ - if (size == 0b11) - return REG_X_BASE; - return REG_W_BASE; -} - -static unsigned sd_01_reg(int v) -{ - switch (v & 1) - { - case 0: - return REG_S_BASE; - case 1: - return REG_D_BASE; - default: - return 0; - } -} - -// ,, -static unsigned bhsd_0123_reg(int v) -{ - switch (v & 3) - { - case 0: - return REG_B_BASE; - case 1: - return REG_H_BASE; - case 2: - return REG_S_BASE; - case 3: - return REG_D_BASE; - default: - return 0; - } -} - -static unsigned rsdr_0123_reg(int v) -{ - switch (v & 3) - { - case 1: - return REG_S_BASE; - case 2: - return REG_D_BASE; - default: - return 0; - } -} - -static unsigned hsdr_0123_reg(int v) -{ - switch (v & 3) - { - case 0: - return REG_H_BASE; - case 1: - return REG_S_BASE; - case 2: - return REG_D_BASE; - default: - return 0; - } -} - -static unsigned rhsd_0123_reg(int v) -{ - if (v == 1) - return REG_H_BASE; - if (v == 2) - return REG_S_BASE; - return 0; -} - -static unsigned rhsd_0123x_reg(int v) -{ - // if(x & 0xE == 0) return 0; // 000x - if ((v & 0xE) == 2) - return REG_H_BASE; // 001x - if ((v & 0xC) == 4) - return REG_S_BASE; // 01xx - if ((v & 0x8) == 8) - return REG_D_BASE; // 1xxx - return 0; -} - -static unsigned rbhsd_0123x_reg(int v) -{ // 0000 RESERVED - if (v == 1) - return REG_B_BASE; // 0001 B - if ((v & 0b1110) == 0b0010) - return REG_H_BASE; // 001x H - if ((v & 0b1100) == 0b0100) - return REG_S_BASE; // 01xx S - if ((v & 0b1000) == 0b1000) - return REG_D_BASE; // 1xxx D - return 0; -} - -static unsigned rhsdr_0123x_reg(int v) -{ - if (v == 1) - return REG_H_BASE; - if ((v & 0b1110) == 0b0010) - return REG_S_BASE; - if ((v & 0b1100) == 0b0100) - return REG_D_BASE; - return 0; -} - -#define OPTIONAL_SHIFT_AMOUNT \ - if (!(ctx->shift_type == 1 && ctx->shift_amount == 0)) \ - { \ - instr->operands[i - 1].shiftType = (ShiftType)(ctx->shift_type); \ - instr->operands[i - 1].shiftValue = ctx->shift_amount; \ - instr->operands[i - 1].shiftValueUsed = 1; \ - } \ - else \ - { \ - instr->operands[i - 1].shiftValueUsed = 0; \ - } - -#define OPTIONAL_EXTEND_AMOUNT(SPECIAL_LSL) \ - instr->operands[i - 1].shiftType = (ShiftType)(ctx->extend_type); \ - instr->operands[i - 1].shiftValue = ctx->shift; \ - if (ctx->option == SPECIAL_LSL) \ - { \ - if (ctx->shift) \ - { \ - instr->operands[i - 1].shiftType = ShiftType_LSL; \ - instr->operands[i - 1].shiftValueUsed = 1; \ - } \ - else \ - instr->operands[i - 1].shiftType = ShiftType_NONE; \ - } \ - else \ - { \ - instr->operands[i - 1].shiftValueUsed = ctx->shift ? 1 : 0; \ - } - -#define OPTIONAL_EXTEND_AMOUNT_0 \ - instr->operands[i - 1].shiftType = (ShiftType)(ctx->extend_type); \ - instr->operands[i - 1].shiftValue = 0; \ - instr->operands[i - 1].shiftValueUsed = ctx->S ? 1 : 0; - -#define OPTIONAL_EXTEND_LSL0 \ - if (ctx->S) \ - { \ - instr->operands[i - 1].shiftType = ShiftType_LSL; \ - instr->operands[i - 1].shiftValue = 0; \ - instr->operands[i - 1].shiftValueUsed = 1; \ - } \ - else \ - instr->operands[i - 1].shiftType = ShiftType_NONE; - -#define OPTIONAL_EXTEND_AMOUNT_32(EXCEPTIONAL_REG) \ - ShiftType st = DecodeRegExtend(ctx->option); \ - if (st == ShiftType_UXTW) \ - { \ - if (EXCEPTIONAL_REG == 31 && ctx->imm3 != 0) \ - { \ - st = ShiftType_LSL; \ - } \ - } \ - instr->operands[i - 1].shiftType = st; \ - instr->operands[i - 1].shiftValue = ctx->shift; \ - if (ctx->shift) \ - { \ - instr->operands[i - 1].shiftValueUsed = 1; \ - } - -#define OPTIONAL_EXTEND_AMOUNT_64_BEHAVIOR0 \ - ShiftType st = DecodeRegExtend(ctx->option); \ - if (ctx->Rn == 31 && ctx->option == 3) \ - { \ - st = ShiftType_LSL; \ - if (ctx->imm3 == 0) \ - st = ShiftType_NONE; \ - } \ - if (st != ShiftType_NONE) \ - { \ - instr->operands[i - 1].shiftType = st; \ - instr->operands[i - 1].shiftValue = ctx->shift; \ - instr->operands[i - 1].shiftValueUsed = 1; \ - } \ - if (!ctx->shift) \ - { \ - instr->operands[i - 1].shiftValueUsed = 0; \ - } - -#define OPTIONAL_EXTEND_AMOUNT_64_BEHAVIOR1 \ - ShiftType st = DecodeRegExtend(ctx->option); \ - if ((ctx->Rd == 31 || ctx->Rn == 31) && ctx->option == 3) \ - { \ - st = ShiftType_LSL; \ - if (ctx->imm3 == 0) \ - st = ShiftType_NONE; \ - } \ - if (st != ShiftType_NONE) \ - { \ - instr->operands[i - 1].shiftType = st; \ - instr->operands[i - 1].shiftValue = ctx->shift; \ - instr->operands[i - 1].shiftValueUsed = 1; \ - } \ - if (!ctx->shift) \ - { \ - instr->operands[i - 1].shiftValueUsed = 0; \ - } - -#define LAST_OPERAND_SHIFT(SHIFT_TYPE, SHIFT_VALUE) \ - instr->operands[i - 1].shiftType = SHIFT_TYPE; \ - instr->operands[i - 1].shiftValue = SHIFT_VALUE; \ - instr->operands[i - 1].shiftValueUsed = 1; - -#define LAST_OPERAND_LSL_12 LAST_OPERAND_SHIFT(ShiftType_LSL, 12) - -#define OPTIONAL_LSL_AMOUNT(AMOUNT) \ - if (AMOUNT) \ - { \ - LAST_OPERAND_SHIFT(ShiftType_LSL, AMOUNT); \ - } \ - else \ - { \ - instr->operands[i - 1].shiftValueUsed = 0; \ - } - -#define ADD_OPERAND_OPTIONAL_PATTERN_MUL \ - { \ - bool print_mul = ctx->imm != 1; \ - bool print_pattern = print_mul || ctx->pattern != 0x1f; \ - if (print_pattern) \ - { \ - ADD_OPERAND_PATTERN; \ - } \ - if (print_mul) \ - { \ - ADD_OPERAND_STR_IMM("mul", ctx->imm); \ - } \ - } - -#define ADD_OPERAND_OPTIONAL_PATTERN \ - if (ctx->pattern != 0x1f) \ - { \ - ADD_OPERAND_PATTERN; \ - } - -/* convert the result of pcode execution to a human-friendly list of operands */ -int decode_scratchpad(context* ctx, Instruction* instr) -{ - ArrangementSpec arr_spec = _1B; - - /* index of operand array, as it's built */ - int i = 0; - - /* populate operation */ - instr->operation = enc_to_oper(instr->encoding); - - /* default to 0 operands */ - InstructionOperand zero = {(OperandClass)(0)}; - for (uint32_t ii = 0; ii < MAX_OPERANDS; ++ii) - instr->operands[ii] = zero; - - switch (instr->encoding) - { - /* instructions with no operands */ - case ENC_AUTIA171615_64LR_DP_1SRC: - case ENC_AUTIA1716_HI_HINTS: - case ENC_AUTIASP_HI_HINTS: - case ENC_AUTIAZ_HI_HINTS: - case ENC_AUTIB171615_64LR_DP_1SRC: - case ENC_AUTIB1716_HI_HINTS: - case ENC_AUTIBSP_HI_HINTS: - case ENC_AUTIBZ_HI_HINTS: - case ENC_AXFLAG_M_PSTATE: - case ENC_CFINV_M_PSTATE: - case ENC_CSDB_HI_HINTS: - case ENC_DGH_HI_HINTS: - case ENC_DRPS_64E_BRANCH_REG: - case ENC_ERETAA_64E_BRANCH_REG: - case ENC_ERETAB_64E_BRANCH_REG: - case ENC_ERET_64E_BRANCH_REG: - case ENC_ESB_HI_HINTS: - case ENC_NOP_HI_HINTS: - case ENC_PACIA171615_64LR_DP_1SRC: - case ENC_PACIA1716_HI_HINTS: - case ENC_PACIASP_HI_HINTS: - case ENC_PACIASPPC_64LR_DP_1SRC: - case ENC_PACIAZ_HI_HINTS: - case ENC_PACIB171615_64LR_DP_1SRC: - case ENC_PACIB1716_HI_HINTS: - case ENC_PACIBSP_HI_HINTS: - case ENC_PACIBSPPC_64LR_DP_1SRC: - case ENC_PACIBZ_HI_HINTS: - case ENC_PACM_HI_HINTS: - case ENC_PACNBIASPPC_64LR_DP_1SRC: - case ENC_PACNBIBSPPC_64LR_DP_1SRC: - case ENC_RETAA_64E_BRANCH_REG: - case ENC_RETAB_64E_BRANCH_REG: - case ENC_SEVL_HI_HINTS: - case ENC_SEV_HI_HINTS: - case ENC_WFE_HI_HINTS: - case ENC_WFI_HI_HINTS: - case ENC_XAFLAG_M_PSTATE: - case ENC_XPACLRI_HI_HINTS: - case ENC_YIELD_HI_HINTS: - case ENC_SETFFR_F_: - // case ENC_SSBB_ONLY_BARRIERS: - // case ENC_PSSBB_ONLY_BARRIERS: - case ENC_SB_ONLY_BARRIERS: - case ENC_PSSBB_DSB_BO_BARRIERS: - case ENC_SSBB_DSB_BO_BARRIERS: - break; - case ENC_WFET_ONLY_SYSTEMINSTRSWITHREG: - case ENC_WFIT_ONLY_SYSTEMINSTRSWITHREG: - { - // - ADD_OPERAND_XD; - break; - } - case ENC_PSB_HC_HINTS: - case ENC_TSB_HC_HINTS: - { - ADD_OPERAND_NAME("csync"); - break; - } - case ENC_LDR_B_LDST_IMMPRE: - case ENC_STR_B_LDST_IMMPRE: - { - // , [, #]! - ADD_OPERAND_BT; - ADD_OPERAND_MEM_PRE_INDEX(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDR_B_LDST_REGOFF: - case ENC_STR_B_LDST_REGOFF: - { - int reg_base = table_wbase_xbase[ctx->option & 1]; - // , [, (|),{}] - ADD_OPERAND_BT; - ADD_OPERAND_MEM_EXTENDED(reg_base, ctx->n, ctx->m); - if (ctx->option & 1) - { - OPTIONAL_EXTEND_AMOUNT_32(3); - } - else - { - OPTIONAL_EXTEND_AMOUNT_64_BEHAVIOR1; - } - if (ctx->S) - { - OPTIONAL_EXTEND_AMOUNT_0 - } - break; - } - case ENC_LDR_BL_LDST_REGOFF: - case ENC_STR_BL_LDST_REGOFF: - { - // , [,{, LSL #0}] - ADD_OPERAND_BT; - ADD_OPERAND_MEM_EXTENDED(REG_X_BASE, ctx->n, ctx->m); - OPTIONAL_EXTEND_LSL0; - break; - } - case ENC_LDR_B_LDST_IMMPOST: - case ENC_STR_B_LDST_IMMPOST: - { - // , [], # - ADD_OPERAND_BT; - ADD_OPERAND_MEM_POST_INDEX(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDR_B_LDST_POS: - case ENC_STR_B_LDST_POS: - { - // , [{, #}] - ADD_OPERAND_BT; - ADD_OPERAND_MEM_REG_OFFSET(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDUR_B_LDST_UNSCALED: - case ENC_STUR_B_LDST_UNSCALED: - { - // , [{, #}] - ADD_OPERAND_BT; - ADD_OPERAND_MEM_REG_OFFSET(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_MOVI_ASIMDIMM_D_DS: // display as hex - { - uint64_t imm = ctx->imm; - //
, # - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->rd); - ADD_OPERAND_IMM64(imm, 0); - break; - } - case ENC_FMOV_D_FLOATIMM: // display as float - { - float fimm = table_imm8_to_float[ctx->imm8]; - //
, # - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_FIMM; - break; - } - case ENC_FABS_D_FLOATDP1: - case ENC_FMOV_D_FLOATDP1: - case ENC_FNEG_D_FLOATDP1: - case ENC_FRINT32X_D_FLOATDP1: - case ENC_FRINT32Z_D_FLOATDP1: - case ENC_FRINT64X_D_FLOATDP1: - case ENC_FRINT64Z_D_FLOATDP1: - case ENC_FRINTA_D_FLOATDP1: - case ENC_FRINTI_D_FLOATDP1: - case ENC_FRINTM_D_FLOATDP1: - case ENC_FRINTN_D_FLOATDP1: - case ENC_FRINTP_D_FLOATDP1: - case ENC_FRINTX_D_FLOATDP1: - case ENC_FRINTZ_D_FLOATDP1: - case ENC_FSQRT_D_FLOATDP1: - { - //
, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_DN; - break; - } - case ENC_FADD_D_FLOATDP2: - case ENC_FDIV_D_FLOATDP2: - case ENC_FMAXNM_D_FLOATDP2: - case ENC_FMAX_D_FLOATDP2: - case ENC_FMINNM_D_FLOATDP2: - case ENC_FMIN_D_FLOATDP2: - case ENC_FMUL_D_FLOATDP2: - case ENC_FNMUL_D_FLOATDP2: - case ENC_FSUB_D_FLOATDP2: - { - //
,, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_DN; - ADD_OPERAND_DM; - break; - } - case ENC_FMADD_D_FLOATDP3: - case ENC_FMSUB_D_FLOATDP3: - case ENC_FNMADD_D_FLOATDP3: - case ENC_FNMSUB_D_FLOATDP3: - { - //
,,, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_DN; - ADD_OPERAND_DM; - ADD_OPERAND_DA; - break; - } - case ENC_FCSEL_D_FLOATSEL: - { - //
,,, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_DN; - ADD_OPERAND_DM; - ADD_OPERAND_COND; - break; - } - case ENC_FCVT_DH_FLOATDP1: - { - //
, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_HN; - break; - } - case ENC_SADDV_R_P_Z_: - case ENC_UADDV_R_P_Z_: - { - arr_spec = table_b_h_s_d[ctx->size]; - //
,,. - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_PRED_REG(ctx->g); - ADD_OPERAND_ZREG_T(ctx->n, arr_spec) - break; - } - case ENC_FCVT_DS_FLOATDP1: - { - //
, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_SN; - break; - } - case ENC_SCVTF_D32_FLOAT2INT: - case ENC_UCVTF_D32_FLOAT2INT: - { - //
, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_WN; - break; - } - case ENC_SCVTF_D32_FLOAT2FIX: - case ENC_UCVTF_D32_FLOAT2FIX: - { - uint64_t fbits = ctx->fracbits; - //
,, # - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_WN; - ADD_OPERAND_FBITS; - break; - } - case ENC_FMOV_D64_FLOAT2INT: - case ENC_SCVTF_D64_FLOAT2INT: - case ENC_UCVTF_D64_FLOAT2INT: - { - //
, - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_XN; - break; - } - case ENC_SCVTF_D64_FLOAT2FIX: - case ENC_UCVTF_D64_FLOAT2FIX: - { - uint64_t fbits = ctx->fracbits; - //
,, # - ADD_OPERAND_REG(REGSET_ZR, REG_D_BASE, ctx->d); - ADD_OPERAND_XN; - ADD_OPERAND_FBITS; - break; - } - case ENC_FCMPE_DZ_FLOATCMP: - case ENC_FCMP_DZ_FLOATCMP: - { - // , #0.0 - ADD_OPERAND_DN; - ADD_OPERAND_FLOAT32(0); - break; - } - case ENC_FCMPE_D_FLOATCMP: - case ENC_FCMP_D_FLOATCMP: - { - // , - ADD_OPERAND_DN; - ADD_OPERAND_DM; - break; - } - case ENC_FCCMPE_D_FLOATCCMP: - case ENC_FCCMP_D_FLOATCCMP: - { - // ,, #, - ADD_OPERAND_DN; - ADD_OPERAND_DM; - ADD_OPERAND_NZCV; - ADD_OPERAND_COND; - break; - } - case ENC_LDP_D_LDSTPAIR_PRE: - case ENC_STP_D_LDSTPAIR_PRE: - { - // ,, [, #]! - ADD_OPERAND_DT1; - ADD_OPERAND_DT2; - ADD_OPERAND_MEM_PRE_INDEX(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDP_D_LDSTPAIR_POST: - case ENC_STP_D_LDSTPAIR_POST: - { - uint64_t imm = ctx->offset; - // ,, [], # - ADD_OPERAND_DT1; - ADD_OPERAND_DT2; - ADD_OPERAND_MEM_POST_INDEX(REGSET_SP, REG_X_BASE, ctx->n, imm); - break; - } - case ENC_LDNP_D_LDSTNAPAIR_OFFS: - case ENC_LDP_D_LDSTPAIR_OFF: - case ENC_STNP_D_LDSTNAPAIR_OFFS: - case ENC_STP_D_LDSTPAIR_OFF: - { - uint64_t imm = ctx->offset; - // ,, [{, #}] - ADD_OPERAND_DT1; - ADD_OPERAND_DT2; - ADD_OPERAND_MEM_REG_OFFSET(REGSET_SP, REG_X_BASE, ctx->n, imm); - break; - } - case ENC_LDR_D_LDST_IMMPRE: - case ENC_STR_D_LDST_IMMPRE: - { - //
, [, #]! - ADD_OPERAND_DT; - ADD_OPERAND_MEM_PRE_INDEX(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDR_D_LDST_REGOFF: - case ENC_STR_D_LDST_REGOFF: - { - int reg_base = table_wbase_xbase[ctx->option & 1]; - //
, [, (|){,{}}] - ADD_OPERAND_DT; - ADD_OPERAND_MEM_EXTENDED(reg_base, ctx->n, ctx->m); - OPTIONAL_EXTEND_AMOUNT(3); - break; - } - case ENC_LDR_D_LDST_IMMPOST: - case ENC_STR_D_LDST_IMMPOST: - { - //
, [], # - ADD_OPERAND_DT; - ADD_OPERAND_MEM_POST_INDEX(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDR_D_LDST_POS: - case ENC_STR_D_LDST_POS: - { - //
, [{, #}] - ADD_OPERAND_DT; - ADD_OPERAND_MEM_REG_OFFSET(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDUR_D_LDST_UNSCALED: - case ENC_STUR_D_LDST_UNSCALED: - { - //
, [{, #}] - ADD_OPERAND_DT; - ADD_OPERAND_MEM_REG_OFFSET(REGSET_SP, REG_X_BASE, ctx->n, ctx->offset); - break; - } - case ENC_LDR_D_LOADLIT: - { - uint64_t eaddr = ctx->address + ctx->offset; - //
,
, , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_D64_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTD_N_F64_S64; // SCVTF
, , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_H32_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTH_N_F16_S32; // SCVTF , , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_H64_FLOAT2FIX: // SCVTF , , # - intrin_id = ARM64_INTRIN_VCVTH_N_F16_S64; - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_S32_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTS_N_F32_S32; // scvtf , , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_S64_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTS_N_F32_S64; // scvtf , , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_D32_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTD_N_F64_U32; // UCVTF
, , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_D64_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTD_N_F64_U64; // UCVTF
, , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_H32_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTH_N_F16_U32; // UCVTF , , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_H64_FLOAT2FIX: // UCVTF , , # - intrin_id = ARM64_INTRIN_VCVTH_N_F16_U64; - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_S32_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTS_N_F32_U32; // ucvtf , , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_S64_FLOAT2FIX: - intrin_id = ARM64_INTRIN_VCVTS_N_F32_U64; // ucvtf , , # - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FDIV_D_FLOATDP2: - intrin_id = ARM64_INTRIN_VDIV_F64; // FDIV Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FDIV_S_FLOATDP2: - intrin_id = ARM64_INTRIN_VDIV_F32; // FDIV Sd,Sn,Sm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FDIV_H_FLOATDP2: - intrin_id = ARM64_INTRIN_VDIVH_F16; // FDIV Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FDIV_ASIMDSAME_ONLY: - case ENC_FDIV_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VDIV_F32; // FDIV Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VDIVQ_F32; // FDIV Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VDIVQ_F64; // FDIV Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VDIV_F16; // FDIV Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VDIVQ_F16; // FDIV Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMADD_D_FLOATDP3: - intrin_id = ARM64_INTRIN_VFMA_F64; // FMADD Dd,Dn,Dm,Da - add_input_reg(inputs, il, instr.operands[3]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMADD_S_FLOATDP3: - intrin_id = ARM64_INTRIN_VFMA_F32; // FMADD Sd,Sn,Sm,Sa - add_input_reg(inputs, il, instr.operands[3]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMADD_H_FLOATDP3: - intrin_id = ARM64_INTRIN_VFMAH_F16; // FMADD Hd,Hn,Hm,Ha - add_input_reg(inputs, il, instr.operands[3]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNMP_ASIMDSAMEFP16_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // float16x4_t vpmaxnm_f16(float16x4_t a, float16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VPMAXNM_F16; // FMAXNMP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // float16x8_t vpmaxnmq_f16(float16x8_t a, float16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VPMAXNMQ_F16; // FMAXNMP Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNMP_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // float32x2_t vpmaxnm_f32(float32x2_t a, float32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VPMAXNM_F32; // FMAXNMP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // float32x4_t vpmaxnmq_f32(float32x4_t a, float32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VPMAXNMQ_F32; // FMAXNMP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // float64x2_t vpmaxnmq_f64(float64x2_t a, float64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VPMAXNMQ_F64; // FMAXNMP Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNMP_ASISDPAIR_ONLY_H: - // None of these are valid instructions, but they are in the spec - // if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // // float16_t vmaxnmv_f16(float16x4_t a) - // // argprep: a -> Vn.4H - // // results: Hd -> result - // intrin_id = ARM64_INTRIN_VMAXNMV_F16; // FMAXNMP Hd,Vn.4H - // else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // // float16_t vmaxnmvq_f16(float16x8_t a) - // // argprep: a -> Vn.8H - // // results: Hd -> result - // intrin_id = ARM64_INTRIN_VMAXNMVQ_F16; // FMAXNMP Hd,Vn.8H - // The only valid instruction is FMAXNMP Hd,Vn.2H - intrin_id = ARM64_INTRIN_VMAXNMV_F16; // FMAXNMP Hd,Vn.2H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNMP_ASISDPAIR_ONLY_SD: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // float32_t vpmaxnms_f32(float32x2_t a) - // argprep: a -> Vn.2S - // results: Sd -> result - intrin_id = ARM64_INTRIN_VPMAXNMS_F32; // FMAXNMP Sd,Vn.2S - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // float64_t vpmaxnmqd_f64(float64x2_t a) - // argprep: a -> Vn.2D - // results: Dd -> result - intrin_id = ARM64_INTRIN_VPMAXNMQD_F64; // FMAXNMP Dd,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNMV_ASIMDALL_ONLY_H: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // float16_t vmaxnmvq_f16(float16x4_t a) - // argprep: a -> Vn.4H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMAXNMVQ_F16; // FMAXNMV Hd,Hn.4H - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // float16_t vmaxnmvq_f16(float16x8_t a) - // argprep: a -> Vn.8H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMAXNMVQ_F16; // FMAXNMV Hd,Hn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNMV_ASIMDALL_ONLY_SD: - intrin_id = ARM64_INTRIN_VMAXNMVQ_F32; // FMAXNMV Sd,Vn.4S - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNM_D_FLOATDP2: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].reg[0] >= REG_D0 && instr.operands[2].reg[0] <= REG_D31)) - // float64x1_t vmaxnm_f64(float64x1_t a, float64x1_t b) - // argprep: a -> Dn; b -> Dm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMAXNM_F64; // FMAXNM Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNM_H_FLOATDP2: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].reg[0] >= REG_H0 && instr.operands[2].reg[0] <= REG_H31)) - // float16_t vmaxnmh_f16(float16_t a, float16_t b) - // argprep: a -> Hn; b -> Hm - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMAXNMH_F16; // FMAXNM Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXNM_S_FLOATDP2: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].reg[0] >= REG_S0 && instr.operands[2].reg[0] <= REG_S31)) - // float32x1_t vmaxnm_f32(float32x1_t a, float32x1_t b) - // argprep: a -> Sn; b -> Sm - // results: Sd -> result - intrin_id = ARM64_INTRIN_VMAXNM_F32; // FMAXNM Sd,Sn,Sm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; case ENC_FMAXNM_ASIMDSAME_ONLY: - case ENC_FMAXNM_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMAXNM__F32; // FMAXNM Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMAXNMQ_F32; // FMAXNM Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMAXNMQ_F64; // FMAXNM Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMAXNM_F16; // FMAXNM Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMAXNMQ_F16; // FMAXNM Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXP_ASIMDSAME_ONLY: - case ENC_FMAXP_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPMAX_F32; // FMAXP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPMAXQ_F32; // FMAXP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VPMAXQ_F64; // FMAXP Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPMAX_F16; // FMAXP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPMAXQ_F16; // FMAXP Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXP_ASISDPAIR_ONLY_H: - intrin_id = ARM64_INTRIN_VMAXV_F16; // FMAXP Hd,Vn.2H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXP_ASISDPAIR_ONLY_SD: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // float32_t vpmaxs_f32(float32x2_t a) - // argprep: a -> Vn.2S - // results: Sd -> result - intrin_id = ARM64_INTRIN_VPMAXS_F32; // FMAXP Sd,Vn.2S - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // float64_t vpmaxqd_f64(float64x2_t a) - // argprep: a -> Vn.2D - // results: Dd -> result - intrin_id = ARM64_INTRIN_VPMAXQD_F64; // FMAXP Dd,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXV_ASIMDALL_ONLY_H: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // float16_t vmaxvq_f16(float16x4_t a) - // argprep: a -> Vn.4H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMAXVQ_F16; // FMAXV Hd,Hn.4H - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // float16_t vmaxvq_f16(float16x8_t a) - // argprep: a -> Vn.8H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMAXVQ_F16; // FMAXV Hd,Hn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAXV_ASIMDALL_ONLY_SD: - intrin_id = ARM64_INTRIN_VMAXVQ_F32; // FMAXV Sd,Vn.4S - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAX_D_FLOATDP2: - intrin_id = ARM64_INTRIN_VMAX_F64; // FMAX Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAX_S_FLOATDP2: - intrin_id = ARM64_INTRIN_VMAX_F32; // FMAX Sd,Sn,Sm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAX_H_FLOATDP2: - intrin_id = ARM64_INTRIN_VMAXH_F16; // FMAX Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMAX_ASIMDSAME_ONLY: - case ENC_FMAX_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMAX_F32; // FMAX Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMAXQ_F32; // FMAX Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMAXQ_F64; // FMAX Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMAX_F16; // FMAX Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMAXQ_F16; // FMAX Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNMP_ASIMDSAME_ONLY: - case ENC_FMINNMP_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPMINNM_F32; // FMINNMP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPMINNMQ_F32; // FMINNMP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VPMINNMQ_F64; // FMINNMP Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPMINNM_F16; // FMINNMP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPMINNMQ_F16; // FMINNMP Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNMP_ASISDPAIR_ONLY_H: - // intrin_id = ARM64_INTRIN_VPMINNMS_F32; // FMINNMP Sd,Vn.2S - intrin_id = ARM64_INTRIN_VMINNMV_F16; // FMINP Hd,Vn.2H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNMP_ASISDPAIR_ONLY_SD: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // float32_t vpminnms_f32(float32x2_t a) - // argprep: a -> Vn.2S - // results: Sd -> result - intrin_id = ARM64_INTRIN_VPMINNMS_F32; // FMINNMP Sd,Vn.2S - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // float64_t vpminnmqd_f64(float64x2_t a) - // argprep: a -> Vn.2D - // results: Dd -> result - intrin_id = ARM64_INTRIN_VPMINNMQD_F64; // FMINNMP Dd,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNMV_ASIMDALL_ONLY_H: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // float16_t vminnmv_f16(float16x4_t a) - // argprep: a -> Vn.4H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMINNMV_F16; // FMINNMV Hd,Vn.4H - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // float16_t vminnmvq_f16(float16x8_t a) - // argprep: a -> Vn.8H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMINNMVQ_F16; // FMINNMV Hd,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNMV_ASIMDALL_ONLY_SD: - intrin_id = ARM64_INTRIN_VMINNMVQ_F32; // FMINNMV Sd,Vn.4S - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNM_D_FLOATDP2: - intrin_id = ARM64_INTRIN_VMINNM_F64; // FMINNM Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNM_S_FLOATDP2: - intrin_id = ARM64_INTRIN_VMINNM_F32; // FMINNM Sd,Sn,Sm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNM_H_FLOATDP2: - intrin_id = ARM64_INTRIN_VMINNMH_F16; // FMINNM Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINNM_ASIMDSAME_ONLY: - case ENC_FMINNM_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMINNM_F32; // FMINNM Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMINNMQ_F32; // FMINNM Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMINNMQ_F64; // FMINNM Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMINNM_F16; // FMINNM Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMINNMQ_F16; // FMINNM Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINP_ASIMDSAME_ONLY: - case ENC_FMINP_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPMIN_F32; // FMINP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPMINQ_F32; // FMINP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VPMINQ_F64; // FMINP Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPMIN_F16; // FMINP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPMINQ_F16; // FMINP Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINP_ASISDPAIR_ONLY_H: - // intrin_id = ARM64_INTRIN_VPMINS_F32; // FMINP Sd,Vn.2S - intrin_id = ARM64_INTRIN_VMINV_F16; // FMINP Hd,Vn.2H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINP_ASISDPAIR_ONLY_SD: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // float32_t vpmins_f32(float32x2_t a) - // argprep: a -> Vn.2S - // results: Sd -> result - intrin_id = ARM64_INTRIN_VPMINS_F32; // FMINP Sd,Vn.2S - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // float64_t vpminqd_f64(float64x2_t a) - // argprep: a -> Vn.2D - // results: Dd -> result - intrin_id = ARM64_INTRIN_VPMINQD_F64; // FMINP Dd,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINV_ASIMDALL_ONLY_H: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // float16_t vminv_f16(float16x4_t a) - // argprep: a -> Vn.4H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMINV_F16; // FMINV Hd,Vn.4H - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // float16_t vminvq_f16(float16x8_t a) - // argprep: a -> Vn.8H - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMINVQ_F16; // FMINV Hd,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMINV_ASIMDALL_ONLY_SD: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // float32_t vminv_f32(float32x2_t a) - // argprep: a -> Vn.2S - // results: Sd -> result - intrin_id = ARM64_INTRIN_VMINV_F32; // FMINV Sd,Vn.2S - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // float32_t vminvq_f32(float32x4_t a) - // argprep: a -> Vn.4S - // results: Sd -> result - intrin_id = ARM64_INTRIN_VMINVQ_F32; // FMINV Sd,Vn.4S - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // float64_t vminvq_f64(float64x2_t a) - // argprep: a -> Vn.2D - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMINVQ_F64; // FMINV Dd,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMIN_D_FLOATDP2: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].reg[0] >= REG_D0 && instr.operands[2].reg[0] <= REG_D31)) - // float64x1_t vmin_f64(float64x1_t a, float64x1_t b) - // argprep: a -> Dn; b -> Dm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMIN_F64; // FMIN Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMIN_S_FLOATDP2: - intrin_id = ARM64_INTRIN_VMIN_F32; // FMIN Sd,Sn,Sm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMIN_H_FLOATDP2: - intrin_id = ARM64_INTRIN_VMINH_F16; // FMIN Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMIN_ASIMDSAME_ONLY: - case ENC_FMIN_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMIN_F32; // FMIN Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMINQ_F32; // FMIN Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMINQ_F64; // FMIN Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMIN_F16; // FMIN Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMINQ_F16; // FMIN Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLAL2_ASIMDELEM_LH: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLAL_LANE_HIGH_F16; // FMLAL2 Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLALQ_LANE_HIGH_F16; // FMLAL2 Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLAL_LANEQ_HIGH_F16; // FMLAL2 Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLALQ_LANEQ_HIGH_F16; // FMLAL2 Vd.4S,Vn.4H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLAL2_ASIMDSAME_F: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLAL_HIGH_F16; // FMLAL2 Vd.2S,Vn.2H,Vm.2H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLALQ_HIGH_F16; // FMLAL2 Vd.4S,Vn.4H,Vm.4H - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLAL_ASIMDELEM_LH: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLAL_LANE_LOW_F16; // FMLAL Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLAL_LANEQ_LOW_F16; // FMLAL Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLALQ_LANE_LOW_F16; // FMLAL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLALQ_LANEQ_LOW_F16; // FMLAL Vd.4S,Vn.4H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLAL_ASIMDSAME_F: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLAL_LOW_F16; // FMLAL Vd.2S,Vn.2H,Vm.2H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLALQ_LOW_F16; // FMLAL Vd.4S,Vn.4H,Vm.4H - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLA_ASIMDELEM_RH_H: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x4_t vfma_laneq_f16(float16x4_t a, float16x4_t b, float16x8_t v, const int lane) - // argprep: a -> Vd.4H; b -> Vn.4H; v -> Vm.8H; lane -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VFMA_LANEQ_F16; // FMLA Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x8_t vfmaq_laneq_f16(float16x8_t a, float16x8_t b, float16x8_t v, const int lane) - // argprep: a -> Vd.8H; b -> Vn.8H; v -> Vm.8H; lane -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VFMAQ_LANEQ_F16; // FMLA Vd.8H,Vn.8H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLA_ASIMDELEM_R_SD: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].laneUsed) - // float32x2_t vfma_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v, const int lane) - // argprep: a -> Vd.2S; b -> Vn.2S; v -> Vm.2S; lane -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VFMA_LANE_F32; // FMLA Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].laneUsed) - // float32x2_t vfma_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v, const int lane) - // argprep: a -> Vd.2S; b -> Vn.2S; v -> Vm.4S; lane -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VFMA_LANEQ_F32; // FMLA Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].laneUsed) - // float16x4_t vfma_n_f16(float16x4_t a, float16x4_t b, float16_t n) - // argprep: a -> Vd.4H; b -> Vn.4H; n -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VFMA_N_F16; // FMLA Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].laneUsed) - // float32x2_t vfma_n_f32(float32x2_t a, float32x2_t b, float32_t n) - // argprep: a -> Vd.2S; b -> Vn.2S; n -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VFMA_N_F32; // FMLA Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].laneUsed) - // float32x4_t vfmaq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v, const int lane) - // argprep: a -> Vd.4S; b -> Vn.4S; v -> Vm.2S; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VFMAQ_LANE_F32; // FMLA Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64x2_t vfmaq_lane_f64(float64x2_t a, float64x2_t b, float64x1_t v, const int lane) - // argprep: a -> Vd.2D; b -> Vn.2D; v -> Vm.1D; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VFMAQ_LANE_F64; // FMLA Vd.2D,Vn.2D,Vm.D[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].laneUsed) - // float32x4_t vfmaq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v, const int lane) - // argprep: a -> Vd.4S; b -> Vn.4S; v -> Vm.4S; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VFMAQ_LANEQ_F32; // FMLA Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].laneUsed) - // float64x2_t vfmaq_laneq_f64(float64x2_t a, float64x2_t b, float64x2_t v, const int lane) - // argprep: a -> Vd.2D; b -> Vn.2D; v -> Vm.2D; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VFMAQ_LANEQ_F64; // FMLA Vd.2D,Vn.2D,Vm.D[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].laneUsed) - // float32x4_t vfmaq_n_f32(float32x4_t a, float32x4_t b, float32_t n) - // argprep: a -> Vd.4S; b -> Vn.4S; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VFMAQ_N_F32; // FMLA Vd.4S,Vn.4S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].laneUsed) - // float64x2_t vfmaq_n_f64(float64x2_t a, float64x2_t b, float64_t n) - // argprep: a -> Vd.2D; b -> Vn.2D; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VFMAQ_N_F64; // FMLA Vd.2D,Vn.2D,Vm.D[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLA_ASIMDSAMEFP16_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // float16x4_t vfma_f16(float16x4_t a, float16x4_t b, float16x4_t c) - // argprep: a -> Vd.4H; b -> Vn.4H; c -> Vm.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VFMA_F16; // FMLA Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // float16x8_t vfmaq_f16(float16x8_t a, float16x8_t b, float16x8_t c) - // argprep: a -> Vd.8H; b -> Vn.8H; c -> Vm.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VFMAQ_F16; // FMLA Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x8_t vfmaq_n_f16(float16x8_t a, float16x8_t b, float16_t n) - // argprep: a -> Vd.8H; b -> Vn.8H; n -> Vm.H[0] - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VFMAQ_N_F16; // FMLA Vd.8H,Vn.8H,Vm.H[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLA_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // float32x2_t vfma_f32(float32x2_t a, float32x2_t b, float32x2_t c) - // argprep: a -> Vd.2S; b -> Vn.2S; c -> Vm.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VFMA_F32; // FMLA Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // float32x4_t vfmaq_f32(float32x4_t a, float32x4_t b, float32x4_t c) - // argprep: a -> Vd.4S; b -> Vn.4S; c -> Vm.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VFMAQ_F32; // FMLA Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // float64x2_t vfmaq_f64(float64x2_t a, float64x2_t b, float64x2_t c) - // argprep: a -> Vd.2D; b -> Vn.2D; c -> Vm.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VFMAQ_F64; // FMLA Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLA_ASISDELEM_RH_H: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16_t vfmah_laneq_f16(float16_t a, float16_t b, float16x8_t v, const int lane) - // argprep: a -> Hd; b -> Hn; v -> Vm.8H; lane -> - // results: Hd -> result - intrin_id = ARM64_INTRIN_VFMAH_LANEQ_F16; // FMLA Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLA_ASISDELEM_R_SD: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64_t vfmad_laneq_f64(float64_t a, float64_t b, float64x2_t v, const int lane) - // argprep: a -> Dd; b -> Dn; v -> Vm.2D; lane -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VFMAD_LANEQ_F64; // FMLA Dd,Dn,Vm.D[lane] - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32_t vfmas_laneq_f32(float32_t a, float32_t b, float32x4_t v, const int lane) - // argprep: a -> Sd; b -> Sn; v -> Vm.4S; lane -> - // results: Sd -> result - intrin_id = ARM64_INTRIN_VFMAS_LANEQ_F32; // FMLA Sd,Sn,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLSL2_ASIMDELEM_LH: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLSL_LANE_HIGH_F16; // FMLSL2 Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLSLQ_LANE_HIGH_F16; // FMLSL2 Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLSL_LANEQ_HIGH_F16; // FMLSL2 Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLSLQ_LANEQ_HIGH_F16; // FMLSL2 Vd.4S,Vn.4H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLSL2_ASIMDSAME_F: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLSL_HIGH_F16; // FMLSL2 Vd.2S,Vn.2H,Vm.2H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLSLQ_HIGH_F16; // FMLSL2 Vd.4S,Vn.4H,Vm.4H - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLSL_ASIMDELEM_LH: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLSL_LANE_LOW_F16; // FMLSL Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLSL_LANEQ_LOW_F16; // FMLSL Vd.2S,Vn.2H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLSLQ_LANE_LOW_F16; // FMLSL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLSLQ_LANEQ_LOW_F16; // FMLSL Vd.4S,Vn.4H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLSL_ASIMDSAME_F: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VFMLSL_LOW_F16; // FMLSL Vd.2S,Vn.2H,Vm.2H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VFMLSLQ_LOW_F16; // FMLSL Vd.4S,Vn.4H,Vm.4H - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLS_ASIMDELEM_RH_H: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x4_t vfms_laneq_f16(float16x4_t a, float16x4_t b, float16x8_t v, const int lane) - // argprep: a -> Vd.4H; b -> Vn.4H; v -> Vm.8H; lane -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VFMS_LANEQ_F16; // FMLS Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x8_t vfmsq_laneq_f16(float16x8_t a, float16x8_t b, float16x8_t v, const int lane) - // argprep: a -> Vd.8H; b -> Vn.8H; v -> Vm.8H; lane -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VFMSQ_LANEQ_F16; // FMLS Vd.8H,Vn.8H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLS_ASIMDELEM_R_SD: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32x2_t vfms_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v, const int lane) - // argprep: a -> Vd.2S; b -> Vn.2S; v -> Vm.4S; lane -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VFMS_LANEQ_F32; // FMLS Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32x4_t vfmsq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v, const int lane) - // argprep: a -> Vd.4S; b -> Vn.4S; v -> Vm.4S; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VFMSQ_LANEQ_F32; // FMLS Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64x2_t vfmsq_laneq_f64(float64x2_t a, float64x2_t b, float64x2_t v, const int lane) - // argprep: a -> Vd.2D; b -> Vn.2D; v -> Vm.2D; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VFMSQ_LANEQ_F64; // FMLS Vd.2D,Vn.2D,Vm.D[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLS_ASIMDSAMEFP16_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // float16x4_t vfms_f16(float16x4_t a, float16x4_t b, float16x4_t c) - // argprep: a -> Vd.4H; b -> Vn.4H; c -> Vm.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VFMS_F16; // FMLS Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].laneUsed) - // float16x4_t vfms_n_f16(float16x4_t a, float16x4_t b, float16_t n) - // argprep: a -> Vd.4H; b -> Vn.4H; n -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VFMS_N_F16; // FMLS Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // float16x8_t vfmsq_f16(float16x8_t a, float16x8_t b, float16x8_t c) - // argprep: a -> Vd.8H; b -> Vn.8H; c -> Vm.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VFMSQ_F16; // FMLS Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].laneUsed) - // float16x8_t vfmsq_n_f16(float16x8_t a, float16x8_t b, float16_t n) - // argprep: a -> Vd.8H; b -> Vn.8H; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VFMSQ_N_F16; // FMLS Vd.8H,Vn.8H,Vm.H[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLS_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // float32x2_t vfms_f32(float32x2_t a, float32x2_t b, float32x2_t c) - // argprep: a -> Vd.2S; b -> Vn.2S; c -> Vm.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VFMS_F32; // FMLS Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].laneUsed) - // float32x2_t vfms_n_f32(float32x2_t a, float32x2_t b, float32_t n) - // argprep: a -> Vd.2S; b -> Vn.2S; n -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VFMS_N_F32; // FMLS Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // float32x4_t vfmsq_f32(float32x4_t a, float32x4_t b, float32x4_t c) - // argprep: a -> Vd.4S; b -> Vn.4S; c -> Vm.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VFMSQ_F32; // FMLS Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // float64x2_t vfmsq_f64(float64x2_t a, float64x2_t b, float64x2_t c) - // argprep: a -> Vd.2D; b -> Vn.2D; c -> Vm.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VFMSQ_F64; // FMLS Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].laneUsed) - // float32x4_t vfmsq_n_f32(float32x4_t a, float32x4_t b, float32_t n) - // argprep: a -> Vd.4S; b -> Vn.4S; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VFMSQ_N_F32; // FMLS Vd.4S,Vn.4S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].laneUsed) - // float64x2_t vfmsq_n_f64(float64x2_t a, float64x2_t b, float64_t n) - // argprep: a -> Vd.2D; b -> Vn.2D; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VFMSQ_N_F64; // FMLS Vd.2D,Vn.2D,Vm.D[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLS_ASISDELEM_RH_H: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16_t vfmsh_laneq_f16(float16_t a, float16_t b, float16x8_t v, const int lane) - // argprep: a -> Hd; b -> Hn; v -> Vm.8H; lane -> - // results: Hd -> result - intrin_id = ARM64_INTRIN_VFMSH_LANEQ_F16; // FMLS Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMLS_ASISDELEM_R_SD: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64_t vfmsd_laneq_f64(float64_t a, float64_t b, float64x2_t v, const int lane) - // argprep: a -> Dd; b -> Dn; v -> Vm.2D; lane -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VFMSD_LANEQ_F64; // FMLS Dd,Dn,Vm.D[lane] - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32_t vfmss_laneq_f32(float32_t a, float32_t b, float32x4_t v, const int lane) - // argprep: a -> Sd; b -> Sn; v -> Vm.4S; lane -> - // results: Sd -> result - intrin_id = ARM64_INTRIN_VFMSS_LANEQ_F32; // FMLS Sd,Sn,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMSUB_D_FLOATDP3: - intrin_id = ARM64_INTRIN_VFMS_F64; // FMSUB Dd,Dn,Dm,Da - add_input_reg(inputs, il, instr.operands[3]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMSUB_S_FLOATDP3: - intrin_id = ARM64_INTRIN_VFMS_F64; // FMSUB Sd,Sn,Sm,Sa - add_input_reg(inputs, il, instr.operands[3]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMSUB_H_FLOATDP3: - intrin_id = ARM64_INTRIN_VFMSH_F16; // FMSUB Hd,Hn,Hm,Ha - add_input_reg(inputs, il, instr.operands[3]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASIMDELEM_RH_H: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x4_t vmulx_laneq_f16(float16x4_t a, float16x8_t v, const int lane) - // argprep: a -> Vn.4H; v -> Vm.8H; lane -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VMULX_LANEQ_F16; // FMULX Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x8_t vmulxq_laneq_f16(float16x8_t a, float16x8_t v, const int lane) - // argprep: a -> Vn.8H; v -> Vm.8H; lane -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULXQ_LANEQ_F16; // FMULX Vd.8H,Vn.8H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASIMDELEM_R_SD: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32x2_t vmulx_laneq_f32(float32x2_t a, float32x4_t v, const int lane) - // argprep: a -> Vn.2S; v -> Vm.4S; lane -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VMULX_LANEQ_F32; // FMULX Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32x4_t vmulxq_laneq_f32(float32x4_t a, float32x4_t v, const int lane) - // argprep: a -> Vn.4S; v -> Vm.4S; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULXQ_LANEQ_F32; // FMULX Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64x2_t vmulxq_laneq_f64(float64x2_t a, float64x2_t v, const int lane) - // argprep: a -> Vn.2D; v -> Vm.2D; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULXQ_LANEQ_F64; // FMULX Vd.2D,Vn.2D,Vm.D[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASIMDSAMEFP16_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // float16x4_t vmulx_f16(float16x4_t a, float16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VMULX_F16; // FMULX Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x4_t vmulx_n_f16(float16x4_t a, float16_t n) - // argprep: a -> Vn.4H; n -> Vm.H[0] - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VMULX_N_F16; // FMULX Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // float16x8_t vmulxq_f16(float16x8_t a, float16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULXQ_F16; // FMULX Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16x8_t vmulxq_n_f16(float16x8_t a, float16_t n) - // argprep: a -> Vn.8H; n -> Vm.H[0] - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULXQ_N_F16; // FMULX Vd.8H,Vn.8H,Vm.H[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // float32x2_t vmulx_f32(float32x2_t a, float32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VMULX_F32; // FMULX Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // float32x4_t vmulxq_f32(float32x4_t a, float32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULXQ_F32; // FMULX Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // float64x2_t vmulxq_f64(float64x2_t a, float64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULXQ_F64; // FMULX Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASISDELEM_RH_H: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // float16_t vmulxh_laneq_f16(float16_t a, float16x8_t v, const int lane) - // argprep: a -> Hn; v -> Vm.8H; lane -> - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMULXH_LANEQ_F16; // FMULX Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASISDELEM_R_SD: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64_t vmulxd_laneq_f64(float64_t a, float64x2_t v, const int lane) - // argprep: a -> Dn; v -> Vm.2D; lane -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMULXD_LANEQ_F64; // FMULX Dd,Dn,Vm.D[lane] - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32_t vmulxs_laneq_f32(float32_t a, float32x4_t v, const int lane) - // argprep: a -> Sn; v -> Vm.4S; lane -> - // results: Sd -> result - intrin_id = ARM64_INTRIN_VMULXS_LANEQ_F32; // FMULX Sd,Sn,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASISDSAMEFP16_ONLY: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].reg[0] >= REG_H0 && instr.operands[2].reg[0] <= REG_H31)) - // float16_t vmulxh_f16(float16_t a, float16_t b) - // argprep: a -> Hn; b -> Hm - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMULXH_F16; // FMULX Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMULX_ASISDSAME_ONLY: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].reg[0] >= REG_D0 && instr.operands[2].reg[0] <= REG_D31)) - // float64_t vmulxd_f64(float64_t a, float64_t b) - // argprep: a -> Dn; b -> Dm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMULXD_F64; // FMULX Dd,Dn,Dm - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].reg[0] >= REG_S0 && instr.operands[2].reg[0] <= REG_S31)) - // float32_t vmulxs_f32(float32_t a, float32_t b) - // argprep: a -> Sn; b -> Sm - // results: Sd -> result - intrin_id = ARM64_INTRIN_VMULXS_F32; // FMULX Sd,Sn,Sm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_D_FLOATDP2: - intrin_id = ARM64_INTRIN_VMUL_F64; // FMUL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_H_FLOATDP2: - intrin_id = ARM64_INTRIN_VMULH_F16; // FMUL Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_ASIMDELEM_RH_H: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES && instr.operands[2].laneUsed) - // float16x4_t vmul_lane_f16(float16x4_t a, float16x4_t v, const int lane) - // argprep: a -> Vn.4H; v -> Vm.4H; lane -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VMUL_LANE_F16; // FMUL Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES && instr.operands[2].laneUsed) - // float16x4_t vmul_laneq_f16(float16x4_t a, float16x8_t v, const int lane) - // argprep: a -> Vn.4H; v -> Vm.8H; lane -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VMUL_LANEQ_F16; // FMUL Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES && instr.operands[2].laneUsed) - // float16x8_t vmulq_lane_f16(float16x8_t a, float16x4_t v, const int lane) - // argprep: a -> Vn.8H; v -> Vm.4H; lane -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULQ_LANE_F16; // FMUL Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES && instr.operands[2].laneUsed) - // float16x8_t vmulq_laneq_f16(float16x8_t a, float16x8_t v, const int lane) - // argprep: a -> Vn.8H; v -> Vm.8H; lane -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULQ_LANEQ_F16; // FMUL Vd.8H,Vn.8H,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_ASIMDELEM_R_SD: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].laneUsed) - // float32x2_t vmul_lane_f32(float32x2_t a, float32x2_t v, const int lane) - // argprep: a -> Vn.2S; v -> Vm.2S; lane -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VMUL_LANE_F32; // FMUL Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].laneUsed) - // float32x2_t vmul_laneq_f32(float32x2_t a, float32x4_t v, const int lane) - // argprep: a -> Vn.2S; v -> Vm.4S; lane -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VMUL_LANEQ_F32; // FMUL Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].laneUsed) - // float32x4_t vmulq_lane_f32(float32x4_t a, float32x2_t v, const int lane) - // argprep: a -> Vn.4S; v -> Vm.2S; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULQ_LANE_F32; // FMUL Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64x2_t vmulq_lane_f64(float64x2_t a, float64x1_t v, const int lane) - // argprep: a -> Vn.2D; v -> Vm.1D; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULQ_LANE_F64; // FMUL Vd.2D,Vn.2D,Vm.D[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].laneUsed) - // float32x4_t vmulq_laneq_f32(float32x4_t a, float32x4_t v, const int lane) - // argprep: a -> Vn.4S; v -> Vm.4S; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULQ_LANEQ_F32; // FMUL Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].laneUsed) - // float64x2_t vmulq_laneq_f64(float64x2_t a, float64x2_t v, const int lane) - // argprep: a -> Vn.2D; v -> Vm.2D; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULQ_LANEQ_F64; // FMUL Vd.2D,Vn.2D,Vm.D[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_ASIMDSAMEFP16_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // float16x4_t vmul_f16(float16x4_t a, float16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VMUL_F16; // FMUL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].laneUsed) - // float16x4_t vmul_n_f16(float16x4_t a, float16_t n) - // argprep: a -> Vn.4H; n -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VMUL_N_F16; // FMUL Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // float16x8_t vmulq_f16(float16x8_t a, float16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULQ_F16; // FMUL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].laneUsed) - // float16x8_t vmulq_n_f16(float16x8_t a, float16_t n) - // argprep: a -> Vn.8H; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULQ_N_F16; // FMUL Vd.8H,Vn.8H,Vm.H[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // float32x2_t vmul_f32(float32x2_t a, float32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VMUL_F32; // FMUL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32x2_t vmul_n_f32(float32x2_t a, float32_t b) - // argprep: a -> Vn.2S; b -> Vm.S[0] - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VMUL_N_F32; // FMUL Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // float32x4_t vmulq_f32(float32x4_t a, float32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULQ_F32; // FMUL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // float64x2_t vmulq_f64(float64x2_t a, float64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULQ_F64; // FMUL Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // float32x4_t vmulq_n_f32(float32x4_t a, float32_t b) - // argprep: a -> Vn.4S; b -> Vm.S[0] - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULQ_N_F32; // FMUL Vd.4S,Vn.4S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64x2_t vmulq_n_f64(float64x2_t a, float64_t b) - // argprep: a -> Vn.2D; b -> Vm.D[0] - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULQ_N_F64; // FMUL Vd.2D,Vn.2D,Vm.D[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_ASISDELEM_RH_H: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64_t vmuld_lane_f64(float64_t a, float64x1_t v, const int lane) - // argprep: a -> Dn; v -> Vm.1D; lane -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMULD_LANE_F64; // FMUL Dd,Dn,Vm.S[lane] - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && instr.operands[2].arrSpec == ARRSPEC_4HALVES && instr.operands[2].laneUsed) - // float16_t vmulh_lane_f16(float16_t a, float16x4_t v, const int lane) - // argprep: a -> Hn; v -> Vm.4H; lane -> - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMULH_LANE_F16; // FMUL Hd,Hn,Vm.H[lane] - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && instr.operands[2].arrSpec == ARRSPEC_8HALVES && instr.operands[2].laneUsed) - // float16_t vmulh_laneq_f16(float16_t a, float16x8_t v, const int lane) - // argprep: a -> Hn; v -> Vm.8H; lane -> - // results: Hd -> result - intrin_id = ARM64_INTRIN_VMULH_LANEQ_F16; // FMUL Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FMUL_ASISDELEM_R_SD: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64x1_t vmul_lane_f64(float64x1_t a, float64x1_t v, const int lane) - // argprep: a -> Dn; v -> Vm.1D; lane -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMUL_LANE_F64; // FMUL Dd,Dn,Vm.D[lane] - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].laneUsed) - // float64_t vmuld_laneq_f64(float64_t a, float64x2_t v, const int lane) - // argprep: a -> Dn; v -> Vm.2D; lane -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMULD_LANEQ_F64; // FMUL Dd,Dn,Vm.D[lane] - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].laneUsed) - // float64x1_t vmul_n_f64(float64x1_t a, float64_t b) - // argprep: a -> Dn; b -> Vm.D[0] - // results: Dd -> result - intrin_id = ARM64_INTRIN_VMUL_N_F64; // FMUL Dd,Dn,Vm.D[0] - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && instr.operands[2].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].laneUsed) - // float32_t vmuls_lane_f32(float32_t a, float32x2_t v, const int lane) - // argprep: a -> Sn; v -> Vm.2S; lane -> - // results: Sd -> result - intrin_id = ARM64_INTRIN_VMULS_LANE_F32; // FMUL Sd,Sn,Vm.S[lane] - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && instr.operands[2].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].laneUsed) - // float32_t vmuls_laneq_f32(float32_t a, float32x4_t v, const int lane) - // argprep: a -> Sn; v -> Vm.4S; lane -> - // results: Sd -> result - intrin_id = ARM64_INTRIN_VMULS_LANEQ_F32; // FMUL Sd,Sn,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FNEG_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VNEG_F64; // FNEG Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FNEG_S_FLOATDP1: - intrin_id = ARM64_INTRIN_VNEG_F64; // FNEG Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FNEG_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VNEGH_F16; // FNEG Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FNEG_ASIMDMISC_R: - case ENC_FNEG_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VNEG_F32; // FNEG Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VNEGQ_F32; // FNEG Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VNEGQ_F64; // FNEG Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VNEG_F16; // FNEG Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VNEGQ_F16; // FNEG Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRECPE_ASIMDMISC_R: - case ENC_FRECPE_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRECPE_F32; // FRECPE Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRECPEQ_F32; // FRECPE Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRECPEQ_F64; // FRECPE Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRECPE_F16; // FRECPE Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRECPEQ_F16; // FRECPE Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRECPE_ASISDMISCFP16_R: - intrin_id = ARM64_INTRIN_VRECPE_F64; // FRECPE Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRECPS_ASIMDSAME_ONLY: - case ENC_FRECPS_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRECPS_F32; // FRECPS Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRECPSQ_F32; // FRECPS Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRECPSQ_F64; // FRECPS Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRECPS_F16; // FRECPS Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRECPSQ_F16; // FRECPS Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRECPS_ASISDSAMEFP16_ONLY: - intrin_id = ARM64_INTRIN_VRECPS_F64; // FRECPS Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRECPX_ASISDMISCFP16_R: - intrin_id = ARM64_INTRIN_VRECPXS_F32; // FRECPX Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT32X_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRND32X_F64; // FRINT32X Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT32X_S_FLOATDP1: - // float32x1_t vrnd32x_f64(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRND32X_F64; // FRINT32X Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT32X_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRND32X_F32; // FRINT32X Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRND32XQ_F32; // FRINT32X Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRND32XQ_F64; // FRINT32X Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT32Z_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRND32Z_F64; // FRINT32Z Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT32Z_S_FLOATDP1: - // float32x1_t vrnd32z_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRND32Z_F32; // FRINT32Z Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT32Z_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRND32Z_F32; // FRINT32Z Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRND32ZQ_F32; // FRINT32Z Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRND32ZQ_F64; // FRINT32Z Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT64X_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRND64X_F64; // FRINT64X Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT64X_S_FLOATDP1: - // float32x1_t vrnd64x_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRND64X_F32; // FRINT64X Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT64X_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRND64X_F32; // FRINT64X Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRND64XQ_F32; // FRINT64X Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRND64XQ_F64; // FRINT64X Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT64Z_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRND64Z_F64; // FRINT64Z Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT64Z_S_FLOATDP1: - // float64x1_t vrnd64z_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRND64Z_F32; // FRINT64Z Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINT64Z_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRND64Z_F32; // FRINT64Z Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRND64ZQ_F32; // FRINT64Z Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRND64ZQ_F64; // FRINT64Z Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTA_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDA_F64; // FRINTA Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTA_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDAH_F16; // FRINTA Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTA_S_FLOATDP1: - // float32x1_t vrnda_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRNDA_F32; // FRINTA Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTA_ASIMDMISC_R: - case ENC_FRINTA_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRNDA_F32; // FRINTA Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRNDAQ_F32; // FRINTA Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRNDAQ_F64; // FRINTA Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRNDA_F16; // FRINTA Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRNDAQ_F16; // FRINTA Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTI_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDI_F64; // FRINTI Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTI_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDIH_F16; // FRINTI Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTI_S_FLOATDP1: - // float32x1_t vrndi_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRNDI_F32; // FRINTI Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTI_ASIMDMISC_R: - case ENC_FRINTI_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRNDI_F32; // FRINTI Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRNDIQ_F32; // FRINTI Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRNDIQ_F64; // FRINTI Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRNDI_F16; // FRINTI Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRNDIQ_F16; // FRINTI Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTM_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDM_F64; // FRINTM Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTM_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDMH_F16; // FRINTM Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTM_S_FLOATDP1: - // float32x1_t vrndm_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRNDM_F32; // FRINTM Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTM_ASIMDMISC_R: - case ENC_FRINTM_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRNDM_F32; // FRINTM Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRNDMQ_F32; // FRINTM Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRNDMQ_F64; // FRINTM Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRNDM_F16; // FRINTM Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRNDMQ_F16; // FRINTM Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTN_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDN_F64; // FRINTN Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTN_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDNH_F16; // FRINTN Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTN_S_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDNS_F32; // FRINTN Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTN_ASIMDMISC_R: - case ENC_FRINTN_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRNDN_F32; // FRINTN Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRNDNQ_F32; // FRINTN Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRNDNQ_F64; // FRINTN Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRNDN_F16; // FRINTN Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRNDNQ_F16; // FRINTN Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTP_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDP_F64; // FRINTP Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTP_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDPH_F16; // FRINTP Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTP_S_FLOATDP1: - // float32x1_t vrndp_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRNDP_F32; // FRINTP Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTP_ASIMDMISC_R: - case ENC_FRINTP_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRNDP_F32; // FRINTP Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRNDPQ_F32; // FRINTP Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRNDPQ_F64; // FRINTP Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRNDP_F16; // FRINTP Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRNDPQ_F16; // FRINTP Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTX_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDX_F64; // FRINTX Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTX_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDXH_F16; // FRINTX Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTX_S_FLOATDP1: - // float32x1_t vrndx_f32(float32x1_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRNDX_F32; // FRINTX Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTX_ASIMDMISC_R: - case ENC_FRINTX_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRNDX_F32; // FRINTX Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRNDXQ_F32; // FRINTX Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRNDXQ_F64; // FRINTX Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRNDX_F16; // FRINTX Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRNDXQ_F16; // FRINTX Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTZ_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VRND_F64; // FRINTZ Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTZ_S_FLOATDP1: - intrin_id = ARM64_INTRIN_VRND_F64; // FRINTZ Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTZ_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VRNDH_F16; // FRINTZ Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRINTZ_ASIMDMISC_R: - case ENC_FRINTZ_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRND_F32; // FRINTZ Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRNDQ_F32; // FRINTZ Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRNDQ_F64; // FRINTZ Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRND_F16; // FRINTZ Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRNDQ_F16; // FRINTZ Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRSQRTE_ASIMDMISC_R: - case ENC_FRSQRTE_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRSQRTE_F32; // FRSQRTE Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRSQRTEQ_F32; // FRSQRTE Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRSQRTEQ_F64; // FRSQRTE Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRSQRTE_F16; // FRSQRTE Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRSQRTEQ_F16; // FRSQRTE Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRSQRTE_ASISDMISCFP16_R: - intrin_id = ARM64_INTRIN_VRSQRTE_F64; // FRSQRTE Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRSQRTE_ASISDMISC_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31)) - // float64_t vrsqrted_f64(float64_t a) - // argprep: a -> Dn - // results: Dd -> result - intrin_id = ARM64_INTRIN_VRSQRTED_F64; // FRSQRTE Dd,Dn - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31)) - // float32_t vrsqrtes_f32(float32_t a) - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VRSQRTES_F32; // FRSQRTE Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRSQRTS_ASIMDSAME_ONLY: - case ENC_FRSQRTS_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRSQRTS_F32; // FRSQRTS Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRSQRTSQ_F32; // FRSQRTS Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRSQRTSQ_F64; // FRSQRTS Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRSQRTS_F16; // FRSQRTS Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRSQRTSQ_F16; // FRSQRTS Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRSQRTS_ASISDSAMEFP16_ONLY: - intrin_id = ARM64_INTRIN_VRSQRTSH_F16; // FRSQRTS Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FRSQRTS_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VRSQRTS_F64; // FRSQRTS Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FSQRT_D_FLOATDP1: - intrin_id = ARM64_INTRIN_VSQRT_F64; // FSQRT Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FSQRT_S_FLOATDP1: - intrin_id = ARM64_INTRIN_VSQRT_F32; // FSQRT Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FSQRT_H_FLOATDP1: - intrin_id = ARM64_INTRIN_VSQRTH_F16; // FSQRT Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FSQRT_ASIMDMISC_R: - case ENC_FSQRT_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSQRT_F32; // FSQRT Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSQRTQ_F32; // FSQRT Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSQRTQ_F64; // FSQRT Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSQRT_F16; // FSQRT Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSQRTQ_F16; // FSQRT Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FSUB_D_FLOATDP2: - intrin_id = ARM64_INTRIN_VSUB_F64; // FSUB Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FSUB_H_FLOATDP2: - intrin_id = ARM64_INTRIN_VSUBH_F16; // FSUB Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FSUB_ASIMDSAME_ONLY: - case ENC_FSUB_ASIMDSAMEFP16_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSUB_F32; // FSUB Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUBQ_F32; // FSUB Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSUBQ_F64; // FSUB Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSUB_F16; // FSUB Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSUBQ_F16; // FSUB Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_INS_ASIMDINS_IR_R: - case ENC_MOV_INS_ASIMDINS_IR_R: - if (instr.operands[0].arrSpec == ARRSPEC_1DOUBLE && (instr.operands[1].reg[0] >= REG_X0 && instr.operands[1].reg[0] <= REG_SP) && instr.operands[0].laneUsed) - // uint8x8_t vcreate_u8(uint64_t a) - // argprep: a -> Xn - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VCREATE_U8; // INS Vd.D[0],Xn - else if (instr.operands[0].arrSpec == ARRSPEC_1DOUBLE && instr.operands[0].laneUsed) - // uint64x1_t vdup_n_u64(uint64_t value) - // argprep: value -> Xn - // results: Vd.1D -> result - intrin_id = ARM64_INTRIN_VDUP_N_U64; // INS Vd.D[0],rn - else if (instr.operands[0].arrSpec == ARRSPEC_1HALF && instr.operands[1].arrSpec == ARRSPEC_1HALF && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // bfloat16x8_t vsetq_lane_bf16(bfloat16_t a, bfloat16x8_t v, const int lane) - // argprep: a -> Vn.H; v -> Vd.8H; lane -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSETQ_LANE_BF16; // INS Vd.H[lane],Vn.H[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[0]); - add_input_lane(inputs, il, instr.operands[0]); - add_input_lane(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_INS_ASIMDINS_IV_V: - case ENC_MOV_INS_ASIMDINS_IV_V: - if (instr.operands[0].arrSpec == ARRSPEC_1DOUBLE && instr.operands[2].arrSpec == ARRSPEC_1DOUBLE && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // uint8x16_t vcombine_u8(uint8x8_t low, uint8x8_t high) - // argprep: low -> Vn.8B; high -> Vm.8B - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VCOMBINE_U8; // INS Vd.D[1],Vm.D[0] - else if (instr.operands[0].arrSpec == ARRSPEC_1HALF && instr.operands[1].arrSpec == ARRSPEC_1HALF && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // uint16x8_t vcopyq_laneq_u16(uint16x8_t a, const int lane1, uint16x8_t b, const int lane2) - // argprep: a -> Vd.8H; lane1 -> ; b -> Vn.8H; lane2 -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VCOPYQ_LANEQ_U16; // INS Vd.H[lane1],Vn.H[lane2] - else if (instr.operands[0].arrSpec == ARRSPEC_1SINGLE && instr.operands[1].arrSpec == ARRSPEC_1SINGLE && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // uint32x4_t vcopyq_laneq_u32(uint32x4_t a, const int lane1, uint32x4_t b, const int lane2) - // argprep: a -> Vd.4S; lane1 -> ; b -> Vn.4S; lane2 -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VCOPYQ_LANEQ_U32; // INS Vd.S[lane1],Vn.S[lane2] - else if (instr.operands[0].arrSpec == ARRSPEC_1BYTE && instr.operands[1].arrSpec == ARRSPEC_1BYTE && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // uint8x16_t vcopyq_laneq_u8(uint8x16_t a, const int lane1, uint8x16_t b, const int lane2) - // argprep: a -> Vd.16B; lane1 -> ; b -> Vn.16B; lane2 -> - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VCOPYQ_LANEQ_U8; // INS Vd.B[lane1],Vn.B[lane2] - else if (instr.operands[0].arrSpec == ARRSPEC_1DOUBLE && instr.operands[1].arrSpec == ARRSPEC_1DOUBLE && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // uint64x2_t vcopyq_laneq_u64(uint64x2_t a, const int lane1, uint64x2_t b, const int lane2) - // argprep: a -> Vd.2D; lane1 -> ; b -> Vn.2D; lane2 -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VCOPYQ_LANEQ_U64; // INS Vd.D[lane1],Vn.D[lane2] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_lane(inputs, il, instr.operands[0]); - add_input_lane(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_LD2_ASISDLSE_R2: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VLD2Q_S8; - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VLD2_S8; - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VLD2_S16; - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VLD2Q_S16; - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VLD2_S32; - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VLD2Q_S32; - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VLD2Q_S64; - else - break; // Should be unreachable. - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_MLA_ASIMDELEM_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_LANE_S16; // MLA Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_LANE_S16; // MLA Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_LANE_S32; // MLA Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_LANE_S32; // MLA Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_LANE_U16; // MLA Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_LANE_U16; // MLA Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_LANE_U32; // MLA Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_LANE_U32; // MLA Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_LANEQ_S16; // MLA Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_LANEQ_S16; // MLA Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_LANEQ_S32; // MLA Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_LANEQ_S32; // MLA Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_LANEQ_U16; // MLA Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_LANEQ_U16; // MLA Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_LANEQ_U32; // MLA Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_LANEQ_U32; // MLA Vd.4S,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_MLA_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMLA_S8; // MLA Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMLAQ_S8; // MLA Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_S16; // MLA Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_S16; // MLA Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_S32; // MLA Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_S32; // MLA Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMLA_U8; // MLA Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMLAQ_U8; // MLA Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_U16; // MLA Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_U16; // MLA Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_U32; // MLA Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_U32; // MLA Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_N_S16; // MLA Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_N_S16; // MLA Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_N_S32; // MLA Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_N_S32; // MLA Vd.4S,Vn.4S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLA_N_U16; // MLA Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAQ_N_U16; // MLA Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLA_N_U32; // MLA Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAQ_N_U32; // MLA Vd.4S,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_MLS_ASIMDELEM_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_LANE_S16; // MLS Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_LANE_S16; // MLS Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_LANE_S32; // MLS Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_LANE_S32; // MLS Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_LANE_U16; // MLS Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_LANE_U16; // MLS Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_LANE_U32; // MLS Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_LANE_U32; // MLS Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_LANEQ_S16; // MLS Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_LANEQ_S16; // MLS Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_LANEQ_S32; // MLS Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_LANEQ_S32; // MLS Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_LANEQ_U16; // MLS Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_LANEQ_U16; // MLS Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_LANEQ_U32; // MLS Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_LANEQ_U32; // MLS Vd.4S,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_MLS_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMLS_S8; // MLS Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMLSQ_S8; // MLS Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_S16; // MLS Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_S16; // MLS Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_S32; // MLS Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_S32; // MLS Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMLS_U8; // MLS Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMLSQ_U8; // MLS Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_U16; // MLS Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_U16; // MLS Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_U32; // MLS Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_U32; // MLS Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_N_S16; // MLS Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_N_S16; // MLS Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_N_S32; // MLS Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_N_S32; // MLS Vd.4S,Vn.4S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMLS_N_U16; // MLS Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSQ_N_U16; // MLS Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMLS_N_U32; // MLS Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSQ_N_U32; // MLS Vd.4S,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - // case ENC_MOV_ORR_ASIMDSAME_ONLY: - // if (instr.operands[1].arrSpec == ARRSPEC_1HALF) - // intrin_id = ARM64_INTRIN_VSET_LANE_F16; // MOV Vd.H[lane],Vn.H[0] - // if (instr.operands[1].arrSpec == ARRSPEC_1HALF) - // intrin_id = ARM64_INTRIN_VSETQ_LANE_F16; // MOV Vd.H[lane],Vn.H[0] - // add_input_reg(inputs, il, instr.operands[1]); - // add_input_reg(inputs, il, instr.operands[0]); - // add_input_lane(inputs, il, instr.operands[0]); - // add_output_reg(outputs, il, instr.operands[0]); - // break; - case ENC_MOV_ORR_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_1HALF && instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // float16x4_t vset_lane_f16(float16_t a, float16x4_t v, const int lane) - // argprep: a -> Vn.H; v -> Vd.4H; lane -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VSET_LANE_F16; // MOV Vd.H[lane],Vn.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_1HALF && instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[0].laneUsed && instr.operands[1].laneUsed) - // float16x8_t vsetq_lane_f16(float16_t a, float16x8_t v, const int lane) - // argprep: a -> Vn.H; v -> Vd.8H; lane -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSETQ_LANE_F16; // MOV Vd.H[lane],Vn.H[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[0]); - add_input_lane(inputs, il, instr.operands[0]); - add_input_lane(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_MUL_ASIMDELEM_R: - if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_LANE_S16; // MUL Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_LANE_S16; // MUL Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_LANE_S32; // MUL Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_LANE_S32; // MUL Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_LANE_U16; // MUL Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_LANE_U16; // MUL Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_LANE_U32; // MUL Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_LANE_U32; // MUL Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_LANEQ_S16; // MUL Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_LANEQ_S16; // MUL Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_LANEQ_S32; // MUL Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_LANEQ_S32; // MUL Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_LANEQ_U16; // MUL Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_LANEQ_U16; // MUL Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_LANEQ_U32; // MUL Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_LANEQ_U32; // MUL Vd.4S,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_MUL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMUL_S8; // MUL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMULQ_S8; // MUL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_S16; // MUL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_S16; // MUL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_S32; // MUL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_S32; // MUL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMUL_U8; // MUL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMULQ_U8; // MUL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_U16; // MUL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_U16; // MUL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_U32; // MUL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_U32; // MUL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_N_S16; // MUL Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_N_S16; // MUL Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_N_S32; // MUL Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_N_S32; // MUL Vd.4S,Vn.4S,Vm.S[0] - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMUL_N_U16; // MUL Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULQ_N_U16; // MUL Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMUL_N_U32; // MUL Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULQ_N_U32; // MUL Vd.4S,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_MVN_NOT_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMVN_S8; // MVN Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMVNQ_S8; // MVN Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMVN_S16; // MVN Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMVNQ_S16; // MVN Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMVN_S32; // MVN Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMVNQ_S32; // MVN Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMVN_U8; // MVN Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMVNQ_U8; // MVN Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMVN_U16; // MVN Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMVNQ_U16; // MVN Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMVN_U32; // MVN Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMVNQ_U32; // MVN Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMVN_P8; // MVN Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMVNQ_P8; // MVN Vd.16B,Vn.16B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_NEG_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VNEG_S8; // NEG Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VNEGQ_S8; // NEG Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VNEG_S16; // NEG Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VNEGQ_S16; // NEG Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VNEG_S32; // NEG Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VNEGQ_S32; // NEG Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VNEGQ_S64; // NEG Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_NEG_ASISDMISC_R: - intrin_id = ARM64_INTRIN_VNEG_S64; // NEG Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_ORN_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_S8; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_S8; // ORN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_S16; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_S16; // ORN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_S32; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_S32; // ORN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_S64; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_S64; // ORN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_U8; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_U8; // ORN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_U16; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_U16; // ORN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_U32; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_U32; // ORN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORN_U64; // ORN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORNQ_U64; // ORN Vd.16B,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_ORR_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_S8; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_S8; // ORR Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_S16; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_S16; // ORR Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_S32; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_S32; // ORR Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_S64; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_S64; // ORR Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_U8; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_U8; // ORR Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_U16; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_U16; // ORR Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_U32; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_U32; // ORR Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VORR_U64; // ORR Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VORRQ_U64; // ORR Vd.16B,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_PMULL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMULL_P8; // PMULL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMULL_HIGH_P8; // PMULL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_FULL && instr.operands[1].arrSpec == ARRSPEC_1DOUBLE) - intrin_id = ARM64_INTRIN_VMULL_P64; // PMULL Vd.1Q,Vn.1D,Vm.1D - else if (instr.operands[0].arrSpec == ARRSPEC_FULL && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMULL_HIGH_P64; // PMULL2 Vd.1Q,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_PMUL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMUL_P8; // PMUL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMULQ_P8; // PMUL Vd.16B,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_RADDHN_ASIMDDIFF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint8x16_t vraddhn_high_u16(uint8x8_t r, uint16x8_t a, uint16x8_t b) - // argprep: r -> Vd.8B; a -> Vn.8H; b -> Vm.8H - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VRADDHN_HIGH_U16; // RADDHN2 Vd.16B,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint16x8_t vraddhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b) - // argprep: r -> Vd.4H; a -> Vn.4S; b -> Vm.4S - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VRADDHN_HIGH_U32; // RADDHN2 Vd.8H,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // uint32x4_t vraddhn_high_u64(uint32x2_t r, uint64x2_t a, uint64x2_t b) - // argprep: r -> Vd.2S; a -> Vn.2D; b -> Vm.2D - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VRADDHN_HIGH_U64; // RADDHN2 Vd.4S,Vn.2D,Vm.2D - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint8x8_t vraddhn_u16(uint16x8_t a, uint16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VRADDHN_U16; // RADDHN Vd.8B,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint16x4_t vraddhn_u32(uint32x4_t a, uint32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VRADDHN_U32; // RADDHN Vd.4H,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // uint32x2_t vraddhn_u64(uint64x2_t a, uint64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VRADDHN_U64; // RADDHN Vd.2S,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_RAX1_VVV2_CRYPTOSHA512_3: - intrin_id = ARM64_INTRIN_VRAX1Q_U64; // RAX1 Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_RBIT_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRBIT_S8; // RBIT Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VRBITQ_S8; // RBIT Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRBIT_U8; // RBIT Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VRBITQ_U8; // RBIT Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRBIT_P8; // RBIT Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VRBITQ_P8; // RBIT Vd.16B,Vn.16B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_REV16_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV16_S8; // REV16 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV16Q_S8; // REV16 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV16_U8; // REV16 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV16Q_U8; // REV16 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV16_P8; // REV16 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV16Q_P8; // REV16 Vd.16B,Vn.16B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_REV32_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV32_S8; // REV32 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV32Q_S8; // REV32 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VREV32_S16; // REV32 Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VREV32Q_S16; // REV32 Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV32_U8; // REV32 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV32Q_U8; // REV32 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VREV32_U16; // REV32 Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VREV32Q_U16; // REV32 Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV32_P8; // REV32 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV32Q_P8; // REV32 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VREV32_P16; // REV32 Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VREV32Q_P16; // REV32 Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_REV64_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV64_S8; // REV64 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV64Q_S8; // REV64 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VREV64_S16; // REV64 Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VREV64Q_S16; // REV64 Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VREV64_S32; // REV64 Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VREV64Q_S32; // REV64 Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV64_U8; // REV64 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV64Q_U8; // REV64 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VREV64_U16; // REV64 Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VREV64Q_U16; // REV64 Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VREV64_U32; // REV64 Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VREV64Q_U32; // REV64 Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VREV64_F32; // REV64 Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VREV64Q_F32; // REV64 Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VREV64_P8; // REV64 Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VREV64Q_P8; // REV64 Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VREV64_P16; // REV64 Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VREV64Q_P16; // REV64 Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VREV64_F16; // REV64 Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VREV64Q_F16; // REV64 Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_RSHRN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vrshrn_high_n_u16(uint8x8_t r, uint16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VRSHRN_HIGH_N_U16; // RSHRN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vrshrn_high_n_u32(uint16x4_t r, uint32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VRSHRN_HIGH_N_U32; // RSHRN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vrshrn_high_n_u64(uint32x2_t r, uint64x2_t a, const int n) - // argprep: r -> Vd.4S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VRSHRN_HIGH_N_U64; // RSHRN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vrshrn_n_u16(uint16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VRSHRN_N_U16; // RSHRN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vrshrn_n_u32(uint32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VRSHRN_N_U32; // RSHRN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vrshrn_n_u64(uint64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VRSHRN_N_U64; // RSHRN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_RSUBHN_ASIMDDIFF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint8x16_t vrsubhn_high_u16(uint8x8_t r, uint16x8_t a, uint16x8_t b) - // argprep: r -> Vd.8B; a -> Vn.8H; b -> Vm.8H - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VRSUBHN_HIGH_U16; // RSUBHN2 Vd.16B,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint16x8_t vrsubhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b) - // argprep: r -> Vd.4H; a -> Vn.4S; b -> Vm.4S - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VRSUBHN_HIGH_U32; // RSUBHN2 Vd.8H,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // uint32x4_t vrsubhn_high_u64(uint32x2_t r, uint64x2_t a, uint64x2_t b) - // argprep: r -> Vd.2S; a -> Vn.2D; b -> Vm.2D - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VRSUBHN_HIGH_U64; // RSUBHN2 Vd.4S,Vn.2D,Vm.2D - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint8x8_t vrsubhn_u16(uint16x8_t a, uint16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VRSUBHN_U16; // RSUBHN Vd.8B,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint16x4_t vrsubhn_u32(uint32x4_t a, uint32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VRSUBHN_U32; // RSUBHN Vd.4H,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // uint32x2_t vrsubhn_u64(uint64x2_t a, uint64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VRSUBHN_U64; // RSUBHN Vd.2S,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SABAL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABAL_S8; // SABAL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABAL_S16; // SABAL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VABAL_S32; // SABAL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABAL_HIGH_S8; // SABAL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABAL_HIGH_S16; // SABAL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VABAL_HIGH_S32; // SABAL2 Vd.2D,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SABA_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VABA_S8; // SABA Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VABAQ_S8; // SABA Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VABA_S16; // SABA Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABAQ_S16; // SABA Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VABA_S32; // SABA Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABAQ_S32; // SABA Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SABDL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // int32x4_t vabdl_high_s16(int16x8_t a, int16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VABDL_HIGH_S16; // SABDL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // int64x2_t vabdl_high_s32(int32x4_t a, int32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VABDL_HIGH_S32; // SABDL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // int16x8_t vabdl_high_s8(int8x16_t a, int8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VABDL_HIGH_S8; // SABDL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // int32x4_t vabdl_s16(int16x4_t a, int16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VABDL_S16; // SABDL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // int64x2_t vabdl_s32(int32x2_t a, int32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VABDL_S32; // SABDL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // int16x8_t vabdl_s8(int8x8_t a, int8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VABDL_S8; // SABDL Vd.8H,Vn.8B,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SABD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VABD_S8; // SABD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VABDQ_S8; // SABD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VABD_S16; // SABD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABDQ_S16; // SABD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VABD_S32; // SABD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABDQ_S32; // SABD Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SADALP_ASIMDMISC_P: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPADAL_S8; // SADALP Vd.4H,Vn.8B - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPADALQ_S8; // SADALP Vd.8H,Vn.16B - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPADAL_S16; // SADALP Vd.2S,Vn.4H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPADALQ_S16; // SADALP Vd.4S,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_1DOUBLE) - intrin_id = ARM64_INTRIN_VPADAL_S32; // SADALP Vd.1D,Vn.2S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VPADALQ_S32; // SADALP Vd.2D,Vn.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SADDLP_ASIMDMISC_P: - if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPADDL_S8; // SADDLP Vd.4H,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPADDLQ_S8; // SADDLP Vd.8H,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPADDL_S16; // SADDLP Vd.2S,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPADDLQ_S16; // SADDLP Vd.4S,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_1DOUBLE) - intrin_id = ARM64_INTRIN_VPADDL_S32; // SADDLP Vd.1D,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VPADDLQ_S32; // SADDLP Vd.2D,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_1DOUBLE) - intrin_id = ARM64_INTRIN_VADDLV_S32; // SADDLP Vd.1D,Vn.2S - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SADDLV_ASIMDALL_ONLY: - intrin_id = ARM64_INTRIN_VADDLV_S8; // SADDLV Hd,Vn.8B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SADDL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // int32x4_t vaddl_high_s16(int16x8_t a, int16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VADDL_HIGH_S16; // SADDL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // int64x2_t vaddl_high_s32(int32x4_t a, int32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VADDL_HIGH_S32; // SADDL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // int16x8_t vaddl_high_s8(int8x16_t a, int8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VADDL_HIGH_S8; // SADDL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // int32x4_t vaddl_s16(int16x4_t a, int16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VADDL_S16; // SADDL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // int64x2_t vaddl_s32(int32x2_t a, int32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VADDL_S32; // SADDL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // int16x8_t vaddl_s8(int8x8_t a, int8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VADDL_S8; // SADDL Vd.8H,Vn.8B,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SADDW_ASIMDDIFF_W: - if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VADDW_S8; // SADDW Vd.8H,Vn.8H,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VADDW_S16; // SADDW Vd.4S,Vn.4S,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VADDW_S32; // SADDW Vd.2D,Vn.2D,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VADDW_HIGH_S8; // SADDW2 Vd.8H,Vn.8H,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VADDW_HIGH_S16; // SADDW2 Vd.4S,Vn.4S,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VADDW_HIGH_S32; // SADDW2 Vd.2D,Vn.2D,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_ASIMDMISCFP16_R: - // float16x8_t vcvtq_f16_s16(int16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VCVTQ_F16_S16; // SCVTF Vd.8H,Vn.8H - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_ASIMDMISC_R: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // float32x2_t vcvt_f32_s32(int32x2_t a) - // argprep: a -> Vn.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VCVT_F32_S32; // SCVTF Vd.2S,Vn.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // float32x4_t vcvtq_f32_s32(int32x4_t a) - // argprep: a -> Vn.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VCVTQ_F32_S32; // SCVTF Vd.4S,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // float64x2_t vcvtq_f64_s64(int64x2_t a) - // argprep: a -> Vn.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VCVTQ_F64_S64; // SCVTF Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_ASIMDSHF_C: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // float16x4_t vcvt_f16_s16(int16x4_t a) - // argprep: a -> Vn.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VCVT_F16_S16; // SCVTF Vd.4H,Vn.4H,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float16x4_t vcvt_n_f16_s16(int16x4_t a, const int n) - // argprep: a -> Vn.4H; n -> - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VCVT_N_F16_S16; // SCVTF Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float32x2_t vcvt_n_f32_s32(int32x2_t a, const int n) - // argprep: a -> Vn.2S; n -> - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VCVT_N_F32_S32; // SCVTF Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // float16x8_t vcvtq_f16_s16(int16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VCVTQ_F16_S16; // SCVTF Vd.8H,Vn.8H,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float16x8_t vcvtq_n_f16_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VCVTQ_N_F16_S16; // SCVTF Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float32x4_t vcvtq_n_f32_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VCVTQ_N_F32_S32; // SCVTF Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float64x2_t vcvtq_n_f64_s64(int64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VCVTQ_N_F64_S64; // SCVTF Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_ASISDMISCFP16_R: - if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31)) - // float16_t vcvth_f16_s16(int16_t a) - // argprep: a -> Hn - // results: Hd -> result - intrin_id = ARM64_INTRIN_VCVTH_F16_S16; // SCVTF Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_ASISDSHF_C: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float64x1_t vcvt_n_f64_s64(int64x1_t a, const int n) - // argprep: a -> Dn; n -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VCVT_N_F64_S64; // SCVTF Dd,Dn,#n - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float16_t vcvth_n_f16_s16(int16_t a, const int n) - // argprep: a -> Hn; n -> - // results: Hd -> result - intrin_id = ARM64_INTRIN_VCVTH_N_F16_S16; // SCVTF Hd,Hn,#n - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // float32_t vcvts_n_f32_s32(int32_t a, const int n) - // argprep: a -> Sn; n -> - // results: Sd -> result - intrin_id = ARM64_INTRIN_VCVTS_N_F32_S32; // SCVTF Sd,Sn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_D32_FLOAT2INT: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31)) - // float64x1_t vcvt_f64_s64(int64x1_t a) - // argprep: a -> Dn - // results: Dd -> result - intrin_id = ARM64_INTRIN_VCVT_F64_S64; // SCVTF Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SCVTF_S32_FLOAT2INT: - // float32_t vcvts_f32_s32(int32_t a) - // asig: SCVTF Sd,Sn - // argprep: a -> Sn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VCVTS_F32_S32; // SCVTF Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SDOT_ASIMDELEM_D: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VDOT_LANE_S32; // SDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VDOTQ_LANEQ_S32; // SDOT Vd.4S,Vn.16B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VDOT_LANEQ_S32; // SDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VDOTQ_LANE_S32; // SDOT Vd.4S,Vn.16B,Vm.4B[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SDOT_ASIMDSAME2_D: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VDOT_S32; // SDOT Vd.2S,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VDOTQ_S32; // SDOT Vd.4S,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA1C_QSV_CRYPTOSHA3: - intrin_id = ARM64_INTRIN_VSHA1CQ_U32; // SHA1C Qd,Sn,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA1H_SS_CRYPTOSHA2: - intrin_id = ARM64_INTRIN_VSHA1H_U32; // SHA1H Sd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA1M_QSV_CRYPTOSHA3: - intrin_id = ARM64_INTRIN_VSHA1MQ_U32; // SHA1M Qd,Sn,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA1P_QSV_CRYPTOSHA3: - intrin_id = ARM64_INTRIN_VSHA1PQ_U32; // SHA1P Qd,Sn,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA1SU0_VVV_CRYPTOSHA3: - intrin_id = ARM64_INTRIN_VSHA1SU0Q_U32; // SHA1SU0 Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA1SU1_VV_CRYPTOSHA2: - intrin_id = ARM64_INTRIN_VSHA1SU1Q_U32; // SHA1SU1 Vd.4S,Vn.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA256H2_QQV_CRYPTOSHA3: - intrin_id = ARM64_INTRIN_VSHA256H2Q_U32; // SHA256H2 Qd,Qn,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA256H_QQV_CRYPTOSHA3: - intrin_id = ARM64_INTRIN_VSHA256HQ_U32; // SHA256H Qd,Qn,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA256SU0_VV_CRYPTOSHA2: - intrin_id = ARM64_INTRIN_VSHA256SU0Q_U32; // SHA256SU0 Vd.4S,Vn.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA256SU1_VVV_CRYPTOSHA3: - intrin_id = ARM64_INTRIN_VSHA256SU1Q_U32; // SHA256SU1 Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA512H2_QQV_CRYPTOSHA512_3: - intrin_id = ARM64_INTRIN_VSHA512H2Q_U64; // SHA512H2 Qd,Qn,Vm.2D - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA512H_QQV_CRYPTOSHA512_3: - intrin_id = ARM64_INTRIN_VSHA512HQ_U64; // SHA512H Qd,Qn,Vm.2D - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA512SU0_VV2_CRYPTOSHA512_2: - intrin_id = ARM64_INTRIN_VSHA512SU0Q_U64; // SHA512SU0 Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHA512SU1_VVV2_CRYPTOSHA512_3: - intrin_id = ARM64_INTRIN_VSHA512SU1Q_U64; // SHA512SU1 Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHADD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VHADD_S8; // SHADD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VHADDQ_S8; // SHADD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VHADD_S16; // SHADD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VHADDQ_S16; // SHADD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VHADD_S32; // SHADD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VHADDQ_S32; // SHADD Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHLL_ASIMDMISC_S: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 16)) - // float32x4_t vcvt_f32_bf16(bfloat16x4_t a) - // immediate: #16 - // argprep: a -> Vn.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VCVT_F32_BF16; // SHLL Vd.4S,Vn.8H,#16 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 16)) - // float32x4_t vcvtq_high_f32_bf16(bfloat16x8_t a) - // immediate: #16 - // argprep: a -> Vn.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VCVTQ_HIGH_F32_BF16; // SHLL2 Vd.4S,Vn.8H,#16 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 16)) - // float32x4_t vcvtq_low_f32_bf16(bfloat16x8_t a) - // immediate: #16 - // argprep: a -> Vn.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VCVTQ_LOW_F32_BF16; // SHLL Vd.4S,Vn.8H,#16 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // int32x4_t vshll_high_n_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_S16; // SHLL2 Vd.4S,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // int64x2_t vshll_high_n_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_S32; // SHLL2 Vd.2D,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES) - // int16x8_t vshll_high_n_s8(int8x16_t a, const int n) - // argprep: a -> Vn.16B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_S8; // SHLL2 Vd.8H,Vn.16B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vshll_high_n_u16(uint16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_U16; // SHLL2 Vd.4S,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vshll_high_n_u32(uint32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_U32; // SHLL2 Vd.2D,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vshll_high_n_u8(uint8x16_t a, const int n) - // argprep: a -> Vn.16B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_U8; // SHLL2 Vd.8H,Vn.16B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // int32x4_t vshll_n_s16(int16x4_t a, const int n) - // argprep: a -> Vn.4H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_N_S16; // SHLL Vd.4S,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // int64x2_t vshll_n_s32(int32x2_t a, const int n) - // argprep: a -> Vn.2S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_N_S32; // SHLL Vd.2D,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES) - // int16x8_t vshll_n_s8(int8x8_t a, const int n) - // argprep: a -> Vn.8B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_N_S8; // SHLL Vd.8H,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // uint32x4_t vshll_n_u16(uint16x4_t a, const int n) - // argprep: a -> Vn.4H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_N_U16; // SHLL Vd.4S,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // uint64x2_t vshll_n_u32(uint32x2_t a, const int n) - // argprep: a -> Vn.2S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_N_U32; // SHLL Vd.2D,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES) - // uint16x8_t vshll_n_u8(uint8x8_t a, const int n) - // argprep: a -> Vn.8B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_N_U8; // SHLL Vd.8H,Vn.8B,#n - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHL_ASIMDSHF_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSHL_N_S8; // SHL Vd.8B,Vn.8B,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSHL_N_S16; // SHL Vd.4H,Vn.4H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSHLQ_N_S16; // SHL Vd.8H,Vn.8H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSHL_N_S32; // SHL Vd.2S,Vn.2S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSHLQ_N_S32; // SHL Vd.4S,Vn.4S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSHLQ_N_S64; // SHL Vd.2D,Vn.2D,#n - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSHL_N_U8; // SHL Vd.8B,Vn.8B,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSHL_N_U16; // SHL Vd.4H,Vn.4H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSHLQ_N_U16; // SHL Vd.8H,Vn.8H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSHL_N_U32; // SHL Vd.2S,Vn.2S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSHLQ_N_U32; // SHL Vd.4S,Vn.4S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSHLQ_N_U64; // SHL Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHL_ASISDSHF_R: - if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VSHLQ_N_S8; // SHL Vd.16B,Vn.16B,#n - // if(None) intrin_id = ARM64_INTRIN_VSHL_N_S64; // SHL Dd,Dn,#n - if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VSHLQ_N_U8; // SHL Vd.16B,Vn.16B,#n - // if(None) intrin_id = ARM64_INTRIN_VSHL_N_U64; // SHL Dd,Dn,#n - // if(None) intrin_id = ARM64_INTRIN_VSHLD_N_S64; // SHL Dd,Dn,#n - // if(None) intrin_id = ARM64_INTRIN_VSHLD_N_U64; // SHL Dd,Dn,#n - // if(None) intrin_id = ARM64_INTRIN_VCVTAH_F32_BF16; // SHL Dd,Dn,#16 - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHRN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vshrn_high_n_u16(uint8x8_t r, uint16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSHRN_HIGH_N_U16; // SHRN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vshrn_high_n_u32(uint16x4_t r, uint32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHRN_HIGH_N_U32; // SHRN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vshrn_high_n_u64(uint32x2_t r, uint64x2_t a, const int n) - // argprep: r -> Vd.2S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHRN_HIGH_N_U64; // SHRN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vshrn_n_u16(uint16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VSHRN_N_U16; // SHRN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vshrn_n_u32(uint32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VSHRN_N_U32; // SHRN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vshrn_n_u64(uint64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VSHRN_N_U64; // SHRN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SHSUB_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VHSUB_S8; // SHSUB Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VHSUBQ_S8; // SHSUB Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VHSUB_S16; // SHSUB Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VHSUBQ_S16; // SHSUB Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VHSUB_S32; // SHSUB Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VHSUBQ_S32; // SHSUB Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SLI_ASISDSHF_R: - case ENC_SLI_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vsli_n_u16(uint16x4_t a, uint16x4_t b, const int n) - // argprep: a -> Vd.4H; b -> Vn.4H; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VSLI_N_U16; // SLI Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vsli_n_u8(uint8x8_t a, uint8x8_t b, const int n) - // argprep: a -> Vd.8B; b -> Vn.8B; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VSLI_N_U8; // SLI Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vsli_n_u32(uint32x2_t a, uint32x2_t b, const int n) - // argprep: a -> Vd.2S; b -> Vn.2S; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VSLI_N_U32; // SLI Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vsliq_n_u16(uint16x8_t a, uint16x8_t b, const int n) - // argprep: a -> Vd.8H; b -> Vn.8H; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSLIQ_N_U16; // SLI Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64x2_t vsliq_n_u64(uint64x2_t a, uint64x2_t b, const int n) - // argprep: a -> Vd.2D; b -> Vn.2D; n -> n - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSLIQ_N_U64; // SLI Vd.2D,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vsliq_n_u32(uint32x4_t a, uint32x4_t b, const int n) - // argprep: a -> Vd.4S; b -> Vn.4S; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSLIQ_N_U32; // SLI Vd.4S,Vn.4S,#n - // add_input_reg(inputs, il, instr.operands[0]); - // add_input_reg(inputs, il, instr.operands[1]); - // add_input_imm(inputs, il, instr.operands[2]); - // add_output_reg(outputs, il, instr.operands[0]); - // break; - // case ENC_SLI_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64_t vslid_n_u64(uint64_t a, uint64_t b, const int n) - // argprep: a -> Dd; b -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSLID_N_U64; // SLI Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vsliq_n_u8(uint8x16_t a, uint8x16_t b, const int n) - // argprep: a -> Vd.16B; b -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSLIQ_N_U8; // SLI Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM3PARTW1_VVV4_CRYPTOSHA512_3: - intrin_id = ARM64_INTRIN_VSM3PARTW1Q_U32; // SM3PARTW1 Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM3PARTW2_VVV4_CRYPTOSHA512_3: - intrin_id = ARM64_INTRIN_VSM3PARTW2Q_U32; // SM3PARTW2 Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM3SS1_VVV4_CRYPTO4: - intrin_id = ARM64_INTRIN_VSM3SS1Q_U32; // SM3SS1 Vd.4S,Vn.4S,Vm.4S,Va.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_reg(inputs, il, instr.operands[3]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM3TT1A_VVV4_CRYPTO3_IMM2: - intrin_id = ARM64_INTRIN_VSM3TT1AQ_U32; // SM3TT1A Vd.4S,Vn.4S,Vm.4S[imm2] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM3TT1B_VVV4_CRYPTO3_IMM2: - intrin_id = ARM64_INTRIN_VSM3TT1BQ_U32; // SM3TT1B Vd.4S,Vn.4S,Vm.4S[imm2] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM3TT2A_VVV4_CRYPTO3_IMM2: - intrin_id = ARM64_INTRIN_VSM3TT2AQ_U32; // SM3TT2A Vd.4S,Vn.4S,Vm.4S[imm2] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM3TT2B_VVV_CRYPTO3_IMM2: - intrin_id = ARM64_INTRIN_VSM3TT2BQ_U32; // SM3TT2B Vd.4S,Vn.4S,Vm.4S[imm2] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM4EKEY_VVV4_CRYPTOSHA512_3: - intrin_id = ARM64_INTRIN_VSM4EKEYQ_U32; // SM4EKEY Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SM4E_VV4_CRYPTOSHA512_2: - intrin_id = ARM64_INTRIN_VSM4EQ_U32; // SM4E Vd.4S,Vn.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMAXP_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VPMAX_S8; // SMAXP Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPMAX_S16; // SMAXP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPMAX_S32; // SMAXP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VPMAXQ_S8; // SMAXP Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPMAXQ_S16; // SMAXP Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPMAXQ_S32; // SMAXP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMAXV_S32; // SMAXP Vd.2S,Vn.2S,Vm.2S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMAXV_ASIMDALL_ONLY: - intrin_id = ARM64_INTRIN_VMAXV_S8; // SMAXV Bd,Vn.8B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMAX_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMAX_S8; // SMAX Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMAXQ_S8; // SMAX Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMAX_S16; // SMAX Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMAXQ_S16; // SMAX Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMAX_S32; // SMAX Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMAXQ_S32; // SMAX Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMINP_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VPMIN_S8; // SMINP Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPMIN_S16; // SMINP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPMIN_S32; // SMINP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VPMINQ_S8; // SMINP Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPMINQ_S16; // SMINP Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPMINQ_S32; // SMINP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMINV_S32; // SMINP Vd.2S,Vn.2S,Vm.2S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMINV_ASIMDALL_ONLY: - intrin_id = ARM64_INTRIN_VMINV_S8; // SMINV Bd,Vn.8B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMIN_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMIN_S8; // SMIN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMINQ_S8; // SMIN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMIN_S16; // SMIN Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMINQ_S16; // SMIN Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMIN_S32; // SMIN Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMINQ_S32; // SMIN Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMLAL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAL_S8; // SMLAL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_S16; // SMLAL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_S32; // SMLAL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_S8; // SMLAL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_S16; // SMLAL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_S32; // SMLAL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_N_S16; // SMLAL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_N_S32; // SMLAL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_N_S16; // SMLAL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_N_S32; // SMLAL2 Vd.2D,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMLAL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_LANE_S16; // SMLAL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_LANE_S32; // SMLAL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANE_S16; // SMLAL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANE_S32; // SMLAL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_LANEQ_S16; // SMLAL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_LANEQ_S32; // SMLAL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANEQ_S16; // SMLAL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANEQ_S32; // SMLAL2 Vd.2D,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMLSL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSL_S8; // SMLSL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_S16; // SMLSL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_S32; // SMLSL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_S8; // SMLSL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_S16; // SMLSL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_S32; // SMLSL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_N_S16; // SMLSL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_N_S32; // SMLSL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_N_S16; // SMLSL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_N_S32; // SMLSL2 Vd.2D,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMLSL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_LANE_S16; // SMLSL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_LANE_S32; // SMLSL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANE_S16; // SMLSL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANE_S32; // SMLSL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_LANEQ_S16; // SMLSL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_LANEQ_S32; // SMLSL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANEQ_S16; // SMLSL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANEQ_S32; // SMLSL2 Vd.2D,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMMLA_ASIMDSAME2_G: - intrin_id = ARM64_INTRIN_VMMLAQ_S32; // SMMLA Vd.4S,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMOV_ASIMDINS_W_W: - intrin_id = ARM64_INTRIN_VGET_LANE_S8; // SMOV Rd,Vn.B[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_lane(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMULL_ASIMDDIFF_L: - if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULL_S8; // SMULL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULL_S16; // SMULL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMULL_S32; // SMULL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMULL_HIGH_S8; // SMULL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULL_HIGH_S16; // SMULL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMULL_HIGH_S32; // SMULL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULL_N_S16; // SMULL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMULL_N_S32; // SMULL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMULL_HIGH_N_S16; // SMULL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMULL_HIGH_N_S32; // SMULL2 Vd.2D,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SMULL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // int32x4_t vmull_high_laneq_s16(int16x8_t a, int16x8_t v, const int lane) - // argprep: a -> Vn.8H; v -> Vm.8H; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_LANEQ_S16; // SMULL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // int64x2_t vmull_high_laneq_s32(int32x4_t a, int32x4_t v, const int lane) - // argprep: a -> Vn.4S; v -> Vm.4S; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_LANEQ_S32; // SMULL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // int32x4_t vmull_laneq_s16(int16x4_t a, int16x8_t v, const int lane) - // argprep: a -> Vn.4H; v -> Vm.8H; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_LANEQ_S16; // SMULL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // int64x2_t vmull_laneq_s32(int32x2_t a, int32x4_t v, const int lane) - // argprep: a -> Vn.2S; v -> Vm.4S; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_LANEQ_S32; // SMULL Vd.2D,Vn.2S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQABS_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQABS_S8; // SQABS Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQABSQ_S8; // SQABS Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQABS_S16; // SQABS Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQABSQ_S16; // SQABS Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQABS_S32; // SQABS Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQABSQ_S32; // SQABS Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQABSQ_S64; // SQABS Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQABS_ASISDMISC_R: - intrin_id = ARM64_INTRIN_VQABS_S64; // SQABS Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQADD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQADD_S8; // SQADD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQADDQ_S8; // SQADD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQADD_S16; // SQADD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQADDQ_S16; // SQADD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQADD_S32; // SQADD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQADDQ_S32; // SQADD Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQADDQ_S64; // SQADD Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQADD_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQADD_S64; // SQADD Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLAL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_S16; // SQDMLAL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_S32; // SQDMLAL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_S16; // SQDMLAL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_S32; // SQDMLAL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_N_S16; // SQDMLAL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_N_S32; // SQDMLAL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_N_S16; // SQDMLAL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_N_S32; // SQDMLAL2 Vd.2D,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLAL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_LANE_S16; // SQDMLAL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_LANE_S32; // SQDMLAL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_LANE_S16; // SQDMLAL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_LANE_S32; // SQDMLAL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_LANEQ_S16; // SQDMLAL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_LANEQ_S32; // SQDMLAL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_LANEQ_S16; // SQDMLAL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLAL_HIGH_LANEQ_S32; // SQDMLAL2 Vd.2D,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLAL_ASISDDIFF_ONLY: - intrin_id = ARM64_INTRIN_VQDMLALH_S16; // SQDMLAL Sd,Hn,Hm - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLAL_ASISDELEM_L: - intrin_id = ARM64_INTRIN_VQDMLALH_LANE_S16; // SQDMLAL Sd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLSL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_S16; // SQDMLSL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_S32; // SQDMLSL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_S16; // SQDMLSL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_S32; // SQDMLSL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_N_S16; // SQDMLSL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_N_S32; // SQDMLSL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_N_S16; // SQDMLSL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_N_S32; // SQDMLSL2 Vd.2D,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLSL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_LANE_S16; // SQDMLSL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_LANE_S32; // SQDMLSL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_LANE_S16; // SQDMLSL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_LANE_S32; // SQDMLSL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_LANEQ_S16; // SQDMLSL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_LANEQ_S32; // SQDMLSL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_LANEQ_S16; // SQDMLSL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQDMLSL_HIGH_LANEQ_S32; // SQDMLSL2 Vd.2D,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLSL_ASISDDIFF_ONLY: - intrin_id = ARM64_INTRIN_VQDMLSLH_S16; // SQDMLSL Sd,Hn,Hm - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMLSL_ASISDELEM_L: - intrin_id = ARM64_INTRIN_VQDMLSLH_LANE_S16; // SQDMLSL Sd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULH_ASIMDELEM_R: - if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQDMULH_LANE_S16; // SQDMULH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQDMULHQ_LANE_S16; // SQDMULH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQDMULH_LANE_S32; // SQDMULH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMULHQ_LANE_S32; // SQDMULH Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQDMULH_LANEQ_S16; // SQDMULH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQDMULHQ_LANEQ_S16; // SQDMULH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQDMULH_LANEQ_S32; // SQDMULH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMULHQ_LANEQ_S32; // SQDMULH Vd.4S,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULH_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQDMULH_S16; // SQDMULH Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQDMULHQ_S16; // SQDMULH Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQDMULH_S32; // SQDMULH Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMULHQ_S32; // SQDMULH Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQDMULH_N_S16; // SQDMULH Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQDMULHQ_N_S16; // SQDMULH Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQDMULH_N_S32; // SQDMULH Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQDMULHQ_N_S32; // SQDMULH Vd.4S,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULH_ASISDELEM_R: - intrin_id = ARM64_INTRIN_VQDMULHH_LANE_S16; // SQDMULH Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULH_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQDMULHH_S16; // SQDMULH Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // int32x4_t vqdmull_high_n_s16(int16x8_t a, int16_t b) - // argprep: a -> Vn.8H; b -> Vm.H[0] - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQDMULL_HIGH_N_S16; // SQDMULL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // int64x2_t vqdmull_high_n_s32(int32x4_t a, int32_t b) - // argprep: a -> Vn.4S; b -> Vm.S[0] - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VQDMULL_HIGH_N_S32; // SQDMULL2 Vd.2D,Vn.4S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // int32x4_t vqdmull_high_s16(int16x8_t a, int16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQDMULL_HIGH_S16; // SQDMULL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // int64x2_t vqdmull_high_s32(int32x4_t a, int32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VQDMULL_HIGH_S32; // SQDMULL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // int32x4_t vqdmull_n_s16(int16x4_t a, int16_t b) - // argprep: a -> Vn.4H; b -> Vm.H[0] - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQDMULL_N_S16; // SQDMULL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // int64x2_t vqdmull_n_s32(int32x2_t a, int32_t b) - // argprep: a -> Vn.2S; b -> Vm.S[0] - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VQDMULL_N_S32; // SQDMULL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // int32x4_t vqdmull_s16(int16x4_t a, int16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQDMULL_S16; // SQDMULL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // int64x2_t vqdmull_s32(int32x2_t a, int32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VQDMULL_S32; // SQDMULL Vd.2D,Vn.2S,Vm.2S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // int32x4_t vqdmull_high_laneq_s16(int16x8_t a, int16x8_t v, const int lane) - // argprep: a -> Vn.8H; v -> Vm.8H; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQDMULL_HIGH_LANEQ_S16; // SQDMULL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // int64x2_t vqdmull_high_laneq_s32(int32x4_t a, int32x4_t v, const int lane) - // argprep: a -> Vn.4S; v -> Vm.4S; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VQDMULL_HIGH_LANEQ_S32; // SQDMULL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // int32x4_t vqdmull_laneq_s16(int16x4_t a, int16x8_t v, const int lane) - // argprep: a -> Vn.4H; v -> Vm.8H; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQDMULL_LANEQ_S16; // SQDMULL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // int64x2_t vqdmull_laneq_s32(int32x2_t a, int32x4_t v, const int lane) - // argprep: a -> Vn.2S; v -> Vm.4S; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VQDMULL_LANEQ_S32; // SQDMULL Vd.2D,Vn.2S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULL_ASISDDIFF_ONLY: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].reg[0] >= REG_H0 && instr.operands[2].reg[0] <= REG_H31)) - // int32_t vqdmullh_s16(int16_t a, int16_t b) - // argprep: a -> Hn; b -> Hm - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQDMULLH_S16; // SQDMULL Sd,Hn,Hm - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].reg[0] >= REG_S0 && instr.operands[2].reg[0] <= REG_S31)) - // int64_t vqdmulls_s32(int32_t a, int32_t b) - // argprep: a -> Sn; b -> Sm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VQDMULLS_S32; // SQDMULL Dd,Sn,Sm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQDMULL_ASISDELEM_L: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // int32_t vqdmullh_laneq_s16(int16_t a, int16x8_t v, const int lane) - // argprep: a -> Hn; v -> Vm.8H; lane -> - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQDMULLH_LANEQ_S16; // SQDMULL Sd,Hn,Vm.H[lane] - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // int64_t vqdmulls_laneq_s32(int32_t a, int32x4_t v, const int lane) - // argprep: a -> Sn; v -> Vm.4S; lane -> - // results: Dd -> result - intrin_id = ARM64_INTRIN_VQDMULLS_LANEQ_S32; // SQDMULL Dd,Sn,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQNEG_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQNEG_S8; // SQNEG Vd.8B,Vn.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQNEGQ_S8; // SQNEG Vd.16B,Vn.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQNEG_S16; // SQNEG Vd.4H,Vn.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQNEGQ_S16; // SQNEG Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQNEG_S32; // SQNEG Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQNEGQ_S32; // SQNEG Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQNEGQ_S64; // SQNEG Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQNEG_ASISDMISC_R: - intrin_id = ARM64_INTRIN_VQNEG_S64; // SQNEG Dd,Dn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMLAH_ASIMDELEM_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMLAH_LANE_S16; // SQRDMLAH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMLAHQ_LANE_S16; // SQRDMLAH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMLAH_LANEQ_S16; // SQRDMLAH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMLAHQ_LANEQ_S16; // SQRDMLAH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLAH_LANE_S32; // SQRDMLAH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLAHQ_LANE_S32; // SQRDMLAH Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLAH_LANEQ_S32; // SQRDMLAH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLAHQ_LANEQ_S32; // SQRDMLAH Vd.4S,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMLAH_ASIMDSAME2_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMLAH_S16; // SQRDMLAH Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLAH_S32; // SQRDMLAH Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMLAHQ_S16; // SQRDMLAH Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLAHQ_S32; // SQRDMLAH Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMLAH_ASISDELEM_R: - intrin_id = ARM64_INTRIN_VQRDMLAHH_LANE_S16; // SQRDMLAH Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMLSH_ASIMDELEM_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMLSH_LANE_S16; // SQRDMLSH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMLSHQ_LANE_S16; // SQRDMLSH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMLSH_LANEQ_S16; // SQRDMLSH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMLSHQ_LANEQ_S16; // SQRDMLSH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLSH_LANE_S32; // SQRDMLSH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLSHQ_LANE_S32; // SQRDMLSH Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLSH_LANEQ_S32; // SQRDMLSH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLSHQ_LANEQ_S32; // SQRDMLSH Vd.4S,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMLSH_ASIMDSAME2_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMLSH_S16; // SQRDMLSH Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLSH_S32; // SQRDMLSH Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMLSHQ_S16; // SQRDMLSH Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMLSHQ_S32; // SQRDMLSH Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMLSH_ASISDELEM_R: - intrin_id = ARM64_INTRIN_VQRDMLSHH_LANE_S16; // SQRDMLSH Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMLSH_ASISDSAME2_ONLY: - intrin_id = ARM64_INTRIN_VQRDMLAHH_S16; // SQRDMLSH Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMULH_ASIMDELEM_R: - if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMULH_LANE_S16; // SQRDMULH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_LANE_S16; // SQRDMULH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULH_LANE_S32; // SQRDMULH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_LANE_S32; // SQRDMULH Vd.4S,Vn.4S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMULH_LANEQ_S16; // SQRDMULH Vd.4H,Vn.4H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_LANEQ_S16; // SQRDMULH Vd.8H,Vn.8H,Vm.H[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULH_LANEQ_S32; // SQRDMULH Vd.2S,Vn.2S,Vm.S[lane] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_LANEQ_S32; // SQRDMULH Vd.4S,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMULH_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMULH_S16; // SQRDMULH Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_S16; // SQRDMULH Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULH_S32; // SQRDMULH Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_S32; // SQRDMULH Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRDMULH_N_S16; // SQRDMULH Vd.4H,Vn.4H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_N_S16; // SQRDMULH Vd.8H,Vn.8H,Vm.H[0] - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULH_N_S32; // SQRDMULH Vd.2S,Vn.2S,Vm.S[0] - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRDMULHQ_N_S32; // SQRDMULH Vd.4S,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMULH_ASISDELEM_R: - intrin_id = ARM64_INTRIN_VQRDMULHH_LANE_S16; // SQRDMULH Hd,Hn,Vm.H[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRDMULH_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQRDMULHH_S16; // SQRDMULH Hd,Hn,Hm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRSHL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQRSHL_S8; // SQRSHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQRSHLQ_S8; // SQRSHL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRSHL_S16; // SQRSHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRSHLQ_S16; // SQRSHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRSHL_S32; // SQRSHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRSHLQ_S32; // SQRSHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQRSHLQ_S64; // SQRSHL Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRSHL_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQRSHL_S64; // SQRSHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRSHRN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x16_t vqrshrn_high_n_s16(int8x8_t r, int16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQRSHRN_HIGH_N_S16; // SQRSHRN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x8_t vqrshrn_high_n_s32(int16x4_t r, int32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQRSHRN_HIGH_N_S32; // SQRSHRN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x4_t vqrshrn_high_n_s64(int32x2_t r, int64x2_t a, const int n) - // argprep: r -> Vd.2S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQRSHRN_HIGH_N_S64; // SQRSHRN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x8_t vqrshrn_n_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQRSHRN_N_S16; // SQRSHRN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x4_t vqrshrn_n_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQRSHRN_N_S32; // SQRSHRN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x2_t vqrshrn_n_s64(int64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQRSHRN_N_S64; // SQRSHRN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRSHRN_ASISDSHF_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32_t vqrshrnd_n_s64(int64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQRSHRND_N_S64; // SQRSHRN Sd,Dn,#n - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8_t vqrshrnh_n_s16(int16_t a, const int n) - // argprep: a -> Hn; n -> n - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQRSHRNH_N_S16; // SQRSHRN Bd,Hn,#n - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16_t vqrshrns_n_s32(int32_t a, const int n) - // argprep: a -> Sn; n -> n - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQRSHRNS_N_S32; // SQRSHRN Hd,Sn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRSHRUN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vqrshrun_high_n_s16(uint8x8_t r, int16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQRSHRUN_HIGH_N_S16; // SQRSHRUN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vqrshrun_high_n_s32(uint16x4_t r, int32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQRSHRUN_HIGH_N_S32; // SQRSHRUN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vqrshrun_high_n_s64(uint32x2_t r, int64x2_t a, const int n) - // argprep: r -> Vd.2S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQRSHRUN_HIGH_N_S64; // SQRSHRUN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vqrshrun_n_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQRSHRUN_N_S16; // SQRSHRUN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vqrshrun_n_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQRSHRUN_N_S32; // SQRSHRUN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vqrshrun_n_s64(int64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQRSHRUN_N_S64; // SQRSHRUN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQRSHRUN_ASISDSHF_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32_t vqrshrund_n_s64(int64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQRSHRUND_N_S64; // SQRSHRUN Sd,Dn,#n - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8_t vqrshrunh_n_s16(int16_t a, const int n) - // argprep: a -> Hn; n -> n - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQRSHRUNH_N_S16; // SQRSHRUN Bd,Hn,#n - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16_t vqrshruns_n_s32(int32_t a, const int n) - // argprep: a -> Sn; n -> n - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQRSHRUNS_N_S32; // SQRSHRUN Hd,Sn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHLU_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vqshlu_n_s16(int16x4_t a, const int n) - // argprep: a -> Vn.4H; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQSHLU_N_S16; // SQSHLU Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vqshlu_n_s32(int32x2_t a, const int n) - // argprep: a -> Vn.2S; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQSHLU_N_S32; // SQSHLU Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vqshlu_n_s8(int8x8_t a, const int n) - // argprep: a -> Vn.8B; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQSHLU_N_S8; // SQSHLU Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vqshluq_n_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQSHLUQ_N_S16; // SQSHLU Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vqshluq_n_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQSHLUQ_N_S32; // SQSHLU Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64x2_t vqshluq_n_s64(int64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VQSHLUQ_N_S64; // SQSHLU Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHLU_ASISDSHF_R: - if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQSHLUQ_N_S8; // SQSHLU Vd.16B,Vn.16B,#n - // if(None) intrin_id = ARM64_INTRIN_VQSHLU_N_S64; // SQSHLU Dd,Dn,#n - // if(None) intrin_id = ARM64_INTRIN_VQSHLUB_N_S8; // SQSHLU Bd,Bn,#n - // if(None) intrin_id = ARM64_INTRIN_VQSHLUH_N_S16; // SQSHLU Hd,Hn,#n - // if(None) intrin_id = ARM64_INTRIN_VQSHLUS_N_S32; // SQSHLU Sd,Sn,#n - // if(None) intrin_id = ARM64_INTRIN_VQSHLUD_N_S64; // SQSHLU Dd,Dn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQSHL_S8; // SQSHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQSHLQ_S8; // SQSHL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQSHL_S16; // SQSHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQSHLQ_S16; // SQSHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQSHL_S32; // SQSHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQSHLQ_S32; // SQSHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQSHLQ_S64; // SQSHL Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQSHLQ_N_S8; // SQSHL Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHL_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQSHL_S64; // SQSHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHRN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x16_t vqshrn_high_n_s16(int8x8_t r, int16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQSHRN_HIGH_N_S16; // SQSHRN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x8_t vqshrn_high_n_s32(int16x4_t r, int32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQSHRN_HIGH_N_S32; // SQSHRN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x4_t vqshrn_high_n_s64(int32x2_t r, int64x2_t a, const int n) - // argprep: r -> Vd.2S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQSHRN_HIGH_N_S64; // SQSHRN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x8_t vqshrn_n_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQSHRN_N_S16; // SQSHRN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x4_t vqshrn_n_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQSHRN_N_S32; // SQSHRN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x2_t vqshrn_n_s64(int64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQSHRN_N_S64; // SQSHRN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHRN_ASISDSHF_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32_t vqshrnd_n_s64(int64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQSHRND_N_S64; // SQSHRN Sd,Dn,#n - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8_t vqshrnh_n_s16(int16_t a, const int n) - // argprep: a -> Hn; n -> n - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQSHRNH_N_S16; // SQSHRN Bd,Hn,#n - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16_t vqshrns_n_s32(int32_t a, const int n) - // argprep: a -> Sn; n -> n - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQSHRNS_N_S32; // SQSHRN Hd,Sn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHRUN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vqshrun_high_n_s16(uint8x8_t r, int16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQSHRUN_HIGH_N_S16; // SQSHRUN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vqshrun_high_n_s32(uint16x4_t r, int32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQSHRUN_HIGH_N_S32; // SQSHRUN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vqshrun_high_n_s64(uint32x2_t r, int64x2_t a, const int n) - // argprep: r -> Vd.2S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQSHRUN_HIGH_N_S64; // SQSHRUN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vqshrun_n_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQSHRUN_N_S16; // SQSHRUN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vqshrun_n_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQSHRUN_N_S32; // SQSHRUN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vqshrun_n_s64(int64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQSHRUN_N_S64; // SQSHRUN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSHRUN_ASISDSHF_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32_t vqshrund_n_s64(int64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQSHRUND_N_S64; // SQSHRUN Sd,Dn,#n - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8_t vqshrunh_n_s16(int16_t a, const int n) - // argprep: a -> Hn; n -> n - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQSHRUNH_N_S16; // SQSHRUN Bd,Hn,#n - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16_t vqshruns_n_s32(int32_t a, const int n) - // argprep: a -> Sn; n -> n - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQSHRUNS_N_S32; // SQSHRUN Hd,Sn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSUB_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQSUB_S8; // SQSUB Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQSUBQ_S8; // SQSUB Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQSUB_S16; // SQSUB Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQSUBQ_S16; // SQSUB Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQSUB_S32; // SQSUB Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQSUBQ_S32; // SQSUB Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQSUBQ_S64; // SQSUB Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQSUB_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQSUB_S64; // SQSUB Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQXTN_ASIMDMISC_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // int8x16_t vqmovn_high_s16(int8x8_t r, int16x8_t a) - // argprep: r -> Vd.8B; a -> Vn.8H - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQMOVN_HIGH_S16; // SQXTN2 Vd.16B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // int16x8_t vqmovn_high_s32(int16x4_t r, int32x4_t a) - // argprep: r -> Vd.4H; a -> Vn.4S - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQMOVN_HIGH_S32; // SQXTN2 Vd.8H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // int32x4_t vqmovn_high_s64(int32x2_t r, int64x2_t a) - // argprep: r -> Vd.2S; a -> Vn.2D - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQMOVN_HIGH_S64; // SQXTN2 Vd.4S,Vn.2D - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // int8x8_t vqmovn_s16(int16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQMOVN_S16; // SQXTN Vd.8B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // int16x4_t vqmovn_s32(int32x4_t a) - // argprep: a -> Vn.4S - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQMOVN_S32; // SQXTN Vd.4H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // int32x2_t vqmovn_s64(int64x2_t a) - // argprep: a -> Vn.2D - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQMOVN_S64; // SQXTN Vd.2S,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQXTN_ASISDMISC_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31)) - // int32_t vqmovnd_s64(int64_t a) - // argprep: a -> Dn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQMOVND_S64; // SQXTN Sd,Dn - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31)) - // int8_t vqmovnh_s16(int16_t a) - // argprep: a -> Hn - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQMOVNH_S16; // SQXTN Bd,Hn - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31)) - // int16_t vqmovns_s32(int32_t a) - // argprep: a -> Sn - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQMOVNS_S32; // SQXTN Hd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQXTUN_ASIMDMISC_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint8x16_t vqmovun_high_s16(uint8x8_t r, int16x8_t a) - // argprep: r -> Vd.8B; a -> Vn.8H - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQMOVUN_HIGH_S16; // SQXTUN2 Vd.16B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint16x8_t vqmovun_high_s32(uint16x4_t r, int32x4_t a) - // argprep: r -> Vd.4H; a -> Vn.4S - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQMOVUN_HIGH_S32; // SQXTUN2 Vd.8H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // uint32x4_t vqmovun_high_s64(uint32x2_t r, int64x2_t a) - // argprep: r -> Vd.2S; a -> Vn.2D - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQMOVUN_HIGH_S64; // SQXTUN2 Vd.4S,Vn.2D - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint8x8_t vqmovun_s16(int16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQMOVUN_S16; // SQXTUN Vd.8B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint16x4_t vqmovun_s32(int32x4_t a) - // argprep: a -> Vn.4S - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQMOVUN_S32; // SQXTUN Vd.4H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // uint32x2_t vqmovun_s64(int64x2_t a) - // argprep: a -> Vn.2D - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQMOVUN_S64; // SQXTUN Vd.2S,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SQXTUN_ASISDMISC_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31)) - // uint32_t vqmovund_s64(int64_t a) - // argprep: a -> Dn - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQMOVUND_S64; // SQXTUN Sd,Dn - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31)) - // uint8_t vqmovunh_s16(int16_t a) - // argprep: a -> Hn - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQMOVUNH_S16; // SQXTUN Bd,Hn - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31)) - // uint16_t vqmovuns_s32(int32_t a) - // argprep: a -> Sn - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQMOVUNS_S32; // SQXTUN Hd,Sn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRHADD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRHADD_S8; // SRHADD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VRHADDQ_S8; // SRHADD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRHADD_S16; // SRHADD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRHADDQ_S16; // SRHADD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRHADD_S32; // SRHADD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRHADDQ_S32; // SRHADD Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRI_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSRI_N_S8; // SRI Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSRI_N_S16; // SRI Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSRIQ_N_S16; // SRI Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSRI_N_S32; // SRI Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSRIQ_N_S32; // SRI Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSRIQ_N_S64; // SRI Vd.2D,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSRI_N_U8; // SRI Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSRI_N_U16; // SRI Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSRIQ_N_U16; // SRI Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSRI_N_U32; // SRI Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSRIQ_N_U32; // SRI Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSRIQ_N_U64; // SRI Vd.2D,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSRIQ_N_P64; // SRI Vd.2D,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSRI_N_P8; // SRI Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSRI_N_P16; // SRI Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSRIQ_N_P16; // SRI Vd.8H,Vn.8H,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRI_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64_t vsrid_n_u64(uint64_t a, uint64_t b, const int n) - // argprep: a -> Dd; b -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSRID_N_U64; // SRI Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vsriq_n_u8(uint8x16_t a, uint8x16_t b, const int n) - // argprep: a -> Vd.16B; b -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSRIQ_N_U8; // SRI Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRSHL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRSHL_S8; // SRSHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VRSHLQ_S8; // SRSHL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRSHL_S16; // SRSHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRSHLQ_S16; // SRSHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRSHL_S32; // SRSHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRSHLQ_S32; // SRSHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRSHLQ_S64; // SRSHL Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRSHL_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VRSHL_S64; // SRSHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRSHR_ASIMDSHF_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRSHR_N_S8; // SRSHR Vd.8B,Vn.8B,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRSHR_N_S16; // SRSHR Vd.4H,Vn.4H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRSHRQ_N_S16; // SRSHR Vd.8H,Vn.8H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRSHR_N_S32; // SRSHR Vd.2S,Vn.2S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRSHRQ_N_S32; // SRSHR Vd.4S,Vn.4S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRSHRQ_N_S64; // SRSHR Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRSHR_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int64_t vrshrd_n_s64(int64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VRSHRD_N_S64; // SRSHR Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x16_t vrshrq_n_s8(int8x16_t a, const int n) - // argprep: a -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VRSHRQ_N_S8; // SRSHR Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SRSRA_ASISDSHF_R: - case ENC_SRSRA_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x4_t vrsra_n_s16(int16x4_t a, int16x4_t b, const int n) - // argprep: a -> Vd.4H; b -> Vn.4H; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VRSRA_N_S16; // SRSRA Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x2_t vrsra_n_s32(int32x2_t a, int32x2_t b, const int n) - // argprep: a -> Vd.2S; b -> Vn.2S; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VRSRA_N_S32; // SRSRA Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x8_t vrsra_n_s8(int8x8_t a, int8x8_t b, const int n) - // argprep: a -> Vd.8B; b -> Vn.8B; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VRSRA_N_S8; // SRSRA Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x8_t vrsraq_n_s16(int16x8_t a, int16x8_t b, const int n) - // argprep: a -> Vd.8H; b -> Vn.8H; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_S16; // SRSRA Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x4_t vrsraq_n_s32(int32x4_t a, int32x4_t b, const int n) - // argprep: a -> Vd.4S; b -> Vn.4S; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_S32; // SRSRA Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int64x2_t vrsraq_n_s64(int64x2_t a, int64x2_t b, const int n) - // argprep: a -> Vd.2D; b -> Vn.2D; n -> n - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_S64; // SRSRA Vd.2D,Vn.2D,#n - // add_input_reg(inputs, il, instr.operands[0]); - // add_input_reg(inputs, il, instr.operands[1]); - // add_input_imm(inputs, il, instr.operands[2]); - // add_output_reg(outputs, il, instr.operands[0]); - // break; - // case ENC_SRSRA_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int64_t vrsrad_n_s64(int64_t a, int64_t b, const int n) - // argprep: a -> Dd; b -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VRSRAD_N_S64; // SRSRA Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x16_t vrsraq_n_s8(int8x16_t a, int8x16_t b, const int n) - // argprep: a -> Vd.16B; b -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_S8; // SRSRA Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SXTL_SSHLL_ASIMDSHF_L: - case ENC_SSHLL_ASIMDSHF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // int32x4_t vmovl_high_s16(int16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMOVL_HIGH_S16; // SSHLL2 Vd.4S,Vn.8H,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // int64x2_t vmovl_high_s32(int32x4_t a) - // argprep: a -> Vn.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMOVL_HIGH_S32; // SSHLL2 Vd.2D,Vn.4S,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // int16x8_t vmovl_high_s8(int8x16_t a) - // argprep: a -> Vn.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMOVL_HIGH_S8; // SSHLL2 Vd.8H,Vn.16B,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // int32x4_t vmovl_s16(int16x4_t a) - // argprep: a -> Vn.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMOVL_S16; // SSHLL Vd.4S,Vn.4H,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // int64x2_t vmovl_s32(int32x2_t a) - // argprep: a -> Vn.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMOVL_S32; // SSHLL Vd.2D,Vn.2S,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // int16x8_t vmovl_s8(int8x8_t a) - // argprep: a -> Vn.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMOVL_S8; // SSHLL Vd.8H,Vn.8B,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x4_t vshll_high_n_s16(int16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_S16; // SSHLL2 Vd.4S,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int64x2_t vshll_high_n_s32(int32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_S32; // SSHLL2 Vd.2D,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x8_t vshll_high_n_s8(int8x16_t a, const int n) - // argprep: a -> Vn.16B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_S8; // SSHLL2 Vd.8H,Vn.16B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int32x4_t vshll_n_s16(int16x4_t a, const int n) - // argprep: a -> Vn.4H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_N_S16; // SSHLL Vd.4S,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int64x2_t vshll_n_s32(int32x2_t a, const int n) - // argprep: a -> Vn.2S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_N_S32; // SSHLL Vd.2D,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int16x8_t vshll_n_s8(int8x8_t a, const int n) - // argprep: a -> Vn.8B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_N_S8; // SSHLL Vd.8H,Vn.8B,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSHL_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // int16x4_t vshl_s16(int16x4_t a, int16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VSHL_S16; // SSHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // int32x2_t vshl_s32(int32x2_t a, int32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VSHL_S32; // SSHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // int8x8_t vshl_s8(int8x8_t a, int8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VSHL_S8; // SSHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // int16x8_t vshlq_s16(int16x8_t a, int16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLQ_S16; // SSHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // int32x4_t vshlq_s32(int32x4_t a, int32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLQ_S32; // SSHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // int64x2_t vshlq_s64(int64x2_t a, int64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLQ_S64; // SSHL Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // int8x16_t vshlq_s8(int8x16_t a, int8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSHLQ_S8; // SSHL Vd.16B,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSHL_ASISDSAME_ONLY: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].reg[0] >= REG_D0 && instr.operands[2].reg[0] <= REG_D31)) - // int64x1_t vshl_s64(int64x1_t a, int64x1_t b) - // argprep: a -> Dn; b -> Dm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSHL_S64; // SSHL Dd,Dn,Dm - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].reg[0] >= REG_D0 && instr.operands[2].reg[0] <= REG_D31)) - // int64_t vshld_s64(int64_t a, int64_t b) - // argprep: a -> Dn; b -> Dm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSHLD_S64; // SSHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSHR_ASIMDSHF_R: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSHR_N_S8; // SSHR Vd.8B,Vn.8B,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSHR_N_S16; // SSHR Vd.4H,Vn.4H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSHRQ_N_S16; // SSHR Vd.8H,Vn.8H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSHR_N_S32; // SSHR Vd.2S,Vn.2S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSHRQ_N_S32; // SSHR Vd.4S,Vn.4S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSHRQ_N_S64; // SSHR Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSHR_ASISDSHF_R: - if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VSHRQ_N_S8; // SSHR Vd.16B,Vn.16B,#n - // if(None) intrin_id = ARM64_INTRIN_VSHR_N_S64; // SSHR Dd,Dn,#n - // if(None) intrin_id = ARM64_INTRIN_VSHRD_N_S64; // SSHR Dd,Dn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSRA_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSRA_N_S8; // SSRA Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSRA_N_S16; // SSRA Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSRAQ_N_S16; // SSRA Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSRA_N_S32; // SSRA Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSRAQ_N_S32; // SSRA Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSRAQ_N_S64; // SSRA Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSRA_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int64_t vsrad_n_s64(int64_t a, int64_t b, const int n) - // argprep: a -> Dd; b -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSRAD_N_S64; // SSRA Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // int8x16_t vsraq_n_s8(int8x16_t a, int8x16_t b, const int n) - // argprep: a -> Vd.16B; b -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSRAQ_N_S8; // SSRA Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSUBL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // int32x4_t vsubl_high_s16(int16x8_t a, int16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSUBL_HIGH_S16; // SSUBL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // int64x2_t vsubl_high_s32(int32x4_t a, int32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSUBL_HIGH_S32; // SSUBL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // int16x8_t vsubl_high_s8(int8x16_t a, int8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSUBL_HIGH_S8; // SSUBL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // int32x4_t vsubl_s16(int16x4_t a, int16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSUBL_S16; // SSUBL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // int64x2_t vsubl_s32(int32x2_t a, int32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSUBL_S32; // SSUBL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // int16x8_t vsubl_s8(int8x8_t a, int8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSUBL_S8; // SSUBL Vd.8H,Vn.8B,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SSUBW_ASIMDDIFF_W: - if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSUBW_S8; // SSUBW Vd.8H,Vn.8H,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUBW_S16; // SSUBW Vd.4S,Vn.4S,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSUBW_S32; // SSUBW Vd.2D,Vn.2D,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSUBW_HIGH_S8; // SSUBW2 Vd.8H,Vn.8H,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUBW_HIGH_S16; // SSUBW2 Vd.4S,Vn.4S,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSUBW_HIGH_S32; // SSUBW2 Vd.2D,Vn.2D,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SUBHN_ASIMDDIFF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint8x16_t vsubhn_high_u16(uint8x8_t r, uint16x8_t a, uint16x8_t b) - // argprep: r -> Vd.8B; a -> Vn.8H; b -> Vm.8H - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSUBHN_HIGH_U16; // SUBHN2 Vd.16B,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint16x8_t vsubhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b) - // argprep: r -> Vd.4H; a -> Vn.4S; b -> Vm.4S - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSUBHN_HIGH_U32; // SUBHN2 Vd.8H,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // uint32x4_t vsubhn_high_u64(uint32x2_t r, uint64x2_t a, uint64x2_t b) - // argprep: r -> Vd.2S; a -> Vn.2D; b -> Vm.2D - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSUBHN_HIGH_U64; // SUBHN2 Vd.4S,Vn.2D,Vm.2D - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint8x8_t vsubhn_u16(uint16x8_t a, uint16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VSUBHN_U16; // SUBHN Vd.8B,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint16x4_t vsubhn_u32(uint32x4_t a, uint32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VSUBHN_U32; // SUBHN Vd.4H,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // uint32x2_t vsubhn_u64(uint64x2_t a, uint64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VSUBHN_U64; // SUBHN Vd.2S,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SUB_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSUB_S8; // SUB Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VSUBQ_S8; // SUB Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSUB_S16; // SUB Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSUBQ_S16; // SUB Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSUB_S32; // SUB Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUBQ_S32; // SUB Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSUBQ_S64; // SUB Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSUB_U8; // SUB Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VSUBQ_U8; // SUB Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSUB_U16; // SUB Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSUBQ_U16; // SUB Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSUB_U32; // SUB Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUBQ_U32; // SUB Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSUBQ_U64; // SUB Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SUB_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VSUB_S64; // SUB Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SUDOT_ASIMDELEM_D: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSUDOT_LANE_S32; // SUDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSUDOT_LANEQ_S32; // SUDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUDOTQ_LANE_S32; // SUDOT Vd.4S,Vn.16B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUDOTQ_LANEQ_S32; // SUDOT Vd.4S,Vn.16B,Vm.4B[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SUQADD_ASIMDMISC_R: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VUQADD_S8; // SUQADD Vd.8B,Vn.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VUQADDQ_S8; // SUQADD Vd.16B,Vn.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUQADD_S16; // SUQADD Vd.4H,Vn.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUQADDQ_S16; // SUQADD Vd.8H,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUQADD_S32; // SUQADD Vd.2S,Vn.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUQADDQ_S32; // SUQADD Vd.4S,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUQADDQ_S64; // SUQADD Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_SUQADD_ASISDMISC_R: - intrin_id = ARM64_INTRIN_VUQADD_S64; // SUQADD Dd,Dn - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_TBL_ASIMDTBL_L1_1: - case ENC_TBX_ASIMDTBL_L1_1: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L1_1) - intrin_id = ARM64_INTRIN_VTBL1_S8; // TBL Vd.8B,{Vn.16B},Vm.8B - else - intrin_id = ARM64_INTRIN_VTBX1_S8; // TBX Vd.8B,{Vn.16B},Vm.8B - } - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L1_1) - intrin_id = ARM64_INTRIN_VQTBL1Q_S8; // TBL Vd.16B,{Vn.16B},Vm.16B - else - intrin_id = ARM64_INTRIN_VQTBX1Q_S8; // TBX Vd.16B,{Vn.16B},Vm.16B - } - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - // Technically, the intrinsics for 2, 3, and 4 vector TBL take a vector of vectors (like int8x16x4 for vqtbl4), - // but it is simpler to just pass all the vector registers as parameters to the intrinsic. - case ENC_TBL_ASIMDTBL_L2_2: - case ENC_TBX_ASIMDTBL_L2_2: - { - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L2_2) - intrin_id = ARM64_INTRIN_VTBL2_S8; // TBL Vd.8B,{Vn.16B - Vn+1.16B},Vm.8B - else - intrin_id = ARM64_INTRIN_VTBX2_S8; // TBX Vd.8B,{Vn.16B - Vn+1.16B},Vm.8B - } - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L2_2) - intrin_id = ARM64_INTRIN_VQTBL2Q_S8; // TBL Vd.16B,{Vn.16B - Vn+1.16B},Vm.16B - else - intrin_id = ARM64_INTRIN_VQTBX2Q_S8; // TBX Vd.16B,{Vn.16B - Vn+1.16B},Vm.16B - } - add_input_reg(inputs, il, instr.operands[1]); - InstructionOperand tmp(instr.operands[1]); - tmp.reg[0] = (Register) (instr.operands[1].reg[0] + 1); - add_input_reg(inputs, il, tmp); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - } - case ENC_TBL_ASIMDTBL_L3_3: - case ENC_TBX_ASIMDTBL_L3_3: - { - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L3_3) - intrin_id = ARM64_INTRIN_VTBL3_S8; // TBL Vd.8B,{Vn.16B - Vn+2.16B},Vm.8B - else - intrin_id = ARM64_INTRIN_VTBX3_S8; // TBX Vd.8B,{Vn.16B - Vn+2.16B},Vm.8B - } - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L3_3) - intrin_id = ARM64_INTRIN_VQTBL3Q_S8; // TBL Vd.16B,{Vn.16B - Vn+2.16B},Vm.16B - else - intrin_id = ARM64_INTRIN_VQTBX3Q_S8; // TBX Vd.16B,{Vn.16B - Vn+2.16B},Vm.16B - } - add_input_reg(inputs, il, instr.operands[1]); - InstructionOperand tmp(instr.operands[1]); - tmp.reg[0] = (Register) (instr.operands[1].reg[0] + 1); - add_input_reg(inputs, il, tmp); - tmp.reg[0] = (Register) (instr.operands[1].reg[0] + 2); - add_input_reg(inputs, il, tmp); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - } - case ENC_TBL_ASIMDTBL_L4_4: - case ENC_TBX_ASIMDTBL_L4_4: - { - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L4_4) - intrin_id = ARM64_INTRIN_VTBL4_S8; // TBL Vd.8B,{Vn.16B - Vn+3.16B},Vm.8B - else - intrin_id = ARM64_INTRIN_VTBX4_S8; // TBX Vd.8B,{Vn.16B - Vn+3.16B},Vm.8B - } - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - { - if (instr.encoding == ENC_TBL_ASIMDTBL_L4_4) - intrin_id = ARM64_INTRIN_VQTBL4Q_S8; // TBL Vd.16B,{Vn.16B - Vn+3.16B},Vm.16B - else - intrin_id = ARM64_INTRIN_VQTBX4Q_S8; // TBX Vd.16B,{Vn.16B - Vn+3.16B},Vm.16B - } - add_input_reg(inputs, il, instr.operands[1]); - InstructionOperand tmp(instr.operands[1]); - tmp.reg[0] = (Register) (instr.operands[1].reg[0] + 1); - add_input_reg(inputs, il, tmp); - tmp.reg[0] = (Register) (instr.operands[1].reg[0] + 2); - add_input_reg(inputs, il, tmp); - tmp.reg[0] = (Register) (instr.operands[1].reg[0] + 3); - add_input_reg(inputs, il, tmp); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - } - case ENC_ST2_ASISDLSE_R2: - case ENC_ST2_ASISDLSEP_I2_I: - // Handling: st2 {Vt.8B - Vt2.8B}, [Xn] [, ] - // All these st2 instructions are using the same intrinsic. - // Semantic between different vector representation is the same at the assembly level. - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VST2_S8; // ST2 {Vt.8B - Vt2.8B}, [Xn], - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VST2Q_S8; // ST2 {Vt.16B - Vt2.16B}, [Xn], - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VST2_S16; // ST2 {Vt.4H - Vt2.4H}, [Xn], - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VST2Q_S16; // ST2 {Vt.8H - Vt2.8H}, [Xn], - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VST2_S32; // ST2 {Vt.2S - Vt2.2S}, [Xn], - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VST2Q_S32; // ST2 {Vt.4S - Vt2.4S}, [Xn], - if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VST2Q_S64; // ST2 {Vt.2D - Vt2.2D}, [Xn], - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[0]); - break; - case ENC_TRN1_ASIMDPERM_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VTRN1_S8; // TRN1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VTRN1Q_S8; // TRN1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN1_S16; // TRN1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN1Q_S16; // TRN1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VTRN1_S32; // TRN1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VTRN1Q_S32; // TRN1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN1Q_S64; // TRN1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VTRN1_U8; // TRN1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VTRN1Q_U8; // TRN1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN1_U16; // TRN1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN1Q_U16; // TRN1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VTRN1_U32; // TRN1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VTRN1Q_U32; // TRN1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN1Q_U64; // TRN1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN1Q_P64; // TRN1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VTRN1_F32; // TRN1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VTRN1Q_F32; // TRN1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN1Q_F64; // TRN1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VTRN1_P8; // TRN1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VTRN1Q_P8; // TRN1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN1_P16; // TRN1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN1Q_P16; // TRN1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN1_F16; // TRN1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN1Q_F16; // TRN1 Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_TRN2_ASIMDPERM_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VTRN2_S8; // TRN2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VTRN2Q_S8; // TRN2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN2_S16; // TRN2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN2Q_S16; // TRN2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VTRN2_S32; // TRN2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VTRN2Q_S32; // TRN2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN2Q_S64; // TRN2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VTRN2_U8; // TRN2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VTRN2Q_U8; // TRN2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN2_U16; // TRN2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN2Q_U16; // TRN2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VTRN2_U32; // TRN2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VTRN2Q_U32; // TRN2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN2Q_U64; // TRN2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN2Q_P64; // TRN2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VTRN2_F32; // TRN2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VTRN2Q_F32; // TRN2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VTRN2Q_F64; // TRN2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VTRN2_P8; // TRN2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VTRN2Q_P8; // TRN2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN2_P16; // TRN2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN2Q_P16; // TRN2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VTRN2_F16; // TRN2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VTRN2Q_F16; // TRN2 Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UABAL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABAL_U8; // UABAL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABAL_U16; // UABAL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VABAL_U32; // UABAL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABAL_HIGH_U8; // UABAL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABAL_HIGH_U16; // UABAL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VABAL_HIGH_U32; // UABAL2 Vd.2D,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UABA_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VABA_U8; // UABA Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VABAQ_U8; // UABA Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VABA_U16; // UABA Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABAQ_U16; // UABA Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VABA_U32; // UABA Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABAQ_U32; // UABA Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UABDL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vabdl_high_u16(uint16x8_t a, uint16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VABDL_HIGH_U16; // UABDL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vabdl_high_u32(uint32x4_t a, uint32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VABDL_HIGH_U32; // UABDL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vabdl_high_u8(uint8x16_t a, uint8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VABDL_HIGH_U8; // UABDL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // uint32x4_t vabdl_u16(uint16x4_t a, uint16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VABDL_U16; // UABDL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // uint64x2_t vabdl_u32(uint32x2_t a, uint32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VABDL_U32; // UABDL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // uint16x8_t vabdl_u8(uint8x8_t a, uint8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VABDL_U8; // UABDL Vd.8H,Vn.8B,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UABD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VABD_U8; // UABD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VABDQ_U8; // UABD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VABD_U16; // UABD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VABDQ_U16; // UABD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VABD_U32; // UABD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VABDQ_U32; // UABD Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UADALP_ASIMDMISC_P: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // uint32x2_t vpadal_u16(uint32x2_t a, uint16x4_t b) - // argprep: a -> Vd.2S; b -> Vn.4H - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VPADAL_U16; // UADALP Vd.2S,Vn.4H - else if (instr.operands[0].arrSpec == ARRSPEC_1DOUBLE && instr.operands[0].arrSpec == ARRSPEC_1DOUBLE && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // uint64x1_t vpadal_u32(uint64x1_t a, uint32x2_t b) - // argprep: a -> Vd.1D; b -> Vn.2S - // results: Vd.1D -> result - intrin_id = ARM64_INTRIN_VPADAL_U32; // UADALP Vd.1D,Vn.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES) - // uint16x4_t vpadal_u8(uint16x4_t a, uint8x8_t b) - // argprep: a -> Vd.4H; b -> Vn.8B - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VPADAL_U8; // UADALP Vd.4H,Vn.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vpadalq_u16(uint32x4_t a, uint16x8_t b) - // argprep: a -> Vd.4S; b -> Vn.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VPADALQ_U16; // UADALP Vd.4S,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vpadalq_u32(uint64x2_t a, uint32x4_t b) - // argprep: a -> Vd.2D; b -> Vn.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VPADALQ_U32; // UADALP Vd.2D,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vpadalq_u8(uint16x8_t a, uint8x16_t b) - // argprep: a -> Vd.8H; b -> Vn.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VPADALQ_U8; // UADALP Vd.8H,Vn.16B - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UADDLP_ASIMDMISC_P: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // uint64_t vaddlv_u32(uint32x2_t a) - // argprep: a -> Vn.2S - // results: Dd -> result - intrin_id = ARM64_INTRIN_VADDLV_U32; // UADDLP Vd.1D,Vn.2S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // uint32x2_t vpaddl_u16(uint16x4_t a) - // argprep: a -> Vn.4H - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VPADDL_U16; // UADDLP Vd.2S,Vn.4H - else if (instr.operands[0].arrSpec == ARRSPEC_1DOUBLE && instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - // uint64x1_t vpaddl_u32(uint32x2_t a) - // argprep: a -> Vn.2S - // results: Vd.1D -> result - intrin_id = ARM64_INTRIN_VPADDL_U32; // UADDLP Vd.1D,Vn.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES) - // uint16x4_t vpaddl_u8(uint8x8_t a) - // argprep: a -> Vn.8B - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VPADDL_U8; // UADDLP Vd.4H,Vn.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vpaddlq_u16(uint16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VPADDLQ_U16; // UADDLP Vd.4S,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vpaddlq_u32(uint32x4_t a) - // argprep: a -> Vn.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VPADDLQ_U32; // UADDLP Vd.2D,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vpaddlq_u8(uint8x16_t a) - // argprep: a -> Vn.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VPADDLQ_U8; // UADDLP Vd.8H,Vn.16B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UADDLV_ASIMDALL_ONLY: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_4HALVES) - // uint32_t vaddlv_u16(uint16x4_t a) - // argprep: a -> Vn.4H - // results: Sd -> result - intrin_id = ARM64_INTRIN_VADDLV_U16; // UADDLV Sd,Vn.4H - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_8BYTES) - // uint16_t vaddlv_u8(uint8x8_t a) - // argprep: a -> Vn.8B - // results: Hd -> result - intrin_id = ARM64_INTRIN_VADDLV_U8; // UADDLV Hd,Vn.8B - else if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint32_t vaddlvq_u16(uint16x8_t a) - // argprep: a -> Vn.8H - // results: Sd -> result - intrin_id = ARM64_INTRIN_VADDLVQ_U16; // UADDLV Sd,Vn.8H - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint64_t vaddlvq_u32(uint32x4_t a) - // argprep: a -> Vn.4S - // results: Dd -> result - intrin_id = ARM64_INTRIN_VADDLVQ_U32; // UADDLV Dd,Vn.4S - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && instr.operands[1].arrSpec == ARRSPEC_16BYTES) - // uint16_t vaddlvq_u8(uint8x16_t a) - // argprep: a -> Vn.16B - // results: Hd -> result - intrin_id = ARM64_INTRIN_VADDLVQ_U8; // UADDLV Hd,Vn.16B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UADDL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vaddl_high_u16(uint16x8_t a, uint16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VADDL_HIGH_U16; // UADDL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vaddl_high_u32(uint32x4_t a, uint32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VADDL_HIGH_U32; // UADDL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vaddl_high_u8(uint8x16_t a, uint8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VADDL_HIGH_U8; // UADDL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // uint32x4_t vaddl_u16(uint16x4_t a, uint16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VADDL_U16; // UADDL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // uint64x2_t vaddl_u32(uint32x2_t a, uint32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VADDL_U32; // UADDL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // uint16x8_t vaddl_u8(uint8x8_t a, uint8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VADDL_U8; // UADDL Vd.8H,Vn.8B,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UADDW_ASIMDDIFF_W: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vaddw_high_u16(uint32x4_t a, uint16x8_t b) - // argprep: a -> Vn.4S; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VADDW_HIGH_U16; // UADDW2 Vd.4S,Vn.4S,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vaddw_high_u32(uint64x2_t a, uint32x4_t b) - // argprep: a -> Vn.2D; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VADDW_HIGH_U32; // UADDW2 Vd.2D,Vn.2D,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vaddw_high_u8(uint16x8_t a, uint8x16_t b) - // argprep: a -> Vn.8H; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VADDW_HIGH_U8; // UADDW2 Vd.8H,Vn.8H,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // uint32x4_t vaddw_u16(uint32x4_t a, uint16x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VADDW_U16; // UADDW Vd.4S,Vn.4S,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // uint64x2_t vaddw_u32(uint64x2_t a, uint32x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VADDW_U32; // UADDW Vd.2D,Vn.2D,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // uint16x8_t vaddw_u8(uint16x8_t a, uint8x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VADDW_U8; // UADDW Vd.8H,Vn.8H,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_ASISDMISC_R: - case ENC_UCVTF_D64_FLOAT2INT: - case ENC_UCVTF_S32_FLOAT2INT: - if (REGSZ_O(instr.operands[0]) == 8) - intrin_id = ARM64_INTRIN_VCVT_F64_U64; // UCVTF Dd,Dn - else if (REGSZ_O(instr.operands[0]) == 4) - intrin_id = ARM64_INTRIN_VCVTS_F32_U32; // UCVTF Sd,Sn - else - break; - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_ASISDSHF_C: - intrin_id = ARM64_INTRIN_VCVT_N_F64_U64; // UCVTF Hd,Hn,#imm - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_ASISDMISCFP16_R: - intrin_id = ARM64_INTRIN_VCVTH_F16_U16; // UCVTF Hd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_S64_FLOAT2INT: - intrin_id = ARM64_INTRIN_VCVTH_F16_U16; // ucvtf s29, x5 - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_H64_FLOAT2INT: - intrin_id = ARM64_INTRIN_VCVTH_F16_U64; // ucvtf h3, x2 - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_H32_FLOAT2INT: - intrin_id = ARM64_INTRIN_VCVTH_F16_U32; // ucvtf h5, w12 - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_D32_FLOAT2INT: - intrin_id = ARM64_INTRIN_VCVT_F64_U32; // ucvtf d0, w7 - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_ASIMDSHF_C: - intrin_id = ARM64_INTRIN_VCVT_N_F32_U32; - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UCVTF_ASIMDMISC_R: - case ENC_UCVTF_ASIMDMISCFP16_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VCVT_F32_U32; // UCVTF Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VCVTQ_F32_U32; // UCVTF Vd.4S,Vn.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VCVTQ_F64_U64; // UCVTF Vd.2D,Vn.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VCVT_N_F32_U32; // UCVTF Vd.2S,Vn.2S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VCVTQ_N_F32_U32; // UCVTF Vd.4S,Vn.4S,#n - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VCVTQ_N_F64_U64; // UCVTF Vd.2D,Vn.2D,#n - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VCVT_F16_U16; // UCVTF Vd.4H,Vn.4H,#0 - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VCVTQ_F16_U16; // UCVTF Vd.8H,Vn.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VCVT_N_F16_U16; // UCVTF Vd.4H,Vn.4H,#n - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VCVTQ_N_F16_U16; // UCVTF Vd.8H,Vn.8H,#n - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UDOT_ASIMDELEM_D: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VDOT_LANE_U32; // UDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VDOTQ_LANEQ_U32; // UDOT Vd.4S,Vn.16B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VDOT_LANEQ_U32; // UDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VDOTQ_LANE_U32; // UDOT Vd.4S,Vn.16B,Vm.4B[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UDOT_ASIMDSAME2_D: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VDOT_U32; // UDOT Vd.2S,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VDOTQ_U32; // UDOT Vd.4S,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UHADD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VHADD_U8; // UHADD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VHADDQ_U8; // UHADD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VHADD_U16; // UHADD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VHADDQ_U16; // UHADD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VHADD_U32; // UHADD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VHADDQ_U32; // UHADD Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UHSUB_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VHSUB_U8; // UHSUB Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VHSUBQ_U8; // UHSUB Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VHSUB_U16; // UHSUB Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VHSUBQ_U16; // UHSUB Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VHSUB_U32; // UHSUB Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VHSUBQ_U32; // UHSUB Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMAXP_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VPMAX_U8; // UMAXP Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPMAX_U16; // UMAXP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPMAX_U32; // UMAXP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VPMAXQ_U8; // UMAXP Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPMAXQ_U16; // UMAXP Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPMAXQ_U32; // UMAXP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMAXV_U32; // UMAXP Vd.2S,Vn.2S,Vm.2S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMAXV_ASIMDALL_ONLY: - intrin_id = ARM64_INTRIN_VMAXV_U8; // UMAXV Bd,Vn.8B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMAX_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMAX_U8; // UMAX Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMAXQ_U8; // UMAX Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMAX_U16; // UMAX Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMAXQ_U16; // UMAX Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMAX_U32; // UMAX Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMAXQ_U32; // UMAX Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMINP_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VPMIN_U8; // UMINP Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VPMIN_U16; // UMINP Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VPMIN_U32; // UMINP Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VPMINQ_U8; // UMINP Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VPMINQ_U16; // UMINP Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VPMINQ_U32; // UMINP Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMINV_U32; // UMINP Vd.2S,Vn.2S,Vm.2S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMINV_ASIMDALL_ONLY: - intrin_id = ARM64_INTRIN_VMINV_U8; // UMINV Bd,Vn.8B - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMIN_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMIN_U8; // UMIN Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMINQ_U8; // UMIN Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMIN_U16; // UMIN Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMINQ_U16; // UMIN Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMIN_U32; // UMIN Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMINQ_U32; // UMIN Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMLAL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAL_U8; // UMLAL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_U16; // UMLAL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_U32; // UMLAL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_U8; // UMLAL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_U16; // UMLAL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_U32; // UMLAL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_N_U16; // UMLAL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_N_U32; // UMLAL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_N_U16; // UMLAL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_N_U32; // UMLAL2 Vd.2D,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMLAL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_LANE_U16; // UMLAL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_LANE_U32; // UMLAL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANE_U16; // UMLAL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANE_U32; // UMLAL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_LANEQ_U16; // UMLAL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_LANEQ_U32; // UMLAL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANEQ_U16; // UMLAL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLAL_HIGH_LANEQ_U32; // UMLAL2 Vd.2D,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMLSL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSL_U8; // UMLSL Vd.8H,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_U16; // UMLSL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_U32; // UMLSL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_U8; // UMLSL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_U16; // UMLSL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_U32; // UMLSL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_N_U16; // UMLSL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_N_U32; // UMLSL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_N_U16; // UMLSL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_N_U32; // UMLSL2 Vd.2D,Vn.4S,Vm.S[0] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMLSL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_LANE_U16; // UMLSL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_LANE_U32; // UMLSL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANE_U16; // UMLSL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANE_U32; // UMLSL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_LANEQ_U16; // UMLSL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_LANEQ_U32; // UMLSL Vd.2D,Vn.2S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANEQ_U16; // UMLSL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VMLSL_HIGH_LANEQ_U32; // UMLSL2 Vd.2D,Vn.4S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMMLA_ASIMDSAME2_G: - intrin_id = ARM64_INTRIN_VMMLAQ_U32; // UMMLA Vd.4S,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMOV_ASIMDINS_W_W: - intrin_id = ARM64_INTRIN_VGET_LANE_U8; // UMOV Rd,Vn.B[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_lane(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMULL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // uint32x4_t vmull_high_n_u16(uint16x8_t a, uint16_t b) - // argprep: a -> Vn.8H; b -> Vm.H[0] - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_N_U16; // UMULL2 Vd.4S,Vn.8H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // uint64x2_t vmull_high_n_u32(uint32x4_t a, uint32_t b) - // argprep: a -> Vn.4S; b -> Vm.S[0] - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_N_U32; // UMULL2 Vd.2D,Vn.4S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vmull_high_u16(uint16x8_t a, uint16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_U16; // UMULL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vmull_high_u32(uint32x4_t a, uint32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_U32; // UMULL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vmull_high_u8(uint8x16_t a, uint8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_U8; // UMULL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // uint32x4_t vmull_n_u16(uint16x4_t a, uint16_t b) - // argprep: a -> Vn.4H; b -> Vm.H[0] - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_N_U16; // UMULL Vd.4S,Vn.4H,Vm.H[0] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // uint64x2_t vmull_n_u32(uint32x2_t a, uint32_t b) - // argprep: a -> Vn.2S; b -> Vm.S[0] - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_N_U32; // UMULL Vd.2D,Vn.2S,Vm.S[0] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // uint32x4_t vmull_u16(uint16x4_t a, uint16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_U16; // UMULL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // uint64x2_t vmull_u32(uint32x2_t a, uint32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_U32; // UMULL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // uint16x8_t vmull_u8(uint8x8_t a, uint8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMULL_U8; // UMULL Vd.8H,Vn.8B,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UMULL_ASIMDELEM_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // uint32x4_t vmull_high_laneq_u16(uint16x8_t a, uint16x8_t v, const int lane) - // argprep: a -> Vn.8H; v -> Vm.8H; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_LANEQ_U16; // UMULL2 Vd.4S,Vn.8H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // uint64x2_t vmull_high_laneq_u32(uint32x4_t a, uint32x4_t v, const int lane) - // argprep: a -> Vn.4S; v -> Vm.4S; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_HIGH_LANEQ_U32; // UMULL2 Vd.2D,Vn.4S,Vm.S[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_1HALF && instr.operands[2].laneUsed) - // uint32x4_t vmull_laneq_u16(uint16x4_t a, uint16x8_t v, const int lane) - // argprep: a -> Vn.4H; v -> Vm.8H; lane -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMULL_LANEQ_U16; // UMULL Vd.4S,Vn.4H,Vm.H[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_1SINGLE && instr.operands[2].laneUsed) - // uint64x2_t vmull_laneq_u32(uint32x2_t a, uint32x4_t v, const int lane) - // argprep: a -> Vn.2S; v -> Vm.4S; lane -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMULL_LANEQ_U32; // UMULL Vd.2D,Vn.2S,Vm.S[lane] - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQADD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQADD_U8; // UQADD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQADDQ_U8; // UQADD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQADD_U16; // UQADD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQADDQ_U16; // UQADD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQADD_U32; // UQADD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQADDQ_U32; // UQADD Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQADDQ_U64; // UQADD Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQADD_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQADD_U64; // UQADD Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQRSHL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQRSHL_U8; // UQRSHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQRSHLQ_U8; // UQRSHL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQRSHL_U16; // UQRSHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQRSHLQ_U16; // UQRSHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQRSHL_U32; // UQRSHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQRSHLQ_U32; // UQRSHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQRSHLQ_U64; // UQRSHL Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQRSHL_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQRSHL_U64; // UQRSHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQRSHRN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vqrshrn_high_n_u16(uint8x8_t r, uint16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQRSHRN_HIGH_N_U16; // UQRSHRN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vqrshrn_high_n_u32(uint16x4_t r, uint32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQRSHRN_HIGH_N_U32; // UQRSHRN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vqrshrn_high_n_u64(uint32x2_t r, uint64x2_t a, const int n) - // argprep: r -> Vd.2S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQRSHRN_HIGH_N_U64; // UQRSHRN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vqrshrn_n_u16(uint16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQRSHRN_N_U16; // UQRSHRN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vqrshrn_n_u32(uint32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQRSHRN_N_U32; // UQRSHRN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vqrshrn_n_u64(uint64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQRSHRN_N_U64; // UQRSHRN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQRSHRN_ASISDSHF_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32_t vqrshrnd_n_u64(uint64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQRSHRND_N_U64; // UQRSHRN Sd,Dn,#n - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8_t vqrshrnh_n_u16(uint16_t a, const int n) - // argprep: a -> Hn; n -> n - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQRSHRNH_N_U16; // UQRSHRN Bd,Hn,#n - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16_t vqrshrns_n_u32(uint32_t a, const int n) - // argprep: a -> Sn; n -> n - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQRSHRNS_N_U32; // UQRSHRN Hd,Sn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQSHL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQSHL_U8; // UQSHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQSHLQ_U8; // UQSHL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQSHL_U16; // UQSHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQSHLQ_U16; // UQSHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQSHL_U32; // UQSHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQSHLQ_U32; // UQSHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQSHLQ_U64; // UQSHL Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQSHLQ_N_U8; // UQSHL Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQSHL_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQSHL_U64; // UQSHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQSHRN_ASIMDSHF_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vqshrn_high_n_u16(uint8x8_t r, uint16x8_t a, const int n) - // argprep: r -> Vd.8B; a -> Vn.8H; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQSHRN_HIGH_N_U16; // UQSHRN2 Vd.16B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vqshrn_high_n_u32(uint16x4_t r, uint32x4_t a, const int n) - // argprep: r -> Vd.4H; a -> Vn.4S; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQSHRN_HIGH_N_U32; // UQSHRN2 Vd.8H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vqshrn_high_n_u64(uint32x2_t r, uint64x2_t a, const int n) - // argprep: r -> Vd.2S; a -> Vn.2D; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQSHRN_HIGH_N_U64; // UQSHRN2 Vd.4S,Vn.2D,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vqshrn_n_u16(uint16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQSHRN_N_U16; // UQSHRN Vd.8B,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vqshrn_n_u32(uint32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQSHRN_N_U32; // UQSHRN Vd.4H,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vqshrn_n_u64(uint64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQSHRN_N_U64; // UQSHRN Vd.2S,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQSHRN_ASISDSHF_N: - if ((instr.operands[0].reg[0] >= REG_S0 && instr.operands[0].reg[0] <= REG_S31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32_t vqshrnd_n_u64(uint64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Sd -> result - intrin_id = ARM64_INTRIN_VQSHRND_N_U64; // UQSHRN Sd,Dn,#n - else if ((instr.operands[0].reg[0] >= REG_B0 && instr.operands[0].reg[0] <= REG_B31) && (instr.operands[1].reg[0] >= REG_H0 && instr.operands[1].reg[0] <= REG_H31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8_t vqshrnh_n_u16(uint16_t a, const int n) - // argprep: a -> Hn; n -> n - // results: Bd -> result - intrin_id = ARM64_INTRIN_VQSHRNH_N_U16; // UQSHRN Bd,Hn,#n - else if ((instr.operands[0].reg[0] >= REG_H0 && instr.operands[0].reg[0] <= REG_H31) && (instr.operands[1].reg[0] >= REG_S0 && instr.operands[1].reg[0] <= REG_S31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16_t vqshrns_n_u32(uint32_t a, const int n) - // argprep: a -> Sn; n -> n - // results: Hd -> result - intrin_id = ARM64_INTRIN_VQSHRNS_N_U32; // UQSHRN Hd,Sn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQSUB_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VQSUB_U8; // UQSUB Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VQSUBQ_U8; // UQSUB Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VQSUB_U16; // UQSUB Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VQSUBQ_U16; // UQSUB Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VQSUB_U32; // UQSUB Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VQSUBQ_U32; // UQSUB Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VQSUBQ_U64; // UQSUB Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQSUB_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VQSUB_U64; // UQSUB Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQXTN_ASIMDMISC_N: - if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint8x16_t vqmovn_high_u16(uint8x8_t r, uint16x8_t a) - // argprep: r -> Vd.8B; a -> Vn.8H - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VQMOVN_HIGH_U16; // UQXTN2 Vd.16B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint16x8_t vqmovn_high_u32(uint16x4_t r, uint32x4_t a) - // argprep: r -> Vd.4H; a -> Vn.4S - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VQMOVN_HIGH_U32; // UQXTN2 Vd.8H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // uint32x4_t vqmovn_high_u64(uint32x2_t r, uint64x2_t a) - // argprep: r -> Vd.2S; a -> Vn.2D - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VQMOVN_HIGH_U64; // UQXTN2 Vd.4S,Vn.2D - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8HALVES) - // uint8x8_t vqmovn_u16(uint16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VQMOVN_U16; // UQXTN Vd.8B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - // uint16x4_t vqmovn_u32(uint32x4_t a) - // argprep: a -> Vn.4S - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VQMOVN_U32; // UQXTN Vd.4H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - // uint32x2_t vqmovn_u64(uint64x2_t a) - // argprep: a -> Vn.2D - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VQMOVN_U64; // UQXTN Vd.2S,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UQXTN_ASISDMISC_N: - intrin_id = ARM64_INTRIN_VQMOVNH_U16; // UQXTN Bd,Hn - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URECPE_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRECPE_U32; // URECPE Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRECPEQ_U32; // URECPE Vd.4S,Vn.4S - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URHADD_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRHADD_U8; // URHADD Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VRHADDQ_U8; // URHADD Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRHADD_U16; // URHADD Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRHADDQ_U16; // URHADD Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRHADD_U32; // URHADD Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRHADDQ_U32; // URHADD Vd.4S,Vn.4S,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URSHL_ASIMDSAME_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VRSHL_U8; // URSHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VRSHLQ_U8; // URSHL Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VRSHL_U16; // URSHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VRSHLQ_U16; // URSHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRSHL_U32; // URSHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRSHLQ_U32; // URSHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VRSHLQ_U64; // URSHL Vd.2D,Vn.2D,Vm.2D - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URSHL_ASISDSAME_ONLY: - intrin_id = ARM64_INTRIN_VRSHL_U64; // URSHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URSHR_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vrshr_n_u16(uint16x4_t a, const int n) - // argprep: a -> Vn.4H; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VRSHR_N_U16; // URSHR Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vrshr_n_u32(uint32x2_t a, const int n) - // argprep: a -> Vn.2S; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VRSHR_N_U32; // URSHR Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vrshr_n_u8(uint8x8_t a, const int n) - // argprep: a -> Vn.8B; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VRSHR_N_U8; // URSHR Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vrshrq_n_u16(uint16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VRSHRQ_N_U16; // URSHR Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vrshrq_n_u32(uint32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VRSHRQ_N_U32; // URSHR Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64x2_t vrshrq_n_u64(uint64x2_t a, const int n) - // argprep: a -> Vn.2D; n -> n - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VRSHRQ_N_U64; // URSHR Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URSHR_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64_t vrshrd_n_u64(uint64_t a, const int n) - // argprep: a -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VRSHRD_N_U64; // URSHR Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vrshrq_n_u8(uint8x16_t a, const int n) - // argprep: a -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VRSHRQ_N_U8; // URSHR Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URSQRTE_ASIMDMISC_R: - if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VRSQRTE_U32; // URSQRTE Vd.2S,Vn.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VRSQRTEQ_U32; // URSQRTE Vd.4S,Vn.4S - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_URSRA_ASISDSHF_R: - case ENC_URSRA_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x4_t vrsra_n_u16(uint16x4_t a, uint16x4_t b, const int n) - // argprep: a -> Vd.4H; b -> Vn.4H; n -> n - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VRSRA_N_U16; // URSRA Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x2_t vrsra_n_u32(uint32x2_t a, uint32x2_t b, const int n) - // argprep: a -> Vd.2S; b -> Vn.2S; n -> n - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VRSRA_N_U32; // URSRA Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x8_t vrsra_n_u8(uint8x8_t a, uint8x8_t b, const int n) - // argprep: a -> Vd.8B; b -> Vn.8B; n -> n - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VRSRA_N_U8; // URSRA Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vrsraq_n_u16(uint16x8_t a, uint16x8_t b, const int n) - // argprep: a -> Vd.8H; b -> Vn.8H; n -> n - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_U16; // URSRA Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vrsraq_n_u32(uint32x4_t a, uint32x4_t b, const int n) - // argprep: a -> Vd.4S; b -> Vn.4S; n -> n - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_U32; // URSRA Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64x2_t vrsraq_n_u64(uint64x2_t a, uint64x2_t b, const int n) - // argprep: a -> Vd.2D; b -> Vn.2D; n -> n - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_U64; // URSRA Vd.2D,Vn.2D,#n - // add_input_reg(inputs, il, instr.operands[0]); - // add_input_reg(inputs, il, instr.operands[1]); - // add_input_imm(inputs, il, instr.operands[2]); - // add_output_reg(outputs, il, instr.operands[0]); - // break; - // case ENC_URSRA_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64_t vrsrad_n_u64(uint64_t a, uint64_t b, const int n) - // argprep: a -> Dd; b -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VRSRAD_N_U64; // URSRA Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vrsraq_n_u8(uint8x16_t a, uint8x16_t b, const int n) - // argprep: a -> Vd.16B; b -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VRSRAQ_N_U8; // URSRA Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USDOT_ASIMDELEM_D: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUSDOT_LANE_S32; // USDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUSDOT_LANEQ_S32; // USDOT Vd.2S,Vn.8B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUSDOTQ_LANE_S32; // USDOT Vd.4S,Vn.16B,Vm.4B[lane] - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUSDOTQ_LANEQ_S32; // USDOT Vd.4S,Vn.16B,Vm.4B[lane] - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USDOT_ASIMDSAME2_D: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUSDOT_S32; // USDOT Vd.2S,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUSDOTQ_S32; // USDOT Vd.4S,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UXTL_USHLL_ASIMDSHF_L: - case ENC_USHLL_ASIMDSHF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // uint32x4_t vmovl_high_u16(uint16x8_t a) - // argprep: a -> Vn.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMOVL_HIGH_U16; // USHLL2 Vd.4S,Vn.8H,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // uint64x2_t vmovl_high_u32(uint32x4_t a) - // argprep: a -> Vn.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMOVL_HIGH_U32; // USHLL2 Vd.2D,Vn.4S,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // uint16x8_t vmovl_high_u8(uint8x16_t a) - // argprep: a -> Vn.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMOVL_HIGH_U8; // USHLL2 Vd.8H,Vn.16B,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // uint32x4_t vmovl_u16(uint16x4_t a) - // argprep: a -> Vn.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VMOVL_U16; // USHLL Vd.4S,Vn.4H,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // uint64x2_t vmovl_u32(uint32x2_t a) - // argprep: a -> Vn.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VMOVL_U32; // USHLL Vd.2D,Vn.2S,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32 && instr.operands[2].immediate == 0)) - // uint16x8_t vmovl_u8(uint8x8_t a) - // argprep: a -> Vn.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VMOVL_U8; // USHLL Vd.8H,Vn.8B,#0 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vshll_high_n_u16(uint16x8_t a, const int n) - // argprep: a -> Vn.8H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_U16; // USHLL2 Vd.4S,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64x2_t vshll_high_n_u32(uint32x4_t a, const int n) - // argprep: a -> Vn.4S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_U32; // USHLL2 Vd.2D,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vshll_high_n_u8(uint8x16_t a, const int n) - // argprep: a -> Vn.16B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_HIGH_N_U8; // USHLL2 Vd.8H,Vn.16B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint32x4_t vshll_n_u16(uint16x4_t a, const int n) - // argprep: a -> Vn.4H; n -> - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLL_N_U16; // USHLL Vd.4S,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64x2_t vshll_n_u32(uint32x2_t a, const int n) - // argprep: a -> Vn.2S; n -> - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLL_N_U32; // USHLL Vd.2D,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint16x8_t vshll_n_u8(uint8x8_t a, const int n) - // argprep: a -> Vn.8B; n -> - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLL_N_U8; // USHLL Vd.8H,Vn.8B,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USHL_ASIMDSAME_ONLY: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // uint16x4_t vshl_u16(uint16x4_t a, int16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4H -> result - intrin_id = ARM64_INTRIN_VSHL_U16; // USHL Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // uint32x2_t vshl_u32(uint32x2_t a, int32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2S -> result - intrin_id = ARM64_INTRIN_VSHL_U32; // USHL Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // uint8x8_t vshl_u8(uint8x8_t a, int8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8B -> result - intrin_id = ARM64_INTRIN_VSHL_U8; // USHL Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint16x8_t vshlq_u16(uint16x8_t a, int16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSHLQ_U16; // USHL Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint32x4_t vshlq_u32(uint32x4_t a, int32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSHLQ_U32; // USHL Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2DOUBLES && instr.operands[2].arrSpec == ARRSPEC_2DOUBLES) - // uint64x2_t vshlq_u64(uint64x2_t a, int64x2_t b) - // argprep: a -> Vn.2D; b -> Vm.2D - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSHLQ_U64; // USHL Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // uint8x16_t vshlq_u8(uint8x16_t a, int8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSHLQ_U8; // USHL Vd.16B,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USHL_ASISDSAME_ONLY: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].reg[0] >= REG_D0 && instr.operands[2].reg[0] <= REG_D31)) - // uint64x1_t vshl_u64(uint64x1_t a, int64x1_t b) - // argprep: a -> Dn; b -> Dm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSHL_U64; // USHL Dd,Dn,Dm - else if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].reg[0] >= REG_D0 && instr.operands[2].reg[0] <= REG_D31)) - // uint64_t vshld_u64(uint64_t a, int64_t b) - // argprep: a -> Dn; b -> Dm - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSHLD_U64; // USHL Dd,Dn,Dm - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USHR_ASISDSHF_R: - if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VSHRQ_N_U8; // USHR Vd.16B,Vn.16B,#n - // if(None) intrin_id = ARM64_INTRIN_VSHR_N_U64; // USHR Dd,Dn,#n - // if(None) intrin_id = ARM64_INTRIN_VSHRD_N_U64; // USHR Dd,Dn,#n - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USMMLA_ASIMDSAME2_G: - intrin_id = ARM64_INTRIN_VUSMMLAQ_S32; // USMMLA Vd.4S,Vn.16B,Vm.16B - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USQADD_ASIMDMISC_R: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSQADD_U8; // USQADD Vd.8B,Vn.8B - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VSQADDQ_U8; // USQADD Vd.16B,Vn.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSQADD_U16; // USQADD Vd.4H,Vn.4H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSQADDQ_U16; // USQADD Vd.8H,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSQADD_U32; // USQADD Vd.2S,Vn.2S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSQADDQ_U32; // USQADD Vd.4S,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSQADDQ_U64; // USQADD Vd.2D,Vn.2D - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USQADD_ASISDMISC_R: - intrin_id = ARM64_INTRIN_VSQADD_U64; // USQADD Dd,Dn - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USRA_ASIMDSHF_R: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VSRA_N_U8; // USRA Vd.8B,Vn.8B,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VSRA_N_U16; // USRA Vd.4H,Vn.4H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSRAQ_N_U16; // USRA Vd.8H,Vn.8H,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VSRA_N_U32; // USRA Vd.2S,Vn.2S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSRAQ_N_U32; // USRA Vd.4S,Vn.4S,#n - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSRAQ_N_U64; // USRA Vd.2D,Vn.2D,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USRA_ASISDSHF_R: - if ((instr.operands[0].reg[0] >= REG_D0 && instr.operands[0].reg[0] <= REG_D31) && (instr.operands[1].reg[0] >= REG_D0 && instr.operands[1].reg[0] <= REG_D31) && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint64_t vsrad_n_u64(uint64_t a, uint64_t b, const int n) - // argprep: a -> Dd; b -> Dn; n -> n - // results: Dd -> result - intrin_id = ARM64_INTRIN_VSRAD_N_U64; // USRA Dd,Dn,#n - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && (instr.operands[2].operandClass && instr.operands[2].operandClass <= FIMM32)) - // uint8x16_t vsraq_n_u8(uint8x16_t a, uint8x16_t b, const int n) - // argprep: a -> Vd.16B; b -> Vn.16B; n -> n - // results: Vd.16B -> result - intrin_id = ARM64_INTRIN_VSRAQ_N_U8; // USRA Vd.16B,Vn.16B,#n - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_imm(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USUBL_ASIMDDIFF_L: - if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_8HALVES && instr.operands[2].arrSpec == ARRSPEC_8HALVES) - // uint32x4_t vsubl_high_u16(uint16x8_t a, uint16x8_t b) - // argprep: a -> Vn.8H; b -> Vm.8H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSUBL_HIGH_U16; // USUBL2 Vd.4S,Vn.8H,Vm.8H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_4SINGLES && instr.operands[2].arrSpec == ARRSPEC_4SINGLES) - // uint64x2_t vsubl_high_u32(uint32x4_t a, uint32x4_t b) - // argprep: a -> Vn.4S; b -> Vm.4S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSUBL_HIGH_U32; // USUBL2 Vd.2D,Vn.4S,Vm.4S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_16BYTES && instr.operands[2].arrSpec == ARRSPEC_16BYTES) - // uint16x8_t vsubl_high_u8(uint8x16_t a, uint8x16_t b) - // argprep: a -> Vn.16B; b -> Vm.16B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSUBL_HIGH_U8; // USUBL2 Vd.8H,Vn.16B,Vm.16B - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES && instr.operands[1].arrSpec == ARRSPEC_4HALVES && instr.operands[2].arrSpec == ARRSPEC_4HALVES) - // uint32x4_t vsubl_u16(uint16x4_t a, uint16x4_t b) - // argprep: a -> Vn.4H; b -> Vm.4H - // results: Vd.4S -> result - intrin_id = ARM64_INTRIN_VSUBL_U16; // USUBL Vd.4S,Vn.4H,Vm.4H - else if (instr.operands[0].arrSpec == ARRSPEC_2DOUBLES && instr.operands[1].arrSpec == ARRSPEC_2SINGLES && instr.operands[2].arrSpec == ARRSPEC_2SINGLES) - // uint64x2_t vsubl_u32(uint32x2_t a, uint32x2_t b) - // argprep: a -> Vn.2S; b -> Vm.2S - // results: Vd.2D -> result - intrin_id = ARM64_INTRIN_VSUBL_U32; // USUBL Vd.2D,Vn.2S,Vm.2S - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES && instr.operands[1].arrSpec == ARRSPEC_8BYTES && instr.operands[2].arrSpec == ARRSPEC_8BYTES) - // uint16x8_t vsubl_u8(uint8x8_t a, uint8x8_t b) - // argprep: a -> Vn.8B; b -> Vm.8B - // results: Vd.8H -> result - intrin_id = ARM64_INTRIN_VSUBL_U8; // USUBL Vd.8H,Vn.8B,Vm.8B - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_USUBW_ASIMDDIFF_W: - if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSUBW_U8; // USUBW Vd.8H,Vn.8H,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUBW_U16; // USUBW Vd.4S,Vn.4S,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSUBW_U32; // USUBW Vd.2D,Vn.2D,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VSUBW_HIGH_U8; // USUBW2 Vd.8H,Vn.8H,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VSUBW_HIGH_U16; // USUBW2 Vd.4S,Vn.4S,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VSUBW_HIGH_U32; // USUBW2 Vd.2D,Vn.2D,Vm.4S - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UZP1_ASIMDPERM_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VUZP1_S8; // UZP1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VUZP1Q_S8; // UZP1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP1_S16; // UZP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP1Q_S16; // UZP1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUZP1_S32; // UZP1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUZP1Q_S32; // UZP1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP1Q_S64; // UZP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VUZP1_U8; // UZP1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VUZP1Q_U8; // UZP1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP1_U16; // UZP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP1Q_U16; // UZP1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUZP1_U32; // UZP1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUZP1Q_U32; // UZP1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP1Q_U64; // UZP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP1Q_P64; // UZP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUZP1_F32; // UZP1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUZP1Q_F32; // UZP1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP1Q_F64; // UZP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VUZP1_P8; // UZP1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VUZP1Q_P8; // UZP1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP1_P16; // UZP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP1Q_P16; // UZP1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP1_F16; // UZP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP1Q_F16; // UZP1 Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_UZP2_ASIMDPERM_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VUZP2_S8; // UZP2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VUZP2Q_S8; // UZP2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP2_S16; // UZP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP2Q_S16; // UZP2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUZP2_S32; // UZP2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUZP2Q_S32; // UZP2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP2Q_S64; // UZP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VUZP2_U8; // UZP2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VUZP2Q_U8; // UZP2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP2_U16; // UZP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP2Q_U16; // UZP2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUZP2_U32; // UZP2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUZP2Q_U32; // UZP2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP2Q_U64; // UZP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP2Q_P64; // UZP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VUZP2_F32; // UZP2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VUZP2Q_F32; // UZP2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VUZP2Q_F64; // UZP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VUZP2_P8; // UZP2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VUZP2Q_P8; // UZP2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP2_P16; // UZP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP2Q_P16; // UZP2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VUZP2_F16; // UZP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VUZP2Q_F16; // UZP2 Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_XAR_VVV2_CRYPTO3_IMM6: - intrin_id = ARM64_INTRIN_VXARQ_U64; // XAR Vd.2D,Vn.2D,Vm.2D,imm6 - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_imm(inputs, il, instr.operands[3]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_XTN_ASIMDMISC_N: - if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMOVN_S16; // XTN Vd.8B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMOVN_S32; // XTN Vd.4H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMOVN_S64; // XTN Vd.2S,Vn.2D - else if (instr.operands[0].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VMOVN_U16; // XTN Vd.8B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VMOVN_U32; // XTN Vd.4H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VMOVN_U64; // XTN Vd.2S,Vn.2D - - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMOVN_HIGH_S16; // XTN2 Vd.16B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMOVN_HIGH_S32; // XTN2 Vd.8H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMOVN_HIGH_S64; // XTN2 Vd.4S,Vn.2D - else if (instr.operands[0].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VMOVN_HIGH_U16; // XTN2 Vd.16B,Vn.8H - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VMOVN_HIGH_U32; // XTN2 Vd.8H,Vn.4S - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VMOVN_HIGH_U64; // XTN2 Vd.4S,Vn.2D - add_input_reg(inputs, il, instr.operands[1]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_ZIP1_ASIMDPERM_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VZIP1_S8; // ZIP1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VZIP1Q_S8; // ZIP1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP1_S16; // ZIP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP1Q_S16; // ZIP1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VZIP1_S32; // ZIP1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VZIP1Q_S32; // ZIP1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP1Q_S64; // ZIP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VZIP1_U8; // ZIP1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VZIP1Q_U8; // ZIP1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP1_U16; // ZIP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP1Q_U16; // ZIP1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VZIP1_U32; // ZIP1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VZIP1Q_U32; // ZIP1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP1Q_U64; // ZIP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP1Q_P64; // ZIP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VZIP1_F32; // ZIP1 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VZIP1Q_F32; // ZIP1 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP1Q_F64; // ZIP1 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VZIP1_P8; // ZIP1 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VZIP1Q_P8; // ZIP1 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP1_P16; // ZIP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP1Q_P16; // ZIP1 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP1_F16; // ZIP1 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP1Q_F16; // ZIP1 Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_ZIP2_ASIMDPERM_ONLY: - if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VZIP2_S8; // ZIP2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VZIP2Q_S8; // ZIP2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP2_S16; // ZIP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP2Q_S16; // ZIP2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VZIP2_S32; // ZIP2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VZIP2Q_S32; // ZIP2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP2Q_S64; // ZIP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VZIP2_U8; // ZIP2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VZIP2Q_U8; // ZIP2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP2_U16; // ZIP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP2Q_U16; // ZIP2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VZIP2_U32; // ZIP2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VZIP2Q_U32; // ZIP2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP2Q_U64; // ZIP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP2Q_P64; // ZIP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VZIP2_F32; // ZIP2 Vd.2S,Vn.2S,Vm.2S - else if (instr.operands[1].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VZIP2Q_F32; // ZIP2 Vd.4S,Vn.4S,Vm.4S - else if (instr.operands[1].arrSpec == ARRSPEC_2DOUBLES) - intrin_id = ARM64_INTRIN_VZIP2Q_F64; // ZIP2 Vd.2D,Vn.2D,Vm.2D - else if (instr.operands[1].arrSpec == ARRSPEC_8BYTES) - intrin_id = ARM64_INTRIN_VZIP2_P8; // ZIP2 Vd.8B,Vn.8B,Vm.8B - else if (instr.operands[1].arrSpec == ARRSPEC_16BYTES) - intrin_id = ARM64_INTRIN_VZIP2Q_P8; // ZIP2 Vd.16B,Vn.16B,Vm.16B - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP2_P16; // ZIP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP2Q_P16; // ZIP2 Vd.8H,Vn.8H,Vm.8H - else if (instr.operands[1].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VZIP2_F16; // ZIP2 Vd.4H,Vn.4H,Vm.4H - else if (instr.operands[1].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VZIP2Q_F16; // ZIP2 Vd.8H,Vn.8H,Vm.8H - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - // case ENC_BFMLALB_Z_ZZZ_: - // intrin_id = ARM64_INTRIN_VBFMLALBQ_F32; // BFMLALB Vd.4S,Vn.8H,Vm.8H - // add_input_reg(inputs, il, instr.operands[0]); - // add_input_reg(inputs, il, instr.operands[1]); - // add_input_reg(inputs, il, instr.operands[2]); - // add_output_reg(outputs, il, instr.operands[0]); - // break; - // case ENC_BFMLALB_Z_ZZZI_: - // if(instr.operands[0].arrSpec==ARRSPEC_4SINGLES) intrin_id = - // ARM64_INTRIN_VBFMLALBQ_LANE_F32; // BFMLALB Vd.4S,Vn.8H,Vm.H[lane] - // if(instr.operands[0].arrSpec==ARRSPEC_4SINGLES) intrin_id = - // ARM64_INTRIN_VBFMLALBQ_LANEQ_F32; // BFMLALB Vd.4S,Vn.8H,Vm.H[lane] add_input_reg(inputs, - // il, instr.operands[0]); add_input_reg(inputs, il, instr.operands[1]); - // add_input_reg(inputs, il, instr.operands[2]); add_input_lane(inputs, il, - // instr.operands[2]); add_output_reg(outputs, il, instr.operands[0]); break; case - // ENC_BFMLALT_Z_ZZZ_: intrin_id = ARM64_INTRIN_VBFMLALTQ_F32; // BFMLALT Vd.4S,Vn.8H,Vm.8H - // add_input_reg(inputs, il, instr.operands[0]); add_input_reg(inputs, il, - // instr.operands[1]); add_input_reg(inputs, il, instr.operands[2]); - // add_output_reg(outputs, il, instr.operands[0]); break; case ENC_BFMLALT_Z_ZZZI_: - // if(instr.operands[0].arrSpec==ARRSPEC_4SINGLES) intrin_id = - // ARM64_INTRIN_VBFMLALTQ_LANE_F32; // BFMLALT Vd.4S,Vn.8H,Vm.H[lane] - // if(instr.operands[0].arrSpec==ARRSPEC_4SINGLES) intrin_id = - // ARM64_INTRIN_VBFMLALTQ_LANEQ_F32; // BFMLALT Vd.4S,Vn.8H,Vm.H[lane] add_input_reg(inputs, - // il, instr.operands[0]); add_input_reg(inputs, il, instr.operands[1]); - // add_input_reg(inputs, il, instr.operands[2]); add_input_lane(inputs, il, - // instr.operands[2]); add_output_reg(outputs, il, instr.operands[0]); break; - case ENC_FCMLA_Z_ZZZI_H: - if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VCMLA_ROT180_LANE_F16; // FCMLA Vd.4H,Vn.4H,Vm.H[lane],#180 - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VCMLA_ROT180_LANEQ_F16; // FCMLA Vd.4H,Vn.4H,Vm.H[lane],#180 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT180_LANE_F16; // FCMLA Vd.8H,Vn.8H,Vm.H[lane],#180 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT180_LANEQ_F16; // FCMLA Vd.8H,Vn.8H,Vm.H[lane],#180 - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VCMLA_ROT270_LANE_F16; // FCMLA Vd.4H,Vn.4H,Vm.H[lane],#270 - else if (instr.operands[0].arrSpec == ARRSPEC_4HALVES) - intrin_id = ARM64_INTRIN_VCMLA_ROT270_LANEQ_F16; // FCMLA Vd.4H,Vn.4H,Vm.H[lane],#270 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT270_LANE_F16; // FCMLA Vd.8H,Vn.8H,Vm.H[lane],#270 - else if (instr.operands[0].arrSpec == ARRSPEC_8HALVES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT270_LANEQ_F16; // FCMLA Vd.8H,Vn.8H,Vm.H[lane],#270 - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - case ENC_FCMLA_Z_ZZZI_S: - if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VCMLA_ROT180_LANE_F32; // FCMLA Vd.2S,Vn.2S,Vm.2S[lane],#180 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT180_LANE_F32; // FCMLA Vd.4S,Vn.4S,Vm.S[lane],#180 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT180_LANEQ_F32; // FCMLA Vd.4S,Vn.4S,Vm.S[lane],#180 - else if (instr.operands[0].arrSpec == ARRSPEC_2SINGLES) - intrin_id = ARM64_INTRIN_VCMLA_ROT270_LANE_F32; // FCMLA Vd.2S,Vn.2S,Vm.2S[lane],#270 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT270_LANE_F32; // FCMLA Vd.4S,Vn.4S,Vm.S[lane],#270 - else if (instr.operands[0].arrSpec == ARRSPEC_4SINGLES) - intrin_id = ARM64_INTRIN_VCMLAQ_ROT270_LANEQ_F32; // FCMLA Vd.4S,Vn.4S,Vm.S[lane],#270 - add_input_reg(inputs, il, instr.operands[0]); - add_input_reg(inputs, il, instr.operands[1]); - add_input_reg(inputs, il, instr.operands[2]); - add_input_lane(inputs, il, instr.operands[2]); - add_output_reg(outputs, il, instr.operands[0]); - break; - - default: - break; - } - - if (intrin_id != (NeonIntrinsic)ARM64_INTRIN_INVALID) - il.AddInstruction(il.Intrinsic(outputs, intrin_id, inputs)); - - return true; -} diff --git a/arch/arm64/neon_intrinsics.h b/arch/arm64/neon_intrinsics.h deleted file mode 100644 index b63d61860..000000000 --- a/arch/arm64/neon_intrinsics.h +++ /dev/null @@ -1,3998 +0,0 @@ -#pragma once - -#include - -#include -#include -#include - -// from api -#include "il.h" /* for ARM64_INTRIN_NORMAL_END, ExtractRegister() */ -#include "lowlevelilinstruction.h" - -using namespace std; -using namespace BinaryNinja; - -enum NeonIntrinsic : uint32_t -{ - ARM64_INTRIN_VADD_S8 = ARM64_INTRIN_NORMAL_END, - ARM64_INTRIN_VADDQ_S8, - ARM64_INTRIN_VADD_S16, - ARM64_INTRIN_VADDQ_S16, - ARM64_INTRIN_VADD_S32, - ARM64_INTRIN_VADDQ_S32, - ARM64_INTRIN_VADD_S64, - ARM64_INTRIN_VADDQ_S64, - ARM64_INTRIN_VADD_U8, - ARM64_INTRIN_VADDQ_U8, - ARM64_INTRIN_VADD_U16, - ARM64_INTRIN_VADDQ_U16, - ARM64_INTRIN_VADD_U32, - ARM64_INTRIN_VADDQ_U32, - ARM64_INTRIN_VADD_U64, - ARM64_INTRIN_VADDQ_U64, - ARM64_INTRIN_VADD_F32, - ARM64_INTRIN_VADDQ_F32, - ARM64_INTRIN_VADD_F64, - ARM64_INTRIN_VADDQ_F64, - ARM64_INTRIN_VADDD_S64, - ARM64_INTRIN_VADDD_U64, - ARM64_INTRIN_VADDL_S8, - ARM64_INTRIN_VADDL_S16, - ARM64_INTRIN_VADDL_S32, - ARM64_INTRIN_VADDL_U8, - ARM64_INTRIN_VADDL_U16, - ARM64_INTRIN_VADDL_U32, - ARM64_INTRIN_VADDL_HIGH_S8, - ARM64_INTRIN_VADDL_HIGH_S16, - ARM64_INTRIN_VADDL_HIGH_S32, - ARM64_INTRIN_VADDL_HIGH_U8, - ARM64_INTRIN_VADDL_HIGH_U16, - ARM64_INTRIN_VADDL_HIGH_U32, - ARM64_INTRIN_VADDW_S8, - ARM64_INTRIN_VADDW_S16, - ARM64_INTRIN_VADDW_S32, - ARM64_INTRIN_VADDW_U8, - ARM64_INTRIN_VADDW_U16, - ARM64_INTRIN_VADDW_U32, - ARM64_INTRIN_VADDW_HIGH_S8, - ARM64_INTRIN_VADDW_HIGH_S16, - ARM64_INTRIN_VADDW_HIGH_S32, - ARM64_INTRIN_VADDW_HIGH_U8, - ARM64_INTRIN_VADDW_HIGH_U16, - ARM64_INTRIN_VADDW_HIGH_U32, - ARM64_INTRIN_VHADD_S8, - ARM64_INTRIN_VHADDQ_S8, - ARM64_INTRIN_VHADD_S16, - ARM64_INTRIN_VHADDQ_S16, - ARM64_INTRIN_VHADD_S32, - ARM64_INTRIN_VHADDQ_S32, - ARM64_INTRIN_VHADD_U8, - ARM64_INTRIN_VHADDQ_U8, - ARM64_INTRIN_VHADD_U16, - ARM64_INTRIN_VHADDQ_U16, - ARM64_INTRIN_VHADD_U32, - ARM64_INTRIN_VHADDQ_U32, - ARM64_INTRIN_VRHADD_S8, - ARM64_INTRIN_VRHADDQ_S8, - ARM64_INTRIN_VRHADD_S16, - ARM64_INTRIN_VRHADDQ_S16, - ARM64_INTRIN_VRHADD_S32, - ARM64_INTRIN_VRHADDQ_S32, - ARM64_INTRIN_VRHADD_U8, - ARM64_INTRIN_VRHADDQ_U8, - ARM64_INTRIN_VRHADD_U16, - ARM64_INTRIN_VRHADDQ_U16, - ARM64_INTRIN_VRHADD_U32, - ARM64_INTRIN_VRHADDQ_U32, - ARM64_INTRIN_VQADD_S8, - ARM64_INTRIN_VQADDQ_S8, - ARM64_INTRIN_VQADD_S16, - ARM64_INTRIN_VQADDQ_S16, - ARM64_INTRIN_VQADD_S32, - ARM64_INTRIN_VQADDQ_S32, - ARM64_INTRIN_VQADD_S64, - ARM64_INTRIN_VQADDQ_S64, - ARM64_INTRIN_VQADD_U8, - ARM64_INTRIN_VQADDQ_U8, - ARM64_INTRIN_VQADD_U16, - ARM64_INTRIN_VQADDQ_U16, - ARM64_INTRIN_VQADD_U32, - ARM64_INTRIN_VQADDQ_U32, - ARM64_INTRIN_VQADD_U64, - ARM64_INTRIN_VQADDQ_U64, - ARM64_INTRIN_VQADDB_S8, - ARM64_INTRIN_VQADDH_S16, - ARM64_INTRIN_VQADDS_S32, - ARM64_INTRIN_VQADDD_S64, - ARM64_INTRIN_VQADDB_U8, - ARM64_INTRIN_VQADDH_U16, - ARM64_INTRIN_VQADDS_U32, - ARM64_INTRIN_VQADDD_U64, - ARM64_INTRIN_VUQADD_S8, - ARM64_INTRIN_VUQADDQ_S8, - ARM64_INTRIN_VUQADD_S16, - ARM64_INTRIN_VUQADDQ_S16, - ARM64_INTRIN_VUQADD_S32, - ARM64_INTRIN_VUQADDQ_S32, - ARM64_INTRIN_VUQADD_S64, - ARM64_INTRIN_VUQADDQ_S64, - ARM64_INTRIN_VUQADDB_S8, - ARM64_INTRIN_VUQADDH_S16, - ARM64_INTRIN_VUQADDS_S32, - ARM64_INTRIN_VUQADDD_S64, - ARM64_INTRIN_VSQADD_U8, - ARM64_INTRIN_VSQADDQ_U8, - ARM64_INTRIN_VSQADD_U16, - ARM64_INTRIN_VSQADDQ_U16, - ARM64_INTRIN_VSQADD_U32, - ARM64_INTRIN_VSQADDQ_U32, - ARM64_INTRIN_VSQADD_U64, - ARM64_INTRIN_VSQADDQ_U64, - ARM64_INTRIN_VSQADDB_U8, - ARM64_INTRIN_VSQADDH_U16, - ARM64_INTRIN_VSQADDS_U32, - ARM64_INTRIN_VSQADDD_U64, - ARM64_INTRIN_VADDHN_S16, - ARM64_INTRIN_VADDHN_S32, - ARM64_INTRIN_VADDHN_S64, - ARM64_INTRIN_VADDHN_U16, - ARM64_INTRIN_VADDHN_U32, - ARM64_INTRIN_VADDHN_U64, - ARM64_INTRIN_VADDHN_HIGH_S16, - ARM64_INTRIN_VADDHN_HIGH_S32, - ARM64_INTRIN_VADDHN_HIGH_S64, - ARM64_INTRIN_VADDHN_HIGH_U16, - ARM64_INTRIN_VADDHN_HIGH_U32, - ARM64_INTRIN_VADDHN_HIGH_U64, - ARM64_INTRIN_VRADDHN_S16, - ARM64_INTRIN_VRADDHN_S32, - ARM64_INTRIN_VRADDHN_S64, - ARM64_INTRIN_VRADDHN_U16, - ARM64_INTRIN_VRADDHN_U32, - ARM64_INTRIN_VRADDHN_U64, - ARM64_INTRIN_VRADDHN_HIGH_S16, - ARM64_INTRIN_VRADDHN_HIGH_S32, - ARM64_INTRIN_VRADDHN_HIGH_S64, - ARM64_INTRIN_VRADDHN_HIGH_U16, - ARM64_INTRIN_VRADDHN_HIGH_U32, - ARM64_INTRIN_VRADDHN_HIGH_U64, - ARM64_INTRIN_VMUL_S8, - ARM64_INTRIN_VMULQ_S8, - ARM64_INTRIN_VMUL_S16, - ARM64_INTRIN_VMULQ_S16, - ARM64_INTRIN_VMUL_S32, - ARM64_INTRIN_VMULQ_S32, - ARM64_INTRIN_VMUL_U8, - ARM64_INTRIN_VMULQ_U8, - ARM64_INTRIN_VMUL_U16, - ARM64_INTRIN_VMULQ_U16, - ARM64_INTRIN_VMUL_U32, - ARM64_INTRIN_VMULQ_U32, - ARM64_INTRIN_VMUL_F32, - ARM64_INTRIN_VMULQ_F32, - ARM64_INTRIN_VMUL_P8, - ARM64_INTRIN_VMULQ_P8, - ARM64_INTRIN_VMUL_F64, - ARM64_INTRIN_VMULQ_F64, - ARM64_INTRIN_VMULX_F32, - ARM64_INTRIN_VMULXQ_F32, - ARM64_INTRIN_VMULX_F64, - ARM64_INTRIN_VMULXQ_F64, - ARM64_INTRIN_VMULXS_F32, - ARM64_INTRIN_VMULXD_F64, - ARM64_INTRIN_VMULX_LANE_F32, - ARM64_INTRIN_VMULXQ_LANE_F32, - ARM64_INTRIN_VMULX_LANE_F64, - ARM64_INTRIN_VMULXQ_LANE_F64, - ARM64_INTRIN_VMULXS_LANE_F32, - ARM64_INTRIN_VMULXD_LANE_F64, - ARM64_INTRIN_VMULX_LANEQ_F32, - ARM64_INTRIN_VMULXQ_LANEQ_F32, - ARM64_INTRIN_VMULX_LANEQ_F64, - ARM64_INTRIN_VMULXQ_LANEQ_F64, - ARM64_INTRIN_VMULXS_LANEQ_F32, - ARM64_INTRIN_VMULXD_LANEQ_F64, - ARM64_INTRIN_VDIV_F32, - ARM64_INTRIN_VDIVQ_F32, - ARM64_INTRIN_VDIV_F64, - ARM64_INTRIN_VDIVQ_F64, - ARM64_INTRIN_VMLA_S8, - ARM64_INTRIN_VMLAQ_S8, - ARM64_INTRIN_VMLA_S16, - ARM64_INTRIN_VMLAQ_S16, - ARM64_INTRIN_VMLA_S32, - ARM64_INTRIN_VMLAQ_S32, - ARM64_INTRIN_VMLA_U8, - ARM64_INTRIN_VMLAQ_U8, - ARM64_INTRIN_VMLA_U16, - ARM64_INTRIN_VMLAQ_U16, - ARM64_INTRIN_VMLA_U32, - ARM64_INTRIN_VMLAQ_U32, - ARM64_INTRIN_VMLA_F32, - ARM64_INTRIN_VMLAQ_F32, - ARM64_INTRIN_VMLA_F64, - ARM64_INTRIN_VMLAQ_F64, - ARM64_INTRIN_VMLAL_S8, - ARM64_INTRIN_VMLAL_S16, - ARM64_INTRIN_VMLAL_S32, - ARM64_INTRIN_VMLAL_U8, - ARM64_INTRIN_VMLAL_U16, - ARM64_INTRIN_VMLAL_U32, - ARM64_INTRIN_VMLAL_HIGH_S8, - ARM64_INTRIN_VMLAL_HIGH_S16, - ARM64_INTRIN_VMLAL_HIGH_S32, - ARM64_INTRIN_VMLAL_HIGH_U8, - ARM64_INTRIN_VMLAL_HIGH_U16, - ARM64_INTRIN_VMLAL_HIGH_U32, - ARM64_INTRIN_VMLS_S8, - ARM64_INTRIN_VMLSQ_S8, - ARM64_INTRIN_VMLS_S16, - ARM64_INTRIN_VMLSQ_S16, - ARM64_INTRIN_VMLS_S32, - ARM64_INTRIN_VMLSQ_S32, - ARM64_INTRIN_VMLS_U8, - ARM64_INTRIN_VMLSQ_U8, - ARM64_INTRIN_VMLS_U16, - ARM64_INTRIN_VMLSQ_U16, - ARM64_INTRIN_VMLS_U32, - ARM64_INTRIN_VMLSQ_U32, - ARM64_INTRIN_VMLS_F32, - ARM64_INTRIN_VMLSQ_F32, - ARM64_INTRIN_VMLS_F64, - ARM64_INTRIN_VMLSQ_F64, - ARM64_INTRIN_VMLSL_S8, - ARM64_INTRIN_VMLSL_S16, - ARM64_INTRIN_VMLSL_S32, - ARM64_INTRIN_VMLSL_U8, - ARM64_INTRIN_VMLSL_U16, - ARM64_INTRIN_VMLSL_U32, - ARM64_INTRIN_VMLSL_HIGH_S8, - ARM64_INTRIN_VMLSL_HIGH_S16, - ARM64_INTRIN_VMLSL_HIGH_S32, - ARM64_INTRIN_VMLSL_HIGH_U8, - ARM64_INTRIN_VMLSL_HIGH_U16, - ARM64_INTRIN_VMLSL_HIGH_U32, - ARM64_INTRIN_VFMA_F32, - ARM64_INTRIN_VFMAQ_F32, - ARM64_INTRIN_VFMA_F64, - ARM64_INTRIN_VFMAQ_F64, - ARM64_INTRIN_VFMA_LANE_F32, - ARM64_INTRIN_VFMAQ_LANE_F32, - ARM64_INTRIN_VFMA_LANE_F64, - ARM64_INTRIN_VFMAQ_LANE_F64, - ARM64_INTRIN_VFMAS_LANE_F32, - ARM64_INTRIN_VFMAD_LANE_F64, - ARM64_INTRIN_VFMA_LANEQ_F32, - ARM64_INTRIN_VFMAQ_LANEQ_F32, - ARM64_INTRIN_VFMA_LANEQ_F64, - ARM64_INTRIN_VFMAQ_LANEQ_F64, - ARM64_INTRIN_VFMAS_LANEQ_F32, - ARM64_INTRIN_VFMAD_LANEQ_F64, - ARM64_INTRIN_VFMS_F32, - ARM64_INTRIN_VFMSQ_F32, - ARM64_INTRIN_VFMS_F64, - ARM64_INTRIN_VFMSQ_F64, - ARM64_INTRIN_VFMS_LANE_F32, - ARM64_INTRIN_VFMSQ_LANE_F32, - ARM64_INTRIN_VFMS_LANE_F64, - ARM64_INTRIN_VFMSQ_LANE_F64, - ARM64_INTRIN_VFMSS_LANE_F32, - ARM64_INTRIN_VFMSD_LANE_F64, - ARM64_INTRIN_VFMS_LANEQ_F32, - ARM64_INTRIN_VFMSQ_LANEQ_F32, - ARM64_INTRIN_VFMS_LANEQ_F64, - ARM64_INTRIN_VFMSQ_LANEQ_F64, - ARM64_INTRIN_VFMSS_LANEQ_F32, - ARM64_INTRIN_VFMSD_LANEQ_F64, - ARM64_INTRIN_VQDMULH_S16, - ARM64_INTRIN_VQDMULHQ_S16, - ARM64_INTRIN_VQDMULH_S32, - ARM64_INTRIN_VQDMULHQ_S32, - ARM64_INTRIN_VQDMULHH_S16, - ARM64_INTRIN_VQDMULHS_S32, - ARM64_INTRIN_VQRDMULH_S16, - ARM64_INTRIN_VQRDMULHQ_S16, - ARM64_INTRIN_VQRDMULH_S32, - ARM64_INTRIN_VQRDMULHQ_S32, - ARM64_INTRIN_VQRDMULHH_S16, - ARM64_INTRIN_VQRDMULHS_S32, - ARM64_INTRIN_VQDMLAL_S16, - ARM64_INTRIN_VQDMLAL_S32, - ARM64_INTRIN_VQDMLALH_S16, - ARM64_INTRIN_VQDMLALS_S32, - ARM64_INTRIN_VQDMLAL_HIGH_S16, - ARM64_INTRIN_VQDMLAL_HIGH_S32, - ARM64_INTRIN_VQDMLSL_S16, - ARM64_INTRIN_VQDMLSL_S32, - ARM64_INTRIN_VQDMLSLH_S16, - ARM64_INTRIN_VQDMLSLS_S32, - ARM64_INTRIN_VQDMLSL_HIGH_S16, - ARM64_INTRIN_VQDMLSL_HIGH_S32, - ARM64_INTRIN_VMULL_S8, - ARM64_INTRIN_VMULL_S16, - ARM64_INTRIN_VMULL_S32, - ARM64_INTRIN_VMULL_U8, - ARM64_INTRIN_VMULL_U16, - ARM64_INTRIN_VMULL_U32, - ARM64_INTRIN_VMULL_P8, - ARM64_INTRIN_VMULL_HIGH_S8, - ARM64_INTRIN_VMULL_HIGH_S16, - ARM64_INTRIN_VMULL_HIGH_S32, - ARM64_INTRIN_VMULL_HIGH_U8, - ARM64_INTRIN_VMULL_HIGH_U16, - ARM64_INTRIN_VMULL_HIGH_U32, - ARM64_INTRIN_VMULL_HIGH_P8, - ARM64_INTRIN_VQDMULL_S16, - ARM64_INTRIN_VQDMULL_S32, - ARM64_INTRIN_VQDMULLH_S16, - ARM64_INTRIN_VQDMULLS_S32, - ARM64_INTRIN_VQDMULL_HIGH_S16, - ARM64_INTRIN_VQDMULL_HIGH_S32, - ARM64_INTRIN_VSUB_S8, - ARM64_INTRIN_VSUBQ_S8, - ARM64_INTRIN_VSUB_S16, - ARM64_INTRIN_VSUBQ_S16, - ARM64_INTRIN_VSUB_S32, - ARM64_INTRIN_VSUBQ_S32, - ARM64_INTRIN_VSUB_S64, - ARM64_INTRIN_VSUBQ_S64, - ARM64_INTRIN_VSUB_U8, - ARM64_INTRIN_VSUBQ_U8, - ARM64_INTRIN_VSUB_U16, - ARM64_INTRIN_VSUBQ_U16, - ARM64_INTRIN_VSUB_U32, - ARM64_INTRIN_VSUBQ_U32, - ARM64_INTRIN_VSUB_U64, - ARM64_INTRIN_VSUBQ_U64, - ARM64_INTRIN_VSUB_F32, - ARM64_INTRIN_VSUBQ_F32, - ARM64_INTRIN_VSUB_F64, - ARM64_INTRIN_VSUBQ_F64, - ARM64_INTRIN_VSUBD_S64, - ARM64_INTRIN_VSUBD_U64, - ARM64_INTRIN_VSUBL_S8, - ARM64_INTRIN_VSUBL_S16, - ARM64_INTRIN_VSUBL_S32, - ARM64_INTRIN_VSUBL_U8, - ARM64_INTRIN_VSUBL_U16, - ARM64_INTRIN_VSUBL_U32, - ARM64_INTRIN_VSUBL_HIGH_S8, - ARM64_INTRIN_VSUBL_HIGH_S16, - ARM64_INTRIN_VSUBL_HIGH_S32, - ARM64_INTRIN_VSUBL_HIGH_U8, - ARM64_INTRIN_VSUBL_HIGH_U16, - ARM64_INTRIN_VSUBL_HIGH_U32, - ARM64_INTRIN_VSUBW_S8, - ARM64_INTRIN_VSUBW_S16, - ARM64_INTRIN_VSUBW_S32, - ARM64_INTRIN_VSUBW_U8, - ARM64_INTRIN_VSUBW_U16, - ARM64_INTRIN_VSUBW_U32, - ARM64_INTRIN_VSUBW_HIGH_S8, - ARM64_INTRIN_VSUBW_HIGH_S16, - ARM64_INTRIN_VSUBW_HIGH_S32, - ARM64_INTRIN_VSUBW_HIGH_U8, - ARM64_INTRIN_VSUBW_HIGH_U16, - ARM64_INTRIN_VSUBW_HIGH_U32, - ARM64_INTRIN_VHSUB_S8, - ARM64_INTRIN_VHSUBQ_S8, - ARM64_INTRIN_VHSUB_S16, - ARM64_INTRIN_VHSUBQ_S16, - ARM64_INTRIN_VHSUB_S32, - ARM64_INTRIN_VHSUBQ_S32, - ARM64_INTRIN_VHSUB_U8, - ARM64_INTRIN_VHSUBQ_U8, - ARM64_INTRIN_VHSUB_U16, - ARM64_INTRIN_VHSUBQ_U16, - ARM64_INTRIN_VHSUB_U32, - ARM64_INTRIN_VHSUBQ_U32, - ARM64_INTRIN_VQSUB_S8, - ARM64_INTRIN_VQSUBQ_S8, - ARM64_INTRIN_VQSUB_S16, - ARM64_INTRIN_VQSUBQ_S16, - ARM64_INTRIN_VQSUB_S32, - ARM64_INTRIN_VQSUBQ_S32, - ARM64_INTRIN_VQSUB_S64, - ARM64_INTRIN_VQSUBQ_S64, - ARM64_INTRIN_VQSUB_U8, - ARM64_INTRIN_VQSUBQ_U8, - ARM64_INTRIN_VQSUB_U16, - ARM64_INTRIN_VQSUBQ_U16, - ARM64_INTRIN_VQSUB_U32, - ARM64_INTRIN_VQSUBQ_U32, - ARM64_INTRIN_VQSUB_U64, - ARM64_INTRIN_VQSUBQ_U64, - ARM64_INTRIN_VQSUBB_S8, - ARM64_INTRIN_VQSUBH_S16, - ARM64_INTRIN_VQSUBS_S32, - ARM64_INTRIN_VQSUBD_S64, - ARM64_INTRIN_VQSUBB_U8, - ARM64_INTRIN_VQSUBH_U16, - ARM64_INTRIN_VQSUBS_U32, - ARM64_INTRIN_VQSUBD_U64, - ARM64_INTRIN_VSUBHN_S16, - ARM64_INTRIN_VSUBHN_S32, - ARM64_INTRIN_VSUBHN_S64, - ARM64_INTRIN_VSUBHN_U16, - ARM64_INTRIN_VSUBHN_U32, - ARM64_INTRIN_VSUBHN_U64, - ARM64_INTRIN_VSUBHN_HIGH_S16, - ARM64_INTRIN_VSUBHN_HIGH_S32, - ARM64_INTRIN_VSUBHN_HIGH_S64, - ARM64_INTRIN_VSUBHN_HIGH_U16, - ARM64_INTRIN_VSUBHN_HIGH_U32, - ARM64_INTRIN_VSUBHN_HIGH_U64, - ARM64_INTRIN_VRSUBHN_S16, - ARM64_INTRIN_VRSUBHN_S32, - ARM64_INTRIN_VRSUBHN_S64, - ARM64_INTRIN_VRSUBHN_U16, - ARM64_INTRIN_VRSUBHN_U32, - ARM64_INTRIN_VRSUBHN_U64, - ARM64_INTRIN_VRSUBHN_HIGH_S16, - ARM64_INTRIN_VRSUBHN_HIGH_S32, - ARM64_INTRIN_VRSUBHN_HIGH_S64, - ARM64_INTRIN_VRSUBHN_HIGH_U16, - ARM64_INTRIN_VRSUBHN_HIGH_U32, - ARM64_INTRIN_VRSUBHN_HIGH_U64, - ARM64_INTRIN_VCEQ_S8, - ARM64_INTRIN_VCEQQ_S8, - ARM64_INTRIN_VCEQ_S16, - ARM64_INTRIN_VCEQQ_S16, - ARM64_INTRIN_VCEQ_S32, - ARM64_INTRIN_VCEQQ_S32, - ARM64_INTRIN_VCEQ_U8, - ARM64_INTRIN_VCEQQ_U8, - ARM64_INTRIN_VCEQ_U16, - ARM64_INTRIN_VCEQQ_U16, - ARM64_INTRIN_VCEQ_U32, - ARM64_INTRIN_VCEQQ_U32, - ARM64_INTRIN_VCEQ_F32, - ARM64_INTRIN_VCEQQ_F32, - ARM64_INTRIN_VCEQ_P8, - ARM64_INTRIN_VCEQQ_P8, - ARM64_INTRIN_VCEQ_S64, - ARM64_INTRIN_VCEQQ_S64, - ARM64_INTRIN_VCEQ_U64, - ARM64_INTRIN_VCEQQ_U64, - ARM64_INTRIN_VCEQ_P64, - ARM64_INTRIN_VCEQQ_P64, - ARM64_INTRIN_VCEQ_F64, - ARM64_INTRIN_VCEQQ_F64, - ARM64_INTRIN_VCEQD_S64, - ARM64_INTRIN_VCEQD_U64, - ARM64_INTRIN_VCEQS_F32, - ARM64_INTRIN_VCEQD_F64, - ARM64_INTRIN_VCEQZ_S8, - ARM64_INTRIN_VCEQZQ_S8, - ARM64_INTRIN_VCEQZ_S16, - ARM64_INTRIN_VCEQZQ_S16, - ARM64_INTRIN_VCEQZ_S32, - ARM64_INTRIN_VCEQZQ_S32, - ARM64_INTRIN_VCEQZ_U8, - ARM64_INTRIN_VCEQZQ_U8, - ARM64_INTRIN_VCEQZ_U16, - ARM64_INTRIN_VCEQZQ_U16, - ARM64_INTRIN_VCEQZ_U32, - ARM64_INTRIN_VCEQZQ_U32, - ARM64_INTRIN_VCEQZ_F32, - ARM64_INTRIN_VCEQZQ_F32, - ARM64_INTRIN_VCEQZ_P8, - ARM64_INTRIN_VCEQZQ_P8, - ARM64_INTRIN_VCEQZ_S64, - ARM64_INTRIN_VCEQZQ_S64, - ARM64_INTRIN_VCEQZ_U64, - ARM64_INTRIN_VCEQZQ_U64, - ARM64_INTRIN_VCEQZ_P64, - ARM64_INTRIN_VCEQZQ_P64, - ARM64_INTRIN_VCEQZ_F64, - ARM64_INTRIN_VCEQZQ_F64, - ARM64_INTRIN_VCEQZD_S64, - ARM64_INTRIN_VCEQZD_U64, - ARM64_INTRIN_VCEQZS_F32, - ARM64_INTRIN_VCEQZD_F64, - ARM64_INTRIN_VCGE_S8, - ARM64_INTRIN_VCGEQ_S8, - ARM64_INTRIN_VCGE_S16, - ARM64_INTRIN_VCGEQ_S16, - ARM64_INTRIN_VCGE_S32, - ARM64_INTRIN_VCGEQ_S32, - ARM64_INTRIN_VCGE_U8, - ARM64_INTRIN_VCGEQ_U8, - ARM64_INTRIN_VCGE_U16, - ARM64_INTRIN_VCGEQ_U16, - ARM64_INTRIN_VCGE_U32, - ARM64_INTRIN_VCGEQ_U32, - ARM64_INTRIN_VCGE_F32, - ARM64_INTRIN_VCGEQ_F32, - ARM64_INTRIN_VCGE_S64, - ARM64_INTRIN_VCGEQ_S64, - ARM64_INTRIN_VCGE_U64, - ARM64_INTRIN_VCGEQ_U64, - ARM64_INTRIN_VCGE_F64, - ARM64_INTRIN_VCGEQ_F64, - ARM64_INTRIN_VCGED_S64, - ARM64_INTRIN_VCGED_U64, - ARM64_INTRIN_VCGES_F32, - ARM64_INTRIN_VCGED_F64, - ARM64_INTRIN_VCGEZ_S8, - ARM64_INTRIN_VCGEZQ_S8, - ARM64_INTRIN_VCGEZ_S16, - ARM64_INTRIN_VCGEZQ_S16, - ARM64_INTRIN_VCGEZ_S32, - ARM64_INTRIN_VCGEZQ_S32, - ARM64_INTRIN_VCGEZ_S64, - ARM64_INTRIN_VCGEZQ_S64, - ARM64_INTRIN_VCGEZ_F32, - ARM64_INTRIN_VCGEZQ_F32, - ARM64_INTRIN_VCGEZ_F64, - ARM64_INTRIN_VCGEZQ_F64, - ARM64_INTRIN_VCGEZD_S64, - ARM64_INTRIN_VCGEZS_F32, - ARM64_INTRIN_VCGEZD_F64, - ARM64_INTRIN_VCLE_S8, - ARM64_INTRIN_VCLEQ_S8, - ARM64_INTRIN_VCLE_S16, - ARM64_INTRIN_VCLEQ_S16, - ARM64_INTRIN_VCLE_S32, - ARM64_INTRIN_VCLEQ_S32, - ARM64_INTRIN_VCLE_U8, - ARM64_INTRIN_VCLEQ_U8, - ARM64_INTRIN_VCLE_U16, - ARM64_INTRIN_VCLEQ_U16, - ARM64_INTRIN_VCLE_U32, - ARM64_INTRIN_VCLEQ_U32, - ARM64_INTRIN_VCLE_F32, - ARM64_INTRIN_VCLEQ_F32, - ARM64_INTRIN_VCLE_S64, - ARM64_INTRIN_VCLEQ_S64, - ARM64_INTRIN_VCLE_U64, - ARM64_INTRIN_VCLEQ_U64, - ARM64_INTRIN_VCLE_F64, - ARM64_INTRIN_VCLEQ_F64, - ARM64_INTRIN_VCLED_S64, - ARM64_INTRIN_VCLED_U64, - ARM64_INTRIN_VCLES_F32, - ARM64_INTRIN_VCLED_F64, - ARM64_INTRIN_VCLEZ_S8, - ARM64_INTRIN_VCLEZQ_S8, - ARM64_INTRIN_VCLEZ_S16, - ARM64_INTRIN_VCLEZQ_S16, - ARM64_INTRIN_VCLEZ_S32, - ARM64_INTRIN_VCLEZQ_S32, - ARM64_INTRIN_VCLEZ_S64, - ARM64_INTRIN_VCLEZQ_S64, - ARM64_INTRIN_VCLEZ_F32, - ARM64_INTRIN_VCLEZQ_F32, - ARM64_INTRIN_VCLEZ_F64, - ARM64_INTRIN_VCLEZQ_F64, - ARM64_INTRIN_VCLEZD_S64, - ARM64_INTRIN_VCLEZS_F32, - ARM64_INTRIN_VCLEZD_F64, - ARM64_INTRIN_VCGT_S8, - ARM64_INTRIN_VCGTQ_S8, - ARM64_INTRIN_VCGT_S16, - ARM64_INTRIN_VCGTQ_S16, - ARM64_INTRIN_VCGT_S32, - ARM64_INTRIN_VCGTQ_S32, - ARM64_INTRIN_VCGT_U8, - ARM64_INTRIN_VCGTQ_U8, - ARM64_INTRIN_VCGT_U16, - ARM64_INTRIN_VCGTQ_U16, - ARM64_INTRIN_VCGT_U32, - ARM64_INTRIN_VCGTQ_U32, - ARM64_INTRIN_VCGT_F32, - ARM64_INTRIN_VCGTQ_F32, - ARM64_INTRIN_VCGT_S64, - ARM64_INTRIN_VCGTQ_S64, - ARM64_INTRIN_VCGT_U64, - ARM64_INTRIN_VCGTQ_U64, - ARM64_INTRIN_VCGT_F64, - ARM64_INTRIN_VCGTQ_F64, - ARM64_INTRIN_VCGTD_S64, - ARM64_INTRIN_VCGTD_U64, - ARM64_INTRIN_VCGTS_F32, - ARM64_INTRIN_VCGTD_F64, - ARM64_INTRIN_VCGTZ_S8, - ARM64_INTRIN_VCGTZQ_S8, - ARM64_INTRIN_VCGTZ_S16, - ARM64_INTRIN_VCGTZQ_S16, - ARM64_INTRIN_VCGTZ_S32, - ARM64_INTRIN_VCGTZQ_S32, - ARM64_INTRIN_VCGTZ_S64, - ARM64_INTRIN_VCGTZQ_S64, - ARM64_INTRIN_VCGTZ_F32, - ARM64_INTRIN_VCGTZQ_F32, - ARM64_INTRIN_VCGTZ_F64, - ARM64_INTRIN_VCGTZQ_F64, - ARM64_INTRIN_VCGTZD_S64, - ARM64_INTRIN_VCGTZS_F32, - ARM64_INTRIN_VCGTZD_F64, - ARM64_INTRIN_VCLT_S8, - ARM64_INTRIN_VCLTQ_S8, - ARM64_INTRIN_VCLT_S16, - ARM64_INTRIN_VCLTQ_S16, - ARM64_INTRIN_VCLT_S32, - ARM64_INTRIN_VCLTQ_S32, - ARM64_INTRIN_VCLT_U8, - ARM64_INTRIN_VCLTQ_U8, - ARM64_INTRIN_VCLT_U16, - ARM64_INTRIN_VCLTQ_U16, - ARM64_INTRIN_VCLT_U32, - ARM64_INTRIN_VCLTQ_U32, - ARM64_INTRIN_VCLT_F32, - ARM64_INTRIN_VCLTQ_F32, - ARM64_INTRIN_VCLT_S64, - ARM64_INTRIN_VCLTQ_S64, - ARM64_INTRIN_VCLT_U64, - ARM64_INTRIN_VCLTQ_U64, - ARM64_INTRIN_VCLT_F64, - ARM64_INTRIN_VCLTQ_F64, - ARM64_INTRIN_VCLTD_S64, - ARM64_INTRIN_VCLTD_U64, - ARM64_INTRIN_VCLTS_F32, - ARM64_INTRIN_VCLTD_F64, - ARM64_INTRIN_VCLTZ_S8, - ARM64_INTRIN_VCLTZQ_S8, - ARM64_INTRIN_VCLTZ_S16, - ARM64_INTRIN_VCLTZQ_S16, - ARM64_INTRIN_VCLTZ_S32, - ARM64_INTRIN_VCLTZQ_S32, - ARM64_INTRIN_VCLTZ_S64, - ARM64_INTRIN_VCLTZQ_S64, - ARM64_INTRIN_VCLTZ_F32, - ARM64_INTRIN_VCLTZQ_F32, - ARM64_INTRIN_VCLTZ_F64, - ARM64_INTRIN_VCLTZQ_F64, - ARM64_INTRIN_VCLTZD_S64, - ARM64_INTRIN_VCLTZS_F32, - ARM64_INTRIN_VCLTZD_F64, - ARM64_INTRIN_VCAGE_F32, - ARM64_INTRIN_VCAGEQ_F32, - ARM64_INTRIN_VCAGE_F64, - ARM64_INTRIN_VCAGEQ_F64, - ARM64_INTRIN_VCAGES_F32, - ARM64_INTRIN_VCAGED_F64, - ARM64_INTRIN_VCALE_F32, - ARM64_INTRIN_VCALEQ_F32, - ARM64_INTRIN_VCALE_F64, - ARM64_INTRIN_VCALEQ_F64, - ARM64_INTRIN_VCALES_F32, - ARM64_INTRIN_VCALED_F64, - ARM64_INTRIN_VCAGT_F32, - ARM64_INTRIN_VCAGTQ_F32, - ARM64_INTRIN_VCAGT_F64, - ARM64_INTRIN_VCAGTQ_F64, - ARM64_INTRIN_VCAGTS_F32, - ARM64_INTRIN_VCAGTD_F64, - ARM64_INTRIN_VCALT_F32, - ARM64_INTRIN_VCALTQ_F32, - ARM64_INTRIN_VCALT_F64, - ARM64_INTRIN_VCALTQ_F64, - ARM64_INTRIN_VCALTS_F32, - ARM64_INTRIN_VCALTD_F64, - ARM64_INTRIN_VTST_S8, - ARM64_INTRIN_VTSTQ_S8, - ARM64_INTRIN_VTST_S16, - ARM64_INTRIN_VTSTQ_S16, - ARM64_INTRIN_VTST_S32, - ARM64_INTRIN_VTSTQ_S32, - ARM64_INTRIN_VTST_U8, - ARM64_INTRIN_VTSTQ_U8, - ARM64_INTRIN_VTST_U16, - ARM64_INTRIN_VTSTQ_U16, - ARM64_INTRIN_VTST_U32, - ARM64_INTRIN_VTSTQ_U32, - ARM64_INTRIN_VTST_P8, - ARM64_INTRIN_VTSTQ_P8, - ARM64_INTRIN_VTST_S64, - ARM64_INTRIN_VTSTQ_S64, - ARM64_INTRIN_VTST_U64, - ARM64_INTRIN_VTSTQ_U64, - ARM64_INTRIN_VTST_P64, - ARM64_INTRIN_VTSTQ_P64, - ARM64_INTRIN_VTSTD_S64, - ARM64_INTRIN_VTSTD_U64, - ARM64_INTRIN_VABD_S8, - ARM64_INTRIN_VABDQ_S8, - ARM64_INTRIN_VABD_S16, - ARM64_INTRIN_VABDQ_S16, - ARM64_INTRIN_VABD_S32, - ARM64_INTRIN_VABDQ_S32, - ARM64_INTRIN_VABD_U8, - ARM64_INTRIN_VABDQ_U8, - ARM64_INTRIN_VABD_U16, - ARM64_INTRIN_VABDQ_U16, - ARM64_INTRIN_VABD_U32, - ARM64_INTRIN_VABDQ_U32, - ARM64_INTRIN_VABD_F32, - ARM64_INTRIN_VABDQ_F32, - ARM64_INTRIN_VABD_F64, - ARM64_INTRIN_VABDQ_F64, - ARM64_INTRIN_VABDS_F32, - ARM64_INTRIN_VABDD_F64, - ARM64_INTRIN_VABDL_S8, - ARM64_INTRIN_VABDL_S16, - ARM64_INTRIN_VABDL_S32, - ARM64_INTRIN_VABDL_U8, - ARM64_INTRIN_VABDL_U16, - ARM64_INTRIN_VABDL_U32, - ARM64_INTRIN_VABDL_HIGH_S8, - ARM64_INTRIN_VABDL_HIGH_S16, - ARM64_INTRIN_VABDL_HIGH_S32, - ARM64_INTRIN_VABDL_HIGH_U8, - ARM64_INTRIN_VABDL_HIGH_U16, - ARM64_INTRIN_VABDL_HIGH_U32, - ARM64_INTRIN_VABA_S8, - ARM64_INTRIN_VABAQ_S8, - ARM64_INTRIN_VABA_S16, - ARM64_INTRIN_VABAQ_S16, - ARM64_INTRIN_VABA_S32, - ARM64_INTRIN_VABAQ_S32, - ARM64_INTRIN_VABA_U8, - ARM64_INTRIN_VABAQ_U8, - ARM64_INTRIN_VABA_U16, - ARM64_INTRIN_VABAQ_U16, - ARM64_INTRIN_VABA_U32, - ARM64_INTRIN_VABAQ_U32, - ARM64_INTRIN_VABAL_S8, - ARM64_INTRIN_VABAL_S16, - ARM64_INTRIN_VABAL_S32, - ARM64_INTRIN_VABAL_U8, - ARM64_INTRIN_VABAL_U16, - ARM64_INTRIN_VABAL_U32, - ARM64_INTRIN_VABAL_HIGH_S8, - ARM64_INTRIN_VABAL_HIGH_S16, - ARM64_INTRIN_VABAL_HIGH_S32, - ARM64_INTRIN_VABAL_HIGH_U8, - ARM64_INTRIN_VABAL_HIGH_U16, - ARM64_INTRIN_VABAL_HIGH_U32, - ARM64_INTRIN_VMAX_S8, - ARM64_INTRIN_VMAXQ_S8, - ARM64_INTRIN_VMAX_S16, - ARM64_INTRIN_VMAXQ_S16, - ARM64_INTRIN_VMAX_S32, - ARM64_INTRIN_VMAXQ_S32, - ARM64_INTRIN_VMAX_U8, - ARM64_INTRIN_VMAXQ_U8, - ARM64_INTRIN_VMAX_U16, - ARM64_INTRIN_VMAXQ_U16, - ARM64_INTRIN_VMAX_U32, - ARM64_INTRIN_VMAXQ_U32, - ARM64_INTRIN_VMAX_F32, - ARM64_INTRIN_VMAXQ_F32, - ARM64_INTRIN_VMAX_F64, - ARM64_INTRIN_VMAXQ_F64, - ARM64_INTRIN_VMIN_S8, - ARM64_INTRIN_VMINQ_S8, - ARM64_INTRIN_VMIN_S16, - ARM64_INTRIN_VMINQ_S16, - ARM64_INTRIN_VMIN_S32, - ARM64_INTRIN_VMINQ_S32, - ARM64_INTRIN_VMIN_U8, - ARM64_INTRIN_VMINQ_U8, - ARM64_INTRIN_VMIN_U16, - ARM64_INTRIN_VMINQ_U16, - ARM64_INTRIN_VMIN_U32, - ARM64_INTRIN_VMINQ_U32, - ARM64_INTRIN_VMIN_F32, - ARM64_INTRIN_VMINQ_F32, - ARM64_INTRIN_VMIN_F64, - ARM64_INTRIN_VMINQ_F64, - ARM64_INTRIN_VMAXNM_F32, - ARM64_INTRIN_VMAXNMQ_F32, - ARM64_INTRIN_VMAXNM_F64, - ARM64_INTRIN_VMAXNMQ_F64, - ARM64_INTRIN_VMINNM_F32, - ARM64_INTRIN_VMINNMQ_F32, - ARM64_INTRIN_VMINNM_F64, - ARM64_INTRIN_VMINNMQ_F64, - ARM64_INTRIN_VSHL_S8, - ARM64_INTRIN_VSHLQ_S8, - ARM64_INTRIN_VSHL_S16, - ARM64_INTRIN_VSHLQ_S16, - ARM64_INTRIN_VSHL_S32, - ARM64_INTRIN_VSHLQ_S32, - ARM64_INTRIN_VSHL_S64, - ARM64_INTRIN_VSHLQ_S64, - ARM64_INTRIN_VSHL_U8, - ARM64_INTRIN_VSHLQ_U8, - ARM64_INTRIN_VSHL_U16, - ARM64_INTRIN_VSHLQ_U16, - ARM64_INTRIN_VSHL_U32, - ARM64_INTRIN_VSHLQ_U32, - ARM64_INTRIN_VSHL_U64, - ARM64_INTRIN_VSHLQ_U64, - ARM64_INTRIN_VSHLD_S64, - ARM64_INTRIN_VSHLD_U64, - ARM64_INTRIN_VQSHL_S8, - ARM64_INTRIN_VQSHLQ_S8, - ARM64_INTRIN_VQSHL_S16, - ARM64_INTRIN_VQSHLQ_S16, - ARM64_INTRIN_VQSHL_S32, - ARM64_INTRIN_VQSHLQ_S32, - ARM64_INTRIN_VQSHL_S64, - ARM64_INTRIN_VQSHLQ_S64, - ARM64_INTRIN_VQSHL_U8, - ARM64_INTRIN_VQSHLQ_U8, - ARM64_INTRIN_VQSHL_U16, - ARM64_INTRIN_VQSHLQ_U16, - ARM64_INTRIN_VQSHL_U32, - ARM64_INTRIN_VQSHLQ_U32, - ARM64_INTRIN_VQSHL_U64, - ARM64_INTRIN_VQSHLQ_U64, - ARM64_INTRIN_VQSHLB_S8, - ARM64_INTRIN_VQSHLH_S16, - ARM64_INTRIN_VQSHLS_S32, - ARM64_INTRIN_VQSHLD_S64, - ARM64_INTRIN_VQSHLB_U8, - ARM64_INTRIN_VQSHLH_U16, - ARM64_INTRIN_VQSHLS_U32, - ARM64_INTRIN_VQSHLD_U64, - ARM64_INTRIN_VRSHL_S8, - ARM64_INTRIN_VRSHLQ_S8, - ARM64_INTRIN_VRSHL_S16, - ARM64_INTRIN_VRSHLQ_S16, - ARM64_INTRIN_VRSHL_S32, - ARM64_INTRIN_VRSHLQ_S32, - ARM64_INTRIN_VRSHL_S64, - ARM64_INTRIN_VRSHLQ_S64, - ARM64_INTRIN_VRSHL_U8, - ARM64_INTRIN_VRSHLQ_U8, - ARM64_INTRIN_VRSHL_U16, - ARM64_INTRIN_VRSHLQ_U16, - ARM64_INTRIN_VRSHL_U32, - ARM64_INTRIN_VRSHLQ_U32, - ARM64_INTRIN_VRSHL_U64, - ARM64_INTRIN_VRSHLQ_U64, - ARM64_INTRIN_VRSHLD_S64, - ARM64_INTRIN_VRSHLD_U64, - ARM64_INTRIN_VQRSHL_S8, - ARM64_INTRIN_VQRSHLQ_S8, - ARM64_INTRIN_VQRSHL_S16, - ARM64_INTRIN_VQRSHLQ_S16, - ARM64_INTRIN_VQRSHL_S32, - ARM64_INTRIN_VQRSHLQ_S32, - ARM64_INTRIN_VQRSHL_S64, - ARM64_INTRIN_VQRSHLQ_S64, - ARM64_INTRIN_VQRSHL_U8, - ARM64_INTRIN_VQRSHLQ_U8, - ARM64_INTRIN_VQRSHL_U16, - ARM64_INTRIN_VQRSHLQ_U16, - ARM64_INTRIN_VQRSHL_U32, - ARM64_INTRIN_VQRSHLQ_U32, - ARM64_INTRIN_VQRSHL_U64, - ARM64_INTRIN_VQRSHLQ_U64, - ARM64_INTRIN_VQRSHLB_S8, - ARM64_INTRIN_VQRSHLH_S16, - ARM64_INTRIN_VQRSHLS_S32, - ARM64_INTRIN_VQRSHLD_S64, - ARM64_INTRIN_VQRSHLB_U8, - ARM64_INTRIN_VQRSHLH_U16, - ARM64_INTRIN_VQRSHLS_U32, - ARM64_INTRIN_VQRSHLD_U64, - ARM64_INTRIN_VSHR_N_S8, - ARM64_INTRIN_VSHRQ_N_S8, - ARM64_INTRIN_VSHR_N_S16, - ARM64_INTRIN_VSHRQ_N_S16, - ARM64_INTRIN_VSHR_N_S32, - ARM64_INTRIN_VSHRQ_N_S32, - ARM64_INTRIN_VSHR_N_S64, - ARM64_INTRIN_VSHRQ_N_S64, - ARM64_INTRIN_VSHR_N_U8, - ARM64_INTRIN_VSHRQ_N_U8, - ARM64_INTRIN_VSHR_N_U16, - ARM64_INTRIN_VSHRQ_N_U16, - ARM64_INTRIN_VSHR_N_U32, - ARM64_INTRIN_VSHRQ_N_U32, - ARM64_INTRIN_VSHR_N_U64, - ARM64_INTRIN_VSHRQ_N_U64, - ARM64_INTRIN_VSHRD_N_S64, - ARM64_INTRIN_VSHRD_N_U64, - ARM64_INTRIN_VSHL_N_S8, - ARM64_INTRIN_VSHLQ_N_S8, - ARM64_INTRIN_VSHL_N_S16, - ARM64_INTRIN_VSHLQ_N_S16, - ARM64_INTRIN_VSHL_N_S32, - ARM64_INTRIN_VSHLQ_N_S32, - ARM64_INTRIN_VSHL_N_S64, - ARM64_INTRIN_VSHLQ_N_S64, - ARM64_INTRIN_VSHL_N_U8, - ARM64_INTRIN_VSHLQ_N_U8, - ARM64_INTRIN_VSHL_N_U16, - ARM64_INTRIN_VSHLQ_N_U16, - ARM64_INTRIN_VSHL_N_U32, - ARM64_INTRIN_VSHLQ_N_U32, - ARM64_INTRIN_VSHL_N_U64, - ARM64_INTRIN_VSHLQ_N_U64, - ARM64_INTRIN_VSHLD_N_S64, - ARM64_INTRIN_VSHLD_N_U64, - ARM64_INTRIN_VRSHR_N_S8, - ARM64_INTRIN_VRSHRQ_N_S8, - ARM64_INTRIN_VRSHR_N_S16, - ARM64_INTRIN_VRSHRQ_N_S16, - ARM64_INTRIN_VRSHR_N_S32, - ARM64_INTRIN_VRSHRQ_N_S32, - ARM64_INTRIN_VRSHR_N_S64, - ARM64_INTRIN_VRSHRQ_N_S64, - ARM64_INTRIN_VRSHR_N_U8, - ARM64_INTRIN_VRSHRQ_N_U8, - ARM64_INTRIN_VRSHR_N_U16, - ARM64_INTRIN_VRSHRQ_N_U16, - ARM64_INTRIN_VRSHR_N_U32, - ARM64_INTRIN_VRSHRQ_N_U32, - ARM64_INTRIN_VRSHR_N_U64, - ARM64_INTRIN_VRSHRQ_N_U64, - ARM64_INTRIN_VRSHRD_N_S64, - ARM64_INTRIN_VRSHRD_N_U64, - ARM64_INTRIN_VSRA_N_S8, - ARM64_INTRIN_VSRAQ_N_S8, - ARM64_INTRIN_VSRA_N_S16, - ARM64_INTRIN_VSRAQ_N_S16, - ARM64_INTRIN_VSRA_N_S32, - ARM64_INTRIN_VSRAQ_N_S32, - ARM64_INTRIN_VSRA_N_S64, - ARM64_INTRIN_VSRAQ_N_S64, - ARM64_INTRIN_VSRA_N_U8, - ARM64_INTRIN_VSRAQ_N_U8, - ARM64_INTRIN_VSRA_N_U16, - ARM64_INTRIN_VSRAQ_N_U16, - ARM64_INTRIN_VSRA_N_U32, - ARM64_INTRIN_VSRAQ_N_U32, - ARM64_INTRIN_VSRA_N_U64, - ARM64_INTRIN_VSRAQ_N_U64, - ARM64_INTRIN_VSRAD_N_S64, - ARM64_INTRIN_VSRAD_N_U64, - ARM64_INTRIN_VRSRA_N_S8, - ARM64_INTRIN_VRSRAQ_N_S8, - ARM64_INTRIN_VRSRA_N_S16, - ARM64_INTRIN_VRSRAQ_N_S16, - ARM64_INTRIN_VRSRA_N_S32, - ARM64_INTRIN_VRSRAQ_N_S32, - ARM64_INTRIN_VRSRA_N_S64, - ARM64_INTRIN_VRSRAQ_N_S64, - ARM64_INTRIN_VRSRA_N_U8, - ARM64_INTRIN_VRSRAQ_N_U8, - ARM64_INTRIN_VRSRA_N_U16, - ARM64_INTRIN_VRSRAQ_N_U16, - ARM64_INTRIN_VRSRA_N_U32, - ARM64_INTRIN_VRSRAQ_N_U32, - ARM64_INTRIN_VRSRA_N_U64, - ARM64_INTRIN_VRSRAQ_N_U64, - ARM64_INTRIN_VRSRAD_N_S64, - ARM64_INTRIN_VRSRAD_N_U64, - ARM64_INTRIN_VQSHL_N_S8, - ARM64_INTRIN_VQSHLQ_N_S8, - ARM64_INTRIN_VQSHL_N_S16, - ARM64_INTRIN_VQSHLQ_N_S16, - ARM64_INTRIN_VQSHL_N_S32, - ARM64_INTRIN_VQSHLQ_N_S32, - ARM64_INTRIN_VQSHL_N_S64, - ARM64_INTRIN_VQSHLQ_N_S64, - ARM64_INTRIN_VQSHL_N_U8, - ARM64_INTRIN_VQSHLQ_N_U8, - ARM64_INTRIN_VQSHL_N_U16, - ARM64_INTRIN_VQSHLQ_N_U16, - ARM64_INTRIN_VQSHL_N_U32, - ARM64_INTRIN_VQSHLQ_N_U32, - ARM64_INTRIN_VQSHL_N_U64, - ARM64_INTRIN_VQSHLQ_N_U64, - ARM64_INTRIN_VQSHLB_N_S8, - ARM64_INTRIN_VQSHLH_N_S16, - ARM64_INTRIN_VQSHLS_N_S32, - ARM64_INTRIN_VQSHLD_N_S64, - ARM64_INTRIN_VQSHLB_N_U8, - ARM64_INTRIN_VQSHLH_N_U16, - ARM64_INTRIN_VQSHLS_N_U32, - ARM64_INTRIN_VQSHLD_N_U64, - ARM64_INTRIN_VQSHLU_N_S8, - ARM64_INTRIN_VQSHLUQ_N_S8, - ARM64_INTRIN_VQSHLU_N_S16, - ARM64_INTRIN_VQSHLUQ_N_S16, - ARM64_INTRIN_VQSHLU_N_S32, - ARM64_INTRIN_VQSHLUQ_N_S32, - ARM64_INTRIN_VQSHLU_N_S64, - ARM64_INTRIN_VQSHLUQ_N_S64, - ARM64_INTRIN_VQSHLUB_N_S8, - ARM64_INTRIN_VQSHLUH_N_S16, - ARM64_INTRIN_VQSHLUS_N_S32, - ARM64_INTRIN_VQSHLUD_N_S64, - ARM64_INTRIN_VSHRN_N_S16, - ARM64_INTRIN_VSHRN_N_S32, - ARM64_INTRIN_VSHRN_N_S64, - ARM64_INTRIN_VSHRN_N_U16, - ARM64_INTRIN_VSHRN_N_U32, - ARM64_INTRIN_VSHRN_N_U64, - ARM64_INTRIN_VSHRN_HIGH_N_S16, - ARM64_INTRIN_VSHRN_HIGH_N_S32, - ARM64_INTRIN_VSHRN_HIGH_N_S64, - ARM64_INTRIN_VSHRN_HIGH_N_U16, - ARM64_INTRIN_VSHRN_HIGH_N_U32, - ARM64_INTRIN_VSHRN_HIGH_N_U64, - ARM64_INTRIN_VQSHRUN_N_S16, - ARM64_INTRIN_VQSHRUN_N_S32, - ARM64_INTRIN_VQSHRUN_N_S64, - ARM64_INTRIN_VQSHRUNH_N_S16, - ARM64_INTRIN_VQSHRUNS_N_S32, - ARM64_INTRIN_VQSHRUND_N_S64, - ARM64_INTRIN_VQSHRUN_HIGH_N_S16, - ARM64_INTRIN_VQSHRUN_HIGH_N_S32, - ARM64_INTRIN_VQSHRUN_HIGH_N_S64, - ARM64_INTRIN_VQRSHRUN_N_S16, - ARM64_INTRIN_VQRSHRUN_N_S32, - ARM64_INTRIN_VQRSHRUN_N_S64, - ARM64_INTRIN_VQRSHRUNH_N_S16, - ARM64_INTRIN_VQRSHRUNS_N_S32, - ARM64_INTRIN_VQRSHRUND_N_S64, - ARM64_INTRIN_VQRSHRUN_HIGH_N_S16, - ARM64_INTRIN_VQRSHRUN_HIGH_N_S32, - ARM64_INTRIN_VQRSHRUN_HIGH_N_S64, - ARM64_INTRIN_VQSHRN_N_S16, - ARM64_INTRIN_VQSHRN_N_S32, - ARM64_INTRIN_VQSHRN_N_S64, - ARM64_INTRIN_VQSHRN_N_U16, - ARM64_INTRIN_VQSHRN_N_U32, - ARM64_INTRIN_VQSHRN_N_U64, - ARM64_INTRIN_VQSHRNH_N_S16, - ARM64_INTRIN_VQSHRNS_N_S32, - ARM64_INTRIN_VQSHRND_N_S64, - ARM64_INTRIN_VQSHRNH_N_U16, - ARM64_INTRIN_VQSHRNS_N_U32, - ARM64_INTRIN_VQSHRND_N_U64, - ARM64_INTRIN_VQSHRN_HIGH_N_S16, - ARM64_INTRIN_VQSHRN_HIGH_N_S32, - ARM64_INTRIN_VQSHRN_HIGH_N_S64, - ARM64_INTRIN_VQSHRN_HIGH_N_U16, - ARM64_INTRIN_VQSHRN_HIGH_N_U32, - ARM64_INTRIN_VQSHRN_HIGH_N_U64, - ARM64_INTRIN_VRSHRN_N_S16, - ARM64_INTRIN_VRSHRN_N_S32, - ARM64_INTRIN_VRSHRN_N_S64, - ARM64_INTRIN_VRSHRN_N_U16, - ARM64_INTRIN_VRSHRN_N_U32, - ARM64_INTRIN_VRSHRN_N_U64, - ARM64_INTRIN_VRSHRN_HIGH_N_S16, - ARM64_INTRIN_VRSHRN_HIGH_N_S32, - ARM64_INTRIN_VRSHRN_HIGH_N_S64, - ARM64_INTRIN_VRSHRN_HIGH_N_U16, - ARM64_INTRIN_VRSHRN_HIGH_N_U32, - ARM64_INTRIN_VRSHRN_HIGH_N_U64, - ARM64_INTRIN_VQRSHRN_N_S16, - ARM64_INTRIN_VQRSHRN_N_S32, - ARM64_INTRIN_VQRSHRN_N_S64, - ARM64_INTRIN_VQRSHRN_N_U16, - ARM64_INTRIN_VQRSHRN_N_U32, - ARM64_INTRIN_VQRSHRN_N_U64, - ARM64_INTRIN_VQRSHRNH_N_S16, - ARM64_INTRIN_VQRSHRNS_N_S32, - ARM64_INTRIN_VQRSHRND_N_S64, - ARM64_INTRIN_VQRSHRNH_N_U16, - ARM64_INTRIN_VQRSHRNS_N_U32, - ARM64_INTRIN_VQRSHRND_N_U64, - ARM64_INTRIN_VQRSHRN_HIGH_N_S16, - ARM64_INTRIN_VQRSHRN_HIGH_N_S32, - ARM64_INTRIN_VQRSHRN_HIGH_N_S64, - ARM64_INTRIN_VQRSHRN_HIGH_N_U16, - ARM64_INTRIN_VQRSHRN_HIGH_N_U32, - ARM64_INTRIN_VQRSHRN_HIGH_N_U64, - ARM64_INTRIN_VSHLL_N_S8, - ARM64_INTRIN_VSHLL_N_S16, - ARM64_INTRIN_VSHLL_N_S32, - ARM64_INTRIN_VSHLL_N_U8, - ARM64_INTRIN_VSHLL_N_U16, - ARM64_INTRIN_VSHLL_N_U32, - ARM64_INTRIN_VSHLL_HIGH_N_S8, - ARM64_INTRIN_VSHLL_HIGH_N_S16, - ARM64_INTRIN_VSHLL_HIGH_N_S32, - ARM64_INTRIN_VSHLL_HIGH_N_U8, - ARM64_INTRIN_VSHLL_HIGH_N_U16, - ARM64_INTRIN_VSHLL_HIGH_N_U32, - ARM64_INTRIN_VSRI_N_S8, - ARM64_INTRIN_VSRIQ_N_S8, - ARM64_INTRIN_VSRI_N_S16, - ARM64_INTRIN_VSRIQ_N_S16, - ARM64_INTRIN_VSRI_N_S32, - ARM64_INTRIN_VSRIQ_N_S32, - ARM64_INTRIN_VSRI_N_S64, - ARM64_INTRIN_VSRIQ_N_S64, - ARM64_INTRIN_VSRI_N_U8, - ARM64_INTRIN_VSRIQ_N_U8, - ARM64_INTRIN_VSRI_N_U16, - ARM64_INTRIN_VSRIQ_N_U16, - ARM64_INTRIN_VSRI_N_U32, - ARM64_INTRIN_VSRIQ_N_U32, - ARM64_INTRIN_VSRI_N_U64, - ARM64_INTRIN_VSRIQ_N_U64, - ARM64_INTRIN_VSRI_N_P64, - ARM64_INTRIN_VSRIQ_N_P64, - ARM64_INTRIN_VSRI_N_P8, - ARM64_INTRIN_VSRIQ_N_P8, - ARM64_INTRIN_VSRI_N_P16, - ARM64_INTRIN_VSRIQ_N_P16, - ARM64_INTRIN_VSRID_N_S64, - ARM64_INTRIN_VSRID_N_U64, - ARM64_INTRIN_VSLI_N_S8, - ARM64_INTRIN_VSLIQ_N_S8, - ARM64_INTRIN_VSLI_N_S16, - ARM64_INTRIN_VSLIQ_N_S16, - ARM64_INTRIN_VSLI_N_S32, - ARM64_INTRIN_VSLIQ_N_S32, - ARM64_INTRIN_VSLI_N_S64, - ARM64_INTRIN_VSLIQ_N_S64, - ARM64_INTRIN_VSLI_N_U8, - ARM64_INTRIN_VSLIQ_N_U8, - ARM64_INTRIN_VSLI_N_U16, - ARM64_INTRIN_VSLIQ_N_U16, - ARM64_INTRIN_VSLI_N_U32, - ARM64_INTRIN_VSLIQ_N_U32, - ARM64_INTRIN_VSLI_N_U64, - ARM64_INTRIN_VSLIQ_N_U64, - ARM64_INTRIN_VSLI_N_P64, - ARM64_INTRIN_VSLIQ_N_P64, - ARM64_INTRIN_VSLI_N_P8, - ARM64_INTRIN_VSLIQ_N_P8, - ARM64_INTRIN_VSLI_N_P16, - ARM64_INTRIN_VSLIQ_N_P16, - ARM64_INTRIN_VSLID_N_S64, - ARM64_INTRIN_VSLID_N_U64, - ARM64_INTRIN_VCVT_S32_F32, - ARM64_INTRIN_VCVTQ_S32_F32, - ARM64_INTRIN_VCVT_U32_F32, - ARM64_INTRIN_VCVTQ_U32_F32, - ARM64_INTRIN_VCVTN_S32_F32, - ARM64_INTRIN_VCVTNQ_S32_F32, - ARM64_INTRIN_VCVTN_U32_F32, - ARM64_INTRIN_VCVTNQ_U32_F32, - ARM64_INTRIN_VCVTM_S32_F32, - ARM64_INTRIN_VCVTMQ_S32_F32, - ARM64_INTRIN_VCVTM_U32_F32, - ARM64_INTRIN_VCVTMQ_U32_F32, - ARM64_INTRIN_VCVTP_S32_F32, - ARM64_INTRIN_VCVTPQ_S32_F32, - ARM64_INTRIN_VCVTP_U32_F32, - ARM64_INTRIN_VCVTPQ_U32_F32, - ARM64_INTRIN_VCVTA_S32_F32, - ARM64_INTRIN_VCVTAQ_S32_F32, - ARM64_INTRIN_VCVTA_U32_F32, - ARM64_INTRIN_VCVTAQ_U32_F32, - ARM64_INTRIN_VCVTS_S32_F32, - ARM64_INTRIN_VCVTS_U32_F32, - ARM64_INTRIN_VCVTNS_S32_F32, - ARM64_INTRIN_VCVTNS_U32_F32, - ARM64_INTRIN_VCVTMS_S32_F32, - ARM64_INTRIN_VCVTMS_U32_F32, - ARM64_INTRIN_VCVTPS_S32_F32, - ARM64_INTRIN_VCVTPS_U32_F32, - ARM64_INTRIN_VCVTAS_S32_F32, - ARM64_INTRIN_VCVTAS_U32_F32, - ARM64_INTRIN_VCVT_S64_F64, - ARM64_INTRIN_VCVTQ_S64_F64, - ARM64_INTRIN_VCVT_U64_F64, - ARM64_INTRIN_VCVTQ_U64_F64, - ARM64_INTRIN_VCVTN_S64_F64, - ARM64_INTRIN_VCVTNQ_S64_F64, - ARM64_INTRIN_VCVTN_U64_F64, - ARM64_INTRIN_VCVTNQ_U64_F64, - ARM64_INTRIN_VCVTM_S64_F64, - ARM64_INTRIN_VCVTMQ_S64_F64, - ARM64_INTRIN_VCVTM_U64_F64, - ARM64_INTRIN_VCVTMQ_U64_F64, - ARM64_INTRIN_VCVTP_S64_F64, - ARM64_INTRIN_VCVTPQ_S64_F64, - ARM64_INTRIN_VCVTP_U64_F64, - ARM64_INTRIN_VCVTPQ_U64_F64, - ARM64_INTRIN_VCVTA_S64_F64, - ARM64_INTRIN_VCVTAQ_S64_F64, - ARM64_INTRIN_VCVTA_U64_F64, - ARM64_INTRIN_VCVTAQ_U64_F64, - ARM64_INTRIN_VCVTD_S64_F64, - ARM64_INTRIN_VCVTD_U64_F64, - ARM64_INTRIN_VCVTND_S64_F64, - ARM64_INTRIN_VCVTND_U64_F64, - ARM64_INTRIN_VCVTMD_S64_F64, - ARM64_INTRIN_VCVTMD_U64_F64, - ARM64_INTRIN_VCVTPD_S64_F64, - ARM64_INTRIN_VCVTPD_U64_F64, - ARM64_INTRIN_VCVTAD_S64_F64, - ARM64_INTRIN_VCVTAD_U64_F64, - ARM64_INTRIN_VCVT_N_S32_F32, - ARM64_INTRIN_VCVTQ_N_S32_F32, - ARM64_INTRIN_VCVT_N_U32_F32, - ARM64_INTRIN_VCVTQ_N_U32_F32, - ARM64_INTRIN_VCVTS_N_S32_F32, - ARM64_INTRIN_VCVTS_N_U32_F32, - ARM64_INTRIN_VCVT_N_S64_F64, - ARM64_INTRIN_VCVTQ_N_S64_F64, - ARM64_INTRIN_VCVT_N_U64_F64, - - ARM64_INTRIN_VCVTH_N_F16_U32, // VConVerT to Half precision, has imm N, to f16 from u32 eg: ucvtf , , # - ARM64_INTRIN_VCVTH_N_F16_U64, // VConVerT to Half precision, has imm N, to f16 from u64 eg: ucvtf , , # - ARM64_INTRIN_VCVTS_N_F32_U32, // VConVerT to Single precision, has imm N, to f32 from u32 eg: ucvtf , , # - ARM64_INTRIN_VCVTS_N_F32_U64, // VConVerT to Single precision, has imm N, to f32 from u64 eg: ucvtf , , # - ARM64_INTRIN_VCVTD_N_F64_U32, // VConVerT to Double precision, has imm N, to f64 from u32 eg: ucvtf
, , # - ARM64_INTRIN_VCVTD_N_F64_U64, // VConVerT to Double precision, has imm N, to f64 from u64 eg: ucvtf
, , # - - ARM64_INTRIN_VCVT_N_F64_U64, // float64x1_t vcvt_n_f64_u64(uint64x1_t a, const int n) - - ARM64_INTRIN_VCVTD_N_F64_F64, // - ARM64_INTRIN_VCVTQ_N_U64_F64, - ARM64_INTRIN_VCVTD_N_S64_F64, - ARM64_INTRIN_VCVTD_N_U64_F64, - - ARM64_INTRIN_VCVT_F32_S32, - ARM64_INTRIN_VCVTQ_F32_S32, - ARM64_INTRIN_VCVT_F32_U32, - ARM64_INTRIN_VCVTQ_F32_U32, - ARM64_INTRIN_VCVTS_F32_S32, - ARM64_INTRIN_VCVTS_F32_U32, - ARM64_INTRIN_VCVT_F64_S64, - ARM64_INTRIN_VCVTQ_F64_S64, - ARM64_INTRIN_VCVT_F64_U64, - ARM64_INTRIN_VCVT_F64_U32, - ARM64_INTRIN_VCVT_F32_U64, - ARM64_INTRIN_VCVTQ_F64_U64, - ARM64_INTRIN_VCVTD_F64_S64, - ARM64_INTRIN_VCVTD_F64_U64, - ARM64_INTRIN_VCVT_N_F32_S32, - ARM64_INTRIN_VCVTQ_N_F32_S32, - ARM64_INTRIN_VCVT_N_F32_U32, - ARM64_INTRIN_VCVTQ_N_F32_U32, - ARM64_INTRIN_VCVTS_N_F32_S32, - ARM64_INTRIN_VCVT_N_F64_S64, - ARM64_INTRIN_VCVTQ_N_F64_S64, - ARM64_INTRIN_VCVTQ_N_F64_U64, - ARM64_INTRIN_VCVTD_N_F64_S64, - ARM64_INTRIN_VCVT_F16_F32, - ARM64_INTRIN_VCVT_HIGH_F16_F32, - ARM64_INTRIN_VCVT_F32_F64, - ARM64_INTRIN_VCVT_HIGH_F32_F64, - ARM64_INTRIN_VCVT_F32_F16, - ARM64_INTRIN_VCVT_HIGH_F32_F16, - ARM64_INTRIN_VCVT_F64_F32, - ARM64_INTRIN_VCVT_HIGH_F64_F32, - ARM64_INTRIN_VCVTX_F32_F64, - ARM64_INTRIN_VCVTXD_F32_F64, - ARM64_INTRIN_VCVTX_HIGH_F32_F64, - ARM64_INTRIN_VRND_F32, - ARM64_INTRIN_VRNDQ_F32, - ARM64_INTRIN_VRND_F64, - ARM64_INTRIN_VRNDQ_F64, - ARM64_INTRIN_VRNDN_F32, - ARM64_INTRIN_VRNDNQ_F32, - ARM64_INTRIN_VRNDN_F64, - ARM64_INTRIN_VRNDNQ_F64, - ARM64_INTRIN_VRNDNS_F32, - ARM64_INTRIN_VRNDM_F32, - ARM64_INTRIN_VRNDMQ_F32, - ARM64_INTRIN_VRNDM_F64, - ARM64_INTRIN_VRNDMQ_F64, - ARM64_INTRIN_VRNDP_F32, - ARM64_INTRIN_VRNDPQ_F32, - ARM64_INTRIN_VRNDP_F64, - ARM64_INTRIN_VRNDPQ_F64, - ARM64_INTRIN_VRNDA_F32, - ARM64_INTRIN_VRNDAQ_F32, - ARM64_INTRIN_VRNDA_F64, - ARM64_INTRIN_VRNDAQ_F64, - ARM64_INTRIN_VRNDI_F32, - ARM64_INTRIN_VRNDIQ_F32, - ARM64_INTRIN_VRNDI_F64, - ARM64_INTRIN_VRNDIQ_F64, - ARM64_INTRIN_VRNDX_F32, - ARM64_INTRIN_VRNDXQ_F32, - ARM64_INTRIN_VRNDX_F64, - ARM64_INTRIN_VRNDXQ_F64, - ARM64_INTRIN_VMOVN_S16, - ARM64_INTRIN_VMOVN_S32, - ARM64_INTRIN_VMOVN_S64, - ARM64_INTRIN_VMOVN_U16, - ARM64_INTRIN_VMOVN_U32, - ARM64_INTRIN_VMOVN_U64, - ARM64_INTRIN_VMOVN_HIGH_S16, - ARM64_INTRIN_VMOVN_HIGH_S32, - ARM64_INTRIN_VMOVN_HIGH_S64, - ARM64_INTRIN_VMOVN_HIGH_U16, - ARM64_INTRIN_VMOVN_HIGH_U32, - ARM64_INTRIN_VMOVN_HIGH_U64, - ARM64_INTRIN_VMOVL_S8, - ARM64_INTRIN_VMOVL_S16, - ARM64_INTRIN_VMOVL_S32, - ARM64_INTRIN_VMOVL_U8, - ARM64_INTRIN_VMOVL_U16, - ARM64_INTRIN_VMOVL_U32, - ARM64_INTRIN_VMOVL_HIGH_S8, - ARM64_INTRIN_VMOVL_HIGH_S16, - ARM64_INTRIN_VMOVL_HIGH_S32, - ARM64_INTRIN_VMOVL_HIGH_U8, - ARM64_INTRIN_VMOVL_HIGH_U16, - ARM64_INTRIN_VMOVL_HIGH_U32, - ARM64_INTRIN_VQMOVN_S16, - ARM64_INTRIN_VQMOVN_S32, - ARM64_INTRIN_VQMOVN_S64, - ARM64_INTRIN_VQMOVN_U16, - ARM64_INTRIN_VQMOVN_U32, - ARM64_INTRIN_VQMOVN_U64, - ARM64_INTRIN_VQMOVNH_S16, - ARM64_INTRIN_VQMOVNS_S32, - ARM64_INTRIN_VQMOVND_S64, - ARM64_INTRIN_VQMOVNH_U16, - ARM64_INTRIN_VQMOVNS_U32, - ARM64_INTRIN_VQMOVND_U64, - ARM64_INTRIN_VQMOVN_HIGH_S16, - ARM64_INTRIN_VQMOVN_HIGH_S32, - ARM64_INTRIN_VQMOVN_HIGH_S64, - ARM64_INTRIN_VQMOVN_HIGH_U16, - ARM64_INTRIN_VQMOVN_HIGH_U32, - ARM64_INTRIN_VQMOVN_HIGH_U64, - ARM64_INTRIN_VQMOVUN_S16, - ARM64_INTRIN_VQMOVUN_S32, - ARM64_INTRIN_VQMOVUN_S64, - ARM64_INTRIN_VQMOVUNH_S16, - ARM64_INTRIN_VQMOVUNS_S32, - ARM64_INTRIN_VQMOVUND_S64, - ARM64_INTRIN_VQMOVUN_HIGH_S16, - ARM64_INTRIN_VQMOVUN_HIGH_S32, - ARM64_INTRIN_VQMOVUN_HIGH_S64, - ARM64_INTRIN_VMLA_LANE_S16, - ARM64_INTRIN_VMLAQ_LANE_S16, - ARM64_INTRIN_VMLA_LANE_S32, - ARM64_INTRIN_VMLAQ_LANE_S32, - ARM64_INTRIN_VMLA_LANE_U16, - ARM64_INTRIN_VMLAQ_LANE_U16, - ARM64_INTRIN_VMLA_LANE_U32, - ARM64_INTRIN_VMLAQ_LANE_U32, - ARM64_INTRIN_VMLA_LANE_F32, - ARM64_INTRIN_VMLAQ_LANE_F32, - ARM64_INTRIN_VMLA_LANEQ_S16, - ARM64_INTRIN_VMLAQ_LANEQ_S16, - ARM64_INTRIN_VMLA_LANEQ_S32, - ARM64_INTRIN_VMLAQ_LANEQ_S32, - ARM64_INTRIN_VMLA_LANEQ_U16, - ARM64_INTRIN_VMLAQ_LANEQ_U16, - ARM64_INTRIN_VMLA_LANEQ_U32, - ARM64_INTRIN_VMLAQ_LANEQ_U32, - ARM64_INTRIN_VMLA_LANEQ_F32, - ARM64_INTRIN_VMLAQ_LANEQ_F32, - ARM64_INTRIN_VMLAL_LANE_S16, - ARM64_INTRIN_VMLAL_LANE_S32, - ARM64_INTRIN_VMLAL_LANE_U16, - ARM64_INTRIN_VMLAL_LANE_U32, - ARM64_INTRIN_VMLAL_HIGH_LANE_S16, - ARM64_INTRIN_VMLAL_HIGH_LANE_S32, - ARM64_INTRIN_VMLAL_HIGH_LANE_U16, - ARM64_INTRIN_VMLAL_HIGH_LANE_U32, - ARM64_INTRIN_VMLAL_LANEQ_S16, - ARM64_INTRIN_VMLAL_LANEQ_S32, - ARM64_INTRIN_VMLAL_LANEQ_U16, - ARM64_INTRIN_VMLAL_LANEQ_U32, - ARM64_INTRIN_VMLAL_HIGH_LANEQ_S16, - ARM64_INTRIN_VMLAL_HIGH_LANEQ_S32, - ARM64_INTRIN_VMLAL_HIGH_LANEQ_U16, - ARM64_INTRIN_VMLAL_HIGH_LANEQ_U32, - ARM64_INTRIN_VQDMLAL_LANE_S16, - ARM64_INTRIN_VQDMLAL_LANE_S32, - ARM64_INTRIN_VQDMLALH_LANE_S16, - ARM64_INTRIN_VQDMLALS_LANE_S32, - ARM64_INTRIN_VQDMLAL_HIGH_LANE_S16, - ARM64_INTRIN_VQDMLAL_HIGH_LANE_S32, - ARM64_INTRIN_VQDMLAL_LANEQ_S16, - ARM64_INTRIN_VQDMLAL_LANEQ_S32, - ARM64_INTRIN_VQDMLALH_LANEQ_S16, - ARM64_INTRIN_VQDMLALS_LANEQ_S32, - ARM64_INTRIN_VQDMLAL_HIGH_LANEQ_S16, - ARM64_INTRIN_VQDMLAL_HIGH_LANEQ_S32, - ARM64_INTRIN_VMLS_LANE_S16, - ARM64_INTRIN_VMLSQ_LANE_S16, - ARM64_INTRIN_VMLS_LANE_S32, - ARM64_INTRIN_VMLSQ_LANE_S32, - ARM64_INTRIN_VMLS_LANE_U16, - ARM64_INTRIN_VMLSQ_LANE_U16, - ARM64_INTRIN_VMLS_LANE_U32, - ARM64_INTRIN_VMLSQ_LANE_U32, - ARM64_INTRIN_VMLS_LANE_F32, - ARM64_INTRIN_VMLSQ_LANE_F32, - ARM64_INTRIN_VMLS_LANEQ_S16, - ARM64_INTRIN_VMLSQ_LANEQ_S16, - ARM64_INTRIN_VMLS_LANEQ_S32, - ARM64_INTRIN_VMLSQ_LANEQ_S32, - ARM64_INTRIN_VMLS_LANEQ_U16, - ARM64_INTRIN_VMLSQ_LANEQ_U16, - ARM64_INTRIN_VMLS_LANEQ_U32, - ARM64_INTRIN_VMLSQ_LANEQ_U32, - ARM64_INTRIN_VMLS_LANEQ_F32, - ARM64_INTRIN_VMLSQ_LANEQ_F32, - ARM64_INTRIN_VMLSL_LANE_S16, - ARM64_INTRIN_VMLSL_LANE_S32, - ARM64_INTRIN_VMLSL_LANE_U16, - ARM64_INTRIN_VMLSL_LANE_U32, - ARM64_INTRIN_VMLSL_HIGH_LANE_S16, - ARM64_INTRIN_VMLSL_HIGH_LANE_S32, - ARM64_INTRIN_VMLSL_HIGH_LANE_U16, - ARM64_INTRIN_VMLSL_HIGH_LANE_U32, - ARM64_INTRIN_VMLSL_LANEQ_S16, - ARM64_INTRIN_VMLSL_LANEQ_S32, - ARM64_INTRIN_VMLSL_LANEQ_U16, - ARM64_INTRIN_VMLSL_LANEQ_U32, - ARM64_INTRIN_VMLSL_HIGH_LANEQ_S16, - ARM64_INTRIN_VMLSL_HIGH_LANEQ_S32, - ARM64_INTRIN_VMLSL_HIGH_LANEQ_U16, - ARM64_INTRIN_VMLSL_HIGH_LANEQ_U32, - ARM64_INTRIN_VQDMLSL_LANE_S16, - ARM64_INTRIN_VQDMLSL_LANE_S32, - ARM64_INTRIN_VQDMLSLH_LANE_S16, - ARM64_INTRIN_VQDMLSLS_LANE_S32, - ARM64_INTRIN_VQDMLSL_HIGH_LANE_S16, - ARM64_INTRIN_VQDMLSL_HIGH_LANE_S32, - ARM64_INTRIN_VQDMLSL_LANEQ_S16, - ARM64_INTRIN_VQDMLSL_LANEQ_S32, - ARM64_INTRIN_VQDMLSLH_LANEQ_S16, - ARM64_INTRIN_VQDMLSLS_LANEQ_S32, - ARM64_INTRIN_VQDMLSL_HIGH_LANEQ_S16, - ARM64_INTRIN_VQDMLSL_HIGH_LANEQ_S32, - ARM64_INTRIN_VMUL_N_S16, - ARM64_INTRIN_VMULQ_N_S16, - ARM64_INTRIN_VMUL_N_S32, - ARM64_INTRIN_VMULQ_N_S32, - ARM64_INTRIN_VMUL_N_U16, - ARM64_INTRIN_VMULQ_N_U16, - ARM64_INTRIN_VMUL_N_U32, - ARM64_INTRIN_VMULQ_N_U32, - ARM64_INTRIN_VMUL_N_F32, - ARM64_INTRIN_VMULQ_N_F32, - ARM64_INTRIN_VMUL_N_F64, - ARM64_INTRIN_VMULQ_N_F64, - ARM64_INTRIN_VMUL_LANE_S16, - ARM64_INTRIN_VMULQ_LANE_S16, - ARM64_INTRIN_VMUL_LANE_S32, - ARM64_INTRIN_VMULQ_LANE_S32, - ARM64_INTRIN_VMUL_LANE_U16, - ARM64_INTRIN_VMULQ_LANE_U16, - ARM64_INTRIN_VMUL_LANE_U32, - ARM64_INTRIN_VMULQ_LANE_U32, - ARM64_INTRIN_VMUL_LANE_F32, - ARM64_INTRIN_VMULQ_LANE_F32, - ARM64_INTRIN_VMUL_LANE_F64, - ARM64_INTRIN_VMULQ_LANE_F64, - ARM64_INTRIN_VMULS_LANE_F32, - ARM64_INTRIN_VMULD_LANE_F64, - ARM64_INTRIN_VMUL_LANEQ_S16, - ARM64_INTRIN_VMULQ_LANEQ_S16, - ARM64_INTRIN_VMUL_LANEQ_S32, - ARM64_INTRIN_VMULQ_LANEQ_S32, - ARM64_INTRIN_VMUL_LANEQ_U16, - ARM64_INTRIN_VMULQ_LANEQ_U16, - ARM64_INTRIN_VMUL_LANEQ_U32, - ARM64_INTRIN_VMULQ_LANEQ_U32, - ARM64_INTRIN_VMUL_LANEQ_F32, - ARM64_INTRIN_VMULQ_LANEQ_F32, - ARM64_INTRIN_VMUL_LANEQ_F64, - ARM64_INTRIN_VMULQ_LANEQ_F64, - ARM64_INTRIN_VMULS_LANEQ_F32, - ARM64_INTRIN_VMULD_LANEQ_F64, - ARM64_INTRIN_VMULL_N_S16, - ARM64_INTRIN_VMULL_N_S32, - ARM64_INTRIN_VMULL_N_U16, - ARM64_INTRIN_VMULL_N_U32, - ARM64_INTRIN_VMULL_HIGH_N_S16, - ARM64_INTRIN_VMULL_HIGH_N_S32, - ARM64_INTRIN_VMULL_HIGH_N_U16, - ARM64_INTRIN_VMULL_HIGH_N_U32, - ARM64_INTRIN_VMULL_LANE_S16, - ARM64_INTRIN_VMULL_LANE_S32, - ARM64_INTRIN_VMULL_LANE_U16, - ARM64_INTRIN_VMULL_LANE_U32, - ARM64_INTRIN_VMULL_HIGH_LANE_S16, - ARM64_INTRIN_VMULL_HIGH_LANE_S32, - ARM64_INTRIN_VMULL_HIGH_LANE_U16, - ARM64_INTRIN_VMULL_HIGH_LANE_U32, - ARM64_INTRIN_VMULL_LANEQ_S16, - ARM64_INTRIN_VMULL_LANEQ_S32, - ARM64_INTRIN_VMULL_LANEQ_U16, - ARM64_INTRIN_VMULL_LANEQ_U32, - ARM64_INTRIN_VMULL_HIGH_LANEQ_S16, - ARM64_INTRIN_VMULL_HIGH_LANEQ_S32, - ARM64_INTRIN_VMULL_HIGH_LANEQ_U16, - ARM64_INTRIN_VMULL_HIGH_LANEQ_U32, - ARM64_INTRIN_VQDMULL_N_S16, - ARM64_INTRIN_VQDMULL_N_S32, - ARM64_INTRIN_VQDMULL_HIGH_N_S16, - ARM64_INTRIN_VQDMULL_HIGH_N_S32, - ARM64_INTRIN_VQDMULL_LANE_S16, - ARM64_INTRIN_VQDMULL_LANE_S32, - ARM64_INTRIN_VQDMULLH_LANE_S16, - ARM64_INTRIN_VQDMULLS_LANE_S32, - ARM64_INTRIN_VQDMULL_HIGH_LANE_S16, - ARM64_INTRIN_VQDMULL_HIGH_LANE_S32, - ARM64_INTRIN_VQDMULL_LANEQ_S16, - ARM64_INTRIN_VQDMULL_LANEQ_S32, - ARM64_INTRIN_VQDMULLH_LANEQ_S16, - ARM64_INTRIN_VQDMULLS_LANEQ_S32, - ARM64_INTRIN_VQDMULL_HIGH_LANEQ_S16, - ARM64_INTRIN_VQDMULL_HIGH_LANEQ_S32, - ARM64_INTRIN_VQDMULH_N_S16, - ARM64_INTRIN_VQDMULHQ_N_S16, - ARM64_INTRIN_VQDMULH_N_S32, - ARM64_INTRIN_VQDMULHQ_N_S32, - ARM64_INTRIN_VQDMULH_LANE_S16, - ARM64_INTRIN_VQDMULHQ_LANE_S16, - ARM64_INTRIN_VQDMULH_LANE_S32, - ARM64_INTRIN_VQDMULHQ_LANE_S32, - ARM64_INTRIN_VQDMULHH_LANE_S16, - ARM64_INTRIN_VQDMULHS_LANE_S32, - ARM64_INTRIN_VQDMULH_LANEQ_S16, - ARM64_INTRIN_VQDMULHQ_LANEQ_S16, - ARM64_INTRIN_VQDMULH_LANEQ_S32, - ARM64_INTRIN_VQDMULHQ_LANEQ_S32, - ARM64_INTRIN_VQDMULHH_LANEQ_S16, - ARM64_INTRIN_VQDMULHS_LANEQ_S32, - ARM64_INTRIN_VQRDMULH_N_S16, - ARM64_INTRIN_VQRDMULHQ_N_S16, - ARM64_INTRIN_VQRDMULH_N_S32, - ARM64_INTRIN_VQRDMULHQ_N_S32, - ARM64_INTRIN_VQRDMULH_LANE_S16, - ARM64_INTRIN_VQRDMULHQ_LANE_S16, - ARM64_INTRIN_VQRDMULH_LANE_S32, - ARM64_INTRIN_VQRDMULHQ_LANE_S32, - ARM64_INTRIN_VQRDMULHH_LANE_S16, - ARM64_INTRIN_VQRDMULHS_LANE_S32, - ARM64_INTRIN_VQRDMULH_LANEQ_S16, - ARM64_INTRIN_VQRDMULHQ_LANEQ_S16, - ARM64_INTRIN_VQRDMULH_LANEQ_S32, - ARM64_INTRIN_VQRDMULHQ_LANEQ_S32, - ARM64_INTRIN_VQRDMULHH_LANEQ_S16, - ARM64_INTRIN_VQRDMULHS_LANEQ_S32, - ARM64_INTRIN_VMLA_N_S16, - ARM64_INTRIN_VMLAQ_N_S16, - ARM64_INTRIN_VMLA_N_S32, - ARM64_INTRIN_VMLAQ_N_S32, - ARM64_INTRIN_VMLA_N_U16, - ARM64_INTRIN_VMLAQ_N_U16, - ARM64_INTRIN_VMLA_N_U32, - ARM64_INTRIN_VMLAQ_N_U32, - ARM64_INTRIN_VMLA_N_F32, - ARM64_INTRIN_VMLAQ_N_F32, - ARM64_INTRIN_VMLAL_N_S16, - ARM64_INTRIN_VMLAL_N_S32, - ARM64_INTRIN_VMLAL_N_U16, - ARM64_INTRIN_VMLAL_N_U32, - ARM64_INTRIN_VMLAL_HIGH_N_S16, - ARM64_INTRIN_VMLAL_HIGH_N_S32, - ARM64_INTRIN_VMLAL_HIGH_N_U16, - ARM64_INTRIN_VMLAL_HIGH_N_U32, - ARM64_INTRIN_VQDMLAL_N_S16, - ARM64_INTRIN_VQDMLAL_N_S32, - ARM64_INTRIN_VQDMLAL_HIGH_N_S16, - ARM64_INTRIN_VQDMLAL_HIGH_N_S32, - ARM64_INTRIN_VMLS_N_S16, - ARM64_INTRIN_VMLSQ_N_S16, - ARM64_INTRIN_VMLS_N_S32, - ARM64_INTRIN_VMLSQ_N_S32, - ARM64_INTRIN_VMLS_N_U16, - ARM64_INTRIN_VMLSQ_N_U16, - ARM64_INTRIN_VMLS_N_U32, - ARM64_INTRIN_VMLSQ_N_U32, - ARM64_INTRIN_VMLS_N_F32, - ARM64_INTRIN_VMLSQ_N_F32, - ARM64_INTRIN_VMLSL_N_S16, - ARM64_INTRIN_VMLSL_N_S32, - ARM64_INTRIN_VMLSL_N_U16, - ARM64_INTRIN_VMLSL_N_U32, - ARM64_INTRIN_VMLSL_HIGH_N_S16, - ARM64_INTRIN_VMLSL_HIGH_N_S32, - ARM64_INTRIN_VMLSL_HIGH_N_U16, - ARM64_INTRIN_VMLSL_HIGH_N_U32, - ARM64_INTRIN_VQDMLSL_N_S16, - ARM64_INTRIN_VQDMLSL_N_S32, - ARM64_INTRIN_VQDMLSL_HIGH_N_S16, - ARM64_INTRIN_VQDMLSL_HIGH_N_S32, - ARM64_INTRIN_VABS_S8, - ARM64_INTRIN_VABSQ_S8, - ARM64_INTRIN_VABS_S16, - ARM64_INTRIN_VABSQ_S16, - ARM64_INTRIN_VABS_S32, - ARM64_INTRIN_VABSQ_S32, - ARM64_INTRIN_VABS_F32, - ARM64_INTRIN_VABSQ_F32, - ARM64_INTRIN_VABS_S64, - ARM64_INTRIN_VABSD_S64, - ARM64_INTRIN_VABSQ_S64, - ARM64_INTRIN_VABS_F64, - ARM64_INTRIN_VABSQ_F64, - ARM64_INTRIN_VQABS_S8, - ARM64_INTRIN_VQABSQ_S8, - ARM64_INTRIN_VQABS_S16, - ARM64_INTRIN_VQABSQ_S16, - ARM64_INTRIN_VQABS_S32, - ARM64_INTRIN_VQABSQ_S32, - ARM64_INTRIN_VQABS_S64, - ARM64_INTRIN_VQABSQ_S64, - ARM64_INTRIN_VQABSB_S8, - ARM64_INTRIN_VQABSH_S16, - ARM64_INTRIN_VQABSS_S32, - ARM64_INTRIN_VQABSD_S64, - ARM64_INTRIN_VNEG_S8, - ARM64_INTRIN_VNEGQ_S8, - ARM64_INTRIN_VNEG_S16, - ARM64_INTRIN_VNEGQ_S16, - ARM64_INTRIN_VNEG_S32, - ARM64_INTRIN_VNEGQ_S32, - ARM64_INTRIN_VNEG_F32, - ARM64_INTRIN_VNEGQ_F32, - ARM64_INTRIN_VNEG_S64, - ARM64_INTRIN_VNEGD_S64, - ARM64_INTRIN_VNEGQ_S64, - ARM64_INTRIN_VNEG_F64, - ARM64_INTRIN_VNEGQ_F64, - ARM64_INTRIN_VQNEG_S8, - ARM64_INTRIN_VQNEGQ_S8, - ARM64_INTRIN_VQNEG_S16, - ARM64_INTRIN_VQNEGQ_S16, - ARM64_INTRIN_VQNEG_S32, - ARM64_INTRIN_VQNEGQ_S32, - ARM64_INTRIN_VQNEG_S64, - ARM64_INTRIN_VQNEGQ_S64, - ARM64_INTRIN_VQNEGB_S8, - ARM64_INTRIN_VQNEGH_S16, - ARM64_INTRIN_VQNEGS_S32, - ARM64_INTRIN_VQNEGD_S64, - ARM64_INTRIN_VCLS_S8, - ARM64_INTRIN_VCLSQ_S8, - ARM64_INTRIN_VCLS_S16, - ARM64_INTRIN_VCLSQ_S16, - ARM64_INTRIN_VCLS_S32, - ARM64_INTRIN_VCLSQ_S32, - ARM64_INTRIN_VCLS_U8, - ARM64_INTRIN_VCLSQ_U8, - ARM64_INTRIN_VCLS_U16, - ARM64_INTRIN_VCLSQ_U16, - ARM64_INTRIN_VCLS_U32, - ARM64_INTRIN_VCLSQ_U32, - ARM64_INTRIN_VCLZ_S8, - ARM64_INTRIN_VCLZQ_S8, - ARM64_INTRIN_VCLZ_S16, - ARM64_INTRIN_VCLZQ_S16, - ARM64_INTRIN_VCLZ_S32, - ARM64_INTRIN_VCLZQ_S32, - ARM64_INTRIN_VCLZ_U8, - ARM64_INTRIN_VCLZQ_U8, - ARM64_INTRIN_VCLZ_U16, - ARM64_INTRIN_VCLZQ_U16, - ARM64_INTRIN_VCLZ_U32, - ARM64_INTRIN_VCLZQ_U32, - ARM64_INTRIN_VCNT_S8, - ARM64_INTRIN_VCNTQ_S8, - ARM64_INTRIN_VCNT_U8, - ARM64_INTRIN_VCNTQ_U8, - ARM64_INTRIN_VCNT_P8, - ARM64_INTRIN_VCNTQ_P8, - ARM64_INTRIN_VRECPE_U32, - ARM64_INTRIN_VRECPEQ_U32, - ARM64_INTRIN_VRECPE_F32, - ARM64_INTRIN_VRECPEQ_F32, - ARM64_INTRIN_VRECPE_F64, - ARM64_INTRIN_VRECPEQ_F64, - ARM64_INTRIN_VRECPES_F32, - ARM64_INTRIN_VRECPED_F64, - ARM64_INTRIN_VRECPS_F32, - ARM64_INTRIN_VRECPSQ_F32, - ARM64_INTRIN_VRECPS_F64, - ARM64_INTRIN_VRECPSQ_F64, - ARM64_INTRIN_VRECPSS_F32, - ARM64_INTRIN_VRECPSD_F64, - ARM64_INTRIN_VSQRT_F32, - ARM64_INTRIN_VSQRTQ_F32, - ARM64_INTRIN_VSQRT_F64, - ARM64_INTRIN_VSQRTQ_F64, - ARM64_INTRIN_VRSQRTE_U32, - ARM64_INTRIN_VRSQRTEQ_U32, - ARM64_INTRIN_VRSQRTE_F32, - ARM64_INTRIN_VRSQRTEQ_F32, - ARM64_INTRIN_VRSQRTE_F64, - ARM64_INTRIN_VRSQRTEQ_F64, - ARM64_INTRIN_VRSQRTES_F32, - ARM64_INTRIN_VRSQRTED_F64, - ARM64_INTRIN_VRSQRTS_F32, - ARM64_INTRIN_VRSQRTSQ_F32, - ARM64_INTRIN_VRSQRTS_F64, - ARM64_INTRIN_VRSQRTSQ_F64, - ARM64_INTRIN_VRSQRTSS_F32, - ARM64_INTRIN_VRSQRTSD_F64, - ARM64_INTRIN_VMVN_S8, - ARM64_INTRIN_VMVNQ_S8, - ARM64_INTRIN_VMVN_S16, - ARM64_INTRIN_VMVNQ_S16, - ARM64_INTRIN_VMVN_S32, - ARM64_INTRIN_VMVNQ_S32, - ARM64_INTRIN_VMVN_U8, - ARM64_INTRIN_VMVNQ_U8, - ARM64_INTRIN_VMVN_U16, - ARM64_INTRIN_VMVNQ_U16, - ARM64_INTRIN_VMVN_U32, - ARM64_INTRIN_VMVNQ_U32, - ARM64_INTRIN_VMVN_P8, - ARM64_INTRIN_VMVNQ_P8, - ARM64_INTRIN_VAND_S8, - ARM64_INTRIN_VANDQ_S8, - ARM64_INTRIN_VAND_S16, - ARM64_INTRIN_VANDQ_S16, - ARM64_INTRIN_VAND_S32, - ARM64_INTRIN_VANDQ_S32, - ARM64_INTRIN_VAND_S64, - ARM64_INTRIN_VANDQ_S64, - ARM64_INTRIN_VAND_U8, - ARM64_INTRIN_VANDQ_U8, - ARM64_INTRIN_VAND_U16, - ARM64_INTRIN_VANDQ_U16, - ARM64_INTRIN_VAND_U32, - ARM64_INTRIN_VANDQ_U32, - ARM64_INTRIN_VAND_U64, - ARM64_INTRIN_VANDQ_U64, - ARM64_INTRIN_VORR_S8, - ARM64_INTRIN_VORRQ_S8, - ARM64_INTRIN_VORR_S16, - ARM64_INTRIN_VORRQ_S16, - ARM64_INTRIN_VORR_S32, - ARM64_INTRIN_VORRQ_S32, - ARM64_INTRIN_VORR_S64, - ARM64_INTRIN_VORRQ_S64, - ARM64_INTRIN_VORR_U8, - ARM64_INTRIN_VORRQ_U8, - ARM64_INTRIN_VORR_U16, - ARM64_INTRIN_VORRQ_U16, - ARM64_INTRIN_VORR_U32, - ARM64_INTRIN_VORRQ_U32, - ARM64_INTRIN_VORR_U64, - ARM64_INTRIN_VORRQ_U64, - ARM64_INTRIN_VEOR_S8, - ARM64_INTRIN_VEORQ_S8, - ARM64_INTRIN_VEOR_S16, - ARM64_INTRIN_VEORQ_S16, - ARM64_INTRIN_VEOR_S32, - ARM64_INTRIN_VEORQ_S32, - ARM64_INTRIN_VEOR_S64, - ARM64_INTRIN_VEORQ_S64, - ARM64_INTRIN_VEOR_U8, - ARM64_INTRIN_VEORQ_U8, - ARM64_INTRIN_VEOR_U16, - ARM64_INTRIN_VEORQ_U16, - ARM64_INTRIN_VEOR_U32, - ARM64_INTRIN_VEORQ_U32, - ARM64_INTRIN_VEOR_U64, - ARM64_INTRIN_VEORQ_U64, - ARM64_INTRIN_VBIC_S8, - ARM64_INTRIN_VBICQ_S8, - ARM64_INTRIN_VBIC_S16, - ARM64_INTRIN_VBICQ_S16, - ARM64_INTRIN_VBIC_S32, - ARM64_INTRIN_VBICQ_S32, - ARM64_INTRIN_VBIC_S64, - ARM64_INTRIN_VBICQ_S64, - ARM64_INTRIN_VBIC_U8, - ARM64_INTRIN_VBICQ_U8, - ARM64_INTRIN_VBIC_U16, - ARM64_INTRIN_VBICQ_U16, - ARM64_INTRIN_VBIC_U32, - ARM64_INTRIN_VBICQ_U32, - ARM64_INTRIN_VBIC_U64, - ARM64_INTRIN_VBICQ_U64, - ARM64_INTRIN_VORN_S8, - ARM64_INTRIN_VORNQ_S8, - ARM64_INTRIN_VORN_S16, - ARM64_INTRIN_VORNQ_S16, - ARM64_INTRIN_VORN_S32, - ARM64_INTRIN_VORNQ_S32, - ARM64_INTRIN_VORN_S64, - ARM64_INTRIN_VORNQ_S64, - ARM64_INTRIN_VORN_U8, - ARM64_INTRIN_VORNQ_U8, - ARM64_INTRIN_VORN_U16, - ARM64_INTRIN_VORNQ_U16, - ARM64_INTRIN_VORN_U32, - ARM64_INTRIN_VORNQ_U32, - ARM64_INTRIN_VORN_U64, - ARM64_INTRIN_VORNQ_U64, - ARM64_INTRIN_VBSL_S8, - ARM64_INTRIN_VBSLQ_S8, - ARM64_INTRIN_VBSL_S16, - ARM64_INTRIN_VBSLQ_S16, - ARM64_INTRIN_VBSL_S32, - ARM64_INTRIN_VBSLQ_S32, - ARM64_INTRIN_VBSL_S64, - ARM64_INTRIN_VBSLQ_S64, - ARM64_INTRIN_VBSL_U8, - ARM64_INTRIN_VBSLQ_U8, - ARM64_INTRIN_VBSL_U16, - ARM64_INTRIN_VBSLQ_U16, - ARM64_INTRIN_VBSL_U32, - ARM64_INTRIN_VBSLQ_U32, - ARM64_INTRIN_VBSL_U64, - ARM64_INTRIN_VBSLQ_U64, - ARM64_INTRIN_VBSL_P64, - ARM64_INTRIN_VBSLQ_P64, - ARM64_INTRIN_VBSL_F32, - ARM64_INTRIN_VBSLQ_F32, - ARM64_INTRIN_VBSL_P8, - ARM64_INTRIN_VBSLQ_P8, - ARM64_INTRIN_VBSL_P16, - ARM64_INTRIN_VBSLQ_P16, - ARM64_INTRIN_VBSL_F64, - ARM64_INTRIN_VBSLQ_F64, - ARM64_INTRIN_VCOPY_LANE_S8, - ARM64_INTRIN_VCOPYQ_LANE_S8, - ARM64_INTRIN_VCOPY_LANE_S16, - ARM64_INTRIN_VCOPYQ_LANE_S16, - ARM64_INTRIN_VCOPY_LANE_S32, - ARM64_INTRIN_VCOPYQ_LANE_S32, - ARM64_INTRIN_VCOPY_LANE_S64, - ARM64_INTRIN_VCOPYQ_LANE_S64, - ARM64_INTRIN_VCOPY_LANE_U8, - ARM64_INTRIN_VCOPYQ_LANE_U8, - ARM64_INTRIN_VCOPY_LANE_U16, - ARM64_INTRIN_VCOPYQ_LANE_U16, - ARM64_INTRIN_VCOPY_LANE_U32, - ARM64_INTRIN_VCOPYQ_LANE_U32, - ARM64_INTRIN_VCOPY_LANE_U64, - ARM64_INTRIN_VCOPYQ_LANE_U64, - ARM64_INTRIN_VCOPY_LANE_P64, - ARM64_INTRIN_VCOPYQ_LANE_P64, - ARM64_INTRIN_VCOPY_LANE_F32, - ARM64_INTRIN_VCOPYQ_LANE_F32, - ARM64_INTRIN_VCOPY_LANE_F64, - ARM64_INTRIN_VCOPYQ_LANE_F64, - ARM64_INTRIN_VCOPY_LANE_P8, - ARM64_INTRIN_VCOPYQ_LANE_P8, - ARM64_INTRIN_VCOPY_LANE_P16, - ARM64_INTRIN_VCOPYQ_LANE_P16, - ARM64_INTRIN_VCOPY_LANEQ_S8, - ARM64_INTRIN_VCOPYQ_LANEQ_S8, - ARM64_INTRIN_VCOPY_LANEQ_S16, - ARM64_INTRIN_VCOPYQ_LANEQ_S16, - ARM64_INTRIN_VCOPY_LANEQ_S32, - ARM64_INTRIN_VCOPYQ_LANEQ_S32, - ARM64_INTRIN_VCOPY_LANEQ_S64, - ARM64_INTRIN_VCOPYQ_LANEQ_S64, - ARM64_INTRIN_VCOPY_LANEQ_U8, - ARM64_INTRIN_VCOPYQ_LANEQ_U8, - ARM64_INTRIN_VCOPY_LANEQ_U16, - ARM64_INTRIN_VCOPYQ_LANEQ_U16, - ARM64_INTRIN_VCOPY_LANEQ_U32, - ARM64_INTRIN_VCOPYQ_LANEQ_U32, - ARM64_INTRIN_VCOPY_LANEQ_U64, - ARM64_INTRIN_VCOPYQ_LANEQ_U64, - ARM64_INTRIN_VCOPY_LANEQ_P64, - ARM64_INTRIN_VCOPYQ_LANEQ_P64, - ARM64_INTRIN_VCOPY_LANEQ_F32, - ARM64_INTRIN_VCOPYQ_LANEQ_F32, - ARM64_INTRIN_VCOPY_LANEQ_F64, - ARM64_INTRIN_VCOPYQ_LANEQ_F64, - ARM64_INTRIN_VCOPY_LANEQ_P8, - ARM64_INTRIN_VCOPYQ_LANEQ_P8, - ARM64_INTRIN_VCOPY_LANEQ_P16, - ARM64_INTRIN_VCOPYQ_LANEQ_P16, - ARM64_INTRIN_VRBIT_S8, - ARM64_INTRIN_VRBITQ_S8, - ARM64_INTRIN_VRBIT_U8, - ARM64_INTRIN_VRBITQ_U8, - ARM64_INTRIN_VRBIT_P8, - ARM64_INTRIN_VRBITQ_P8, - ARM64_INTRIN_VCREATE_S8, - ARM64_INTRIN_VCREATE_S16, - ARM64_INTRIN_VCREATE_S32, - ARM64_INTRIN_VCREATE_S64, - ARM64_INTRIN_VCREATE_U8, - ARM64_INTRIN_VCREATE_U16, - ARM64_INTRIN_VCREATE_U32, - ARM64_INTRIN_VCREATE_U64, - ARM64_INTRIN_VCREATE_P64, - ARM64_INTRIN_VCREATE_F16, - ARM64_INTRIN_VCREATE_F32, - ARM64_INTRIN_VCREATE_P8, - ARM64_INTRIN_VCREATE_P16, - ARM64_INTRIN_VCREATE_F64, - ARM64_INTRIN_VDUP_N_S8, - ARM64_INTRIN_VDUPQ_N_S8, - ARM64_INTRIN_VDUP_N_S16, - ARM64_INTRIN_VDUPQ_N_S16, - ARM64_INTRIN_VDUP_N_S32, - ARM64_INTRIN_VDUPQ_N_S32, - ARM64_INTRIN_VDUP_N_S64, - ARM64_INTRIN_VDUPQ_N_S64, - ARM64_INTRIN_VDUP_N_U8, - ARM64_INTRIN_VDUPQ_N_U8, - ARM64_INTRIN_VDUP_N_U16, - ARM64_INTRIN_VDUPQ_N_U16, - ARM64_INTRIN_VDUP_N_U32, - ARM64_INTRIN_VDUPQ_N_U32, - ARM64_INTRIN_VDUP_N_U64, - ARM64_INTRIN_VDUPQ_N_U64, - ARM64_INTRIN_VDUP_N_P64, - ARM64_INTRIN_VDUPQ_N_P64, - ARM64_INTRIN_VDUP_N_F32, - ARM64_INTRIN_VDUPQ_N_F32, - ARM64_INTRIN_VDUP_N_P8, - ARM64_INTRIN_VDUPQ_N_P8, - ARM64_INTRIN_VDUP_N_P16, - ARM64_INTRIN_VDUPQ_N_P16, - ARM64_INTRIN_VDUP_N_F64, - ARM64_INTRIN_VDUPQ_N_F64, - ARM64_INTRIN_VMOV_N_S8, - ARM64_INTRIN_VMOVQ_N_S8, - ARM64_INTRIN_VMOV_N_S16, - ARM64_INTRIN_VMOVQ_N_S16, - ARM64_INTRIN_VMOV_N_S32, - ARM64_INTRIN_VMOVQ_N_S32, - ARM64_INTRIN_VMOV_N_S64, - ARM64_INTRIN_VMOVQ_N_S64, - ARM64_INTRIN_VMOV_N_U8, - ARM64_INTRIN_VMOVQ_N_U8, - ARM64_INTRIN_VMOV_N_U16, - ARM64_INTRIN_VMOVQ_N_U16, - ARM64_INTRIN_VMOV_N_U32, - ARM64_INTRIN_VMOVQ_N_U32, - ARM64_INTRIN_VMOV_N_U64, - ARM64_INTRIN_VMOVQ_N_U64, - ARM64_INTRIN_VMOV_N_F32, - ARM64_INTRIN_VMOVQ_N_F32, - ARM64_INTRIN_VMOV_N_P8, - ARM64_INTRIN_VMOVQ_N_P8, - ARM64_INTRIN_VMOV_N_P16, - ARM64_INTRIN_VMOVQ_N_P16, - ARM64_INTRIN_VMOV_N_F64, - ARM64_INTRIN_VMOVQ_N_F64, - ARM64_INTRIN_VDUP_LANE_S8, - ARM64_INTRIN_VDUPQ_LANE_S8, - ARM64_INTRIN_VDUP_LANE_S16, - ARM64_INTRIN_VDUPQ_LANE_S16, - ARM64_INTRIN_VDUP_LANE_S32, - ARM64_INTRIN_VDUPQ_LANE_S32, - ARM64_INTRIN_VDUP_LANE_S64, - ARM64_INTRIN_VDUPQ_LANE_S64, - ARM64_INTRIN_VDUP_LANE_U8, - ARM64_INTRIN_VDUPQ_LANE_U8, - ARM64_INTRIN_VDUP_LANE_U16, - ARM64_INTRIN_VDUPQ_LANE_U16, - ARM64_INTRIN_VDUP_LANE_U32, - ARM64_INTRIN_VDUPQ_LANE_U32, - ARM64_INTRIN_VDUP_LANE_U64, - ARM64_INTRIN_VDUPQ_LANE_U64, - ARM64_INTRIN_VDUP_LANE_P64, - ARM64_INTRIN_VDUPQ_LANE_P64, - ARM64_INTRIN_VDUP_LANE_F32, - ARM64_INTRIN_VDUPQ_LANE_F32, - ARM64_INTRIN_VDUP_LANE_P8, - ARM64_INTRIN_VDUPQ_LANE_P8, - ARM64_INTRIN_VDUP_LANE_P16, - ARM64_INTRIN_VDUPQ_LANE_P16, - ARM64_INTRIN_VDUP_LANE_F64, - ARM64_INTRIN_VDUPQ_LANE_F64, - ARM64_INTRIN_VDUP_LANEQ_S8, - ARM64_INTRIN_VDUPQ_LANEQ_S8, - ARM64_INTRIN_VDUP_LANEQ_S16, - ARM64_INTRIN_VDUPQ_LANEQ_S16, - ARM64_INTRIN_VDUP_LANEQ_S32, - ARM64_INTRIN_VDUPQ_LANEQ_S32, - ARM64_INTRIN_VDUP_LANEQ_S64, - ARM64_INTRIN_VDUPQ_LANEQ_S64, - ARM64_INTRIN_VDUP_LANEQ_U8, - ARM64_INTRIN_VDUPQ_LANEQ_U8, - ARM64_INTRIN_VDUP_LANEQ_U16, - ARM64_INTRIN_VDUPQ_LANEQ_U16, - ARM64_INTRIN_VDUP_LANEQ_U32, - ARM64_INTRIN_VDUPQ_LANEQ_U32, - ARM64_INTRIN_VDUP_LANEQ_U64, - ARM64_INTRIN_VDUPQ_LANEQ_U64, - ARM64_INTRIN_VDUP_LANEQ_P64, - ARM64_INTRIN_VDUPQ_LANEQ_P64, - ARM64_INTRIN_VDUP_LANEQ_F32, - ARM64_INTRIN_VDUPQ_LANEQ_F32, - ARM64_INTRIN_VDUP_LANEQ_P8, - ARM64_INTRIN_VDUPQ_LANEQ_P8, - ARM64_INTRIN_VDUP_LANEQ_P16, - ARM64_INTRIN_VDUPQ_LANEQ_P16, - ARM64_INTRIN_VDUP_LANEQ_F64, - ARM64_INTRIN_VDUPQ_LANEQ_F64, - ARM64_INTRIN_VCOMBINE_S8, - ARM64_INTRIN_VCOMBINE_S16, - ARM64_INTRIN_VCOMBINE_S32, - ARM64_INTRIN_VCOMBINE_S64, - ARM64_INTRIN_VCOMBINE_U8, - ARM64_INTRIN_VCOMBINE_U16, - ARM64_INTRIN_VCOMBINE_U32, - ARM64_INTRIN_VCOMBINE_U64, - ARM64_INTRIN_VCOMBINE_P64, - ARM64_INTRIN_VCOMBINE_F16, - ARM64_INTRIN_VCOMBINE_F32, - ARM64_INTRIN_VCOMBINE_P8, - ARM64_INTRIN_VCOMBINE_P16, - ARM64_INTRIN_VCOMBINE_F64, - ARM64_INTRIN_VGET_HIGH_S8, - ARM64_INTRIN_VGET_HIGH_S16, - ARM64_INTRIN_VGET_HIGH_S32, - ARM64_INTRIN_VGET_HIGH_S64, - ARM64_INTRIN_VGET_HIGH_U8, - ARM64_INTRIN_VGET_HIGH_U16, - ARM64_INTRIN_VGET_HIGH_U32, - ARM64_INTRIN_VGET_HIGH_U64, - ARM64_INTRIN_VGET_HIGH_P64, - ARM64_INTRIN_VGET_HIGH_F16, - ARM64_INTRIN_VGET_HIGH_F32, - ARM64_INTRIN_VGET_HIGH_P8, - ARM64_INTRIN_VGET_HIGH_P16, - ARM64_INTRIN_VGET_HIGH_F64, - ARM64_INTRIN_VGET_LOW_S8, - ARM64_INTRIN_VGET_LOW_S16, - ARM64_INTRIN_VGET_LOW_S32, - ARM64_INTRIN_VGET_LOW_S64, - ARM64_INTRIN_VGET_LOW_U8, - ARM64_INTRIN_VGET_LOW_U16, - ARM64_INTRIN_VGET_LOW_U32, - ARM64_INTRIN_VGET_LOW_U64, - ARM64_INTRIN_VGET_LOW_P64, - ARM64_INTRIN_VGET_LOW_F16, - ARM64_INTRIN_VGET_LOW_F32, - ARM64_INTRIN_VGET_LOW_P8, - ARM64_INTRIN_VGET_LOW_P16, - ARM64_INTRIN_VGET_LOW_F64, - ARM64_INTRIN_VDUPB_LANE_S8, - ARM64_INTRIN_VDUPH_LANE_S16, - ARM64_INTRIN_VDUPS_LANE_S32, - ARM64_INTRIN_VDUPD_LANE_S64, - ARM64_INTRIN_VDUPB_LANE_U8, - ARM64_INTRIN_VDUPH_LANE_U16, - ARM64_INTRIN_VDUPS_LANE_U32, - ARM64_INTRIN_VDUPD_LANE_U64, - ARM64_INTRIN_VDUPS_LANE_F32, - ARM64_INTRIN_VDUPD_LANE_F64, - ARM64_INTRIN_VDUPB_LANE_P8, - ARM64_INTRIN_VDUPH_LANE_P16, - ARM64_INTRIN_VDUPB_LANEQ_S8, - ARM64_INTRIN_VDUPH_LANEQ_S16, - ARM64_INTRIN_VDUPS_LANEQ_S32, - ARM64_INTRIN_VDUPD_LANEQ_S64, - ARM64_INTRIN_VDUPB_LANEQ_U8, - ARM64_INTRIN_VDUPH_LANEQ_U16, - ARM64_INTRIN_VDUPS_LANEQ_U32, - ARM64_INTRIN_VDUPD_LANEQ_U64, - ARM64_INTRIN_VDUPS_LANEQ_F32, - ARM64_INTRIN_VDUPD_LANEQ_F64, - ARM64_INTRIN_VDUPB_LANEQ_P8, - ARM64_INTRIN_VDUPH_LANEQ_P16, - ARM64_INTRIN_VLD1_S8, - ARM64_INTRIN_VLD1Q_S8, - ARM64_INTRIN_VLD1_S16, - ARM64_INTRIN_VLD1Q_S16, - ARM64_INTRIN_VLD1_S32, - ARM64_INTRIN_VLD1Q_S32, - ARM64_INTRIN_VLD1_S64, - ARM64_INTRIN_VLD1Q_S64, - ARM64_INTRIN_VLD1_U8, - ARM64_INTRIN_VLD1Q_U8, - ARM64_INTRIN_VLD1_U16, - ARM64_INTRIN_VLD1Q_U16, - ARM64_INTRIN_VLD1_U32, - ARM64_INTRIN_VLD1Q_U32, - ARM64_INTRIN_VLD1_U64, - ARM64_INTRIN_VLD1Q_U64, - ARM64_INTRIN_VLD1_P64, - ARM64_INTRIN_VLD1Q_P64, - ARM64_INTRIN_VLD1_F16, - ARM64_INTRIN_VLD1Q_F16, - ARM64_INTRIN_VLD1_F32, - ARM64_INTRIN_VLD1Q_F32, - ARM64_INTRIN_VLD1_P8, - ARM64_INTRIN_VLD1Q_P8, - ARM64_INTRIN_VLD1_P16, - ARM64_INTRIN_VLD1Q_P16, - ARM64_INTRIN_VLD1_F64, - ARM64_INTRIN_VLD1Q_F64, - ARM64_INTRIN_VLD1_LANE_S8, - ARM64_INTRIN_VLD1Q_LANE_S8, - ARM64_INTRIN_VLD1_LANE_S16, - ARM64_INTRIN_VLD1Q_LANE_S16, - ARM64_INTRIN_VLD1_LANE_S32, - ARM64_INTRIN_VLD1Q_LANE_S32, - ARM64_INTRIN_VLD1_LANE_S64, - ARM64_INTRIN_VLD1Q_LANE_S64, - ARM64_INTRIN_VLD1_LANE_U8, - ARM64_INTRIN_VLD1Q_LANE_U8, - ARM64_INTRIN_VLD1_LANE_U16, - ARM64_INTRIN_VLD1Q_LANE_U16, - ARM64_INTRIN_VLD1_LANE_U32, - ARM64_INTRIN_VLD1Q_LANE_U32, - ARM64_INTRIN_VLD1_LANE_U64, - ARM64_INTRIN_VLD1Q_LANE_U64, - ARM64_INTRIN_VLD1_LANE_P64, - ARM64_INTRIN_VLD1Q_LANE_P64, - ARM64_INTRIN_VLD1_LANE_F16, - ARM64_INTRIN_VLD1Q_LANE_F16, - ARM64_INTRIN_VLD1_LANE_F32, - ARM64_INTRIN_VLD1Q_LANE_F32, - ARM64_INTRIN_VLD1_LANE_P8, - ARM64_INTRIN_VLD1Q_LANE_P8, - ARM64_INTRIN_VLD1_LANE_P16, - ARM64_INTRIN_VLD1Q_LANE_P16, - ARM64_INTRIN_VLD1_LANE_F64, - ARM64_INTRIN_VLD1Q_LANE_F64, - ARM64_INTRIN_VLD1_DUP_S8, - ARM64_INTRIN_VLD1Q_DUP_S8, - ARM64_INTRIN_VLD1_DUP_S16, - ARM64_INTRIN_VLD1Q_DUP_S16, - ARM64_INTRIN_VLD1_DUP_S32, - ARM64_INTRIN_VLD1Q_DUP_S32, - ARM64_INTRIN_VLD1_DUP_S64, - ARM64_INTRIN_VLD1Q_DUP_S64, - ARM64_INTRIN_VLD1_DUP_U8, - ARM64_INTRIN_VLD1Q_DUP_U8, - ARM64_INTRIN_VLD1_DUP_U16, - ARM64_INTRIN_VLD1Q_DUP_U16, - ARM64_INTRIN_VLD1_DUP_U32, - ARM64_INTRIN_VLD1Q_DUP_U32, - ARM64_INTRIN_VLD1_DUP_U64, - ARM64_INTRIN_VLD1Q_DUP_U64, - ARM64_INTRIN_VLD1_DUP_P64, - ARM64_INTRIN_VLD1Q_DUP_P64, - ARM64_INTRIN_VLD1_DUP_F16, - ARM64_INTRIN_VLD1Q_DUP_F16, - ARM64_INTRIN_VLD1_DUP_F32, - ARM64_INTRIN_VLD1Q_DUP_F32, - ARM64_INTRIN_VLD1_DUP_P8, - ARM64_INTRIN_VLD1Q_DUP_P8, - ARM64_INTRIN_VLD1_DUP_P16, - ARM64_INTRIN_VLD1Q_DUP_P16, - ARM64_INTRIN_VLD1_DUP_F64, - ARM64_INTRIN_VLD1Q_DUP_F64, - ARM64_INTRIN_VST1_S8, - ARM64_INTRIN_VST1Q_S8, - ARM64_INTRIN_VST1_S16, - ARM64_INTRIN_VST1Q_S16, - ARM64_INTRIN_VST1_S32, - ARM64_INTRIN_VST1Q_S32, - ARM64_INTRIN_VST1_S64, - ARM64_INTRIN_VST1Q_S64, - ARM64_INTRIN_VST1_U8, - ARM64_INTRIN_VST1Q_U8, - ARM64_INTRIN_VST1_U16, - ARM64_INTRIN_VST1Q_U16, - ARM64_INTRIN_VST1_U32, - ARM64_INTRIN_VST1Q_U32, - ARM64_INTRIN_VST1_U64, - ARM64_INTRIN_VST1Q_U64, - ARM64_INTRIN_VST1_P64, - ARM64_INTRIN_VST1Q_P64, - ARM64_INTRIN_VST1_F16, - ARM64_INTRIN_VST1Q_F16, - ARM64_INTRIN_VST1_F32, - ARM64_INTRIN_VST1Q_F32, - ARM64_INTRIN_VST1_P8, - ARM64_INTRIN_VST1Q_P8, - ARM64_INTRIN_VST1_P16, - ARM64_INTRIN_VST1Q_P16, - ARM64_INTRIN_VST1_F64, - ARM64_INTRIN_VST1Q_F64, - ARM64_INTRIN_VST1_LANE_S8, - ARM64_INTRIN_VST1Q_LANE_S8, - ARM64_INTRIN_VST1_LANE_S16, - ARM64_INTRIN_VST1Q_LANE_S16, - ARM64_INTRIN_VST1_LANE_S32, - ARM64_INTRIN_VST1Q_LANE_S32, - ARM64_INTRIN_VST1_LANE_S64, - ARM64_INTRIN_VST1Q_LANE_S64, - ARM64_INTRIN_VST1_LANE_U8, - ARM64_INTRIN_VST1Q_LANE_U8, - ARM64_INTRIN_VST1_LANE_U16, - ARM64_INTRIN_VST1Q_LANE_U16, - ARM64_INTRIN_VST1_LANE_U32, - ARM64_INTRIN_VST1Q_LANE_U32, - ARM64_INTRIN_VST1_LANE_U64, - ARM64_INTRIN_VST1Q_LANE_U64, - ARM64_INTRIN_VST1_LANE_P64, - ARM64_INTRIN_VST1Q_LANE_P64, - ARM64_INTRIN_VST1_LANE_F16, - ARM64_INTRIN_VST1Q_LANE_F16, - ARM64_INTRIN_VST1_LANE_F32, - ARM64_INTRIN_VST1Q_LANE_F32, - ARM64_INTRIN_VST1_LANE_P8, - ARM64_INTRIN_VST1Q_LANE_P8, - ARM64_INTRIN_VST1_LANE_P16, - ARM64_INTRIN_VST1Q_LANE_P16, - ARM64_INTRIN_VST1_LANE_F64, - ARM64_INTRIN_VST1Q_LANE_F64, - ARM64_INTRIN_VLD2_S8, - ARM64_INTRIN_VLD2Q_S8, - ARM64_INTRIN_VLD2_S16, - ARM64_INTRIN_VLD2Q_S16, - ARM64_INTRIN_VLD2_S32, - ARM64_INTRIN_VLD2Q_S32, - ARM64_INTRIN_VLD2_U8, - ARM64_INTRIN_VLD2Q_U8, - ARM64_INTRIN_VLD2_U16, - ARM64_INTRIN_VLD2Q_U16, - ARM64_INTRIN_VLD2_U32, - ARM64_INTRIN_VLD2Q_U32, - ARM64_INTRIN_VLD2_F16, - ARM64_INTRIN_VLD2Q_F16, - ARM64_INTRIN_VLD2_F32, - ARM64_INTRIN_VLD2Q_F32, - ARM64_INTRIN_VLD2_P8, - ARM64_INTRIN_VLD2Q_P8, - ARM64_INTRIN_VLD2_P16, - ARM64_INTRIN_VLD2Q_P16, - ARM64_INTRIN_VLD2_S64, - ARM64_INTRIN_VLD2_U64, - ARM64_INTRIN_VLD2_P64, - ARM64_INTRIN_VLD2Q_S64, - ARM64_INTRIN_VLD2Q_U64, - ARM64_INTRIN_VLD2Q_P64, - ARM64_INTRIN_VLD2_F64, - ARM64_INTRIN_VLD2Q_F64, - ARM64_INTRIN_VLD3_S8, - ARM64_INTRIN_VLD3Q_S8, - ARM64_INTRIN_VLD3_S16, - ARM64_INTRIN_VLD3Q_S16, - ARM64_INTRIN_VLD3_S32, - ARM64_INTRIN_VLD3Q_S32, - ARM64_INTRIN_VLD3_U8, - ARM64_INTRIN_VLD3Q_U8, - ARM64_INTRIN_VLD3_U16, - ARM64_INTRIN_VLD3Q_U16, - ARM64_INTRIN_VLD3_U32, - ARM64_INTRIN_VLD3Q_U32, - ARM64_INTRIN_VLD3_F16, - ARM64_INTRIN_VLD3Q_F16, - ARM64_INTRIN_VLD3_F32, - ARM64_INTRIN_VLD3Q_F32, - ARM64_INTRIN_VLD3_P8, - ARM64_INTRIN_VLD3Q_P8, - ARM64_INTRIN_VLD3_P16, - ARM64_INTRIN_VLD3Q_P16, - ARM64_INTRIN_VLD3_S64, - ARM64_INTRIN_VLD3_U64, - ARM64_INTRIN_VLD3_P64, - ARM64_INTRIN_VLD3Q_S64, - ARM64_INTRIN_VLD3Q_U64, - ARM64_INTRIN_VLD3Q_P64, - ARM64_INTRIN_VLD3_F64, - ARM64_INTRIN_VLD3Q_F64, - ARM64_INTRIN_VLD4_S8, - ARM64_INTRIN_VLD4Q_S8, - ARM64_INTRIN_VLD4_S16, - ARM64_INTRIN_VLD4Q_S16, - ARM64_INTRIN_VLD4_S32, - ARM64_INTRIN_VLD4Q_S32, - ARM64_INTRIN_VLD4_U8, - ARM64_INTRIN_VLD4Q_U8, - ARM64_INTRIN_VLD4_U16, - ARM64_INTRIN_VLD4Q_U16, - ARM64_INTRIN_VLD4_U32, - ARM64_INTRIN_VLD4Q_U32, - ARM64_INTRIN_VLD4_F16, - ARM64_INTRIN_VLD4Q_F16, - ARM64_INTRIN_VLD4_F32, - ARM64_INTRIN_VLD4Q_F32, - ARM64_INTRIN_VLD4_P8, - ARM64_INTRIN_VLD4Q_P8, - ARM64_INTRIN_VLD4_P16, - ARM64_INTRIN_VLD4Q_P16, - ARM64_INTRIN_VLD4_S64, - ARM64_INTRIN_VLD4_U64, - ARM64_INTRIN_VLD4_P64, - ARM64_INTRIN_VLD4Q_S64, - ARM64_INTRIN_VLD4Q_U64, - ARM64_INTRIN_VLD4Q_P64, - ARM64_INTRIN_VLD4_F64, - ARM64_INTRIN_VLD4Q_F64, - ARM64_INTRIN_VLD2_DUP_S8, - ARM64_INTRIN_VLD2Q_DUP_S8, - ARM64_INTRIN_VLD2_DUP_S16, - ARM64_INTRIN_VLD2Q_DUP_S16, - ARM64_INTRIN_VLD2_DUP_S32, - ARM64_INTRIN_VLD2Q_DUP_S32, - ARM64_INTRIN_VLD2_DUP_U8, - ARM64_INTRIN_VLD2Q_DUP_U8, - ARM64_INTRIN_VLD2_DUP_U16, - ARM64_INTRIN_VLD2Q_DUP_U16, - ARM64_INTRIN_VLD2_DUP_U32, - ARM64_INTRIN_VLD2Q_DUP_U32, - ARM64_INTRIN_VLD2_DUP_F16, - ARM64_INTRIN_VLD2Q_DUP_F16, - ARM64_INTRIN_VLD2_DUP_F32, - ARM64_INTRIN_VLD2Q_DUP_F32, - ARM64_INTRIN_VLD2_DUP_P8, - ARM64_INTRIN_VLD2Q_DUP_P8, - ARM64_INTRIN_VLD2_DUP_P16, - ARM64_INTRIN_VLD2Q_DUP_P16, - ARM64_INTRIN_VLD2_DUP_S64, - ARM64_INTRIN_VLD2_DUP_U64, - ARM64_INTRIN_VLD2_DUP_P64, - ARM64_INTRIN_VLD2Q_DUP_S64, - ARM64_INTRIN_VLD2Q_DUP_U64, - ARM64_INTRIN_VLD2Q_DUP_P64, - ARM64_INTRIN_VLD2_DUP_F64, - ARM64_INTRIN_VLD2Q_DUP_F64, - ARM64_INTRIN_VLD3_DUP_S8, - ARM64_INTRIN_VLD3Q_DUP_S8, - ARM64_INTRIN_VLD3_DUP_S16, - ARM64_INTRIN_VLD3Q_DUP_S16, - ARM64_INTRIN_VLD3_DUP_S32, - ARM64_INTRIN_VLD3Q_DUP_S32, - ARM64_INTRIN_VLD3_DUP_U8, - ARM64_INTRIN_VLD3Q_DUP_U8, - ARM64_INTRIN_VLD3_DUP_U16, - ARM64_INTRIN_VLD3Q_DUP_U16, - ARM64_INTRIN_VLD3_DUP_U32, - ARM64_INTRIN_VLD3Q_DUP_U32, - ARM64_INTRIN_VLD3_DUP_F16, - ARM64_INTRIN_VLD3Q_DUP_F16, - ARM64_INTRIN_VLD3_DUP_F32, - ARM64_INTRIN_VLD3Q_DUP_F32, - ARM64_INTRIN_VLD3_DUP_P8, - ARM64_INTRIN_VLD3Q_DUP_P8, - ARM64_INTRIN_VLD3_DUP_P16, - ARM64_INTRIN_VLD3Q_DUP_P16, - ARM64_INTRIN_VLD3_DUP_S64, - ARM64_INTRIN_VLD3_DUP_U64, - ARM64_INTRIN_VLD3_DUP_P64, - ARM64_INTRIN_VLD3Q_DUP_S64, - ARM64_INTRIN_VLD3Q_DUP_U64, - ARM64_INTRIN_VLD3Q_DUP_P64, - ARM64_INTRIN_VLD3_DUP_F64, - ARM64_INTRIN_VLD3Q_DUP_F64, - ARM64_INTRIN_VLD4_DUP_S8, - ARM64_INTRIN_VLD4Q_DUP_S8, - ARM64_INTRIN_VLD4_DUP_S16, - ARM64_INTRIN_VLD4Q_DUP_S16, - ARM64_INTRIN_VLD4_DUP_S32, - ARM64_INTRIN_VLD4Q_DUP_S32, - ARM64_INTRIN_VLD4_DUP_U8, - ARM64_INTRIN_VLD4Q_DUP_U8, - ARM64_INTRIN_VLD4_DUP_U16, - ARM64_INTRIN_VLD4Q_DUP_U16, - ARM64_INTRIN_VLD4_DUP_U32, - ARM64_INTRIN_VLD4Q_DUP_U32, - ARM64_INTRIN_VLD4_DUP_F16, - ARM64_INTRIN_VLD4Q_DUP_F16, - ARM64_INTRIN_VLD4_DUP_F32, - ARM64_INTRIN_VLD4Q_DUP_F32, - ARM64_INTRIN_VLD4_DUP_P8, - ARM64_INTRIN_VLD4Q_DUP_P8, - ARM64_INTRIN_VLD4_DUP_P16, - ARM64_INTRIN_VLD4Q_DUP_P16, - ARM64_INTRIN_VLD4_DUP_S64, - ARM64_INTRIN_VLD4_DUP_U64, - ARM64_INTRIN_VLD4_DUP_P64, - ARM64_INTRIN_VLD4Q_DUP_S64, - ARM64_INTRIN_VLD4Q_DUP_U64, - ARM64_INTRIN_VLD4Q_DUP_P64, - ARM64_INTRIN_VLD4_DUP_F64, - ARM64_INTRIN_VLD4Q_DUP_F64, - ARM64_INTRIN_VST2_S8, - ARM64_INTRIN_VST2Q_S8, - ARM64_INTRIN_VST2_S16, - ARM64_INTRIN_VST2Q_S16, - ARM64_INTRIN_VST2_S32, - ARM64_INTRIN_VST2Q_S32, - ARM64_INTRIN_VST2_U8, - ARM64_INTRIN_VST2Q_U8, - ARM64_INTRIN_VST2_U16, - ARM64_INTRIN_VST2Q_U16, - ARM64_INTRIN_VST2_U32, - ARM64_INTRIN_VST2Q_U32, - ARM64_INTRIN_VST2_F16, - ARM64_INTRIN_VST2Q_F16, - ARM64_INTRIN_VST2_F32, - ARM64_INTRIN_VST2Q_F32, - ARM64_INTRIN_VST2_P8, - ARM64_INTRIN_VST2Q_P8, - ARM64_INTRIN_VST2_P16, - ARM64_INTRIN_VST2Q_P16, - ARM64_INTRIN_VST2_S64, - ARM64_INTRIN_VST2_U64, - ARM64_INTRIN_VST2_P64, - ARM64_INTRIN_VST2Q_S64, - ARM64_INTRIN_VST2Q_U64, - ARM64_INTRIN_VST2Q_P64, - ARM64_INTRIN_VST2_F64, - ARM64_INTRIN_VST2Q_F64, - ARM64_INTRIN_VST3_S8, - ARM64_INTRIN_VST3Q_S8, - ARM64_INTRIN_VST3_S16, - ARM64_INTRIN_VST3Q_S16, - ARM64_INTRIN_VST3_S32, - ARM64_INTRIN_VST3Q_S32, - ARM64_INTRIN_VST3_U8, - ARM64_INTRIN_VST3Q_U8, - ARM64_INTRIN_VST3_U16, - ARM64_INTRIN_VST3Q_U16, - ARM64_INTRIN_VST3_U32, - ARM64_INTRIN_VST3Q_U32, - ARM64_INTRIN_VST3_F16, - ARM64_INTRIN_VST3Q_F16, - ARM64_INTRIN_VST3_F32, - ARM64_INTRIN_VST3Q_F32, - ARM64_INTRIN_VST3_P8, - ARM64_INTRIN_VST3Q_P8, - ARM64_INTRIN_VST3_P16, - ARM64_INTRIN_VST3Q_P16, - ARM64_INTRIN_VST3_S64, - ARM64_INTRIN_VST3_U64, - ARM64_INTRIN_VST3_P64, - ARM64_INTRIN_VST3Q_S64, - ARM64_INTRIN_VST3Q_U64, - ARM64_INTRIN_VST3Q_P64, - ARM64_INTRIN_VST3_F64, - ARM64_INTRIN_VST3Q_F64, - ARM64_INTRIN_VST4_S8, - ARM64_INTRIN_VST4Q_S8, - ARM64_INTRIN_VST4_S16, - ARM64_INTRIN_VST4Q_S16, - ARM64_INTRIN_VST4_S32, - ARM64_INTRIN_VST4Q_S32, - ARM64_INTRIN_VST4_U8, - ARM64_INTRIN_VST4Q_U8, - ARM64_INTRIN_VST4_U16, - ARM64_INTRIN_VST4Q_U16, - ARM64_INTRIN_VST4_U32, - ARM64_INTRIN_VST4Q_U32, - ARM64_INTRIN_VST4_F16, - ARM64_INTRIN_VST4Q_F16, - ARM64_INTRIN_VST4_F32, - ARM64_INTRIN_VST4Q_F32, - ARM64_INTRIN_VST4_P8, - ARM64_INTRIN_VST4Q_P8, - ARM64_INTRIN_VST4_P16, - ARM64_INTRIN_VST4Q_P16, - ARM64_INTRIN_VST4_S64, - ARM64_INTRIN_VST4_U64, - ARM64_INTRIN_VST4_P64, - ARM64_INTRIN_VST4Q_S64, - ARM64_INTRIN_VST4Q_U64, - ARM64_INTRIN_VST4Q_P64, - ARM64_INTRIN_VST4_F64, - ARM64_INTRIN_VST4Q_F64, - ARM64_INTRIN_VLD2_LANE_S16, - ARM64_INTRIN_VLD2Q_LANE_S16, - ARM64_INTRIN_VLD2_LANE_S32, - ARM64_INTRIN_VLD2Q_LANE_S32, - ARM64_INTRIN_VLD2_LANE_U16, - ARM64_INTRIN_VLD2Q_LANE_U16, - ARM64_INTRIN_VLD2_LANE_U32, - ARM64_INTRIN_VLD2Q_LANE_U32, - ARM64_INTRIN_VLD2_LANE_F16, - ARM64_INTRIN_VLD2Q_LANE_F16, - ARM64_INTRIN_VLD2_LANE_F32, - ARM64_INTRIN_VLD2Q_LANE_F32, - ARM64_INTRIN_VLD2_LANE_P16, - ARM64_INTRIN_VLD2Q_LANE_P16, - ARM64_INTRIN_VLD2_LANE_S8, - ARM64_INTRIN_VLD2_LANE_U8, - ARM64_INTRIN_VLD2_LANE_P8, - ARM64_INTRIN_VLD2Q_LANE_S8, - ARM64_INTRIN_VLD2Q_LANE_U8, - ARM64_INTRIN_VLD2Q_LANE_P8, - ARM64_INTRIN_VLD2_LANE_S64, - ARM64_INTRIN_VLD2Q_LANE_S64, - ARM64_INTRIN_VLD2_LANE_U64, - ARM64_INTRIN_VLD2Q_LANE_U64, - ARM64_INTRIN_VLD2_LANE_P64, - ARM64_INTRIN_VLD2Q_LANE_P64, - ARM64_INTRIN_VLD2_LANE_F64, - ARM64_INTRIN_VLD2Q_LANE_F64, - ARM64_INTRIN_VLD3_LANE_S16, - ARM64_INTRIN_VLD3Q_LANE_S16, - ARM64_INTRIN_VLD3_LANE_S32, - ARM64_INTRIN_VLD3Q_LANE_S32, - ARM64_INTRIN_VLD3_LANE_U16, - ARM64_INTRIN_VLD3Q_LANE_U16, - ARM64_INTRIN_VLD3_LANE_U32, - ARM64_INTRIN_VLD3Q_LANE_U32, - ARM64_INTRIN_VLD3_LANE_F16, - ARM64_INTRIN_VLD3Q_LANE_F16, - ARM64_INTRIN_VLD3_LANE_F32, - ARM64_INTRIN_VLD3Q_LANE_F32, - ARM64_INTRIN_VLD3_LANE_P16, - ARM64_INTRIN_VLD3Q_LANE_P16, - ARM64_INTRIN_VLD3_LANE_S8, - ARM64_INTRIN_VLD3_LANE_U8, - ARM64_INTRIN_VLD3_LANE_P8, - ARM64_INTRIN_VLD3Q_LANE_S8, - ARM64_INTRIN_VLD3Q_LANE_U8, - ARM64_INTRIN_VLD3Q_LANE_P8, - ARM64_INTRIN_VLD3_LANE_S64, - ARM64_INTRIN_VLD3Q_LANE_S64, - ARM64_INTRIN_VLD3_LANE_U64, - ARM64_INTRIN_VLD3Q_LANE_U64, - ARM64_INTRIN_VLD3_LANE_P64, - ARM64_INTRIN_VLD3Q_LANE_P64, - ARM64_INTRIN_VLD3_LANE_F64, - ARM64_INTRIN_VLD3Q_LANE_F64, - ARM64_INTRIN_VLD4_LANE_S16, - ARM64_INTRIN_VLD4Q_LANE_S16, - ARM64_INTRIN_VLD4_LANE_S32, - ARM64_INTRIN_VLD4Q_LANE_S32, - ARM64_INTRIN_VLD4_LANE_U16, - ARM64_INTRIN_VLD4Q_LANE_U16, - ARM64_INTRIN_VLD4_LANE_U32, - ARM64_INTRIN_VLD4Q_LANE_U32, - ARM64_INTRIN_VLD4_LANE_F16, - ARM64_INTRIN_VLD4Q_LANE_F16, - ARM64_INTRIN_VLD4_LANE_F32, - ARM64_INTRIN_VLD4Q_LANE_F32, - ARM64_INTRIN_VLD4_LANE_P16, - ARM64_INTRIN_VLD4Q_LANE_P16, - ARM64_INTRIN_VLD4_LANE_S8, - ARM64_INTRIN_VLD4_LANE_U8, - ARM64_INTRIN_VLD4_LANE_P8, - ARM64_INTRIN_VLD4Q_LANE_S8, - ARM64_INTRIN_VLD4Q_LANE_U8, - ARM64_INTRIN_VLD4Q_LANE_P8, - ARM64_INTRIN_VLD4_LANE_S64, - ARM64_INTRIN_VLD4Q_LANE_S64, - ARM64_INTRIN_VLD4_LANE_U64, - ARM64_INTRIN_VLD4Q_LANE_U64, - ARM64_INTRIN_VLD4_LANE_P64, - ARM64_INTRIN_VLD4Q_LANE_P64, - ARM64_INTRIN_VLD4_LANE_F64, - ARM64_INTRIN_VLD4Q_LANE_F64, - ARM64_INTRIN_VST2_LANE_S8, - ARM64_INTRIN_VST2_LANE_U8, - ARM64_INTRIN_VST2_LANE_P8, - ARM64_INTRIN_VST3_LANE_S8, - ARM64_INTRIN_VST3_LANE_U8, - ARM64_INTRIN_VST3_LANE_P8, - ARM64_INTRIN_VST4_LANE_S8, - ARM64_INTRIN_VST4_LANE_U8, - ARM64_INTRIN_VST4_LANE_P8, - ARM64_INTRIN_VST2_LANE_S16, - ARM64_INTRIN_VST2Q_LANE_S16, - ARM64_INTRIN_VST2_LANE_S32, - ARM64_INTRIN_VST2Q_LANE_S32, - ARM64_INTRIN_VST2_LANE_U16, - ARM64_INTRIN_VST2Q_LANE_U16, - ARM64_INTRIN_VST2_LANE_U32, - ARM64_INTRIN_VST2Q_LANE_U32, - ARM64_INTRIN_VST2_LANE_F16, - ARM64_INTRIN_VST2Q_LANE_F16, - ARM64_INTRIN_VST2_LANE_F32, - ARM64_INTRIN_VST2Q_LANE_F32, - ARM64_INTRIN_VST2_LANE_P16, - ARM64_INTRIN_VST2Q_LANE_P16, - ARM64_INTRIN_VST2Q_LANE_S8, - ARM64_INTRIN_VST2Q_LANE_U8, - ARM64_INTRIN_VST2Q_LANE_P8, - ARM64_INTRIN_VST2_LANE_S64, - ARM64_INTRIN_VST2Q_LANE_S64, - ARM64_INTRIN_VST2_LANE_U64, - ARM64_INTRIN_VST2Q_LANE_U64, - ARM64_INTRIN_VST2_LANE_P64, - ARM64_INTRIN_VST2Q_LANE_P64, - ARM64_INTRIN_VST2_LANE_F64, - ARM64_INTRIN_VST2Q_LANE_F64, - ARM64_INTRIN_VST3_LANE_S16, - ARM64_INTRIN_VST3Q_LANE_S16, - ARM64_INTRIN_VST3_LANE_S32, - ARM64_INTRIN_VST3Q_LANE_S32, - ARM64_INTRIN_VST3_LANE_U16, - ARM64_INTRIN_VST3Q_LANE_U16, - ARM64_INTRIN_VST3_LANE_U32, - ARM64_INTRIN_VST3Q_LANE_U32, - ARM64_INTRIN_VST3_LANE_F16, - ARM64_INTRIN_VST3Q_LANE_F16, - ARM64_INTRIN_VST3_LANE_F32, - ARM64_INTRIN_VST3Q_LANE_F32, - ARM64_INTRIN_VST3_LANE_P16, - ARM64_INTRIN_VST3Q_LANE_P16, - ARM64_INTRIN_VST3Q_LANE_S8, - ARM64_INTRIN_VST3Q_LANE_U8, - ARM64_INTRIN_VST3Q_LANE_P8, - ARM64_INTRIN_VST3_LANE_S64, - ARM64_INTRIN_VST3Q_LANE_S64, - ARM64_INTRIN_VST3_LANE_U64, - ARM64_INTRIN_VST3Q_LANE_U64, - ARM64_INTRIN_VST3_LANE_P64, - ARM64_INTRIN_VST3Q_LANE_P64, - ARM64_INTRIN_VST3_LANE_F64, - ARM64_INTRIN_VST3Q_LANE_F64, - ARM64_INTRIN_VST4_LANE_S16, - ARM64_INTRIN_VST4Q_LANE_S16, - ARM64_INTRIN_VST4_LANE_S32, - ARM64_INTRIN_VST4Q_LANE_S32, - ARM64_INTRIN_VST4_LANE_U16, - ARM64_INTRIN_VST4Q_LANE_U16, - ARM64_INTRIN_VST4_LANE_U32, - ARM64_INTRIN_VST4Q_LANE_U32, - ARM64_INTRIN_VST4_LANE_F16, - ARM64_INTRIN_VST4Q_LANE_F16, - ARM64_INTRIN_VST4_LANE_F32, - ARM64_INTRIN_VST4Q_LANE_F32, - ARM64_INTRIN_VST4_LANE_P16, - ARM64_INTRIN_VST4Q_LANE_P16, - ARM64_INTRIN_VST4Q_LANE_S8, - ARM64_INTRIN_VST4Q_LANE_U8, - ARM64_INTRIN_VST4Q_LANE_P8, - ARM64_INTRIN_VST4_LANE_S64, - ARM64_INTRIN_VST4Q_LANE_S64, - ARM64_INTRIN_VST4_LANE_U64, - ARM64_INTRIN_VST4Q_LANE_U64, - ARM64_INTRIN_VST4_LANE_P64, - ARM64_INTRIN_VST4Q_LANE_P64, - ARM64_INTRIN_VST4_LANE_F64, - ARM64_INTRIN_VST4Q_LANE_F64, - ARM64_INTRIN_VST1_S8_X2, - ARM64_INTRIN_VST1Q_S8_X2, - ARM64_INTRIN_VST1_S16_X2, - ARM64_INTRIN_VST1Q_S16_X2, - ARM64_INTRIN_VST1_S32_X2, - ARM64_INTRIN_VST1Q_S32_X2, - ARM64_INTRIN_VST1_U8_X2, - ARM64_INTRIN_VST1Q_U8_X2, - ARM64_INTRIN_VST1_U16_X2, - ARM64_INTRIN_VST1Q_U16_X2, - ARM64_INTRIN_VST1_U32_X2, - ARM64_INTRIN_VST1Q_U32_X2, - ARM64_INTRIN_VST1_F16_X2, - ARM64_INTRIN_VST1Q_F16_X2, - ARM64_INTRIN_VST1_F32_X2, - ARM64_INTRIN_VST1Q_F32_X2, - ARM64_INTRIN_VST1_P8_X2, - ARM64_INTRIN_VST1Q_P8_X2, - ARM64_INTRIN_VST1_P16_X2, - ARM64_INTRIN_VST1Q_P16_X2, - ARM64_INTRIN_VST1_S64_X2, - ARM64_INTRIN_VST1_U64_X2, - ARM64_INTRIN_VST1_P64_X2, - ARM64_INTRIN_VST1Q_S64_X2, - ARM64_INTRIN_VST1Q_U64_X2, - ARM64_INTRIN_VST1Q_P64_X2, - ARM64_INTRIN_VST1_F64_X2, - ARM64_INTRIN_VST1Q_F64_X2, - ARM64_INTRIN_VST1_S8_X3, - ARM64_INTRIN_VST1Q_S8_X3, - ARM64_INTRIN_VST1_S16_X3, - ARM64_INTRIN_VST1Q_S16_X3, - ARM64_INTRIN_VST1_S32_X3, - ARM64_INTRIN_VST1Q_S32_X3, - ARM64_INTRIN_VST1_U8_X3, - ARM64_INTRIN_VST1Q_U8_X3, - ARM64_INTRIN_VST1_U16_X3, - ARM64_INTRIN_VST1Q_U16_X3, - ARM64_INTRIN_VST1_U32_X3, - ARM64_INTRIN_VST1Q_U32_X3, - ARM64_INTRIN_VST1_F16_X3, - ARM64_INTRIN_VST1Q_F16_X3, - ARM64_INTRIN_VST1_F32_X3, - ARM64_INTRIN_VST1Q_F32_X3, - ARM64_INTRIN_VST1_P8_X3, - ARM64_INTRIN_VST1Q_P8_X3, - ARM64_INTRIN_VST1_P16_X3, - ARM64_INTRIN_VST1Q_P16_X3, - ARM64_INTRIN_VST1_S64_X3, - ARM64_INTRIN_VST1_U64_X3, - ARM64_INTRIN_VST1_P64_X3, - ARM64_INTRIN_VST1Q_S64_X3, - ARM64_INTRIN_VST1Q_U64_X3, - ARM64_INTRIN_VST1Q_P64_X3, - ARM64_INTRIN_VST1_F64_X3, - ARM64_INTRIN_VST1Q_F64_X3, - ARM64_INTRIN_VST1_S8_X4, - ARM64_INTRIN_VST1Q_S8_X4, - ARM64_INTRIN_VST1_S16_X4, - ARM64_INTRIN_VST1Q_S16_X4, - ARM64_INTRIN_VST1_S32_X4, - ARM64_INTRIN_VST1Q_S32_X4, - ARM64_INTRIN_VST1_U8_X4, - ARM64_INTRIN_VST1Q_U8_X4, - ARM64_INTRIN_VST1_U16_X4, - ARM64_INTRIN_VST1Q_U16_X4, - ARM64_INTRIN_VST1_U32_X4, - ARM64_INTRIN_VST1Q_U32_X4, - ARM64_INTRIN_VST1_F16_X4, - ARM64_INTRIN_VST1Q_F16_X4, - ARM64_INTRIN_VST1_F32_X4, - ARM64_INTRIN_VST1Q_F32_X4, - ARM64_INTRIN_VST1_P8_X4, - ARM64_INTRIN_VST1Q_P8_X4, - ARM64_INTRIN_VST1_P16_X4, - ARM64_INTRIN_VST1Q_P16_X4, - ARM64_INTRIN_VST1_S64_X4, - ARM64_INTRIN_VST1_U64_X4, - ARM64_INTRIN_VST1_P64_X4, - ARM64_INTRIN_VST1Q_S64_X4, - ARM64_INTRIN_VST1Q_U64_X4, - ARM64_INTRIN_VST1Q_P64_X4, - ARM64_INTRIN_VST1_F64_X4, - ARM64_INTRIN_VST1Q_F64_X4, - ARM64_INTRIN_VLD1_S8_X2, - ARM64_INTRIN_VLD1Q_S8_X2, - ARM64_INTRIN_VLD1_S16_X2, - ARM64_INTRIN_VLD1Q_S16_X2, - ARM64_INTRIN_VLD1_S32_X2, - ARM64_INTRIN_VLD1Q_S32_X2, - ARM64_INTRIN_VLD1_U8_X2, - ARM64_INTRIN_VLD1Q_U8_X2, - ARM64_INTRIN_VLD1_U16_X2, - ARM64_INTRIN_VLD1Q_U16_X2, - ARM64_INTRIN_VLD1_U32_X2, - ARM64_INTRIN_VLD1Q_U32_X2, - ARM64_INTRIN_VLD1_F16_X2, - ARM64_INTRIN_VLD1Q_F16_X2, - ARM64_INTRIN_VLD1_F32_X2, - ARM64_INTRIN_VLD1Q_F32_X2, - ARM64_INTRIN_VLD1_P8_X2, - ARM64_INTRIN_VLD1Q_P8_X2, - ARM64_INTRIN_VLD1_P16_X2, - ARM64_INTRIN_VLD1Q_P16_X2, - ARM64_INTRIN_VLD1_S64_X2, - ARM64_INTRIN_VLD1_U64_X2, - ARM64_INTRIN_VLD1_P64_X2, - ARM64_INTRIN_VLD1Q_S64_X2, - ARM64_INTRIN_VLD1Q_U64_X2, - ARM64_INTRIN_VLD1Q_P64_X2, - ARM64_INTRIN_VLD1_F64_X2, - ARM64_INTRIN_VLD1Q_F64_X2, - ARM64_INTRIN_VLD1_S8_X3, - ARM64_INTRIN_VLD1Q_S8_X3, - ARM64_INTRIN_VLD1_S16_X3, - ARM64_INTRIN_VLD1Q_S16_X3, - ARM64_INTRIN_VLD1_S32_X3, - ARM64_INTRIN_VLD1Q_S32_X3, - ARM64_INTRIN_VLD1_U8_X3, - ARM64_INTRIN_VLD1Q_U8_X3, - ARM64_INTRIN_VLD1_U16_X3, - ARM64_INTRIN_VLD1Q_U16_X3, - ARM64_INTRIN_VLD1_U32_X3, - ARM64_INTRIN_VLD1Q_U32_X3, - ARM64_INTRIN_VLD1_F16_X3, - ARM64_INTRIN_VLD1Q_F16_X3, - ARM64_INTRIN_VLD1_F32_X3, - ARM64_INTRIN_VLD1Q_F32_X3, - ARM64_INTRIN_VLD1_P8_X3, - ARM64_INTRIN_VLD1Q_P8_X3, - ARM64_INTRIN_VLD1_P16_X3, - ARM64_INTRIN_VLD1Q_P16_X3, - ARM64_INTRIN_VLD1_S64_X3, - ARM64_INTRIN_VLD1_U64_X3, - ARM64_INTRIN_VLD1_P64_X3, - ARM64_INTRIN_VLD1Q_S64_X3, - ARM64_INTRIN_VLD1Q_U64_X3, - ARM64_INTRIN_VLD1Q_P64_X3, - ARM64_INTRIN_VLD1_F64_X3, - ARM64_INTRIN_VLD1Q_F64_X3, - ARM64_INTRIN_VLD1_S8_X4, - ARM64_INTRIN_VLD1Q_S8_X4, - ARM64_INTRIN_VLD1_S16_X4, - ARM64_INTRIN_VLD1Q_S16_X4, - ARM64_INTRIN_VLD1_S32_X4, - ARM64_INTRIN_VLD1Q_S32_X4, - ARM64_INTRIN_VLD1_U8_X4, - ARM64_INTRIN_VLD1Q_U8_X4, - ARM64_INTRIN_VLD1_U16_X4, - ARM64_INTRIN_VLD1Q_U16_X4, - ARM64_INTRIN_VLD1_U32_X4, - ARM64_INTRIN_VLD1Q_U32_X4, - ARM64_INTRIN_VLD1_F16_X4, - ARM64_INTRIN_VLD1Q_F16_X4, - ARM64_INTRIN_VLD1_F32_X4, - ARM64_INTRIN_VLD1Q_F32_X4, - ARM64_INTRIN_VLD1_P8_X4, - ARM64_INTRIN_VLD1Q_P8_X4, - ARM64_INTRIN_VLD1_P16_X4, - ARM64_INTRIN_VLD1Q_P16_X4, - ARM64_INTRIN_VLD1_S64_X4, - ARM64_INTRIN_VLD1_U64_X4, - ARM64_INTRIN_VLD1_P64_X4, - ARM64_INTRIN_VLD1Q_S64_X4, - ARM64_INTRIN_VLD1Q_U64_X4, - ARM64_INTRIN_VLD1Q_P64_X4, - ARM64_INTRIN_VLD1_F64_X4, - ARM64_INTRIN_VLD1Q_F64_X4, - ARM64_INTRIN_VPADD_S8, - ARM64_INTRIN_VPADD_S16, - ARM64_INTRIN_VPADD_S32, - ARM64_INTRIN_VPADD_U8, - ARM64_INTRIN_VPADD_U16, - ARM64_INTRIN_VPADD_U32, - ARM64_INTRIN_VPADD_F32, - ARM64_INTRIN_VPADDQ_S8, - ARM64_INTRIN_VPADDQ_S16, - ARM64_INTRIN_VPADDQ_S32, - ARM64_INTRIN_VPADDQ_S64, - ARM64_INTRIN_VPADDQ_U8, - ARM64_INTRIN_VPADDQ_U16, - ARM64_INTRIN_VPADDQ_U32, - ARM64_INTRIN_VPADDQ_U64, - ARM64_INTRIN_VPADDQ_F32, - ARM64_INTRIN_VPADDQ_F64, - ARM64_INTRIN_VPADDL_S8, - ARM64_INTRIN_VPADDLQ_S8, - ARM64_INTRIN_VPADDL_S16, - ARM64_INTRIN_VPADDLQ_S16, - ARM64_INTRIN_VPADDL_S32, - ARM64_INTRIN_VPADDLQ_S32, - ARM64_INTRIN_VPADDL_U8, - ARM64_INTRIN_VPADDLQ_U8, - ARM64_INTRIN_VPADDL_U16, - ARM64_INTRIN_VPADDLQ_U16, - ARM64_INTRIN_VPADDL_U32, - ARM64_INTRIN_VPADDLQ_U32, - ARM64_INTRIN_VPADAL_S8, - ARM64_INTRIN_VPADALQ_S8, - ARM64_INTRIN_VPADAL_S16, - ARM64_INTRIN_VPADALQ_S16, - ARM64_INTRIN_VPADAL_S32, - ARM64_INTRIN_VPADALQ_S32, - ARM64_INTRIN_VPADAL_U8, - ARM64_INTRIN_VPADALQ_U8, - ARM64_INTRIN_VPADAL_U16, - ARM64_INTRIN_VPADALQ_U16, - ARM64_INTRIN_VPADAL_U32, - ARM64_INTRIN_VPADALQ_U32, - ARM64_INTRIN_VPMAX_S8, - ARM64_INTRIN_VPMAX_S16, - ARM64_INTRIN_VPMAX_S32, - ARM64_INTRIN_VPMAX_U8, - ARM64_INTRIN_VPMAX_U16, - ARM64_INTRIN_VPMAX_U32, - ARM64_INTRIN_VPMAX_F32, - ARM64_INTRIN_VPMAXQ_S8, - ARM64_INTRIN_VPMAXQ_S16, - ARM64_INTRIN_VPMAXQ_S32, - ARM64_INTRIN_VPMAXQ_U8, - ARM64_INTRIN_VPMAXQ_U16, - ARM64_INTRIN_VPMAXQ_U32, - ARM64_INTRIN_VPMAXQ_F32, - ARM64_INTRIN_VPMAXQ_F64, - ARM64_INTRIN_VPMIN_S8, - ARM64_INTRIN_VPMIN_S16, - ARM64_INTRIN_VPMIN_S32, - ARM64_INTRIN_VPMIN_U8, - ARM64_INTRIN_VPMIN_U16, - ARM64_INTRIN_VPMIN_U32, - ARM64_INTRIN_VPMIN_F32, - ARM64_INTRIN_VPMINQ_S8, - ARM64_INTRIN_VPMINQ_S16, - ARM64_INTRIN_VPMINQ_S32, - ARM64_INTRIN_VPMINQ_U8, - ARM64_INTRIN_VPMINQ_U16, - ARM64_INTRIN_VPMINQ_U32, - ARM64_INTRIN_VPMINQ_F32, - ARM64_INTRIN_VPMINQ_F64, - ARM64_INTRIN_VPMAXNM_F32, - ARM64_INTRIN_VPMAXNMQ_F32, - ARM64_INTRIN_VPMAXNMQ_F64, - ARM64_INTRIN_VPMINNM_F32, - ARM64_INTRIN_VPMINNMQ_F32, - ARM64_INTRIN_VPMINNMQ_F64, - ARM64_INTRIN_VPADDD_S64, - ARM64_INTRIN_VPADDD_U64, - ARM64_INTRIN_VPADDS_F32, - ARM64_INTRIN_VPADDD_F64, - ARM64_INTRIN_VPMAXS_F32, - ARM64_INTRIN_VPMAXQD_F64, - ARM64_INTRIN_VPMINS_F32, - ARM64_INTRIN_VPMINQD_F64, - ARM64_INTRIN_VPMAXNMS_F32, - ARM64_INTRIN_VPMAXNMQD_F64, - ARM64_INTRIN_VPMINNMS_F32, - ARM64_INTRIN_VPMINNMQD_F64, - ARM64_INTRIN_VADDV_S8, - ARM64_INTRIN_VADDVQ_S8, - ARM64_INTRIN_VADDV_S16, - ARM64_INTRIN_VADDVQ_S16, - ARM64_INTRIN_VADDV_S32, - ARM64_INTRIN_VADDVQ_S32, - ARM64_INTRIN_VADDVQ_S64, - ARM64_INTRIN_VADDV_U8, - ARM64_INTRIN_VADDVQ_U8, - ARM64_INTRIN_VADDV_U16, - ARM64_INTRIN_VADDVQ_U16, - ARM64_INTRIN_VADDV_U32, - ARM64_INTRIN_VADDVQ_U32, - ARM64_INTRIN_VADDVQ_U64, - ARM64_INTRIN_VADDV_F32, - ARM64_INTRIN_VADDVQ_F32, - ARM64_INTRIN_VADDVQ_F64, - ARM64_INTRIN_VADDLV_S8, - ARM64_INTRIN_VADDLVQ_S8, - ARM64_INTRIN_VADDLV_S16, - ARM64_INTRIN_VADDLVQ_S16, - ARM64_INTRIN_VADDLV_S32, - ARM64_INTRIN_VADDLVQ_S32, - ARM64_INTRIN_VADDLV_U8, - ARM64_INTRIN_VADDLVQ_U8, - ARM64_INTRIN_VADDLV_U16, - ARM64_INTRIN_VADDLVQ_U16, - ARM64_INTRIN_VADDLV_U32, - ARM64_INTRIN_VADDLVQ_U32, - ARM64_INTRIN_VMAXV_S8, - ARM64_INTRIN_VMAXVQ_S8, - ARM64_INTRIN_VMAXV_S16, - ARM64_INTRIN_VMAXVQ_S16, - ARM64_INTRIN_VMAXV_S32, - ARM64_INTRIN_VMAXVQ_S32, - ARM64_INTRIN_VMAXV_U8, - ARM64_INTRIN_VMAXVQ_U8, - ARM64_INTRIN_VMAXV_U16, - ARM64_INTRIN_VMAXVQ_U16, - ARM64_INTRIN_VMAXV_U32, - ARM64_INTRIN_VMAXVQ_U32, - ARM64_INTRIN_VMAXV_F32, - ARM64_INTRIN_VMAXVQ_F32, - ARM64_INTRIN_VMAXVQ_F64, - ARM64_INTRIN_VMINV_S8, - ARM64_INTRIN_VMINVQ_S8, - ARM64_INTRIN_VMINV_S16, - ARM64_INTRIN_VMINVQ_S16, - ARM64_INTRIN_VMINV_S32, - ARM64_INTRIN_VMINVQ_S32, - ARM64_INTRIN_VMINV_U8, - ARM64_INTRIN_VMINVQ_U8, - ARM64_INTRIN_VMINV_U16, - ARM64_INTRIN_VMINVQ_U16, - ARM64_INTRIN_VMINV_U32, - ARM64_INTRIN_VMINVQ_U32, - ARM64_INTRIN_VMINV_F32, - ARM64_INTRIN_VMINVQ_F32, - ARM64_INTRIN_VMINVQ_F64, - ARM64_INTRIN_VMAXNMV_F32, - ARM64_INTRIN_VMAXNMVQ_F32, - ARM64_INTRIN_VMAXNMVQ_F64, - ARM64_INTRIN_VMINNMV_F32, - ARM64_INTRIN_VMINNMVQ_F32, - ARM64_INTRIN_VMINNMVQ_F64, - ARM64_INTRIN_VEXT_S8, - ARM64_INTRIN_VEXTQ_S8, - ARM64_INTRIN_VEXT_S16, - ARM64_INTRIN_VEXTQ_S16, - ARM64_INTRIN_VEXT_S32, - ARM64_INTRIN_VEXTQ_S32, - ARM64_INTRIN_VEXT_S64, - ARM64_INTRIN_VEXTQ_S64, - ARM64_INTRIN_VEXT_U8, - ARM64_INTRIN_VEXTQ_U8, - ARM64_INTRIN_VEXT_U16, - ARM64_INTRIN_VEXTQ_U16, - ARM64_INTRIN_VEXT_U32, - ARM64_INTRIN_VEXTQ_U32, - ARM64_INTRIN_VEXT_U64, - ARM64_INTRIN_VEXTQ_U64, - ARM64_INTRIN_VEXT_P64, - ARM64_INTRIN_VEXTQ_P64, - ARM64_INTRIN_VEXT_F32, - ARM64_INTRIN_VEXTQ_F32, - ARM64_INTRIN_VEXT_F64, - ARM64_INTRIN_VEXTQ_F64, - ARM64_INTRIN_VEXT_P8, - ARM64_INTRIN_VEXTQ_P8, - ARM64_INTRIN_VEXT_P16, - ARM64_INTRIN_VEXTQ_P16, - ARM64_INTRIN_VREV64_S8, - ARM64_INTRIN_VREV64Q_S8, - ARM64_INTRIN_VREV64_S16, - ARM64_INTRIN_VREV64Q_S16, - ARM64_INTRIN_VREV64_S32, - ARM64_INTRIN_VREV64Q_S32, - ARM64_INTRIN_VREV64_U8, - ARM64_INTRIN_VREV64Q_U8, - ARM64_INTRIN_VREV64_U16, - ARM64_INTRIN_VREV64Q_U16, - ARM64_INTRIN_VREV64_U32, - ARM64_INTRIN_VREV64Q_U32, - ARM64_INTRIN_VREV64_F32, - ARM64_INTRIN_VREV64Q_F32, - ARM64_INTRIN_VREV64_P8, - ARM64_INTRIN_VREV64Q_P8, - ARM64_INTRIN_VREV64_P16, - ARM64_INTRIN_VREV64Q_P16, - ARM64_INTRIN_VREV32_S8, - ARM64_INTRIN_VREV32Q_S8, - ARM64_INTRIN_VREV32_S16, - ARM64_INTRIN_VREV32Q_S16, - ARM64_INTRIN_VREV32_U8, - ARM64_INTRIN_VREV32Q_U8, - ARM64_INTRIN_VREV32_U16, - ARM64_INTRIN_VREV32Q_U16, - ARM64_INTRIN_VREV32_P8, - ARM64_INTRIN_VREV32Q_P8, - ARM64_INTRIN_VREV32_P16, - ARM64_INTRIN_VREV32Q_P16, - ARM64_INTRIN_VREV16_S8, - ARM64_INTRIN_VREV16Q_S8, - ARM64_INTRIN_VREV16_U8, - ARM64_INTRIN_VREV16Q_U8, - ARM64_INTRIN_VREV16_P8, - ARM64_INTRIN_VREV16Q_P8, - ARM64_INTRIN_VZIP1_S8, - ARM64_INTRIN_VZIP1Q_S8, - ARM64_INTRIN_VZIP1_S16, - ARM64_INTRIN_VZIP1Q_S16, - ARM64_INTRIN_VZIP1_S32, - ARM64_INTRIN_VZIP1Q_S32, - ARM64_INTRIN_VZIP1Q_S64, - ARM64_INTRIN_VZIP1_U8, - ARM64_INTRIN_VZIP1Q_U8, - ARM64_INTRIN_VZIP1_U16, - ARM64_INTRIN_VZIP1Q_U16, - ARM64_INTRIN_VZIP1_U32, - ARM64_INTRIN_VZIP1Q_U32, - ARM64_INTRIN_VZIP1Q_U64, - ARM64_INTRIN_VZIP1Q_P64, - ARM64_INTRIN_VZIP1_F32, - ARM64_INTRIN_VZIP1Q_F32, - ARM64_INTRIN_VZIP1Q_F64, - ARM64_INTRIN_VZIP1_P8, - ARM64_INTRIN_VZIP1Q_P8, - ARM64_INTRIN_VZIP1_P16, - ARM64_INTRIN_VZIP1Q_P16, - ARM64_INTRIN_VZIP2_S8, - ARM64_INTRIN_VZIP2Q_S8, - ARM64_INTRIN_VZIP2_S16, - ARM64_INTRIN_VZIP2Q_S16, - ARM64_INTRIN_VZIP2_S32, - ARM64_INTRIN_VZIP2Q_S32, - ARM64_INTRIN_VZIP2Q_S64, - ARM64_INTRIN_VZIP2_U8, - ARM64_INTRIN_VZIP2Q_U8, - ARM64_INTRIN_VZIP2_U16, - ARM64_INTRIN_VZIP2Q_U16, - ARM64_INTRIN_VZIP2_U32, - ARM64_INTRIN_VZIP2Q_U32, - ARM64_INTRIN_VZIP2Q_U64, - ARM64_INTRIN_VZIP2Q_P64, - ARM64_INTRIN_VZIP2_F32, - ARM64_INTRIN_VZIP2Q_F32, - ARM64_INTRIN_VZIP2Q_F64, - ARM64_INTRIN_VZIP2_P8, - ARM64_INTRIN_VZIP2Q_P8, - ARM64_INTRIN_VZIP2_P16, - ARM64_INTRIN_VZIP2Q_P16, - ARM64_INTRIN_VUZP1_S8, - ARM64_INTRIN_VUZP1Q_S8, - ARM64_INTRIN_VUZP1_S16, - ARM64_INTRIN_VUZP1Q_S16, - ARM64_INTRIN_VUZP1_S32, - ARM64_INTRIN_VUZP1Q_S32, - ARM64_INTRIN_VUZP1Q_S64, - ARM64_INTRIN_VUZP1_U8, - ARM64_INTRIN_VUZP1Q_U8, - ARM64_INTRIN_VUZP1_U16, - ARM64_INTRIN_VUZP1Q_U16, - ARM64_INTRIN_VUZP1_U32, - ARM64_INTRIN_VUZP1Q_U32, - ARM64_INTRIN_VUZP1Q_U64, - ARM64_INTRIN_VUZP1Q_P64, - ARM64_INTRIN_VUZP1_F32, - ARM64_INTRIN_VUZP1Q_F32, - ARM64_INTRIN_VUZP1Q_F64, - ARM64_INTRIN_VUZP1_P8, - ARM64_INTRIN_VUZP1Q_P8, - ARM64_INTRIN_VUZP1_P16, - ARM64_INTRIN_VUZP1Q_P16, - ARM64_INTRIN_VUZP2_S8, - ARM64_INTRIN_VUZP2Q_S8, - ARM64_INTRIN_VUZP2_S16, - ARM64_INTRIN_VUZP2Q_S16, - ARM64_INTRIN_VUZP2_S32, - ARM64_INTRIN_VUZP2Q_S32, - ARM64_INTRIN_VUZP2Q_S64, - ARM64_INTRIN_VUZP2_U8, - ARM64_INTRIN_VUZP2Q_U8, - ARM64_INTRIN_VUZP2_U16, - ARM64_INTRIN_VUZP2Q_U16, - ARM64_INTRIN_VUZP2_U32, - ARM64_INTRIN_VUZP2Q_U32, - ARM64_INTRIN_VUZP2Q_U64, - ARM64_INTRIN_VUZP2Q_P64, - ARM64_INTRIN_VUZP2_F32, - ARM64_INTRIN_VUZP2Q_F32, - ARM64_INTRIN_VUZP2Q_F64, - ARM64_INTRIN_VUZP2_P8, - ARM64_INTRIN_VUZP2Q_P8, - ARM64_INTRIN_VUZP2_P16, - ARM64_INTRIN_VUZP2Q_P16, - ARM64_INTRIN_VTRN1_S8, - ARM64_INTRIN_VTRN1Q_S8, - ARM64_INTRIN_VTRN1_S16, - ARM64_INTRIN_VTRN1Q_S16, - ARM64_INTRIN_VTRN1_S32, - ARM64_INTRIN_VTRN1Q_S32, - ARM64_INTRIN_VTRN1Q_S64, - ARM64_INTRIN_VTRN1_U8, - ARM64_INTRIN_VTRN1Q_U8, - ARM64_INTRIN_VTRN1_U16, - ARM64_INTRIN_VTRN1Q_U16, - ARM64_INTRIN_VTRN1_U32, - ARM64_INTRIN_VTRN1Q_U32, - ARM64_INTRIN_VTRN1Q_U64, - ARM64_INTRIN_VTRN1Q_P64, - ARM64_INTRIN_VTRN1_F32, - ARM64_INTRIN_VTRN1Q_F32, - ARM64_INTRIN_VTRN1Q_F64, - ARM64_INTRIN_VTRN1_P8, - ARM64_INTRIN_VTRN1Q_P8, - ARM64_INTRIN_VTRN1_P16, - ARM64_INTRIN_VTRN1Q_P16, - ARM64_INTRIN_VTRN2_S8, - ARM64_INTRIN_VTRN2Q_S8, - ARM64_INTRIN_VTRN2_S16, - ARM64_INTRIN_VTRN2Q_S16, - ARM64_INTRIN_VTRN2_S32, - ARM64_INTRIN_VTRN2Q_S32, - ARM64_INTRIN_VTRN2Q_S64, - ARM64_INTRIN_VTRN2_U8, - ARM64_INTRIN_VTRN2Q_U8, - ARM64_INTRIN_VTRN2_U16, - ARM64_INTRIN_VTRN2Q_U16, - ARM64_INTRIN_VTRN2_U32, - ARM64_INTRIN_VTRN2Q_U32, - ARM64_INTRIN_VTRN2Q_U64, - ARM64_INTRIN_VTRN2Q_P64, - ARM64_INTRIN_VTRN2_F32, - ARM64_INTRIN_VTRN2Q_F32, - ARM64_INTRIN_VTRN2Q_F64, - ARM64_INTRIN_VTRN2_P8, - ARM64_INTRIN_VTRN2Q_P8, - ARM64_INTRIN_VTRN2_P16, - ARM64_INTRIN_VTRN2Q_P16, - ARM64_INTRIN_VTBL1_S8, - ARM64_INTRIN_VTBL1_U8, - ARM64_INTRIN_VTBL1_P8, - ARM64_INTRIN_VTBX1_S8, - ARM64_INTRIN_VTBX1_U8, - ARM64_INTRIN_VTBX1_P8, - ARM64_INTRIN_VTBL2_S8, - ARM64_INTRIN_VTBL2_U8, - ARM64_INTRIN_VTBL2_P8, - ARM64_INTRIN_VTBL3_S8, - ARM64_INTRIN_VTBL3_U8, - ARM64_INTRIN_VTBL3_P8, - ARM64_INTRIN_VTBL4_S8, - ARM64_INTRIN_VTBL4_U8, - ARM64_INTRIN_VTBL4_P8, - ARM64_INTRIN_VTBX2_S8, - ARM64_INTRIN_VTBX2_U8, - ARM64_INTRIN_VTBX2_P8, - ARM64_INTRIN_VTBX3_S8, - ARM64_INTRIN_VTBX3_U8, - ARM64_INTRIN_VTBX3_P8, - ARM64_INTRIN_VTBX4_S8, - ARM64_INTRIN_VTBX4_U8, - ARM64_INTRIN_VTBX4_P8, - ARM64_INTRIN_VQTBL1_S8, - ARM64_INTRIN_VQTBL1Q_S8, - ARM64_INTRIN_VQTBL1_U8, - ARM64_INTRIN_VQTBL1Q_U8, - ARM64_INTRIN_VQTBL1_P8, - ARM64_INTRIN_VQTBL1Q_P8, - ARM64_INTRIN_VQTBX1_S8, - ARM64_INTRIN_VQTBX1Q_S8, - ARM64_INTRIN_VQTBX1_U8, - ARM64_INTRIN_VQTBX1Q_U8, - ARM64_INTRIN_VQTBX1_P8, - ARM64_INTRIN_VQTBX1Q_P8, - ARM64_INTRIN_VQTBL2_S8, - ARM64_INTRIN_VQTBL2Q_S8, - ARM64_INTRIN_VQTBL2_U8, - ARM64_INTRIN_VQTBL2Q_U8, - ARM64_INTRIN_VQTBL2_P8, - ARM64_INTRIN_VQTBL2Q_P8, - ARM64_INTRIN_VQTBL3_S8, - ARM64_INTRIN_VQTBL3Q_S8, - ARM64_INTRIN_VQTBL3_U8, - ARM64_INTRIN_VQTBL3Q_U8, - ARM64_INTRIN_VQTBL3_P8, - ARM64_INTRIN_VQTBL3Q_P8, - ARM64_INTRIN_VQTBL4_S8, - ARM64_INTRIN_VQTBL4Q_S8, - ARM64_INTRIN_VQTBL4_U8, - ARM64_INTRIN_VQTBL4Q_U8, - ARM64_INTRIN_VQTBL4_P8, - ARM64_INTRIN_VQTBL4Q_P8, - ARM64_INTRIN_VQTBX2_S8, - ARM64_INTRIN_VQTBX2Q_S8, - ARM64_INTRIN_VQTBX2_U8, - ARM64_INTRIN_VQTBX2Q_U8, - ARM64_INTRIN_VQTBX2_P8, - ARM64_INTRIN_VQTBX2Q_P8, - ARM64_INTRIN_VQTBX3_S8, - ARM64_INTRIN_VQTBX3Q_S8, - ARM64_INTRIN_VQTBX3_U8, - ARM64_INTRIN_VQTBX3Q_U8, - ARM64_INTRIN_VQTBX3_P8, - ARM64_INTRIN_VQTBX3Q_P8, - ARM64_INTRIN_VQTBX4_S8, - ARM64_INTRIN_VQTBX4Q_S8, - ARM64_INTRIN_VQTBX4_U8, - ARM64_INTRIN_VQTBX4Q_U8, - ARM64_INTRIN_VQTBX4_P8, - ARM64_INTRIN_VQTBX4Q_P8, - ARM64_INTRIN_VGET_LANE_U8, - ARM64_INTRIN_VGET_LANE_U16, - ARM64_INTRIN_VGET_LANE_U32, - ARM64_INTRIN_VGET_LANE_U64, - ARM64_INTRIN_VGET_LANE_P64, - ARM64_INTRIN_VGET_LANE_S8, - ARM64_INTRIN_VGET_LANE_S16, - ARM64_INTRIN_VGET_LANE_S32, - ARM64_INTRIN_VGET_LANE_S64, - ARM64_INTRIN_VGET_LANE_P8, - ARM64_INTRIN_VGET_LANE_P16, - ARM64_INTRIN_VGET_LANE_F32, - ARM64_INTRIN_VGET_LANE_F64, - ARM64_INTRIN_VGETQ_LANE_U8, - ARM64_INTRIN_VGETQ_LANE_U16, - ARM64_INTRIN_VGETQ_LANE_U32, - ARM64_INTRIN_VGETQ_LANE_U64, - ARM64_INTRIN_VGETQ_LANE_P64, - ARM64_INTRIN_VGETQ_LANE_S8, - ARM64_INTRIN_VGETQ_LANE_S16, - ARM64_INTRIN_VGETQ_LANE_S32, - ARM64_INTRIN_VGETQ_LANE_S64, - ARM64_INTRIN_VGETQ_LANE_P8, - ARM64_INTRIN_VGETQ_LANE_P16, - ARM64_INTRIN_VGET_LANE_F16, - ARM64_INTRIN_VGETQ_LANE_F16, - ARM64_INTRIN_VGETQ_LANE_F32, - ARM64_INTRIN_VGETQ_LANE_F64, - ARM64_INTRIN_VSET_LANE_U8, - ARM64_INTRIN_VSET_LANE_U16, - ARM64_INTRIN_VSET_LANE_U32, - ARM64_INTRIN_VSET_LANE_U64, - ARM64_INTRIN_VSET_LANE_P64, - ARM64_INTRIN_VSET_LANE_S8, - ARM64_INTRIN_VSET_LANE_S16, - ARM64_INTRIN_VSET_LANE_S32, - ARM64_INTRIN_VSET_LANE_S64, - ARM64_INTRIN_VSET_LANE_P8, - ARM64_INTRIN_VSET_LANE_P16, - ARM64_INTRIN_VSET_LANE_F16, - ARM64_INTRIN_VSETQ_LANE_F16, - ARM64_INTRIN_VSET_LANE_F32, - ARM64_INTRIN_VSET_LANE_F64, - ARM64_INTRIN_VSETQ_LANE_U8, - ARM64_INTRIN_VSETQ_LANE_U16, - ARM64_INTRIN_VSETQ_LANE_U32, - ARM64_INTRIN_VSETQ_LANE_U64, - ARM64_INTRIN_VSETQ_LANE_P64, - ARM64_INTRIN_VSETQ_LANE_S8, - ARM64_INTRIN_VSETQ_LANE_S16, - ARM64_INTRIN_VSETQ_LANE_S32, - ARM64_INTRIN_VSETQ_LANE_S64, - ARM64_INTRIN_VSETQ_LANE_P8, - ARM64_INTRIN_VSETQ_LANE_P16, - ARM64_INTRIN_VSETQ_LANE_F32, - ARM64_INTRIN_VSETQ_LANE_F64, - ARM64_INTRIN_VRECPXS_F32, - ARM64_INTRIN_VRECPXD_F64, - ARM64_INTRIN_VFMA_N_F32, - ARM64_INTRIN_VFMAQ_N_F32, - ARM64_INTRIN_VFMS_N_F32, - ARM64_INTRIN_VFMSQ_N_F32, - ARM64_INTRIN_VFMA_N_F64, - ARM64_INTRIN_VFMAQ_N_F64, - ARM64_INTRIN_VFMS_N_F64, - ARM64_INTRIN_VFMSQ_N_F64, - ARM64_INTRIN_VTRN_S8, - ARM64_INTRIN_VTRN_S16, - ARM64_INTRIN_VTRN_U8, - ARM64_INTRIN_VTRN_U16, - ARM64_INTRIN_VTRN_P8, - ARM64_INTRIN_VTRN_P16, - ARM64_INTRIN_VTRN_S32, - ARM64_INTRIN_VTRN_F32, - ARM64_INTRIN_VTRN_U32, - ARM64_INTRIN_VTRNQ_S8, - ARM64_INTRIN_VTRNQ_S16, - ARM64_INTRIN_VTRNQ_S32, - ARM64_INTRIN_VTRNQ_F32, - ARM64_INTRIN_VTRNQ_U8, - ARM64_INTRIN_VTRNQ_U16, - ARM64_INTRIN_VTRNQ_U32, - ARM64_INTRIN_VTRNQ_P8, - ARM64_INTRIN_VTRNQ_P16, - ARM64_INTRIN_VZIP_S8, - ARM64_INTRIN_VZIP_S16, - ARM64_INTRIN_VZIP_U8, - ARM64_INTRIN_VZIP_U16, - ARM64_INTRIN_VZIP_P8, - ARM64_INTRIN_VZIP_P16, - ARM64_INTRIN_VZIP_S32, - ARM64_INTRIN_VZIP_F32, - ARM64_INTRIN_VZIP_U32, - ARM64_INTRIN_VZIPQ_S8, - ARM64_INTRIN_VZIPQ_S16, - ARM64_INTRIN_VZIPQ_S32, - ARM64_INTRIN_VZIPQ_F32, - ARM64_INTRIN_VZIPQ_U8, - ARM64_INTRIN_VZIPQ_U16, - ARM64_INTRIN_VZIPQ_U32, - ARM64_INTRIN_VZIPQ_P8, - ARM64_INTRIN_VZIPQ_P16, - ARM64_INTRIN_VUZP_S8, - ARM64_INTRIN_VUZP_S16, - ARM64_INTRIN_VUZP_S32, - ARM64_INTRIN_VUZP_F32, - ARM64_INTRIN_VUZP_U8, - ARM64_INTRIN_VUZP_U16, - ARM64_INTRIN_VUZP_U32, - ARM64_INTRIN_VUZP_P8, - ARM64_INTRIN_VUZP_P16, - ARM64_INTRIN_VUZPQ_S8, - ARM64_INTRIN_VUZPQ_S16, - ARM64_INTRIN_VUZPQ_S32, - ARM64_INTRIN_VUZPQ_F32, - ARM64_INTRIN_VUZPQ_U8, - ARM64_INTRIN_VUZPQ_U16, - ARM64_INTRIN_VUZPQ_U32, - ARM64_INTRIN_VUZPQ_P8, - ARM64_INTRIN_VUZPQ_P16, - ARM64_INTRIN_VLDRQ_P128, - ARM64_INTRIN_VSTRQ_P128, - ARM64_INTRIN_VAESEQ_U8, - ARM64_INTRIN_VAESDQ_U8, - ARM64_INTRIN_VAESMCQ_U8, - ARM64_INTRIN_VAESIMCQ_U8, - ARM64_INTRIN_VSHA1CQ_U32, - ARM64_INTRIN_VSHA1PQ_U32, - ARM64_INTRIN_VSHA1MQ_U32, - ARM64_INTRIN_VSHA1H_U32, - ARM64_INTRIN_VSHA1SU0Q_U32, - ARM64_INTRIN_VSHA1SU1Q_U32, - ARM64_INTRIN_VSHA256HQ_U32, - ARM64_INTRIN_VSHA256H2Q_U32, - ARM64_INTRIN_VSHA256SU0Q_U32, - ARM64_INTRIN_VSHA256SU1Q_U32, - ARM64_INTRIN_VMULL_P64, - ARM64_INTRIN_VMULL_HIGH_P64, - ARM64_INTRIN_VADD_P8, - ARM64_INTRIN_VADD_P16, - ARM64_INTRIN_VADD_P64, - ARM64_INTRIN_VADDQ_P8, - ARM64_INTRIN_VADDQ_P16, - ARM64_INTRIN_VADDQ_P64, - ARM64_INTRIN_VADDQ_P128, - ARM64_INTRIN___CRC32B, - ARM64_INTRIN___CRC32H, - ARM64_INTRIN___CRC32W, - ARM64_INTRIN___CRC32D, - ARM64_INTRIN___CRC32CB, - ARM64_INTRIN___CRC32CH, - ARM64_INTRIN___CRC32CW, - ARM64_INTRIN___CRC32CD, - ARM64_INTRIN_VQRDMLAH_S16, - ARM64_INTRIN_VQRDMLAH_S32, - ARM64_INTRIN_VQRDMLAHQ_S16, - ARM64_INTRIN_VQRDMLAHQ_S32, - ARM64_INTRIN_VQRDMLSH_S16, - ARM64_INTRIN_VQRDMLSH_S32, - ARM64_INTRIN_VQRDMLSHQ_S16, - ARM64_INTRIN_VQRDMLSHQ_S32, - ARM64_INTRIN_VQRDMLAH_LANE_S16, - ARM64_INTRIN_VQRDMLAHQ_LANE_S16, - ARM64_INTRIN_VQRDMLAH_LANEQ_S16, - ARM64_INTRIN_VQRDMLAHQ_LANEQ_S16, - ARM64_INTRIN_VQRDMLAH_LANE_S32, - ARM64_INTRIN_VQRDMLAHQ_LANE_S32, - ARM64_INTRIN_VQRDMLAH_LANEQ_S32, - ARM64_INTRIN_VQRDMLAHQ_LANEQ_S32, - ARM64_INTRIN_VQRDMLSH_LANE_S16, - ARM64_INTRIN_VQRDMLSHQ_LANE_S16, - ARM64_INTRIN_VQRDMLSH_LANEQ_S16, - ARM64_INTRIN_VQRDMLSHQ_LANEQ_S16, - ARM64_INTRIN_VQRDMLSH_LANE_S32, - ARM64_INTRIN_VQRDMLSHQ_LANE_S32, - ARM64_INTRIN_VQRDMLSH_LANEQ_S32, - ARM64_INTRIN_VQRDMLSHQ_LANEQ_S32, - ARM64_INTRIN_VQRDMLAHH_S16, - ARM64_INTRIN_VQRDMLAHS_S32, - ARM64_INTRIN_VQRDMLSHH_S16, - ARM64_INTRIN_VQRDMLSHS_S32, - ARM64_INTRIN_VQRDMLAHH_LANE_S16, - ARM64_INTRIN_VQRDMLAHH_LANEQ_S16, - ARM64_INTRIN_VQRDMLAHS_LANE_S32, - ARM64_INTRIN_VQRDMLAHS_LANEQ_S32, - ARM64_INTRIN_VQRDMLSHH_LANE_S16, - ARM64_INTRIN_VQRDMLSHH_LANEQ_S16, - ARM64_INTRIN_VQRDMLSHS_LANE_S32, - ARM64_INTRIN_VQRDMLSHS_LANEQ_S32, - ARM64_INTRIN_VABSH_F16, - ARM64_INTRIN_VCEQZH_F16, - ARM64_INTRIN_VCGEZH_F16, - ARM64_INTRIN_VCGTZH_F16, - ARM64_INTRIN_VCLEZH_F16, - ARM64_INTRIN_VCLTZH_F16, - ARM64_INTRIN_VCVTH_F16_S16, - ARM64_INTRIN_VCVTH_F16_S32, - ARM64_INTRIN_VCVTH_F16_S64, - ARM64_INTRIN_VCVTH_F16_U16, - ARM64_INTRIN_VCVTH_F16_U32, - ARM64_INTRIN_VCVTH_F16_U64, - ARM64_INTRIN_VCVTH_S16_F16, - ARM64_INTRIN_VCVTH_S32_F16, - ARM64_INTRIN_VCVTH_S64_F16, - ARM64_INTRIN_VCVTH_U16_F16, - ARM64_INTRIN_VCVTH_U32_F16, - ARM64_INTRIN_VCVTH_U64_F16, - ARM64_INTRIN_VCVTAH_S16_F16, - ARM64_INTRIN_VCVTAH_S32_F16, - ARM64_INTRIN_VCVTAH_S64_F16, - ARM64_INTRIN_VCVTAH_U16_F16, - ARM64_INTRIN_VCVTAH_U32_F16, - ARM64_INTRIN_VCVTAH_U64_F16, - ARM64_INTRIN_VCVTMH_S16_F16, - ARM64_INTRIN_VCVTMH_S32_F16, - ARM64_INTRIN_VCVTMH_S64_F16, - ARM64_INTRIN_VCVTMH_U16_F16, - ARM64_INTRIN_VCVTMH_U32_F16, - ARM64_INTRIN_VCVTMH_U64_F16, - ARM64_INTRIN_VCVTNH_S16_F16, - ARM64_INTRIN_VCVTNH_S32_F16, - ARM64_INTRIN_VCVTNH_S64_F16, - ARM64_INTRIN_VCVTNH_U16_F16, - ARM64_INTRIN_VCVTNH_U32_F16, - ARM64_INTRIN_VCVTNH_U64_F16, - ARM64_INTRIN_VCVTPH_S16_F16, - ARM64_INTRIN_VCVTPH_S32_F16, - ARM64_INTRIN_VCVTPH_S64_F16, - ARM64_INTRIN_VCVTPH_U16_F16, - ARM64_INTRIN_VCVTPH_U32_F16, - ARM64_INTRIN_VCVTPH_U64_F16, - ARM64_INTRIN_VNEGH_F16, - ARM64_INTRIN_VRECPEH_F16, - ARM64_INTRIN_VRECPXH_F16, - ARM64_INTRIN_VRNDH_F16, - ARM64_INTRIN_VRNDAH_F16, - ARM64_INTRIN_VRNDIH_F16, - ARM64_INTRIN_VRNDMH_F16, - ARM64_INTRIN_VRNDNH_F16, - ARM64_INTRIN_VRNDPH_F16, - ARM64_INTRIN_VRNDXH_F16, - ARM64_INTRIN_VRSQRTEH_F16, - ARM64_INTRIN_VSQRTH_F16, - ARM64_INTRIN_VADDH_F16, - ARM64_INTRIN_VABDH_F16, - ARM64_INTRIN_VCAGEH_F16, - ARM64_INTRIN_VCAGTH_F16, - ARM64_INTRIN_VCALEH_F16, - ARM64_INTRIN_VCALTH_F16, - ARM64_INTRIN_VCEQH_F16, - ARM64_INTRIN_VCGEH_F16, - ARM64_INTRIN_VCGTH_F16, - ARM64_INTRIN_VCLEH_F16, - ARM64_INTRIN_VCLTH_F16, - ARM64_INTRIN_VCVTH_N_F16_S16, - ARM64_INTRIN_VCVTH_N_F16_S32, - ARM64_INTRIN_VCVTH_N_F16_S64, - ARM64_INTRIN_VCVTH_N_F16_U16, - ARM64_INTRIN_VCVTH_N_S16_F16, - ARM64_INTRIN_VCVTH_N_S32_F16, - ARM64_INTRIN_VCVTH_N_S64_F16, - ARM64_INTRIN_VCVTH_N_U16_F16, - ARM64_INTRIN_VCVTH_N_U32_F16, - ARM64_INTRIN_VCVTH_N_U64_F16, - ARM64_INTRIN_VDIVH_F16, - ARM64_INTRIN_VMAXH_F16, - ARM64_INTRIN_VMAXNMH_F16, - ARM64_INTRIN_VMINH_F16, - ARM64_INTRIN_VMINNMH_F16, - ARM64_INTRIN_VMULH_F16, - ARM64_INTRIN_VMULXH_F16, - ARM64_INTRIN_VRECPSH_F16, - ARM64_INTRIN_VRSQRTSH_F16, - ARM64_INTRIN_VSUBH_F16, - ARM64_INTRIN_VFMAH_F16, - ARM64_INTRIN_VFMSH_F16, - ARM64_INTRIN_VABS_F16, - ARM64_INTRIN_VABSQ_F16, - ARM64_INTRIN_VCEQZ_F16, - ARM64_INTRIN_VCEQZQ_F16, - ARM64_INTRIN_VCGEZ_F16, - ARM64_INTRIN_VCGEZQ_F16, - ARM64_INTRIN_VCGTZ_F16, - ARM64_INTRIN_VCGTZQ_F16, - ARM64_INTRIN_VCLEZ_F16, - ARM64_INTRIN_VCLEZQ_F16, - ARM64_INTRIN_VCLTZ_F16, - ARM64_INTRIN_VCLTZQ_F16, - ARM64_INTRIN_VCVT_F16_S16, - ARM64_INTRIN_VCVTQ_F16_S16, - ARM64_INTRIN_VCVT_F16_U16, - ARM64_INTRIN_VCVTQ_F16_U16, - ARM64_INTRIN_VCVT_S16_F16, - ARM64_INTRIN_VCVTQ_S16_F16, - ARM64_INTRIN_VCVT_U16_F16, - ARM64_INTRIN_VCVTQ_U16_F16, - ARM64_INTRIN_VCVTA_S16_F16, - ARM64_INTRIN_VCVTAQ_S16_F16, - ARM64_INTRIN_VCVTA_U16_F16, - ARM64_INTRIN_VCVTAQ_U16_F16, - ARM64_INTRIN_VCVTM_S16_F16, - ARM64_INTRIN_VCVTMQ_S16_F16, - ARM64_INTRIN_VCVTM_U16_F16, - ARM64_INTRIN_VCVTMQ_U16_F16, - ARM64_INTRIN_VCVTN_S16_F16, - ARM64_INTRIN_VCVTNQ_S16_F16, - ARM64_INTRIN_VCVTN_U16_F16, - ARM64_INTRIN_VCVTNQ_U16_F16, - ARM64_INTRIN_VCVTP_S16_F16, - ARM64_INTRIN_VCVTPQ_S16_F16, - ARM64_INTRIN_VCVTP_U16_F16, - ARM64_INTRIN_VCVTPQ_U16_F16, - ARM64_INTRIN_VNEG_F16, - ARM64_INTRIN_VNEGQ_F16, - ARM64_INTRIN_VRECPE_F16, - ARM64_INTRIN_VRECPEQ_F16, - ARM64_INTRIN_VRND_F16, - ARM64_INTRIN_VRNDQ_F16, - ARM64_INTRIN_VRNDA_F16, - ARM64_INTRIN_VRNDAQ_F16, - ARM64_INTRIN_VRNDI_F16, - ARM64_INTRIN_VRNDIQ_F16, - ARM64_INTRIN_VRNDM_F16, - ARM64_INTRIN_VRNDMQ_F16, - ARM64_INTRIN_VRNDN_F16, - ARM64_INTRIN_VRNDNQ_F16, - ARM64_INTRIN_VRNDP_F16, - ARM64_INTRIN_VRNDPQ_F16, - ARM64_INTRIN_VRNDX_F16, - ARM64_INTRIN_VRNDXQ_F16, - ARM64_INTRIN_VRSQRTE_F16, - ARM64_INTRIN_VRSQRTEQ_F16, - ARM64_INTRIN_VSQRT_F16, - ARM64_INTRIN_VSQRTQ_F16, - ARM64_INTRIN_VADD_F16, - ARM64_INTRIN_VADDQ_F16, - ARM64_INTRIN_VABD_F16, - ARM64_INTRIN_VABDQ_F16, - ARM64_INTRIN_VCAGE_F16, - ARM64_INTRIN_VCAGEQ_F16, - ARM64_INTRIN_VCAGT_F16, - ARM64_INTRIN_VCAGTQ_F16, - ARM64_INTRIN_VCALE_F16, - ARM64_INTRIN_VCALEQ_F16, - ARM64_INTRIN_VCALT_F16, - ARM64_INTRIN_VCALTQ_F16, - ARM64_INTRIN_VCEQ_F16, - ARM64_INTRIN_VCEQQ_F16, - ARM64_INTRIN_VCGE_F16, - ARM64_INTRIN_VCGEQ_F16, - ARM64_INTRIN_VCGT_F16, - ARM64_INTRIN_VCGTQ_F16, - ARM64_INTRIN_VCLE_F16, - ARM64_INTRIN_VCLEQ_F16, - ARM64_INTRIN_VCLT_F16, - ARM64_INTRIN_VCLTQ_F16, - ARM64_INTRIN_VCVT_N_F16_S16, - ARM64_INTRIN_VCVTQ_N_F16_S16, - ARM64_INTRIN_VCVT_N_F16_U16, - ARM64_INTRIN_VCVTQ_N_F16_U16, - ARM64_INTRIN_VCVT_N_S16_F16, - ARM64_INTRIN_VCVTQ_N_S16_F16, - ARM64_INTRIN_VCVT_N_U16_F16, - ARM64_INTRIN_VCVTQ_N_U16_F16, - ARM64_INTRIN_VDIV_F16, - ARM64_INTRIN_VDIVQ_F16, - ARM64_INTRIN_VMAX_F16, - ARM64_INTRIN_VMAXQ_F16, - ARM64_INTRIN_VMAXNM_F16, - ARM64_INTRIN_VMAXNMQ_F16, - ARM64_INTRIN_VMIN_F16, - ARM64_INTRIN_VMINQ_F16, - ARM64_INTRIN_VMINNM_F16, - ARM64_INTRIN_VMINNMQ_F16, - ARM64_INTRIN_VMUL_F16, - ARM64_INTRIN_VMULQ_F16, - ARM64_INTRIN_VMULX_F16, - ARM64_INTRIN_VMULXQ_F16, - ARM64_INTRIN_VPADD_F16, - ARM64_INTRIN_VPADDQ_F16, - ARM64_INTRIN_VPMAX_F16, - ARM64_INTRIN_VPMAXQ_F16, - ARM64_INTRIN_VPMAXNM_F16, - ARM64_INTRIN_VPMAXNMQ_F16, - ARM64_INTRIN_VPMIN_F16, - ARM64_INTRIN_VPMINQ_F16, - ARM64_INTRIN_VPMINNM_F16, - ARM64_INTRIN_VPMINNMQ_F16, - ARM64_INTRIN_VRECPS_F16, - ARM64_INTRIN_VRECPSQ_F16, - ARM64_INTRIN_VRSQRTS_F16, - ARM64_INTRIN_VRSQRTSQ_F16, - ARM64_INTRIN_VSUB_F16, - ARM64_INTRIN_VSUBQ_F16, - ARM64_INTRIN_VFMA_F16, - ARM64_INTRIN_VFMAQ_F16, - ARM64_INTRIN_VFMS_F16, - ARM64_INTRIN_VFMSQ_F16, - ARM64_INTRIN_VFMA_LANE_F16, - ARM64_INTRIN_VFMAQ_LANE_F16, - ARM64_INTRIN_VFMA_LANEQ_F16, - ARM64_INTRIN_VFMAQ_LANEQ_F16, - ARM64_INTRIN_VFMA_N_F16, - ARM64_INTRIN_VFMAQ_N_F16, - ARM64_INTRIN_VFMAH_LANE_F16, - ARM64_INTRIN_VFMAH_LANEQ_F16, - ARM64_INTRIN_VFMS_LANE_F16, - ARM64_INTRIN_VFMSQ_LANE_F16, - ARM64_INTRIN_VFMS_LANEQ_F16, - ARM64_INTRIN_VFMSQ_LANEQ_F16, - ARM64_INTRIN_VFMS_N_F16, - ARM64_INTRIN_VFMSQ_N_F16, - ARM64_INTRIN_VFMSH_LANE_F16, - ARM64_INTRIN_VFMSH_LANEQ_F16, - ARM64_INTRIN_VMUL_LANE_F16, - ARM64_INTRIN_VMULQ_LANE_F16, - ARM64_INTRIN_VMUL_LANEQ_F16, - ARM64_INTRIN_VMULQ_LANEQ_F16, - ARM64_INTRIN_VMUL_N_F16, - ARM64_INTRIN_VMULQ_N_F16, - ARM64_INTRIN_VMULH_LANE_F16, - ARM64_INTRIN_VMULH_LANEQ_F16, - ARM64_INTRIN_VMULX_LANE_F16, - ARM64_INTRIN_VMULXQ_LANE_F16, - ARM64_INTRIN_VMULX_LANEQ_F16, - ARM64_INTRIN_VMULXQ_LANEQ_F16, - ARM64_INTRIN_VMULX_N_F16, - ARM64_INTRIN_VMULXQ_N_F16, - ARM64_INTRIN_VMULXH_LANE_F16, - ARM64_INTRIN_VMULXH_LANEQ_F16, - ARM64_INTRIN_VMAXV_F16, - ARM64_INTRIN_VMAXVQ_F16, - ARM64_INTRIN_VMINV_F16, - ARM64_INTRIN_VMINVQ_F16, - ARM64_INTRIN_VMAXNMV_F16, - ARM64_INTRIN_VMAXNMVQ_F16, - ARM64_INTRIN_VMINNMV_F16, - ARM64_INTRIN_VMINNMVQ_F16, - ARM64_INTRIN_VBSL_F16, - ARM64_INTRIN_VBSLQ_F16, - ARM64_INTRIN_VZIP_F16, - ARM64_INTRIN_VZIPQ_F16, - ARM64_INTRIN_VUZP_F16, - ARM64_INTRIN_VUZPQ_F16, - ARM64_INTRIN_VTRN_F16, - ARM64_INTRIN_VTRNQ_F16, - ARM64_INTRIN_VMOV_N_F16, - ARM64_INTRIN_VMOVQ_N_F16, - ARM64_INTRIN_VDUP_N_F16, - ARM64_INTRIN_VDUPQ_N_F16, - ARM64_INTRIN_VDUP_LANE_F16, - ARM64_INTRIN_VDUPQ_LANE_F16, - ARM64_INTRIN_VEXT_F16, - ARM64_INTRIN_VEXTQ_F16, - ARM64_INTRIN_VREV64_F16, - ARM64_INTRIN_VREV64Q_F16, - ARM64_INTRIN_VZIP1_F16, - ARM64_INTRIN_VZIP1Q_F16, - ARM64_INTRIN_VZIP2_F16, - ARM64_INTRIN_VZIP2Q_F16, - ARM64_INTRIN_VUZP1_F16, - ARM64_INTRIN_VUZP1Q_F16, - ARM64_INTRIN_VUZP2_F16, - ARM64_INTRIN_VUZP2Q_F16, - ARM64_INTRIN_VTRN1_F16, - ARM64_INTRIN_VTRN1Q_F16, - ARM64_INTRIN_VTRN2_F16, - ARM64_INTRIN_VTRN2Q_F16, - ARM64_INTRIN_VDUP_LANEQ_F16, - ARM64_INTRIN_VDUPQ_LANEQ_F16, - ARM64_INTRIN_VDUPH_LANE_F16, - ARM64_INTRIN_VDUPH_LANEQ_F16, - ARM64_INTRIN_VDOT_U32, - ARM64_INTRIN_VDOT_S32, - ARM64_INTRIN_VDOTQ_U32, - ARM64_INTRIN_VDOTQ_S32, - ARM64_INTRIN_VDOT_LANE_U32, - ARM64_INTRIN_VDOT_LANE_S32, - ARM64_INTRIN_VDOTQ_LANEQ_U32, - ARM64_INTRIN_VDOTQ_LANEQ_S32, - ARM64_INTRIN_VDOT_LANEQ_U32, - ARM64_INTRIN_VDOT_LANEQ_S32, - ARM64_INTRIN_VDOTQ_LANE_U32, - ARM64_INTRIN_VDOTQ_LANE_S32, - ARM64_INTRIN_VSHA512HQ_U64, - ARM64_INTRIN_VSHA512H2Q_U64, - ARM64_INTRIN_VSHA512SU0Q_U64, - ARM64_INTRIN_VSHA512SU1Q_U64, - ARM64_INTRIN_VEOR3Q_U8, - ARM64_INTRIN_VEOR3Q_U16, - ARM64_INTRIN_VEOR3Q_U32, - ARM64_INTRIN_VEOR3Q_U64, - ARM64_INTRIN_VEOR3Q_S8, - ARM64_INTRIN_VEOR3Q_S16, - ARM64_INTRIN_VEOR3Q_S32, - ARM64_INTRIN_VEOR3Q_S64, - ARM64_INTRIN_VRAX1Q_U64, - ARM64_INTRIN_VXARQ_U64, - ARM64_INTRIN_VBCAXQ_U8, - ARM64_INTRIN_VBCAXQ_U16, - ARM64_INTRIN_VBCAXQ_U32, - ARM64_INTRIN_VBCAXQ_U64, - ARM64_INTRIN_VBCAXQ_S8, - ARM64_INTRIN_VBCAXQ_S16, - ARM64_INTRIN_VBCAXQ_S32, - ARM64_INTRIN_VBCAXQ_S64, - ARM64_INTRIN_VSM3SS1Q_U32, - ARM64_INTRIN_VSM3TT1AQ_U32, - ARM64_INTRIN_VSM3TT1BQ_U32, - ARM64_INTRIN_VSM3TT2AQ_U32, - ARM64_INTRIN_VSM3TT2BQ_U32, - ARM64_INTRIN_VSM3PARTW1Q_U32, - ARM64_INTRIN_VSM3PARTW2Q_U32, - ARM64_INTRIN_VSM4EQ_U32, - ARM64_INTRIN_VSM4EKEYQ_U32, - ARM64_INTRIN_VFMLAL_LOW_F16, - ARM64_INTRIN_VFMLSL_LOW_F16, - ARM64_INTRIN_VFMLALQ_LOW_F16, - ARM64_INTRIN_VFMLSLQ_LOW_F16, - ARM64_INTRIN_VFMLAL_HIGH_F16, - ARM64_INTRIN_VFMLSL_HIGH_F16, - ARM64_INTRIN_VFMLALQ_HIGH_F16, - ARM64_INTRIN_VFMLSLQ_HIGH_F16, - ARM64_INTRIN_VFMLAL_LANE_LOW_F16, - ARM64_INTRIN_VFMLAL_LANEQ_LOW_F16, - ARM64_INTRIN_VFMLALQ_LANE_LOW_F16, - ARM64_INTRIN_VFMLALQ_LANEQ_LOW_F16, - ARM64_INTRIN_VFMLSL_LANE_LOW_F16, - ARM64_INTRIN_VFMLSL_LANEQ_LOW_F16, - ARM64_INTRIN_VFMLSLQ_LANE_LOW_F16, - ARM64_INTRIN_VFMLSLQ_LANEQ_LOW_F16, - ARM64_INTRIN_VFMLAL_LANE_HIGH_F16, - ARM64_INTRIN_VFMLSL_LANE_HIGH_F16, - ARM64_INTRIN_VFMLALQ_LANE_HIGH_F16, - ARM64_INTRIN_VFMLSLQ_LANE_HIGH_F16, - ARM64_INTRIN_VFMLAL_LANEQ_HIGH_F16, - ARM64_INTRIN_VFMLSL_LANEQ_HIGH_F16, - ARM64_INTRIN_VFMLALQ_LANEQ_HIGH_F16, - ARM64_INTRIN_VFMLSLQ_LANEQ_HIGH_F16, - ARM64_INTRIN_VCADD_ROT90_F16, - ARM64_INTRIN_VCADD_ROT90_F32, - ARM64_INTRIN_VCADDQ_ROT90_F16, - ARM64_INTRIN_VCADDQ_ROT90_F32, - ARM64_INTRIN_VCADDQ_ROT90_F64, - ARM64_INTRIN_VCADD_ROT270_F16, - ARM64_INTRIN_VCADD_ROT270_F32, - ARM64_INTRIN_VCADDQ_ROT270_F16, - ARM64_INTRIN_VCADDQ_ROT270_F32, - ARM64_INTRIN_VCADDQ_ROT270_F64, - ARM64_INTRIN_VCMLA_F16, - ARM64_INTRIN_VCMLA_F32, - ARM64_INTRIN_VCMLA_LANE_F16, - ARM64_INTRIN_VCMLA_LANE_F32, - ARM64_INTRIN_VCMLA_LANEQ_F16, - ARM64_INTRIN_VCMLA_LANEQ_F32, - ARM64_INTRIN_VCMLAQ_F16, - ARM64_INTRIN_VCMLAQ_F32, - ARM64_INTRIN_VCMLAQ_F64, - ARM64_INTRIN_VCMLAQ_LANE_F16, - ARM64_INTRIN_VCMLAQ_LANE_F32, - ARM64_INTRIN_VCMLAQ_LANEQ_F16, - ARM64_INTRIN_VCMLAQ_LANEQ_F32, - ARM64_INTRIN_VCMLA_ROT90_F16, - ARM64_INTRIN_VCMLA_ROT90_F32, - ARM64_INTRIN_VCMLA_ROT90_LANE_F16, - ARM64_INTRIN_VCMLA_ROT90_LANE_F32, - ARM64_INTRIN_VCMLA_ROT90_LANEQ_F16, - ARM64_INTRIN_VCMLA_ROT90_LANEQ_F32, - ARM64_INTRIN_VCMLAQ_ROT90_F16, - ARM64_INTRIN_VCMLAQ_ROT90_F32, - ARM64_INTRIN_VCMLAQ_ROT90_F64, - ARM64_INTRIN_VCMLAQ_ROT90_LANE_F16, - ARM64_INTRIN_VCMLAQ_ROT90_LANE_F32, - ARM64_INTRIN_VCMLAQ_ROT90_LANEQ_F16, - ARM64_INTRIN_VCMLAQ_ROT90_LANEQ_F32, - ARM64_INTRIN_VCMLA_ROT180_F16, - ARM64_INTRIN_VCMLA_ROT180_F32, - ARM64_INTRIN_VCMLA_ROT180_LANE_F16, - ARM64_INTRIN_VCMLA_ROT180_LANE_F32, - ARM64_INTRIN_VCMLA_ROT180_LANEQ_F16, - ARM64_INTRIN_VCMLA_ROT180_LANEQ_F32, - ARM64_INTRIN_VCMLAQ_ROT180_F16, - ARM64_INTRIN_VCMLAQ_ROT180_F32, - ARM64_INTRIN_VCMLAQ_ROT180_F64, - ARM64_INTRIN_VCMLAQ_ROT180_LANE_F16, - ARM64_INTRIN_VCMLAQ_ROT180_LANE_F32, - ARM64_INTRIN_VCMLAQ_ROT180_LANEQ_F16, - ARM64_INTRIN_VCMLAQ_ROT180_LANEQ_F32, - ARM64_INTRIN_VCMLA_ROT270_F16, - ARM64_INTRIN_VCMLA_ROT270_F32, - ARM64_INTRIN_VCMLA_ROT270_LANE_F16, - ARM64_INTRIN_VCMLA_ROT270_LANE_F32, - ARM64_INTRIN_VCMLA_ROT270_LANEQ_F16, - ARM64_INTRIN_VCMLA_ROT270_LANEQ_F32, - ARM64_INTRIN_VCMLAQ_ROT270_F16, - ARM64_INTRIN_VCMLAQ_ROT270_F32, - ARM64_INTRIN_VCMLAQ_ROT270_F64, - ARM64_INTRIN_VCMLAQ_ROT270_LANE_F16, - ARM64_INTRIN_VCMLAQ_ROT270_LANE_F32, - ARM64_INTRIN_VCMLAQ_ROT270_LANEQ_F16, - ARM64_INTRIN_VCMLAQ_ROT270_LANEQ_F32, - ARM64_INTRIN_VRND32Z_F32, - ARM64_INTRIN_VRND32ZQ_F32, - ARM64_INTRIN_VRND32Z_F64, - ARM64_INTRIN_VRND32ZQ_F64, - ARM64_INTRIN_VRND64Z_F32, - ARM64_INTRIN_VRND64ZQ_F32, - ARM64_INTRIN_VRND64Z_F64, - ARM64_INTRIN_VRND64ZQ_F64, - ARM64_INTRIN_VRND32X_F32, - ARM64_INTRIN_VRND32XQ_F32, - ARM64_INTRIN_VRND32X_F64, - ARM64_INTRIN_VRND32XQ_F64, - ARM64_INTRIN_VRND64X_F32, - ARM64_INTRIN_VRND64XQ_F32, - ARM64_INTRIN_VRND64X_F64, - ARM64_INTRIN_VRND64XQ_F64, - ARM64_INTRIN_VMMLAQ_S32, - ARM64_INTRIN_VMMLAQ_U32, - ARM64_INTRIN_VUSMMLAQ_S32, - ARM64_INTRIN_VUSDOT_S32, - ARM64_INTRIN_VUSDOT_LANE_S32, - ARM64_INTRIN_VSUDOT_LANE_S32, - ARM64_INTRIN_VUSDOT_LANEQ_S32, - ARM64_INTRIN_VSUDOT_LANEQ_S32, - ARM64_INTRIN_VUSDOTQ_S32, - ARM64_INTRIN_VUSDOTQ_LANE_S32, - ARM64_INTRIN_VSUDOTQ_LANE_S32, - ARM64_INTRIN_VUSDOTQ_LANEQ_S32, - ARM64_INTRIN_VSUDOTQ_LANEQ_S32, - ARM64_INTRIN_VCREATE_BF16, - ARM64_INTRIN_VDUP_N_BF16, - ARM64_INTRIN_VDUPQ_N_BF16, - ARM64_INTRIN_VDUP_LANE_BF16, - ARM64_INTRIN_VDUPQ_LANE_BF16, - ARM64_INTRIN_VDUP_LANEQ_BF16, - ARM64_INTRIN_VDUPQ_LANEQ_BF16, - ARM64_INTRIN_VCOMBINE_BF16, - ARM64_INTRIN_VGET_HIGH_BF16, - ARM64_INTRIN_VGET_LOW_BF16, - ARM64_INTRIN_VGET_LANE_BF16, - ARM64_INTRIN_VGETQ_LANE_BF16, - ARM64_INTRIN_VSET_LANE_BF16, - ARM64_INTRIN_VSETQ_LANE_BF16, - ARM64_INTRIN_VDUPH_LANE_BF16, - ARM64_INTRIN_VDUPH_LANEQ_BF16, - ARM64_INTRIN_VLD1_BF16, - ARM64_INTRIN_VLD1Q_BF16, - ARM64_INTRIN_VLD1_LANE_BF16, - ARM64_INTRIN_VLD1Q_LANE_BF16, - ARM64_INTRIN_VLD1_DUP_BF16, - ARM64_INTRIN_VLD1Q_DUP_BF16, - ARM64_INTRIN_VST1_BF16, - ARM64_INTRIN_VST1Q_BF16, - ARM64_INTRIN_VST1_LANE_BF16, - ARM64_INTRIN_VST1Q_LANE_BF16, - ARM64_INTRIN_VLD2_BF16, - ARM64_INTRIN_VLD2Q_BF16, - ARM64_INTRIN_VLD3_BF16, - ARM64_INTRIN_VLD3Q_BF16, - ARM64_INTRIN_VLD4_BF16, - ARM64_INTRIN_VLD4Q_BF16, - ARM64_INTRIN_VLD2_DUP_BF16, - ARM64_INTRIN_VLD2Q_DUP_BF16, - ARM64_INTRIN_VLD3_DUP_BF16, - ARM64_INTRIN_VLD3Q_DUP_BF16, - ARM64_INTRIN_VLD4_DUP_BF16, - ARM64_INTRIN_VLD4Q_DUP_BF16, - ARM64_INTRIN_VST2_BF16, - ARM64_INTRIN_VST2Q_BF16, - ARM64_INTRIN_VST3_BF16, - ARM64_INTRIN_VST3Q_BF16, - ARM64_INTRIN_VST4_BF16, - ARM64_INTRIN_VST4Q_BF16, - ARM64_INTRIN_VLD2_LANE_BF16, - ARM64_INTRIN_VLD2Q_LANE_BF16, - ARM64_INTRIN_VLD3_LANE_BF16, - ARM64_INTRIN_VLD3Q_LANE_BF16, - ARM64_INTRIN_VLD4_LANE_BF16, - ARM64_INTRIN_VLD4Q_LANE_BF16, - ARM64_INTRIN_VST2_LANE_BF16, - ARM64_INTRIN_VST2Q_LANE_BF16, - ARM64_INTRIN_VST3_LANE_BF16, - ARM64_INTRIN_VST3Q_LANE_BF16, - ARM64_INTRIN_VST4_LANE_BF16, - ARM64_INTRIN_VST4Q_LANE_BF16, - ARM64_INTRIN_VST1_BF16_X2, - ARM64_INTRIN_VST1Q_BF16_X2, - ARM64_INTRIN_VST1_BF16_X3, - ARM64_INTRIN_VST1Q_BF16_X3, - ARM64_INTRIN_VST1_BF16_X4, - ARM64_INTRIN_VST1Q_BF16_X4, - ARM64_INTRIN_VLD1_BF16_X2, - ARM64_INTRIN_VLD1Q_BF16_X2, - ARM64_INTRIN_VLD1_BF16_X3, - ARM64_INTRIN_VLD1Q_BF16_X3, - ARM64_INTRIN_VLD1_BF16_X4, - ARM64_INTRIN_VLD1Q_BF16_X4, - ARM64_INTRIN_VCVT_F32_BF16, - ARM64_INTRIN_VCVTQ_LOW_F32_BF16, - ARM64_INTRIN_VCVTQ_HIGH_F32_BF16, - ARM64_INTRIN_VCVT_BF16_F32, - ARM64_INTRIN_VCVTQ_LOW_BF16_F32, - ARM64_INTRIN_VCVTQ_HIGH_BF16_F32, - ARM64_INTRIN_VCVTH_BF16_F32, - ARM64_INTRIN_VCVTAH_F32_BF16, - ARM64_INTRIN_VCOPY_LANE_BF16, - ARM64_INTRIN_VCOPYQ_LANE_BF16, - ARM64_INTRIN_VCOPY_LANEQ_BF16, - ARM64_INTRIN_VCOPYQ_LANEQ_BF16, - ARM64_INTRIN_VBFDOT_F32, - ARM64_INTRIN_VBFDOTQ_F32, - ARM64_INTRIN_VBFDOT_LANE_F32, - ARM64_INTRIN_VBFDOTQ_LANEQ_F32, - ARM64_INTRIN_VBFDOT_LANEQ_F32, - ARM64_INTRIN_VBFDOTQ_LANE_F32, - ARM64_INTRIN_VBFMMLAQ_F32, - ARM64_INTRIN_VBFMLALBQ_F32, - ARM64_INTRIN_VBFMLALTQ_F32, - ARM64_INTRIN_VBFMLALBQ_LANE_F32, - ARM64_INTRIN_VBFMLALBQ_LANEQ_F32, - ARM64_INTRIN_VBFMLALTQ_LANE_F32, - ARM64_INTRIN_VBFMLALTQ_LANEQ_F32, - // Added to resolve collisions between vector and scalar variants of the intrinsic - ARM64_INTRIN_VMAX__F32, - ARM64_INTRIN_VMAXNM__F32, - // Added to fill in obvious gaps - ARM64_INTRIN_VCVTNS_S64_F32, - ARM64_INTRIN_VCVTN_S32_F64, - ARM64_INTRIN_VCVTD_N_F64_S32, - ARM64_INTRIN_VCVTS_N_F32_S64, - ARM64_INTRIN_VCVT_S32_F64, - ARM64_INTRIN_VCVT_U32_F64, - ARM64_INTRIN_VCVTA_S32_F64, - ARM64_INTRIN_VCVTA_U32_F64, - ARM64_INTRIN_VCVTAD_S32_F64, - ARM64_INTRIN_VCVTAD_U32_F64, - ARM64_INTRIN_VCVTAS_N_S32_F32, - ARM64_INTRIN_VCVTAS_N_U32_F32, - ARM64_INTRIN_VCVTD_S32_F64, - ARM64_INTRIN_VCVTD_U32_F64, - ARM64_INTRIN_VCVTM_S32_F64, - ARM64_INTRIN_VCVTM_U32_F64, - ARM64_INTRIN_VCVTMD_S32_F64, - ARM64_INTRIN_VCVTMD_U32_F64, - ARM64_INTRIN_VCVTMS_N_S32_F32, - ARM64_INTRIN_VCVTMS_N_U32_F32, - ARM64_INTRIN_VCVTN_U32_F64, - ARM64_INTRIN_VCVTND_S32_F64, - ARM64_INTRIN_VCVTND_U32_F64, - ARM64_INTRIN_VCVTP_S32_F64, - ARM64_INTRIN_VCVTP_U32_F64, - ARM64_INTRIN_VCVTPD_S32_F64, - ARM64_INTRIN_VCVTPD_U32_F64, - ARM64_INTRIN_VCVTPS_N_S32_F32, - ARM64_INTRIN_VCVTPS_N_U32_F32, - ARM64_INTRIN_VCVTA_N_S64_F64, - ARM64_INTRIN_VCVTA_N_U64_F64, - ARM64_INTRIN_VCVTAD_N_S64_F64, - ARM64_INTRIN_VCVTAD_N_U64_F64, - ARM64_INTRIN_VCVTM_N_S64_F64, - ARM64_INTRIN_VCVTM_N_U64_F64, - ARM64_INTRIN_VCVTMD_N_S64_F64, - ARM64_INTRIN_VCVTMD_N_U64_F64, - ARM64_INTRIN_VCVTP_N_S64_F64, - ARM64_INTRIN_VCVTP_N_U64_F64, - ARM64_INTRIN_VCVTPD_N_S64_F64, - ARM64_INTRIN_VCVTPD_N_U64_F64, - ARM64_INTRIN_VCVTNS_U64_F32, - ARM64_INTRIN_VCVTPS_U64_F32, - ARM64_INTRIN_VCVTPS_S64_F32, - ARM64_INTRIN_VCVTS_S64_F32, - ARM64_INTRIN_VCVTS_U64_F32, - ARM64_INTRIN_VCVTD_N_U64_F32, - ARM64_INTRIN_VCVTD_N_U32_F64, - ARM64_INTRIN_VCVTS_N_U64_F32, - ARM64_INTRIN_VCVTS_N_U32_F64, - ARM64_INTRIN_VCVTS_N_U64_F64, - ARM64_INTRIN_VCVT_U64_F32, - // The end, add more above - ARM64_INTRIN_NEON_END -}; - -string NeonGetIntrinsicName(uint32_t intrinsic); -vector NeonGetIntrinsicInputs(uint32_t intrinsic); -vector>> NeonGetIntrinsicOutputs(uint32_t intrinsic); -bool NeonGetLowLevelILForInstruction( - Architecture* arch, uint64_t addr, LowLevelILFunction& il, Instruction& instr, size_t addrSize); -Ref get_tlbi_op_enum(); -Ref get_at_op_enum(); -Ref get_dc_op_enum(); diff --git a/arch/arm64/operands.cpp b/arch/arm64/operands.cpp new file mode 100644 index 000000000..6b22b79b0 --- /dev/null +++ b/arch/arm64/operands.cpp @@ -0,0 +1,99 @@ +#include "operands.h" + +Register OperandRegister(const exarmo_aarch64_operand& operand) +{ + return OperandRegisterAt(operand, 0); +} + + +Register OperandRegisterAt(const exarmo_aarch64_operand& operand, size_t index) +{ + switch (operand.kind) + { + case EXARMO_AARCH64_OPERAND_REG: + if (index != 0) + return REG_NONE; + return ToRegister(operand.reg.reg); + case EXARMO_AARCH64_OPERAND_MEM: + if (index == 0) + return ToRegister(operand.mem.base); + if (index == 1 && (operand.mem.offset.kind == EXARMO_AARCH64_OFFSET_REG + || operand.mem.offset.kind == EXARMO_AARCH64_OFFSET_VECTOR)) + return ToRegister(operand.mem.offset.reg); + return REG_NONE; + case EXARMO_AARCH64_OPERAND_LIST: + if (index >= operand.list.len) + return REG_NONE; + return ToRegister(operand.list.regs[index]); + default: + return REG_NONE; + } +} + + +int64_t OperandImmediate(const exarmo_aarch64_operand& operand) +{ + return operand.kind == EXARMO_AARCH64_OPERAND_IMM ? (int64_t)operand.imm.value : 0; +} + + +uint64_t LabelTarget(const exarmo_aarch64_operand& operand, uint64_t addr) +{ + if (operand.kind != EXARMO_AARCH64_OPERAND_LABEL) + return 0; + + // A64 reads the PC as the instruction's own address, and ADRP names the page the target is + // in rather than the target. + const exarmo_aarch64_label& label = operand.label; + return ((addr + label.pc_ahead) & ~(uint64_t)(label.pc_align - 1)) + label.offset; +} + + +exarmo_aarch64_modifier OperandModifier(const exarmo_aarch64_operand& operand) +{ + switch (operand.kind) + { + case EXARMO_AARCH64_OPERAND_REG: + return operand.reg.modifier; + case EXARMO_AARCH64_OPERAND_IMM: + return operand.imm.modifier; + case EXARMO_AARCH64_OPERAND_MEM: + return operand.mem.offset.modifier; + case EXARMO_AARCH64_OPERAND_MODIFIER: + return operand.modifier; + default: + return exarmo_aarch64_modifier {}; + } +} + + +exarmo_aarch64_arrangement OperandArrangement(const exarmo_aarch64_operand& operand) +{ + switch (operand.kind) + { + case EXARMO_AARCH64_OPERAND_REG: + return operand.reg.arrangement; + case EXARMO_AARCH64_OPERAND_LIST: + return operand.list.arrangement; + case EXARMO_AARCH64_OPERAND_ZA_SLICE: + return operand.za_slice.arrangement; + case EXARMO_AARCH64_OPERAND_MEM: + return operand.mem.base_arrangement; + default: + return exarmo_aarch64_arrangement {}; + } +} + + +int32_t OperandLaneIndex(const exarmo_aarch64_operand& operand) +{ + switch (operand.kind) + { + case EXARMO_AARCH64_OPERAND_REG: + return operand.reg.index; + case EXARMO_AARCH64_OPERAND_LIST: + return operand.list.index; + default: + return -1; + } +} diff --git a/arch/arm64/operands.h b/arch/arm64/operands.h new file mode 100644 index 000000000..71d6bb58a --- /dev/null +++ b/arch/arm64/operands.h @@ -0,0 +1,35 @@ +#pragma once + +#include "registers.h" + +#include "exarmo/aarch64.h" + +#include + +// Accessors for the fields of an exarmo operand. + +// Equivalent to OperandRegisterAt(operand, 0). +Register OperandRegister(const exarmo_aarch64_operand& operand); + +// The registers an operand names, in the order the architecture writes them: a register +// operand's own, a memory operand's base and then its offset register, each member of a list. +// REG_NONE past the end. +Register OperandRegisterAt(const exarmo_aarch64_operand& operand, size_t index); + +// The operand's arrangement. `element` is EXARMO_AARCH64_ELEMENT_NONE if the operand has no +// arrangement. +exarmo_aarch64_arrangement OperandArrangement(const exarmo_aarch64_operand& operand); + +// The element index written on an operand, or -1 where none is. +int32_t OperandLaneIndex(const exarmo_aarch64_operand& operand); + +// An immediate operand's value before any shift. Zero for any other operand. Use LabelTarget for a +// label. +int64_t OperandImmediate(const exarmo_aarch64_operand& operand); + +// The target of a label operand in the instruction at `addr`. +uint64_t LabelTarget(const exarmo_aarch64_operand& operand, uint64_t addr); + +// The shift or extend written on an operand, and how far it shifts. A memory operand's is the +// one written on its offset register. +exarmo_aarch64_modifier OperandModifier(const exarmo_aarch64_operand& operand); diff --git a/arch/arm64/disassembler/regs.c b/arch/arm64/registers.cpp similarity index 83% rename from arch/arm64/disassembler/regs.c rename to arch/arm64/registers.cpp index a8fef876a..d87969089 100644 --- a/arch/arm64/disassembler/regs.c +++ b/arch/arm64/registers.cpp @@ -1,10 +1,13 @@ -#include "regs.h" +#include "registers.h" + +#include +#include //----------------------------------------------------------------------------- // registers (and related) to string //----------------------------------------------------------------------------- -static const char* const RegisterString[] = {"NONE", "w0", "w1", "w2", "w3", "w4", "w5", "w6", "w7", "w8", +static const std::string_view RegisterString[] = {"NONE", "w0", "w1", "w2", "w3", "w4", "w5", "w6", "w7", "w8", "w9", "w10", "w11", "w12", "w13", "w14", "w15", "w16", "w17", "w18", "w19", "w20", "w21", "w22", "w23", "w24", "w25", "w26", "w27", "w28", "w29", "w30", "wzr", "wsp", "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17", @@ -166,17 +169,17 @@ static const char* const RegisterString[] = {"NONE", "w0", "w1", "w2", "w3", "w4 "pstl1keep", "pstl1strm", "pstl2keep", "pstl2strm", "pstl3keep", "pstl3strm", "#0x16", "#0x17", "#0x18", "#0x19", "#0x1a", "#0x1b", "#0x1c", "#0x1d", "#0x1e", "#0x1f", "zt0", "END"}; -const char* aarch64_get_register_name(enum Register r) +std::string_view RegisterName(enum Register r) { if (r > REG_NONE && r < REG_END) return RegisterString[r]; - return ""; + return {}; } -size_t aarch64_get_register_size(enum Register r) +size_t RegisterSize(enum Register r) { - // Comparison done in order of likelyhood to occur + // Comparison done in order of likelihood to occur if ((r >= REG_X0 && r <= REG_SP) || (r >= REG_D0 && r <= REG_D31)) return 8; else if ((r >= REG_W0 && r <= REG_WSP) || (r >= REG_S0 && r <= REG_S31)) @@ -200,3 +203,109 @@ size_t aarch64_get_register_size(enum Register r) return 0; } + + +Register ToRegister(exarmo_aarch64_reg reg) +{ + switch (reg.class_) + { + case EXARMO_AARCH64_REG_W: + return reg.num == 31 ? REG_WZR : (Register)(REG_W0 + reg.num); + case EXARMO_AARCH64_REG_W_SP: + return reg.num == 31 ? REG_WSP : (Register)(REG_W0 + reg.num); + // GP is a general register of unspecified width. Map it to X, the wider reading. + case EXARMO_AARCH64_REG_GP: + case EXARMO_AARCH64_REG_X: + return reg.num == 31 ? REG_XZR : (Register)(REG_X0 + reg.num); + case EXARMO_AARCH64_REG_X_SP: + return reg.num == 31 ? REG_SP : (Register)(REG_X0 + reg.num); + case EXARMO_AARCH64_REG_B: + return (Register)(REG_B0 + reg.num); + case EXARMO_AARCH64_REG_H: + return (Register)(REG_H0 + reg.num); + case EXARMO_AARCH64_REG_S: + return (Register)(REG_S0 + reg.num); + case EXARMO_AARCH64_REG_D: + return (Register)(REG_D0 + reg.num); + case EXARMO_AARCH64_REG_Q: + return (Register)(REG_Q0 + reg.num); + case EXARMO_AARCH64_REG_V: + return (Register)(REG_V0 + reg.num); + case EXARMO_AARCH64_REG_Z: + return (Register)(REG_Z0 + reg.num); + case EXARMO_AARCH64_REG_P: + return (Register)(REG_P0 + reg.num); + // A predicate-as-counter names the same physical register as the predicate of that number, + // read a different way. + case EXARMO_AARCH64_REG_PN: + return (Register)(REG_P0 + reg.num); + case EXARMO_AARCH64_REG_ZT0: + return REG_ZT0; + // An SME tile is not a register the architecture plugin numbers. + case EXARMO_AARCH64_REG_ZA_TILE: + default: + return REG_NONE; + } +} + + +uint32_t ArrangementLanes(exarmo_aarch64_arrangement arrangement) +{ + return std::max(arrangement.lanes, 1); +} + + +uint32_t ArrangementBits(exarmo_aarch64_arrangement arrangement) +{ + return (uint32_t)arrangement.element * ArrangementLanes(arrangement); +} + + +Register ArrangementRegister(exarmo_aarch64_arrangement arrangement, uint32_t number) +{ + if (number > 31) + return REG_NONE; + + uint32_t bits = ArrangementBits(arrangement); + if (bits == 0 || bits > 128) + return (Register)(REG_V0 + number); + + return LaneRegister(bits, number, 0); +} + + +Register LaneRegister(uint32_t element, uint32_t number, uint32_t lane) +{ + Register first; + uint32_t lanes; + switch (element) + { + case EXARMO_AARCH64_ELEMENT_Q: + first = REG_V0; + lanes = 1; + break; + case EXARMO_AARCH64_ELEMENT_B: + first = REG_V0_B0; + lanes = 16; + break; + case EXARMO_AARCH64_ELEMENT_H: + first = REG_V0_H0; + lanes = 8; + break; + case EXARMO_AARCH64_ELEMENT_S: + first = REG_V0_S0; + lanes = 4; + break; + case EXARMO_AARCH64_ELEMENT_D: + first = REG_V0_D0; + lanes = 2; + break; + default: + return REG_NONE; + } + + if (number > 31 || lane >= lanes) + return REG_NONE; + + return (Register)(first + number * lanes + lane); +} diff --git a/arch/arm64/disassembler/regs.h b/arch/arm64/registers.h similarity index 91% rename from arch/arm64/disassembler/regs.h rename to arch/arm64/registers.h index ab247683e..5f32baac0 100644 --- a/arch/arm64/disassembler/regs.h +++ b/arch/arm64/registers.h @@ -1,6 +1,10 @@ #pragma once +#include "exarmo/aarch64.h" + #include +#include +#include #ifdef _MSC_VER #undef REG_NONE // collides with winnt's define @@ -10,6 +14,8 @@ // registers (non-system) //----------------------------------------------------------------------------- +// Register numbers are saved in databases as part of each variable's storage. Never renumber an +// existing register. enum Register { REG_NONE, @@ -1337,12 +1343,29 @@ enum Register REG_END }; -#ifdef __cplusplus -extern "C" -{ -#endif - const char* aarch64_get_register_name(enum Register); - size_t aarch64_get_register_size(enum Register); -#ifdef __cplusplus -} -#endif +// The name the architecture writes a register under. Empty where the number names none. +std::string_view RegisterName(enum Register); + +// How many bytes a register holds. Zero where the number names none. +size_t RegisterSize(enum Register); + +// Map an exarmo register to the whole register it names, so v0.s[1] gives v0. Use LaneRegister for +// a single lane. +Register ToRegister(exarmo_aarch64_reg reg); + +// How wide the whole arrangement is in bits. An element width with no lane count written names +// one element, so `.d` and `.1d` are both 64 bits. +uint32_t ArrangementBits(exarmo_aarch64_arrangement arrangement); + +// How many elements the arrangement names, which is one where it writes no count. +uint32_t ArrangementLanes(exarmo_aarch64_arrangement arrangement); + +// The register covering exactly the bits an arrangement names. A 128-bit arrangement gives the +// vector register, and a narrower one gives lane 0 of that width, so v0.2s is REG_V0_D0. Without an +// arrangement this is the vector register. +Register ArrangementRegister(exarmo_aarch64_arrangement arrangement, uint32_t number); + +// The register for one lane of vector register `number`, where `element` is the lane width. For +// example, v3.s[2] is REG_V0_S0 + 3 * 4 + 2. Returns REG_NONE for an unsupported width or an +// out-of-range lane. +Register LaneRegister(uint32_t element, uint32_t number, uint32_t lane); diff --git a/arch/arm64/src/lib.rs b/arch/arm64/src/lib.rs new file mode 100644 index 000000000..83377a8bd --- /dev/null +++ b/arch/arm64/src/lib.rs @@ -0,0 +1,2 @@ +// Name exarmo_aarch64_capi so that it is linked into our static library. +extern crate exarmo_aarch64_capi; diff --git a/arch/arm64/sysregs_enum.cpp b/arch/arm64/sysregs_enum.cpp deleted file mode 100644 index c99f36cb1..000000000 --- a/arch/arm64/sysregs_enum.cpp +++ /dev/null @@ -1,3988 +0,0 @@ -/* GENERATED FILE - DO NOT MODIFY - SUBMIT GITHUB ISSUE IF PROBLEM FOUND */ - -#include "sysregs_enum.h" - -using namespace BinaryNinja; -using namespace std; - -Ref get_system_register_enum() -{ - static EnumerationBuilder builder; - static std::once_flag once; - std::call_once(once, []() { - builder.AddMemberWithValue(get_system_register_name(REG_PSTATE_SPSEL), REG_PSTATE_SPSEL); - builder.AddMemberWithValue(get_system_register_name(REG_DAIFSET), REG_DAIFSET); - builder.AddMemberWithValue(get_system_register_name(REG_DAIFCLR), REG_DAIFCLR); - builder.AddMemberWithValue(get_system_register_name(REG_IC_IALLUIS), REG_IC_IALLUIS); - builder.AddMemberWithValue(get_system_register_name(REG_IC_IALLU), REG_IC_IALLU); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPUSHX), REG_GCSPUSHX); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPOPCX), REG_GCSPOPCX); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPOPX), REG_GCSPOPX); - builder.AddMemberWithValue(get_system_register_name(REG_GSB_SYS), REG_GSB_SYS); - builder.AddMemberWithValue(get_system_register_name(REG_GSB_ACK), REG_GSB_ACK); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDDIS), REG_GIC_CDDIS); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDEN), REG_GIC_CDEN); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDPRI), REG_GIC_CDPRI); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDAFF), REG_GIC_CDAFF); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDPEND), REG_GIC_CDPEND); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDRCFG), REG_GIC_CDRCFG); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDEOI), REG_GIC_CDEOI); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDDI), REG_GIC_CDDI); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_CDHM), REG_GIC_CDHM); - builder.AddMemberWithValue(get_system_register_name(REG_GICR_CDIA), REG_GICR_CDIA); - builder.AddMemberWithValue(get_system_register_name(REG_GICR_CDNMIA), REG_GICR_CDNMIA); - builder.AddMemberWithValue(get_system_register_name(REG_BRB_IALL), REG_BRB_IALL); - builder.AddMemberWithValue(get_system_register_name(REG_BRB_INJ), REG_BRB_INJ); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIT), REG_TRCIT); - builder.AddMemberWithValue(get_system_register_name(REG_CFP_RCTX), REG_CFP_RCTX); - builder.AddMemberWithValue(get_system_register_name(REG_DVP_RCTX), REG_DVP_RCTX); - builder.AddMemberWithValue(get_system_register_name(REG_COSP_RCTX), REG_COSP_RCTX); - builder.AddMemberWithValue(get_system_register_name(REG_CPP_RCTX), REG_CPP_RCTX); - builder.AddMemberWithValue(get_system_register_name(REG_IC_IVAU), REG_IC_IVAU); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPUSHM), REG_GCSPUSHM); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPOPM), REG_GCSPOPM); - builder.AddMemberWithValue(get_system_register_name(REG_GCSSS1), REG_GCSSS1); - builder.AddMemberWithValue(get_system_register_name(REG_GCSSS2), REG_GCSSS2); - builder.AddMemberWithValue(get_system_register_name(REG_MLBI_ALLE1), REG_MLBI_ALLE1); - builder.AddMemberWithValue(get_system_register_name(REG_MLBI_VMALLE1), REG_MLBI_VMALLE1); - builder.AddMemberWithValue(get_system_register_name(REG_MLBI_VPIDE1), REG_MLBI_VPIDE1); - builder.AddMemberWithValue(get_system_register_name(REG_MLBI_VPMGE1), REG_MLBI_VPMGE1); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDDIS), REG_GIC_VDDIS); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDEN), REG_GIC_VDEN); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDPRI), REG_GIC_VDPRI); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDAFF), REG_GIC_VDAFF); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDPEND), REG_GIC_VDPEND); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDRCFG), REG_GIC_VDRCFG); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDDI), REG_GIC_VDDI); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_VDHM), REG_GIC_VDHM); - builder.AddMemberWithValue(get_system_register_name(REG_APAS), REG_APAS); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDDIS), REG_GIC_LDDIS); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDEN), REG_GIC_LDEN); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDPRI), REG_GIC_LDPRI); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDAFF), REG_GIC_LDAFF); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDPEND), REG_GIC_LDPEND); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDRCFG), REG_GIC_LDRCFG); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDDI), REG_GIC_LDDI); - builder.AddMemberWithValue(get_system_register_name(REG_GIC_LDHM), REG_GIC_LDHM); - builder.AddMemberWithValue(get_system_register_name(REG_OSDTRRX_EL1), REG_OSDTRRX_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR0_EL1), REG_DBGBVR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR0_EL1), REG_DBGBCR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR0_EL1), REG_DBGWVR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR0_EL1), REG_DBGWCR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR1_EL1), REG_DBGBVR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR1_EL1), REG_DBGBCR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR1_EL1), REG_DBGWVR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR1_EL1), REG_DBGWCR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MDCCINT_EL1), REG_MDCCINT_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MDSCR_EL1), REG_MDSCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR2_EL1), REG_DBGBVR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR2_EL1), REG_DBGBCR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR2_EL1), REG_DBGWVR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR2_EL1), REG_DBGWCR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_OSDTRTX_EL1), REG_OSDTRTX_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR3_EL1), REG_DBGBVR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR3_EL1), REG_DBGBCR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR3_EL1), REG_DBGWVR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR3_EL1), REG_DBGWCR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MDSELR_EL1), REG_MDSELR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR4_EL1), REG_DBGBVR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR4_EL1), REG_DBGBCR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR4_EL1), REG_DBGWVR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR4_EL1), REG_DBGWCR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MDSTEPOP_EL1), REG_MDSTEPOP_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR5_EL1), REG_DBGBVR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR5_EL1), REG_DBGBCR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR5_EL1), REG_DBGWVR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR5_EL1), REG_DBGWCR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWFAR), REG_DBGWFAR); - builder.AddMemberWithValue(get_system_register_name(REG_OSECCR_EL1), REG_OSECCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR6_EL1), REG_DBGBVR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR6_EL1), REG_DBGBCR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR6_EL1), REG_DBGWVR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR6_EL1), REG_DBGWCR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR7_EL1), REG_DBGBVR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR7_EL1), REG_DBGBCR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR7_EL1), REG_DBGWVR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR7_EL1), REG_DBGWCR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR8_EL1), REG_DBGBVR8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR8_EL1), REG_DBGBCR8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR8_EL1), REG_DBGWVR8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR8_EL1), REG_DBGWCR8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR9_EL1), REG_DBGBVR9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR9_EL1), REG_DBGBCR9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR9_EL1), REG_DBGWVR9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR9_EL1), REG_DBGWCR9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR10_EL1), REG_DBGBVR10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR10_EL1), REG_DBGBCR10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR10_EL1), REG_DBGWVR10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR10_EL1), REG_DBGWCR10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR11_EL1), REG_DBGBVR11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR11_EL1), REG_DBGBCR11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR11_EL1), REG_DBGWVR11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR11_EL1), REG_DBGWCR11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR12_EL1), REG_DBGBVR12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR12_EL1), REG_DBGBCR12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR12_EL1), REG_DBGWVR12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR12_EL1), REG_DBGWCR12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR13_EL1), REG_DBGBVR13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR13_EL1), REG_DBGBCR13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR13_EL1), REG_DBGWVR13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR13_EL1), REG_DBGWCR13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR14_EL1), REG_DBGBVR14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR14_EL1), REG_DBGBCR14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR14_EL1), REG_DBGWVR14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR14_EL1), REG_DBGWCR14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBVR15_EL1), REG_DBGBVR15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGBCR15_EL1), REG_DBGBCR15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWVR15_EL1), REG_DBGWVR15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGWCR15_EL1), REG_DBGWCR15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MDRAR_EL1), REG_MDRAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_OSLAR_EL1), REG_OSLAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_OSLSR_EL1), REG_OSLSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_OSDLR_EL1), REG_OSDLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGPRCR_EL1), REG_DBGPRCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGCLAIMSET_EL1), REG_DBGCLAIMSET_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGCLAIMCLR_EL1), REG_DBGCLAIMCLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBGAUTHSTATUS_EL1), REG_DBGAUTHSTATUS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMCGCR0_EL1), REG_SPMCGCR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMCGCR1_EL1), REG_SPMCGCR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMACCESSR_EL1), REG_SPMACCESSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMIIDR_EL1), REG_SPMIIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMDEVARCH_EL1), REG_SPMDEVARCH_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMDEVAFF_EL1), REG_SPMDEVAFF_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMCFGR_EL1), REG_SPMCFGR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMINTENSET_EL1), REG_SPMINTENSET_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPMINTENCLR_EL1), REG_SPMINTENCLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR0_EL1), REG_PMEVCNTSVR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR1_EL1), REG_PMEVCNTSVR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR2_EL1), REG_PMEVCNTSVR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR3_EL1), REG_PMEVCNTSVR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR4_EL1), REG_PMEVCNTSVR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR5_EL1), REG_PMEVCNTSVR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR6_EL1), REG_PMEVCNTSVR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR7_EL1), REG_PMEVCNTSVR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR8_EL1), REG_PMEVCNTSVR8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR9_EL1), REG_PMEVCNTSVR9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR10_EL1), REG_PMEVCNTSVR10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR11_EL1), REG_PMEVCNTSVR11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR12_EL1), REG_PMEVCNTSVR12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR13_EL1), REG_PMEVCNTSVR13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR14_EL1), REG_PMEVCNTSVR14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR15_EL1), REG_PMEVCNTSVR15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR16_EL1), REG_PMEVCNTSVR16_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR17_EL1), REG_PMEVCNTSVR17_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR18_EL1), REG_PMEVCNTSVR18_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR19_EL1), REG_PMEVCNTSVR19_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR20_EL1), REG_PMEVCNTSVR20_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR21_EL1), REG_PMEVCNTSVR21_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR22_EL1), REG_PMEVCNTSVR22_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR23_EL1), REG_PMEVCNTSVR23_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR24_EL1), REG_PMEVCNTSVR24_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR25_EL1), REG_PMEVCNTSVR25_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR26_EL1), REG_PMEVCNTSVR26_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR27_EL1), REG_PMEVCNTSVR27_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR28_EL1), REG_PMEVCNTSVR28_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR29_EL1), REG_PMEVCNTSVR29_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTSVR30_EL1), REG_PMEVCNTSVR30_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCCNTSVR_EL1), REG_PMCCNTSVR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMICNTSVR_EL1), REG_PMICNTSVR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCTRACEIDR), REG_TRCTRACEIDR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVICTLR), REG_TRCVICTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSEQEVR0), REG_TRCSEQEVR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTRLDVR0), REG_TRCCNTRLDVR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR8), REG_TRCIDR8); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC0), REG_TRCIMSPEC0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCPRGCTLR), REG_TRCPRGCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCQCTLR), REG_TRCQCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVIIECTLR), REG_TRCVIIECTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSEQEVR1), REG_TRCSEQEVR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTRLDVR1), REG_TRCCNTRLDVR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR9), REG_TRCIDR9); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC1), REG_TRCIMSPEC1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCITEEDCR), REG_TRCITEEDCR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVISSCTLR), REG_TRCVISSCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSEQEVR2), REG_TRCSEQEVR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTRLDVR2), REG_TRCCNTRLDVR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR10), REG_TRCIDR10); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC2), REG_TRCIMSPEC2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSTATR), REG_TRCSTATR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVIPCSSCTLR), REG_TRCVIPCSSCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTRLDVR3), REG_TRCCNTRLDVR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR11), REG_TRCIDR11); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC3), REG_TRCIMSPEC3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCONFIGR), REG_TRCCONFIGR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTCTLR0), REG_TRCCNTCTLR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR12), REG_TRCIDR12); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC4), REG_TRCIMSPEC4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTCTLR1), REG_TRCCNTCTLR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR13), REG_TRCIDR13); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC5), REG_TRCIMSPEC5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCAUXCTLR), REG_TRCAUXCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSEQRSTEVR), REG_TRCSEQRSTEVR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTCTLR2), REG_TRCCNTCTLR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC6), REG_TRCIMSPEC6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSEQSTR), REG_TRCSEQSTR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTCTLR3), REG_TRCCNTCTLR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIMSPEC7), REG_TRCIMSPEC7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCEVENTCTL0R), REG_TRCEVENTCTL0R); - builder.AddMemberWithValue(get_system_register_name(REG_TRCEXTINSELR0), REG_TRCEXTINSELR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTVR0), REG_TRCCNTVR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR0), REG_TRCIDR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCEVENTCTL1R), REG_TRCEVENTCTL1R); - builder.AddMemberWithValue(get_system_register_name(REG_TRCEXTINSELR1), REG_TRCEXTINSELR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTVR1), REG_TRCCNTVR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR1), REG_TRCIDR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSR), REG_TRCRSR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCEXTINSELR2), REG_TRCEXTINSELR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTVR2), REG_TRCCNTVR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR2), REG_TRCIDR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSTALLCTLR), REG_TRCSTALLCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCEXTINSELR3), REG_TRCEXTINSELR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCNTVR3), REG_TRCCNTVR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR3), REG_TRCIDR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCTSCTLR), REG_TRCTSCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR4), REG_TRCIDR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSYNCPR), REG_TRCSYNCPR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR5), REG_TRCIDR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCCCTLR), REG_TRCCCCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR6), REG_TRCIDR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCBBCTLR), REG_TRCBBCTLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCIDR7), REG_TRCIDR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR0), REG_TRCRSCTLR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR16), REG_TRCRSCTLR16); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR0), REG_TRCSSCCR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR0), REG_TRCSSPCICR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR1), REG_TRCRSCTLR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR17), REG_TRCRSCTLR17); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR1), REG_TRCSSCCR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR1), REG_TRCSSPCICR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCOSLSR), REG_TRCOSLSR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR2), REG_TRCRSCTLR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR18), REG_TRCRSCTLR18); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR2), REG_TRCSSCCR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR2), REG_TRCSSPCICR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR3), REG_TRCRSCTLR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR19), REG_TRCRSCTLR19); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR3), REG_TRCSSCCR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR3), REG_TRCSSPCICR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR4), REG_TRCRSCTLR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR20), REG_TRCRSCTLR20); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR4), REG_TRCSSCCR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR4), REG_TRCSSPCICR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR5), REG_TRCRSCTLR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR21), REG_TRCRSCTLR21); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR5), REG_TRCSSCCR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR5), REG_TRCSSPCICR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR6), REG_TRCRSCTLR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR22), REG_TRCRSCTLR22); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR6), REG_TRCSSCCR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR6), REG_TRCSSPCICR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR7), REG_TRCRSCTLR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR23), REG_TRCRSCTLR23); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCCR7), REG_TRCSSCCR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSPCICR7), REG_TRCSSPCICR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR8), REG_TRCRSCTLR8); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR24), REG_TRCRSCTLR24); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR0), REG_TRCSSCSR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR9), REG_TRCRSCTLR9); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR25), REG_TRCRSCTLR25); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR1), REG_TRCSSCSR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR10), REG_TRCRSCTLR10); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR26), REG_TRCRSCTLR26); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR2), REG_TRCSSCSR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR11), REG_TRCRSCTLR11); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR27), REG_TRCRSCTLR27); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR3), REG_TRCSSCSR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR12), REG_TRCRSCTLR12); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR28), REG_TRCRSCTLR28); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR4), REG_TRCSSCSR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR13), REG_TRCRSCTLR13); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR29), REG_TRCRSCTLR29); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR5), REG_TRCSSCSR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR14), REG_TRCRSCTLR14); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR30), REG_TRCRSCTLR30); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR6), REG_TRCSSCSR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR15), REG_TRCRSCTLR15); - builder.AddMemberWithValue(get_system_register_name(REG_TRCRSCTLR31), REG_TRCRSCTLR31); - builder.AddMemberWithValue(get_system_register_name(REG_TRCSSCSR7), REG_TRCSSCSR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR0), REG_TRCACVR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR8), REG_TRCACVR8); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR0), REG_TRCACATR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR8), REG_TRCACATR8); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR1), REG_TRCACVR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR9), REG_TRCACVR9); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR1), REG_TRCACATR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR9), REG_TRCACATR9); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR2), REG_TRCACVR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR10), REG_TRCACVR10); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR2), REG_TRCACATR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR10), REG_TRCACATR10); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR3), REG_TRCACVR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR11), REG_TRCACVR11); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR3), REG_TRCACATR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR11), REG_TRCACATR11); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR4), REG_TRCACVR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR12), REG_TRCACVR12); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR4), REG_TRCACATR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR12), REG_TRCACATR12); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR5), REG_TRCACVR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR13), REG_TRCACVR13); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR5), REG_TRCACATR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR13), REG_TRCACATR13); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR6), REG_TRCACVR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR14), REG_TRCACVR14); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR6), REG_TRCACATR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR14), REG_TRCACATR14); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR7), REG_TRCACVR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACVR15), REG_TRCACVR15); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR7), REG_TRCACATR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCACATR15), REG_TRCACATR15); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR0), REG_TRCCIDCVR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR0), REG_TRCVMIDCVR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCCTLR0), REG_TRCCIDCCTLR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCCTLR1), REG_TRCCIDCCTLR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR1), REG_TRCCIDCVR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR1), REG_TRCVMIDCVR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCCTLR0), REG_TRCVMIDCCTLR0); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCCTLR1), REG_TRCVMIDCCTLR1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR2), REG_TRCCIDCVR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR2), REG_TRCVMIDCVR2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR3), REG_TRCCIDCVR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR3), REG_TRCVMIDCVR3); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR4), REG_TRCCIDCVR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR4), REG_TRCVMIDCVR4); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR5), REG_TRCCIDCVR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR5), REG_TRCVMIDCVR5); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR6), REG_TRCCIDCVR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR6), REG_TRCVMIDCVR6); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCIDCVR7), REG_TRCCIDCVR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCVMIDCVR7), REG_TRCVMIDCVR7); - builder.AddMemberWithValue(get_system_register_name(REG_TRCDEVID), REG_TRCDEVID); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCLAIMSET), REG_TRCCLAIMSET); - builder.AddMemberWithValue(get_system_register_name(REG_TRCCLAIMCLR), REG_TRCCLAIMCLR); - builder.AddMemberWithValue(get_system_register_name(REG_TRCAUTHSTATUS), REG_TRCAUTHSTATUS); - builder.AddMemberWithValue(get_system_register_name(REG_TRCDEVARCH), REG_TRCDEVARCH); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF0_EL1), REG_BRBINF0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC0_EL1), REG_BRBSRC0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT0_EL1), REG_BRBTGT0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF16_EL1), REG_BRBINF16_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC16_EL1), REG_BRBSRC16_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT16_EL1), REG_BRBTGT16_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF1_EL1), REG_BRBINF1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC1_EL1), REG_BRBSRC1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT1_EL1), REG_BRBTGT1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF17_EL1), REG_BRBINF17_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC17_EL1), REG_BRBSRC17_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT17_EL1), REG_BRBTGT17_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF2_EL1), REG_BRBINF2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC2_EL1), REG_BRBSRC2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT2_EL1), REG_BRBTGT2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF18_EL1), REG_BRBINF18_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC18_EL1), REG_BRBSRC18_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT18_EL1), REG_BRBTGT18_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF3_EL1), REG_BRBINF3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC3_EL1), REG_BRBSRC3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT3_EL1), REG_BRBTGT3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF19_EL1), REG_BRBINF19_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC19_EL1), REG_BRBSRC19_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT19_EL1), REG_BRBTGT19_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF4_EL1), REG_BRBINF4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC4_EL1), REG_BRBSRC4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT4_EL1), REG_BRBTGT4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF20_EL1), REG_BRBINF20_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC20_EL1), REG_BRBSRC20_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT20_EL1), REG_BRBTGT20_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF5_EL1), REG_BRBINF5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC5_EL1), REG_BRBSRC5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT5_EL1), REG_BRBTGT5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF21_EL1), REG_BRBINF21_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC21_EL1), REG_BRBSRC21_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT21_EL1), REG_BRBTGT21_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF6_EL1), REG_BRBINF6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC6_EL1), REG_BRBSRC6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT6_EL1), REG_BRBTGT6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF22_EL1), REG_BRBINF22_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC22_EL1), REG_BRBSRC22_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT22_EL1), REG_BRBTGT22_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF7_EL1), REG_BRBINF7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC7_EL1), REG_BRBSRC7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT7_EL1), REG_BRBTGT7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF23_EL1), REG_BRBINF23_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC23_EL1), REG_BRBSRC23_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT23_EL1), REG_BRBTGT23_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF8_EL1), REG_BRBINF8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC8_EL1), REG_BRBSRC8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT8_EL1), REG_BRBTGT8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF24_EL1), REG_BRBINF24_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC24_EL1), REG_BRBSRC24_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT24_EL1), REG_BRBTGT24_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF9_EL1), REG_BRBINF9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC9_EL1), REG_BRBSRC9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT9_EL1), REG_BRBTGT9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF25_EL1), REG_BRBINF25_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC25_EL1), REG_BRBSRC25_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT25_EL1), REG_BRBTGT25_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF10_EL1), REG_BRBINF10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC10_EL1), REG_BRBSRC10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT10_EL1), REG_BRBTGT10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF26_EL1), REG_BRBINF26_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC26_EL1), REG_BRBSRC26_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT26_EL1), REG_BRBTGT26_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF11_EL1), REG_BRBINF11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC11_EL1), REG_BRBSRC11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT11_EL1), REG_BRBTGT11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF27_EL1), REG_BRBINF27_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC27_EL1), REG_BRBSRC27_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT27_EL1), REG_BRBTGT27_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF12_EL1), REG_BRBINF12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC12_EL1), REG_BRBSRC12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT12_EL1), REG_BRBTGT12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF28_EL1), REG_BRBINF28_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC28_EL1), REG_BRBSRC28_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT28_EL1), REG_BRBTGT28_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF13_EL1), REG_BRBINF13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC13_EL1), REG_BRBSRC13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT13_EL1), REG_BRBTGT13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF29_EL1), REG_BRBINF29_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC29_EL1), REG_BRBSRC29_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT29_EL1), REG_BRBTGT29_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF14_EL1), REG_BRBINF14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC14_EL1), REG_BRBSRC14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT14_EL1), REG_BRBTGT14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF30_EL1), REG_BRBINF30_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC30_EL1), REG_BRBSRC30_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT30_EL1), REG_BRBTGT30_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF15_EL1), REG_BRBINF15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC15_EL1), REG_BRBSRC15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT15_EL1), REG_BRBTGT15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINF31_EL1), REG_BRBINF31_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRC31_EL1), REG_BRBSRC31_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGT31_EL1), REG_BRBTGT31_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBCR_EL1), REG_BRBCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBFCR_EL1), REG_BRBFCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTS_EL1), REG_BRBTS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBINFINJ_EL1), REG_BRBINFINJ_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBSRCINJ_EL1), REG_BRBSRCINJ_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBTGTINJ_EL1), REG_BRBTGTINJ_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BRBIDR0_EL1), REG_BRBIDR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TEECR32_EL1), REG_TEECR32_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TEEHBR32_EL1), REG_TEEHBR32_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MDCCSR_EL0), REG_MDCCSR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_DBGDTR_EL0), REG_DBGDTR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_DBGDTRRX_EL0), REG_DBGDTRRX_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMCR_EL0), REG_SPMCR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMCNTENSET_EL0), REG_SPMCNTENSET_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMCNTENCLR_EL0), REG_SPMCNTENCLR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMOVSCLR_EL0), REG_SPMOVSCLR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMZR_EL0), REG_SPMZR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMSELR_EL0), REG_SPMSELR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMOVSSET_EL0), REG_SPMOVSSET_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR0_EL0), REG_SPMEVCNTR0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR1_EL0), REG_SPMEVCNTR1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR2_EL0), REG_SPMEVCNTR2_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR3_EL0), REG_SPMEVCNTR3_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR4_EL0), REG_SPMEVCNTR4_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR5_EL0), REG_SPMEVCNTR5_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR6_EL0), REG_SPMEVCNTR6_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR7_EL0), REG_SPMEVCNTR7_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR8_EL0), REG_SPMEVCNTR8_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR9_EL0), REG_SPMEVCNTR9_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR10_EL0), REG_SPMEVCNTR10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR11_EL0), REG_SPMEVCNTR11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR12_EL0), REG_SPMEVCNTR12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR13_EL0), REG_SPMEVCNTR13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR14_EL0), REG_SPMEVCNTR14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVCNTR15_EL0), REG_SPMEVCNTR15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER0_EL0), REG_SPMEVTYPER0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER1_EL0), REG_SPMEVTYPER1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER2_EL0), REG_SPMEVTYPER2_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER3_EL0), REG_SPMEVTYPER3_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER4_EL0), REG_SPMEVTYPER4_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER5_EL0), REG_SPMEVTYPER5_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER6_EL0), REG_SPMEVTYPER6_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER7_EL0), REG_SPMEVTYPER7_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER8_EL0), REG_SPMEVTYPER8_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER9_EL0), REG_SPMEVTYPER9_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER10_EL0), REG_SPMEVTYPER10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER11_EL0), REG_SPMEVTYPER11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER12_EL0), REG_SPMEVTYPER12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER13_EL0), REG_SPMEVTYPER13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER14_EL0), REG_SPMEVTYPER14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVTYPER15_EL0), REG_SPMEVTYPER15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR0_EL0), REG_SPMEVFILTR0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR1_EL0), REG_SPMEVFILTR1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR2_EL0), REG_SPMEVFILTR2_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR3_EL0), REG_SPMEVFILTR3_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR4_EL0), REG_SPMEVFILTR4_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR5_EL0), REG_SPMEVFILTR5_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR6_EL0), REG_SPMEVFILTR6_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR7_EL0), REG_SPMEVFILTR7_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR8_EL0), REG_SPMEVFILTR8_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR9_EL0), REG_SPMEVFILTR9_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR10_EL0), REG_SPMEVFILTR10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR11_EL0), REG_SPMEVFILTR11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR12_EL0), REG_SPMEVFILTR12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR13_EL0), REG_SPMEVFILTR13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR14_EL0), REG_SPMEVFILTR14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILTR15_EL0), REG_SPMEVFILTR15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R0_EL0), REG_SPMEVFILT2R0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R1_EL0), REG_SPMEVFILT2R1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R2_EL0), REG_SPMEVFILT2R2_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R3_EL0), REG_SPMEVFILT2R3_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R4_EL0), REG_SPMEVFILT2R4_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R5_EL0), REG_SPMEVFILT2R5_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R6_EL0), REG_SPMEVFILT2R6_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R7_EL0), REG_SPMEVFILT2R7_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R8_EL0), REG_SPMEVFILT2R8_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R9_EL0), REG_SPMEVFILT2R9_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R10_EL0), REG_SPMEVFILT2R10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R11_EL0), REG_SPMEVFILT2R11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R12_EL0), REG_SPMEVFILT2R12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R13_EL0), REG_SPMEVFILT2R13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R14_EL0), REG_SPMEVFILT2R14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPMEVFILT2R15_EL0), REG_SPMEVFILT2R15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_DBGVCR32_EL2), REG_DBGVCR32_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_BRBCR_EL2), REG_BRBCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPMACCESSR_EL2), REG_SPMACCESSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_BRBCR_EL12), REG_BRBCR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPMACCESSR_EL12), REG_SPMACCESSR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPMACCESSR_EL3), REG_SPMACCESSR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SPMROOTCR_EL3), REG_SPMROOTCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SPMSCR_EL1), REG_SPMSCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MIDR_EL1), REG_MIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPIDR_EL1), REG_MPIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_REVIDR_EL1), REG_REVIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_PFR0_EL1), REG_ID_PFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_PFR1_EL1), REG_ID_PFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_DFR0_EL1), REG_ID_DFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AFR0_EL1), REG_ID_AFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_MMFR0_EL1), REG_ID_MMFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_MMFR1_EL1), REG_ID_MMFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_MMFR2_EL1), REG_ID_MMFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_MMFR3_EL1), REG_ID_MMFR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_ISAR0_EL1), REG_ID_ISAR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_ISAR1_EL1), REG_ID_ISAR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_ISAR2_EL1), REG_ID_ISAR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_ISAR3_EL1), REG_ID_ISAR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_ISAR4_EL1), REG_ID_ISAR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_ISAR5_EL1), REG_ID_ISAR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_MMFR4_EL1), REG_ID_MMFR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_ISAR6_EL1), REG_ID_ISAR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MVFR0_EL1), REG_MVFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MVFR1_EL1), REG_MVFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MVFR2_EL1), REG_MVFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA32RES3_EL1), REG_ID_AA32RES3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_PFR2_EL1), REG_ID_PFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_DFR1_EL1), REG_ID_DFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_MMFR5_EL1), REG_ID_MMFR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA32RES7_EL1), REG_ID_AA32RES7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64PFR0_EL1), REG_ID_AA64PFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64PFR1_EL1), REG_ID_AA64PFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64PFR2_EL1), REG_ID_AA64PFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64PFR3_EL1), REG_ID_AA64PFR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ZFR0_EL1), REG_ID_AA64ZFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64SMFR0_EL1), REG_ID_AA64SMFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ZFR2_EL1), REG_ID_AA64ZFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64FPFR0_EL1), REG_ID_AA64FPFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64DFR0_EL1), REG_ID_AA64DFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64DFR1_EL1), REG_ID_AA64DFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64DFR2_EL1), REG_ID_AA64DFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64DFR3_EL1), REG_ID_AA64DFR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64AFR0_EL1), REG_ID_AA64AFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64AFR1_EL1), REG_ID_AA64AFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64AFR2_EL1), REG_ID_AA64AFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64AFR3_EL1), REG_ID_AA64AFR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR0_EL1), REG_ID_AA64ISAR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR1_EL1), REG_ID_AA64ISAR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR2_EL1), REG_ID_AA64ISAR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR3_EL1), REG_ID_AA64ISAR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR4_EL1), REG_ID_AA64ISAR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR5_EL1), REG_ID_AA64ISAR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR6_EL1), REG_ID_AA64ISAR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64ISAR7_EL1), REG_ID_AA64ISAR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR0_EL1), REG_ID_AA64MMFR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR1_EL1), REG_ID_AA64MMFR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR2_EL1), REG_ID_AA64MMFR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR3_EL1), REG_ID_AA64MMFR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR4_EL1), REG_ID_AA64MMFR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR5_EL1), REG_ID_AA64MMFR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR6_EL1), REG_ID_AA64MMFR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ID_AA64MMFR7_EL1), REG_ID_AA64MMFR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR_EL1), REG_SCTLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLR_EL1), REG_ACTLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CPACR_EL1), REG_CPACR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2_EL1), REG_SCTLR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_RGSR_EL1), REG_RGSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_GCR_EL1), REG_GCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ZCR_EL1), REG_ZCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRFCR_EL1), REG_TRFCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRCITECR_EL1), REG_TRCITECR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SMPRI_EL1), REG_SMPRI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SMCR_EL1), REG_SMCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLRMASK_EL1), REG_SCTLRMASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLRMASK_EL1), REG_ACTLRMASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CPACRMASK_EL1), REG_CPACRMASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2MASK_EL1), REG_SCTLR2MASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CPACRALIAS_EL1), REG_CPACRALIAS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLRALIAS_EL1), REG_ACTLRALIAS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLRALIAS_EL1), REG_SCTLRALIAS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2ALIAS_EL1), REG_SCTLR2ALIAS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TTBR0_EL1), REG_TTBR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TTBR1_EL1), REG_TTBR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TCR_EL1), REG_TCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TCR2_EL1), REG_TCR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APIAKEYLO_EL1), REG_APIAKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APIAKEYHI_EL1), REG_APIAKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APIBKEYLO_EL1), REG_APIBKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APIBKEYHI_EL1), REG_APIBKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APDAKEYLO_EL1), REG_APDAKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APDAKEYHI_EL1), REG_APDAKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APDBKEYLO_EL1), REG_APDBKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APDBKEYHI_EL1), REG_APDBKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APGAKEYLO_EL1), REG_APGAKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APGAKEYHI_EL1), REG_APGAKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_GCSCR_EL1), REG_GCSCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPR_EL1), REG_GCSPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_GCSCRE0_EL1), REG_GCSCRE0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TCRMASK_EL1), REG_TCRMASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TCR2MASK_EL1), REG_TCR2MASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TCRALIAS_EL1), REG_TCRALIAS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TCR2ALIAS_EL1), REG_TCR2ALIAS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_EL1), REG_SPSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ELR_EL1), REG_ELR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SP_EL0), REG_SP_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPSEL), REG_SPSEL); - builder.AddMemberWithValue(get_system_register_name(REG_CURRENTEL), REG_CURRENTEL); - builder.AddMemberWithValue(get_system_register_name(REG_PAN), REG_PAN); - builder.AddMemberWithValue(get_system_register_name(REG_UAO), REG_UAO); - builder.AddMemberWithValue(get_system_register_name(REG_ALLINT), REG_ALLINT); - builder.AddMemberWithValue(get_system_register_name(REG_PM), REG_PM); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PMR_EL1), REG_ICC_PMR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR0_EL1), REG_AFSR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR1_EL1), REG_AFSR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ESR_EL1), REG_ESR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERRIDR_EL1), REG_ERRIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERRSELR_EL1), REG_ERRSELR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXGSR_EL1), REG_ERXGSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXFR_EL1), REG_ERXFR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXCTLR_EL1), REG_ERXCTLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXSTATUS_EL1), REG_ERXSTATUS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXADDR_EL1), REG_ERXADDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXPFGF_EL1), REG_ERXPFGF_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXPFGCTL_EL1), REG_ERXPFGCTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXPFGCDN_EL1), REG_ERXPFGCDN_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXMISC0_EL1), REG_ERXMISC0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXMISC1_EL1), REG_ERXMISC1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXMISC2_EL1), REG_ERXMISC2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ERXMISC3_EL1), REG_ERXMISC3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TFSR_EL1), REG_TFSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TFSRE0_EL1), REG_TFSRE0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_FAR_EL1), REG_FAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PFAR_EL1), REG_PFAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PAR_EL1), REG_PAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSCR_EL1), REG_PMSCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSNEVFR_EL1), REG_PMSNEVFR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSICR_EL1), REG_PMSICR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSIRR_EL1), REG_PMSIRR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSFCR_EL1), REG_PMSFCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSEVFR_EL1), REG_PMSEVFR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSLATFR_EL1), REG_PMSLATFR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSIDR_EL1), REG_PMSIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMBLIMITR_EL1), REG_PMBLIMITR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMBPTR_EL1), REG_PMBPTR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMBSR_EL1), REG_PMBSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSDSFR_EL1), REG_PMSDSFR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMBMAR_EL1), REG_PMBMAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMBIDR_EL1), REG_PMBIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBLIMITR_EL1), REG_TRBLIMITR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBPTR_EL1), REG_TRBPTR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBBASER_EL1), REG_TRBBASER_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBSR_EL1), REG_TRBSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBMAR_EL1), REG_TRBMAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBMPAM_EL1), REG_TRBMPAM_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBTRG_EL1), REG_TRBTRG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRBIDR_EL1), REG_TRBIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMSSCR_EL1), REG_PMSSCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMINTENSET_EL1), REG_PMINTENSET_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMINTENCLR_EL1), REG_PMINTENCLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMUACR_EL1), REG_PMUACR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMECR_EL1), REG_PMECR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMMIR_EL1), REG_PMMIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMIAR_EL1), REG_PMIAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR_EL1), REG_MAIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR2_EL1), REG_MAIR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PIRE0_EL1), REG_PIRE0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PIR_EL1), REG_PIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_POR_EL1), REG_POR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_S2POR_EL1), REG_S2POR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR_EL1), REG_AMAIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR2_EL1), REG_AMAIR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LORSA_EL1), REG_LORSA_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LOREA_EL1), REG_LOREA_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LORN_EL1), REG_LORN_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LORC_EL1), REG_LORC_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMIDR_EL1), REG_MPAMIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBWIDR_EL1), REG_MPAMBWIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TLBIDIDR_EL1), REG_TLBIDIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LORID_EL1), REG_LORID_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAM1_EL1), REG_MPAM1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAM0_EL1), REG_MPAM0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMCTL_EL1), REG_MPAMCTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMSM_EL1), REG_MPAMSM_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBW1_EL1), REG_MPAMBW1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBW0_EL1), REG_MPAMBW0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBWSM_EL1), REG_MPAMBWSM_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_LWR_EL1), REG_CTRR_C_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_UPR_EL1), REG_CTRR_C_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_LWR_EL1), REG_CTRR_D_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_UPR_EL1), REG_CTRR_D_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_LWR_EL12), REG_CTRR_C_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_UPR_EL12), REG_CTRR_C_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_LWR_EL12), REG_CTRR_D_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_UPR_EL12), REG_CTRR_D_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_LWR_EL2), REG_CTRR_C_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_UPR_EL2), REG_CTRR_C_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_LWR_EL2), REG_CTRR_D_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_UPR_EL2), REG_CTRR_D_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_CTL_EL1), REG_CTRR_C_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_CTL_EL1), REG_CTRR_D_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_CTL_EL12), REG_CTRR_C_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_CTL_EL12), REG_CTRR_D_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_C_CTL_EL2), REG_CTRR_C_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_D_CTL_EL2), REG_CTRR_D_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_LWR_EL1), REG_CTXR_A_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_UPR_EL1), REG_CTXR_A_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_LWR_EL1), REG_CTXR_B_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_UPR_EL1), REG_CTXR_B_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_LWR_EL1), REG_CTXR_C_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_UPR_EL1), REG_CTXR_C_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_LWR_EL1), REG_CTXR_D_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_UPR_EL1), REG_CTXR_D_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_LWR_EL12), REG_CTXR_A_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_UPR_EL12), REG_CTXR_A_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_LWR_EL12), REG_CTXR_B_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_UPR_EL12), REG_CTXR_B_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_LWR_EL12), REG_CTXR_C_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_UPR_EL12), REG_CTXR_C_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_LWR_EL12), REG_CTXR_D_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_UPR_EL12), REG_CTXR_D_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_LWR_EL2), REG_CTXR_A_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_UPR_EL2), REG_CTXR_A_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_LWR_EL2), REG_CTXR_B_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_UPR_EL2), REG_CTXR_B_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_LWR_EL2), REG_CTXR_C_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_UPR_EL2), REG_CTXR_C_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_LWR_EL2), REG_CTXR_D_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_UPR_EL2), REG_CTXR_D_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_CTL_EL1), REG_CTXR_A_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_CTL_EL1), REG_CTXR_B_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_CTL_EL1), REG_CTXR_C_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_CTL_EL1), REG_CTXR_D_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_CTL_EL12), REG_CTXR_A_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_CTL_EL12), REG_CTXR_B_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_CTL_EL12), REG_CTXR_C_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_CTL_EL12), REG_CTXR_D_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_A_CTL_EL2), REG_CTXR_A_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_B_CTL_EL2), REG_CTXR_B_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_C_CTL_EL2), REG_CTXR_C_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTXR_D_CTL_EL2), REG_CTXR_D_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_C_LWR_EL2), REG_ACC_CTRR_C_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_C_UPR_EL2), REG_ACC_CTRR_C_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_D_LWR_EL2), REG_ACC_CTRR_D_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_D_UPR_EL2), REG_ACC_CTRR_D_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_A_LWR_EL2), REG_ACC_CTXR_A_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_A_UPR_EL2), REG_ACC_CTXR_A_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_B_LWR_EL2), REG_ACC_CTXR_B_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_B_UPR_EL2), REG_ACC_CTXR_B_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_C_LWR_EL2), REG_ACC_CTXR_C_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_C_UPR_EL2), REG_ACC_CTXR_C_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_D_LWR_EL2), REG_ACC_CTXR_D_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_D_UPR_EL2), REG_ACC_CTXR_D_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_C_CTL_EL2), REG_ACC_CTRR_C_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_D_CTL_EL2), REG_ACC_CTRR_D_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_A_CTL_EL2), REG_ACC_CTXR_A_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_B_CTL_EL2), REG_ACC_CTXR_B_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_C_CTL_EL2), REG_ACC_CTXR_C_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTXR_D_CTL_EL2), REG_ACC_CTXR_D_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VBAR_EL1), REG_VBAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_RVBAR_EL1), REG_RVBAR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_RMR_EL1), REG_RMR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ISR_EL1), REG_ISR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DISR_EL1), REG_DISR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_IAR0_EL1), REG_ICC_IAR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_EOIR0_EL1), REG_ICC_EOIR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_HPPIR0_EL1), REG_ICC_HPPIR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_BPR0_EL1), REG_ICC_BPR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP0R0_EL1), REG_ICC_AP0R0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP0R1_EL1), REG_ICC_AP0R1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP0R2_EL1), REG_ICC_AP0R2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP0R3_EL1), REG_ICC_AP0R3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP1R0_EL1), REG_ICC_AP1R0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP1R1_EL1), REG_ICC_AP1R1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP1R2_EL1), REG_ICC_AP1R2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_AP1R3_EL1), REG_ICC_AP1R3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_NMIAR1_EL1), REG_ICC_NMIAR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_HMR0_EL1), REG_ICC_PPI_HMR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_HMR1_EL1), REG_ICC_PPI_HMR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_IDR0_EL1), REG_ICC_IDR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_HPPIR_EL1), REG_ICC_HPPIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_ICSR_EL1), REG_ICC_ICSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_IAFFIDR_EL1), REG_ICC_IAFFIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_ENABLER0_EL1), REG_ICC_PPI_ENABLER0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_ENABLER1_EL1), REG_ICC_PPI_ENABLER1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_DIR_EL1), REG_ICC_DIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_RPR_EL1), REG_ICC_RPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_SGI1R_EL1), REG_ICC_SGI1R_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_ASGI1R_EL1), REG_ICC_ASGI1R_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_SGI0R_EL1), REG_ICC_SGI0R_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_IAR1_EL1), REG_ICC_IAR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_EOIR1_EL1), REG_ICC_EOIR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_HPPIR1_EL1), REG_ICC_HPPIR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_BPR1_EL1), REG_ICC_BPR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_CTLR_EL1), REG_ICC_CTLR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_SRE_EL1), REG_ICC_SRE_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_IGRPEN0_EL1), REG_ICC_IGRPEN0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_IGRPEN1_EL1), REG_ICC_IGRPEN1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_CACTIVER0_EL1), REG_ICC_PPI_CACTIVER0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_CACTIVER1_EL1), REG_ICC_PPI_CACTIVER1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_SACTIVER0_EL1), REG_ICC_PPI_SACTIVER0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_SACTIVER1_EL1), REG_ICC_PPI_SACTIVER1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_CPENDR0_EL1), REG_ICC_PPI_CPENDR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_CPENDR1_EL1), REG_ICC_PPI_CPENDR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_SPENDR0_EL1), REG_ICC_PPI_SPENDR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_SPENDR1_EL1), REG_ICC_PPI_SPENDR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR0_EL1), REG_ICC_PPI_PRIORITYR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR1_EL1), REG_ICC_PPI_PRIORITYR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR2_EL1), REG_ICC_PPI_PRIORITYR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR3_EL1), REG_ICC_PPI_PRIORITYR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR4_EL1), REG_ICC_PPI_PRIORITYR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR5_EL1), REG_ICC_PPI_PRIORITYR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR6_EL1), REG_ICC_PPI_PRIORITYR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR7_EL1), REG_ICC_PPI_PRIORITYR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR8_EL1), REG_ICC_PPI_PRIORITYR8_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR9_EL1), REG_ICC_PPI_PRIORITYR9_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR10_EL1), REG_ICC_PPI_PRIORITYR10_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR11_EL1), REG_ICC_PPI_PRIORITYR11_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR12_EL1), REG_ICC_PPI_PRIORITYR12_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR13_EL1), REG_ICC_PPI_PRIORITYR13_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR14_EL1), REG_ICC_PPI_PRIORITYR14_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_PRIORITYR15_EL1), REG_ICC_PPI_PRIORITYR15_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CONTEXTIDR_EL1), REG_CONTEXTIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_RCWSMASK_EL1), REG_RCWSMASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDR_EL1), REG_TPIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ACCDATA_EL1), REG_ACCDATA_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_RCWMASK_EL1), REG_RCWMASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCXTNUM_EL1), REG_SCXTNUM_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CNTKCTL_EL1), REG_CNTKCTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_HID0), REG_HID0); - builder.AddMemberWithValue(get_system_register_name(REG_HID25), REG_HID25); - builder.AddMemberWithValue(get_system_register_name(REG_HID26), REG_HID26); - builder.AddMemberWithValue(get_system_register_name(REG_HID27), REG_HID27); - builder.AddMemberWithValue(get_system_register_name(REG_HID28), REG_HID28); - builder.AddMemberWithValue(get_system_register_name(REG_HID29), REG_HID29); - builder.AddMemberWithValue(get_system_register_name(REG_HID34), REG_HID34); - builder.AddMemberWithValue(get_system_register_name(REG_HID1), REG_HID1); - builder.AddMemberWithValue(get_system_register_name(REG_HID21), REG_HID21); - builder.AddMemberWithValue(get_system_register_name(REG_BIUVCSCUPCMDCRD), REG_BIUVCSCUPCMDCRD); - builder.AddMemberWithValue(get_system_register_name(REG_BIUVCSCUPDATCRD), REG_BIUVCSCUPDATCRD); - builder.AddMemberWithValue(get_system_register_name(REG_HID2), REG_HID2); - builder.AddMemberWithValue(get_system_register_name(REG_HID30), REG_HID30); - builder.AddMemberWithValue(get_system_register_name(REG_HID31), REG_HID31); - builder.AddMemberWithValue(get_system_register_name(REG_HID32), REG_HID32); - builder.AddMemberWithValue(get_system_register_name(REG_HID33), REG_HID33); - builder.AddMemberWithValue(get_system_register_name(REG_HID3), REG_HID3); - builder.AddMemberWithValue(get_system_register_name(REG_BIUVCSCUPCMDCRDC2), REG_BIUVCSCUPCMDCRDC2); - builder.AddMemberWithValue(get_system_register_name(REG_BIUVCSCUPDATCRDC2), REG_BIUVCSCUPDATCRDC2); - builder.AddMemberWithValue(get_system_register_name(REG_HID4), REG_HID4); - builder.AddMemberWithValue(get_system_register_name(REG_HID5), REG_HID5); - builder.AddMemberWithValue(get_system_register_name(REG_HID6), REG_HID6); - builder.AddMemberWithValue(get_system_register_name(REG_HID7), REG_HID7); - builder.AddMemberWithValue(get_system_register_name(REG_HID8), REG_HID8); - builder.AddMemberWithValue(get_system_register_name(REG_HID9), REG_HID9); - builder.AddMemberWithValue(get_system_register_name(REG_HID10), REG_HID10); - builder.AddMemberWithValue(get_system_register_name(REG_BLOCK_CMAINT_CFG), REG_BLOCK_CMAINT_CFG); - builder.AddMemberWithValue(get_system_register_name(REG_HID11), REG_HID11); - builder.AddMemberWithValue(get_system_register_name(REG_HID18), REG_HID18); - builder.AddMemberWithValue(get_system_register_name(REG_HID36), REG_HID36); - builder.AddMemberWithValue(get_system_register_name(REG_HID37), REG_HID37); - builder.AddMemberWithValue(get_system_register_name(REG_HID12), REG_HID12); - builder.AddMemberWithValue(get_system_register_name(REG_HID15), REG_HID15); - builder.AddMemberWithValue(get_system_register_name(REG_HID19), REG_HID19); - builder.AddMemberWithValue(get_system_register_name(REG_BIU_TLIMIT), REG_BIU_TLIMIT); - builder.AddMemberWithValue(get_system_register_name(REG_HID13), REG_HID13); - builder.AddMemberWithValue(get_system_register_name(REG_HID_RCTX_G0CTL), REG_HID_RCTX_G0CTL); - builder.AddMemberWithValue(get_system_register_name(REG_HID_RCTX_G1CTL), REG_HID_RCTX_G1CTL); - builder.AddMemberWithValue(get_system_register_name(REG_HID14), REG_HID14); - builder.AddMemberWithValue(get_system_register_name(REG_HID16), REG_HID16); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_WRR2), REG_LLC_WRR2); - builder.AddMemberWithValue(get_system_register_name(REG_BIU_AFI_CFG), REG_BIU_AFI_CFG); - builder.AddMemberWithValue(get_system_register_name(REG_HID17), REG_HID17); - builder.AddMemberWithValue(get_system_register_name(REG_HID24), REG_HID24); - builder.AddMemberWithValue(get_system_register_name(REG_HID35), REG_HID35); - builder.AddMemberWithValue(get_system_register_name(REG_CCSIDR_EL1), REG_CCSIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CLIDR_EL1), REG_CLIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CCSIDR2_EL1), REG_CCSIDR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_GMID_EL1), REG_GMID_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SMIDR_EL1), REG_SMIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AIDR_EL1), REG_AIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_APR_EL1), REG_ICC_APR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_CR0_EL1), REG_ICC_CR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PCR_EL1), REG_ICC_PCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_HAPR_EL1), REG_ICC_HAPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR0_EL1), REG_PMCR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APPL_CONTEXTPTR), REG_APPL_CONTEXTPTR); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_CTL_EL1), REG_LD_LATPROF_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTL01_EL1), REG_AON_CPU_MSTALL_CTL01_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PM_MEMFLT_CTL23_EL1), REG_PM_MEMFLT_CTL23_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_CTL_EL0), REG_AGTCNTV_CTL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTVCTSS_NOREDIR_EL0), REG_AGTCNTVCTSS_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR1_EL1), REG_PMCR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_CTR_EL1), REG_LD_LATPROF_CTR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTL23_EL1), REG_AON_CPU_MSTALL_CTL23_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PM_MEMFLT_CTL45_EL1), REG_PM_MEMFLT_CTL45_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTRDIR_EL1), REG_AGTCNTRDIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTKCTL_NOREDIR_EL1), REG_AGTCNTKCTL_NOREDIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR2_EL1), REG_PMCR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_STS_EL1), REG_LD_LATPROF_STS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTL45_EL1), REG_AON_CPU_MSTALL_CTL45_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTHP_CVAL_EL2), REG_AGTCNTHP_CVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTVCT_NOREDIR_EL0), REG_CNTVCT_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_CVAL_NOREDIR_EL0), REG_AGTCNTP_CVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR3_EL1), REG_PMCR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_INF_EL1), REG_LD_LATPROF_INF_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTL67_EL1), REG_AON_CPU_MSTALL_CTL67_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTHP_TVAL_EL2), REG_AGTCNTHP_TVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPCTSS_NOREDIR_EL0), REG_CNTPCTSS_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_TVAL_NOREDIR_EL0), REG_AGTCNTP_TVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR4_EL1), REG_PMCR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_CTL_EL2), REG_LD_LATPROF_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MEMFLT_CTL01_EL1), REG_AON_CPU_MEMFLT_CTL01_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTHP_CTL_EL2), REG_AGTCNTHP_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTVCTSS_NOREDIR_EL0), REG_CNTVCTSS_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_CTL_NOREDIR_EL0), REG_AGTCNTP_CTL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMESR0_EL1), REG_PMESR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_CMD_EL1), REG_LD_LATPROF_CMD_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MEMFLT_CTL23_EL1), REG_AON_CPU_MEMFLT_CTL23_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTHV_CVAL_EL2), REG_AGTCNTHV_CVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_CVAL_NOREDIR_EL0), REG_AGTCNTV_CVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMESR1_EL1), REG_PMESR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR1_EL2), REG_PMCR1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MEMFLT_CTL45_EL1), REG_AON_CPU_MEMFLT_CTL45_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTHV_TVAL_EL2), REG_AGTCNTHV_TVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTKCTL_NOREDIR_EL1), REG_CNTKCTL_NOREDIR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_TVAL_NOREDIR_EL0), REG_AGTCNTV_TVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_OPMAT0_EL1), REG_OPMAT0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR1_EL12), REG_PMCR1_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MEMFLT_CTL67_EL1), REG_AON_CPU_MEMFLT_CTL67_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTHV_CTL_EL2), REG_AGTCNTHV_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_CVAL_NOREDIR_EL0), REG_CNTP_CVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_CTL_NOREDIR_EL0), REG_AGTCNTV_CTL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_OPMAT1_EL1), REG_OPMAT1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR1_GL12), REG_PMCR1_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR0_EL1), REG_AON_CPU_MSTALL_CTR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTFRQ_EL0), REG_AGTCNTFRQ_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_TVAL_NOREDIR_EL0), REG_CNTP_TVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPCT_NOREDIR_EL0), REG_CNTPCT_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_OPMSK0_EL1), REG_OPMSK0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_CTL_EL12), REG_LD_LATPROF_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR1_EL1), REG_AON_CPU_MSTALL_CTR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTVOFF_EL2), REG_AGTCNTVOFF_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_CTL_NOREDIR_EL0), REG_CNTP_CTL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_CTL_NOREDIR_EL0), REG_CNTV_CTL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_OPMSK1_EL1), REG_OPMSK1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LD_LATPROF_INF_EL2), REG_LD_LATPROF_INF_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR2_EL1), REG_AON_CPU_MSTALL_CTR2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_CVAL_EL0), REG_AGTCNTP_CVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_CVAL_NOREDIR_EL0), REG_CNTV_CVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTPCT_NOREDIR_EL0), REG_AGTCNTPCT_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR3_EL1), REG_AON_CPU_MSTALL_CTR3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_TVAL_EL0), REG_AGTCNTP_TVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_TVAL_NOREDIR_EL0), REG_CNTV_TVAL_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_VMSA_HV_LOCK_EL2), REG_VMSA_HV_LOCK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PMSWCTRL_EL1), REG_PMSWCTRL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR5_EL0), REG_PMCR5_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR4_EL1), REG_AON_CPU_MSTALL_CTR4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCOMPARE0_EL1), REG_PMCOMPARE0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCOMPARE1_EL1), REG_PMCOMPARE1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_VMSA_NV_LOCK_EL2), REG_VMSA_NV_LOCK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PMSR_EL1), REG_PMSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR5_EL1), REG_AON_CPU_MSTALL_CTR5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_CTL_EL0), REG_AGTCNTP_CTL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCOMPARE5_EL1), REG_PMCOMPARE5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCOMPARE6_EL1), REG_PMCOMPARE6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCOMPARE7_EL1), REG_PMCOMPARE7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR_BVRNG4_EL1), REG_PMCR_BVRNG4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PM_PMI_PC), REG_PM_PMI_PC); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR6_EL1), REG_AON_CPU_MSTALL_CTR6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_CVAL_EL0), REG_AGTCNTV_CVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTVCT_NOREDIR_EL0), REG_AGTCNTVCT_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR_BVRNG5_EL1), REG_PMCR_BVRNG5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CPU_MSTALL_CTR7_EL1), REG_AON_CPU_MSTALL_CTR7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_TVAL_EL0), REG_AGTCNTV_TVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTPCTSS_NOREDIR_EL0), REG_AGTCNTPCTSS_NOREDIR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CSSELR_EL1), REG_CSSELR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMC0), REG_PMC0); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER0), REG_UPMCFILTER0); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER1), REG_UPMCFILTER1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER2), REG_UPMCFILTER2); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER3), REG_UPMCFILTER3); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER4), REG_UPMCFILTER4); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER5), REG_UPMCFILTER5); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER6), REG_UPMCFILTER6); - builder.AddMemberWithValue(get_system_register_name(REG_PMC1), REG_PMC1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCFILTER7), REG_UPMCFILTER7); - builder.AddMemberWithValue(get_system_register_name(REG_PMC2), REG_PMC2); - builder.AddMemberWithValue(get_system_register_name(REG_PMC3), REG_PMC3); - builder.AddMemberWithValue(get_system_register_name(REG_PMC4), REG_PMC4); - builder.AddMemberWithValue(get_system_register_name(REG_PMC5), REG_PMC5); - builder.AddMemberWithValue(get_system_register_name(REG_PMC6), REG_PMC6); - builder.AddMemberWithValue(get_system_register_name(REG_PMC7), REG_PMC7); - builder.AddMemberWithValue(get_system_register_name(REG_PMC8), REG_PMC8); - builder.AddMemberWithValue(get_system_register_name(REG_PMC9), REG_PMC9); - builder.AddMemberWithValue(get_system_register_name(REG_PMTRHLD6_EL1), REG_PMTRHLD6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMTRHLD4_EL1), REG_PMTRHLD4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMTRHLD2_EL1), REG_PMTRHLD2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PMMMAP_EL1), REG_PMMMAP_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTR_EL0), REG_CTR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_DCZID_EL0), REG_DCZID_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_RNDR), REG_RNDR); - builder.AddMemberWithValue(get_system_register_name(REG_RNDRRS), REG_RNDRRS); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPR_EL0), REG_GCSPR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_NZCV), REG_NZCV); - builder.AddMemberWithValue(get_system_register_name(REG_DAIF), REG_DAIF); - builder.AddMemberWithValue(get_system_register_name(REG_SVCR), REG_SVCR); - builder.AddMemberWithValue(get_system_register_name(REG_DIT), REG_DIT); - builder.AddMemberWithValue(get_system_register_name(REG_SSBS), REG_SSBS); - builder.AddMemberWithValue(get_system_register_name(REG_TCO), REG_TCO); - builder.AddMemberWithValue(get_system_register_name(REG_FPCR), REG_FPCR); - builder.AddMemberWithValue(get_system_register_name(REG_FPSR), REG_FPSR); - builder.AddMemberWithValue(get_system_register_name(REG_FPMR), REG_FPMR); - builder.AddMemberWithValue(get_system_register_name(REG_DSPSR_EL0), REG_DSPSR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_DLR_EL0), REG_DLR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMICNTR_EL0), REG_PMICNTR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMICFILTR_EL0), REG_PMICFILTR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR_EL0), REG_PMCR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCNTENSET_EL0), REG_PMCNTENSET_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCNTENCLR_EL0), REG_PMCNTENCLR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMOVSCLR_EL0), REG_PMOVSCLR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMSWINC_EL0), REG_PMSWINC_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMSELR_EL0), REG_PMSELR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCEID0_EL0), REG_PMCEID0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCEID1_EL0), REG_PMCEID1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCCNTR_EL0), REG_PMCCNTR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMXEVTYPER_EL0), REG_PMXEVTYPER_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMXEVCNTR_EL0), REG_PMXEVCNTR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMZR_EL0), REG_PMZR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMUSERENR_EL0), REG_PMUSERENR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMOVSSET_EL0), REG_PMOVSSET_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_POR_EL0), REG_POR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDR_EL0), REG_TPIDR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDRRO_EL0), REG_TPIDRRO_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDR2_EL0), REG_TPIDR2_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SCXTNUM_EL0), REG_SCXTNUM_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCR_EL0), REG_AMCR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCFGR_EL0), REG_AMCFGR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCGCR_EL0), REG_AMCGCR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMUSERENR_EL0), REG_AMUSERENR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCNTENCLR0_EL0), REG_AMCNTENCLR0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCNTENSET0_EL0), REG_AMCNTENSET0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCG1IDR_EL0), REG_AMCG1IDR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCNTENCLR1_EL0), REG_AMCNTENCLR1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMCNTENSET1_EL0), REG_AMCNTENSET1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR00_EL0), REG_AMEVCNTR00_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR01_EL0), REG_AMEVCNTR01_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR02_EL0), REG_AMEVCNTR02_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR03_EL0), REG_AMEVCNTR03_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER00_EL0), REG_AMEVTYPER00_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER01_EL0), REG_AMEVTYPER01_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER02_EL0), REG_AMEVTYPER02_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER03_EL0), REG_AMEVTYPER03_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR10_EL0), REG_AMEVCNTR10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR11_EL0), REG_AMEVCNTR11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR12_EL0), REG_AMEVCNTR12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR13_EL0), REG_AMEVCNTR13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR14_EL0), REG_AMEVCNTR14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR15_EL0), REG_AMEVCNTR15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR16_EL0), REG_AMEVCNTR16_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR17_EL0), REG_AMEVCNTR17_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR18_EL0), REG_AMEVCNTR18_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR19_EL0), REG_AMEVCNTR19_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR110_EL0), REG_AMEVCNTR110_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR111_EL0), REG_AMEVCNTR111_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR112_EL0), REG_AMEVCNTR112_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR113_EL0), REG_AMEVCNTR113_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR114_EL0), REG_AMEVCNTR114_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTR115_EL0), REG_AMEVCNTR115_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER10_EL0), REG_AMEVTYPER10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER11_EL0), REG_AMEVTYPER11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER12_EL0), REG_AMEVTYPER12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER13_EL0), REG_AMEVTYPER13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER14_EL0), REG_AMEVTYPER14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER15_EL0), REG_AMEVTYPER15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER16_EL0), REG_AMEVTYPER16_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER17_EL0), REG_AMEVTYPER17_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER18_EL0), REG_AMEVTYPER18_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER19_EL0), REG_AMEVTYPER19_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER110_EL0), REG_AMEVTYPER110_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER111_EL0), REG_AMEVTYPER111_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER112_EL0), REG_AMEVTYPER112_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER113_EL0), REG_AMEVTYPER113_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER114_EL0), REG_AMEVTYPER114_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVTYPER115_EL0), REG_AMEVTYPER115_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTFRQ_EL0), REG_CNTFRQ_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPCT_EL0), REG_CNTPCT_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTVCT_EL0), REG_CNTVCT_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPCTSS_EL0), REG_CNTPCTSS_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTVCTSS_EL0), REG_CNTVCTSS_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_TVAL_EL0), REG_CNTP_TVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_CTL_EL0), REG_CNTP_CTL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_CVAL_EL0), REG_CNTP_CVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_TVAL_EL0), REG_CNTV_TVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_CTL_EL0), REG_CNTV_CTL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_CVAL_EL0), REG_CNTV_CVAL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR0_EL0), REG_PMEVCNTR0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR1_EL0), REG_PMEVCNTR1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR2_EL0), REG_PMEVCNTR2_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR3_EL0), REG_PMEVCNTR3_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR4_EL0), REG_PMEVCNTR4_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR5_EL0), REG_PMEVCNTR5_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR6_EL0), REG_PMEVCNTR6_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR7_EL0), REG_PMEVCNTR7_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR8_EL0), REG_PMEVCNTR8_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR9_EL0), REG_PMEVCNTR9_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR10_EL0), REG_PMEVCNTR10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR11_EL0), REG_PMEVCNTR11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR12_EL0), REG_PMEVCNTR12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR13_EL0), REG_PMEVCNTR13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR14_EL0), REG_PMEVCNTR14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR15_EL0), REG_PMEVCNTR15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR16_EL0), REG_PMEVCNTR16_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR17_EL0), REG_PMEVCNTR17_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR18_EL0), REG_PMEVCNTR18_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR19_EL0), REG_PMEVCNTR19_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR20_EL0), REG_PMEVCNTR20_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR21_EL0), REG_PMEVCNTR21_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR22_EL0), REG_PMEVCNTR22_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR23_EL0), REG_PMEVCNTR23_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR24_EL0), REG_PMEVCNTR24_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR25_EL0), REG_PMEVCNTR25_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR26_EL0), REG_PMEVCNTR26_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR27_EL0), REG_PMEVCNTR27_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR28_EL0), REG_PMEVCNTR28_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR29_EL0), REG_PMEVCNTR29_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVCNTR30_EL0), REG_PMEVCNTR30_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER0_EL0), REG_PMEVTYPER0_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER1_EL0), REG_PMEVTYPER1_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER2_EL0), REG_PMEVTYPER2_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER3_EL0), REG_PMEVTYPER3_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER4_EL0), REG_PMEVTYPER4_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER5_EL0), REG_PMEVTYPER5_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER6_EL0), REG_PMEVTYPER6_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER7_EL0), REG_PMEVTYPER7_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER8_EL0), REG_PMEVTYPER8_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER9_EL0), REG_PMEVTYPER9_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER10_EL0), REG_PMEVTYPER10_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER11_EL0), REG_PMEVTYPER11_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER12_EL0), REG_PMEVTYPER12_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER13_EL0), REG_PMEVTYPER13_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER14_EL0), REG_PMEVTYPER14_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER15_EL0), REG_PMEVTYPER15_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER16_EL0), REG_PMEVTYPER16_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER17_EL0), REG_PMEVTYPER17_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER18_EL0), REG_PMEVTYPER18_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER19_EL0), REG_PMEVTYPER19_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER20_EL0), REG_PMEVTYPER20_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER21_EL0), REG_PMEVTYPER21_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER22_EL0), REG_PMEVTYPER22_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER23_EL0), REG_PMEVTYPER23_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER24_EL0), REG_PMEVTYPER24_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER25_EL0), REG_PMEVTYPER25_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER26_EL0), REG_PMEVTYPER26_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER27_EL0), REG_PMEVTYPER27_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER28_EL0), REG_PMEVTYPER28_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER29_EL0), REG_PMEVTYPER29_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMEVTYPER30_EL0), REG_PMEVTYPER30_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCCFILTR_EL0), REG_PMCCFILTR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_LSU_ERR_STS), REG_LSU_ERR_STS); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATCTL1_EL1), REG_AFLATCTL1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN0_EL1), REG_AFLATVALBIN0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATINFLO_EL1), REG_AFLATINFLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LSU_ERR_CTL), REG_LSU_ERR_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATCTL2_EL1), REG_AFLATCTL2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN1_EL1), REG_AFLATVALBIN1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATINFHI_EL1), REG_AFLATINFHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATCTL3_EL1), REG_AFLATCTL3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN2_EL1), REG_AFLATVALBIN2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATCTL4_EL1), REG_AFLATCTL4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN3_EL1), REG_AFLATVALBIN3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_FILL_CTL), REG_LLC_FILL_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATCTL5_LO_EL1), REG_AFLATCTL5_LO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN4_EL1), REG_AFLATVALBIN4_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATCTL5_HI_EL1), REG_AFLATCTL5_HI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_FILL_DAT), REG_LLC_FILL_DAT); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN5_EL1), REG_AFLATVALBIN5_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN6_EL1), REG_AFLATVALBIN6_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_RAM_CONFIG), REG_LLC_RAM_CONFIG); - builder.AddMemberWithValue(get_system_register_name(REG_AFLATVALBIN7_EL1), REG_AFLATVALBIN7_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_ERR_STS), REG_LLC_ERR_STS); - builder.AddMemberWithValue(get_system_register_name(REG_CMAINT_BCAST_LIST_0), REG_CMAINT_BCAST_LIST_0); - builder.AddMemberWithValue(get_system_register_name(REG_CMAINT_BCAST_LIST_1), REG_CMAINT_BCAST_LIST_1); - builder.AddMemberWithValue(get_system_register_name(REG_CMAINT_BCAST_CTL), REG_CMAINT_BCAST_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_ERR_ADR), REG_LLC_ERR_ADR); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_ERR_CTL), REG_LLC_ERR_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_ERR_INJ), REG_LLC_ERR_INJ); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_ERR_INF), REG_LLC_ERR_INF); - builder.AddMemberWithValue(get_system_register_name(REG_USERTAGSEL_EL1), REG_USERTAGSEL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UUSERTAG_EL0), REG_UUSERTAG_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_KUSERTAG_EL1), REG_KUSERTAG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_HUSERTAG_EL2), REG_HUSERTAG_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_TRACE_CTL0), REG_LLC_TRACE_CTL0); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_TRACE_CTL1), REG_LLC_TRACE_CTL1); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC), REG_LLC_UP_REQ_VC); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC_THRESH), REG_LLC_UP_REQ_VC_THRESH); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC_2), REG_LLC_UP_REQ_VC_2); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC_THRESH_2), REG_LLC_UP_REQ_VC_THRESH_2); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DRAM_HASH0), REG_LLC_DRAM_HASH0); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DRAM_HASH1), REG_LLC_DRAM_HASH1); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DRAM_HASH2), REG_LLC_DRAM_HASH2); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DRAM_HASH3), REG_LLC_DRAM_HASH3); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_TRACE_CTL2), REG_LLC_TRACE_CTL2); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DRAM_HASH4), REG_LLC_DRAM_HASH4); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC_3), REG_LLC_UP_REQ_VC_3); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC_THRESH_3), REG_LLC_UP_REQ_VC_THRESH_3); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC_4), REG_LLC_UP_REQ_VC_4); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_UP_REQ_VC_THRESH_4), REG_LLC_UP_REQ_VC_THRESH_4); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_HASH0), REG_LLC_HASH0); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_HASH1), REG_LLC_HASH1); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_HASH2), REG_LLC_HASH2); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_HASH3), REG_LLC_HASH3); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_WRR), REG_LLC_WRR); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DRAM_HASH5), REG_LLC_DRAM_HASH5); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DRAM_HASH6), REG_LLC_DRAM_HASH6); - builder.AddMemberWithValue(get_system_register_name(REG_VPIDR_EL2), REG_VPIDR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VMPIDR_EL2), REG_VMPIDR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR_EL2), REG_SCTLR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLR_EL2), REG_ACTLR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2_EL2), REG_SCTLR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HCR_EL2), REG_HCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MDCR_EL2), REG_MDCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CPTR_EL2), REG_CPTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HSTR_EL2), REG_HSTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HFGRTR_EL2), REG_HFGRTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HFGWTR_EL2), REG_HFGWTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HFGITR_EL2), REG_HFGITR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HACR_EL2), REG_HACR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ZCR_EL2), REG_ZCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TRFCR_EL2), REG_TRFCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HCRX_EL2), REG_HCRX_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TRCITECR_EL2), REG_TRCITECR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SMPRIMAP_EL2), REG_SMPRIMAP_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SMCR_EL2), REG_SMCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SDER32_EL2), REG_SDER32_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLRMASK_EL2), REG_SCTLRMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLRMASK_EL2), REG_ACTLRMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CPTRMASK_EL2), REG_CPTRMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2MASK_EL2), REG_SCTLR2MASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_NVHCR_EL2), REG_NVHCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_NVHCRX_EL2), REG_NVHCRX_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_NVHCRMASK_EL2), REG_NVHCRMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_NVHCRXMASK_EL2), REG_NVHCRXMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HCRMASK_EL2), REG_HCRMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HCRXMASK_EL2), REG_HCRXMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TTBR0_EL2), REG_TTBR0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TTBR1_EL2), REG_TTBR1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TCR_EL2), REG_TCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TCR2_EL2), REG_TCR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTTBR_EL2), REG_VTTBR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTCR_EL2), REG_VTCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VNCR_EL2), REG_VNCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HDBSSBR_EL2), REG_HDBSSBR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HDBSSPROD_EL2), REG_HDBSSPROD_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HACDBSBR_EL2), REG_HACDBSBR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HACDBSCONS_EL2), REG_HACDBSCONS_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_GCSCR_EL2), REG_GCSCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPR_EL2), REG_GCSPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VSTTBR_EL2), REG_VSTTBR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VSTCR_EL2), REG_VSTCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TCRMASK_EL2), REG_TCRMASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TCR2MASK_EL2), REG_TCR2MASK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBID0_EL2), REG_VTLBID0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBID1_EL2), REG_VTLBID1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBID2_EL2), REG_VTLBID2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBID3_EL2), REG_VTLBID3_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBIDOS0_EL2), REG_VTLBIDOS0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBIDOS1_EL2), REG_VTLBIDOS1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBIDOS2_EL2), REG_VTLBIDOS2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VTLBIDOS3_EL2), REG_VTLBIDOS3_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_DACR32_EL2), REG_DACR32_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HDFGRTR2_EL2), REG_HDFGRTR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HDFGWTR2_EL2), REG_HDFGWTR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HFGRTR2_EL2), REG_HFGRTR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HFGWTR2_EL2), REG_HFGWTR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HDFGRTR_EL2), REG_HDFGRTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HDFGWTR_EL2), REG_HDFGWTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HAFGRTR_EL2), REG_HAFGRTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HFGITR2_EL2), REG_HFGITR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_EL2), REG_SPSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ELR_EL2), REG_ELR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SP_EL1), REG_SP_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_IRQ), REG_SPSR_IRQ); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_ABT), REG_SPSR_ABT); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_UND), REG_SPSR_UND); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_FIQ), REG_SPSR_FIQ); - builder.AddMemberWithValue(get_system_register_name(REG_IFSR32_EL2), REG_IFSR32_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR0_EL2), REG_AFSR0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR1_EL2), REG_AFSR1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ESR_EL2), REG_ESR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VSESR_EL2), REG_VSESR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_FPEXC32_EL2), REG_FPEXC32_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TFSR_EL2), REG_TFSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_FAR_EL2), REG_FAR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HPFAR_EL2), REG_HPFAR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PFAR_EL2), REG_PFAR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PMSCR_EL2), REG_PMSCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PMBSR_EL2), REG_PMBSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TRBSR_EL2), REG_TRBSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR2_EL2), REG_MAIR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR_EL2), REG_MAIR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PIRE0_EL2), REG_PIRE0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PIR_EL2), REG_PIR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_POR_EL2), REG_POR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_S2PIR_EL2), REG_S2PIR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR_EL2), REG_AMAIR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR2_EL2), REG_AMAIR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMHCR_EL2), REG_MPAMHCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPMV_EL2), REG_MPAMVPMV_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAM2_EL2), REG_MPAM2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMCTL_EL2), REG_MPAMCTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBW2_EL2), REG_MPAMBW2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBWCAP_EL2), REG_MPAMBWCAP_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM0_EL2), REG_MPAMVPM0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM1_EL2), REG_MPAMVPM1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM2_EL2), REG_MPAMVPM2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM3_EL2), REG_MPAMVPM3_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM4_EL2), REG_MPAMVPM4_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM5_EL2), REG_MPAMVPM5_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM6_EL2), REG_MPAMVPM6_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVPM7_EL2), REG_MPAMVPM7_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVIDCR_EL2), REG_MPAMVIDCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMVIDSR_EL2), REG_MPAMVIDSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MECID_P0_EL2), REG_MECID_P0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MECID_A0_EL2), REG_MECID_A0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MECID_P1_EL2), REG_MECID_P1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MECID_A1_EL2), REG_MECID_A1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MECIDR_EL2), REG_MECIDR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VMECID_P_EL2), REG_VMECID_P_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VMECID_A_EL2), REG_VMECID_A_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VBAR_EL2), REG_VBAR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_RVBAR_EL2), REG_RVBAR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_RMR_EL2), REG_RMR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VDISR_EL2), REG_VDISR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP0R0_EL2), REG_ICH_AP0R0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP0R1_EL2), REG_ICH_AP0R1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP0R2_EL2), REG_ICH_AP0R2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP0R3_EL2), REG_ICH_AP0R3_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_APR_EL2), REG_ICH_APR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_HPPIR_EL2), REG_ICH_HPPIR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP1R0_EL2), REG_ICH_AP1R0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP1R1_EL2), REG_ICH_AP1R1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP1R2_EL2), REG_ICH_AP1R2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_AP1R3_EL2), REG_ICH_AP1R3_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_HFGRTR_EL2), REG_ICH_HFGRTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_SRE_EL2), REG_ICC_SRE_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_HFGWTR_EL2), REG_ICH_HFGWTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_HFGITR_EL2), REG_ICH_HFGITR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_DVIR0_EL2), REG_ICH_PPI_DVIR0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_DVIR1_EL2), REG_ICH_PPI_DVIR1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_ENABLER0_EL2), REG_ICH_PPI_ENABLER0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_ENABLER1_EL2), REG_ICH_PPI_ENABLER1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PENDR0_EL2), REG_ICH_PPI_PENDR0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PENDR1_EL2), REG_ICH_PPI_PENDR1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_ACTIVER0_EL2), REG_ICH_PPI_ACTIVER0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_ACTIVER1_EL2), REG_ICH_PPI_ACTIVER1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_HCR_EL2), REG_ICH_HCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_VTR_EL2), REG_ICH_VTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_MISR_EL2), REG_ICH_MISR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_EISR_EL2), REG_ICH_EISR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_VCTLR_EL2), REG_ICH_VCTLR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_ELRSR_EL2), REG_ICH_ELRSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_CONTEXTR_EL2), REG_ICH_CONTEXTR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_VMCR_EL2), REG_ICH_VMCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR0_EL2), REG_ICH_LR0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR1_EL2), REG_ICH_LR1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR2_EL2), REG_ICH_LR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR3_EL2), REG_ICH_LR3_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR4_EL2), REG_ICH_LR4_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR5_EL2), REG_ICH_LR5_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR6_EL2), REG_ICH_LR6_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR7_EL2), REG_ICH_LR7_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR8_EL2), REG_ICH_LR8_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR9_EL2), REG_ICH_LR9_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR10_EL2), REG_ICH_LR10_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR11_EL2), REG_ICH_LR11_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR12_EL2), REG_ICH_LR12_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR13_EL2), REG_ICH_LR13_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR14_EL2), REG_ICH_LR14_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_LR15_EL2), REG_ICH_LR15_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR0_EL2), REG_ICH_PPI_PRIORITYR0_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR1_EL2), REG_ICH_PPI_PRIORITYR1_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR2_EL2), REG_ICH_PPI_PRIORITYR2_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR3_EL2), REG_ICH_PPI_PRIORITYR3_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR4_EL2), REG_ICH_PPI_PRIORITYR4_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR5_EL2), REG_ICH_PPI_PRIORITYR5_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR6_EL2), REG_ICH_PPI_PRIORITYR6_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR7_EL2), REG_ICH_PPI_PRIORITYR7_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR8_EL2), REG_ICH_PPI_PRIORITYR8_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR9_EL2), REG_ICH_PPI_PRIORITYR9_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR10_EL2), REG_ICH_PPI_PRIORITYR10_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR11_EL2), REG_ICH_PPI_PRIORITYR11_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR12_EL2), REG_ICH_PPI_PRIORITYR12_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR13_EL2), REG_ICH_PPI_PRIORITYR13_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR14_EL2), REG_ICH_PPI_PRIORITYR14_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ICH_PPI_PRIORITYR15_EL2), REG_ICH_PPI_PRIORITYR15_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CONTEXTIDR_EL2), REG_CONTEXTIDR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDR_EL2), REG_TPIDR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SCXTNUM_EL2), REG_SCXTNUM_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF00_EL2), REG_AMEVCNTVOFF00_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF01_EL2), REG_AMEVCNTVOFF01_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF02_EL2), REG_AMEVCNTVOFF02_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF03_EL2), REG_AMEVCNTVOFF03_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF04_EL2), REG_AMEVCNTVOFF04_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF05_EL2), REG_AMEVCNTVOFF05_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF06_EL2), REG_AMEVCNTVOFF06_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF07_EL2), REG_AMEVCNTVOFF07_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF08_EL2), REG_AMEVCNTVOFF08_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF09_EL2), REG_AMEVCNTVOFF09_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF010_EL2), REG_AMEVCNTVOFF010_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF011_EL2), REG_AMEVCNTVOFF011_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF012_EL2), REG_AMEVCNTVOFF012_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF013_EL2), REG_AMEVCNTVOFF013_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF014_EL2), REG_AMEVCNTVOFF014_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF015_EL2), REG_AMEVCNTVOFF015_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF10_EL2), REG_AMEVCNTVOFF10_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF11_EL2), REG_AMEVCNTVOFF11_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF12_EL2), REG_AMEVCNTVOFF12_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF13_EL2), REG_AMEVCNTVOFF13_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF14_EL2), REG_AMEVCNTVOFF14_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF15_EL2), REG_AMEVCNTVOFF15_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF16_EL2), REG_AMEVCNTVOFF16_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF17_EL2), REG_AMEVCNTVOFF17_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF18_EL2), REG_AMEVCNTVOFF18_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF19_EL2), REG_AMEVCNTVOFF19_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF110_EL2), REG_AMEVCNTVOFF110_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF111_EL2), REG_AMEVCNTVOFF111_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF112_EL2), REG_AMEVCNTVOFF112_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF113_EL2), REG_AMEVCNTVOFF113_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF114_EL2), REG_AMEVCNTVOFF114_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AMEVCNTVOFF115_EL2), REG_AMEVCNTVOFF115_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTVOFF_EL2), REG_CNTVOFF_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPOFF_EL2), REG_CNTPOFF_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHCTL_EL2), REG_CNTHCTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHP_TVAL_EL2), REG_CNTHP_TVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHP_CTL_EL2), REG_CNTHP_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHP_CVAL_EL2), REG_CNTHP_CVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHV_TVAL_EL2), REG_CNTHV_TVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHV_CTL_EL2), REG_CNTHV_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHV_CVAL_EL2), REG_CNTHV_CVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHVS_TVAL_EL2), REG_CNTHVS_TVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHVS_CTL_EL2), REG_CNTHVS_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHVS_CVAL_EL2), REG_CNTHVS_CVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHPS_TVAL_EL2), REG_CNTHPS_TVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHPS_CTL_EL2), REG_CNTHPS_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CNTHPS_CVAL_EL2), REG_CNTHPS_CVAL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_FED_ERR_STS), REG_FED_ERR_STS); - builder.AddMemberWithValue(get_system_register_name(REG_FED_ERR_CTL), REG_FED_ERR_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_APCTL_EL1), REG_APCTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_KERNKEYLO_EL1), REG_KERNKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_KERNKEYHI_EL1), REG_KERNKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_VMSA_LOCK_EL1), REG_VMSA_LOCK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AMX_STATE_T_EL1), REG_AMX_STATE_T_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AMX_CONFIG_EL1), REG_AMX_CONFIG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_VMSA_LOCK_EL2), REG_VMSA_LOCK_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_UPR_EL1), REG_CTRR_B_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_LWR_EL1), REG_CTRR_B_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SP_SETUP_GL1), REG_SP_SETUP_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_SP_SETUP_GL2), REG_SP_SETUP_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_CTL_EL1), REG_CTRR_B_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_LWR_EL1), REG_CTRR_A_LWR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_UPR_EL1), REG_CTRR_A_UPR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_CTL_EL1), REG_CTRR_A_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_VMSA_LOCK_EL12), REG_VMSA_LOCK_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_CTL_EL02), REG_AGTCNTV_CTL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_AMX_STATE_EL1), REG_AMX_STATE_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AMX_STATUS_EL1), REG_AMX_STATUS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_CVAL_EL02), REG_AGTCNTP_CVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_REDIR_ACNTP_TVAL_EL02), REG_REDIR_ACNTP_TVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTP_CTL_EL02), REG_AGTCNTP_CTL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_CVAL_EL02), REG_AGTCNTV_CVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTV_TVAL_EL02), REG_AGTCNTV_TVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_AMX_CONFIG_EL12), REG_AMX_CONFIG_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AMX_CONFIG_EL2), REG_AMX_CONFIG_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_EL0), REG_SPRR_HUPERM_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_EL0), REG_SPRR_VUPERM_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_CTL_EL2), REG_CTRR_A_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_CTL_EL2), REG_CTRR_B_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_LWR_EL2), REG_CTRR_A_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_UPR_EL2), REG_CTRR_A_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_LWR_EL2), REG_CTRR_B_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_UPR_EL2), REG_CTRR_B_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUMPRR_EL2), REG_SPRR_HUMPRR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_SH01_EL2), REG_SPRR_HUPERM_SH01_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_SH02_EL2), REG_SPRR_HUPERM_SH02_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_SH03_EL2), REG_SPRR_HUPERM_SH03_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_SH04_EL2), REG_SPRR_HUPERM_SH04_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_SH05_EL2), REG_SPRR_HUPERM_SH05_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_SH06_EL2), REG_SPRR_HUPERM_SH06_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_HUPERM_SH07_EL2), REG_SPRR_HUPERM_SH07_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUMPRR_EL1), REG_SPRR_VUMPRR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_SH01_EL1), REG_SPRR_VUPERM_SH01_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_SH02_EL1), REG_SPRR_VUPERM_SH02_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_SH03_EL1), REG_SPRR_VUPERM_SH03_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_SH04_EL1), REG_SPRR_VUPERM_SH04_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_SH05_EL1), REG_SPRR_VUPERM_SH05_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_SH06_EL1), REG_SPRR_VUPERM_SH06_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_VUPERM_SH07_EL1), REG_SPRR_VUPERM_SH07_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_LWR_EL12), REG_CTRR_A_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_UPR_EL12), REG_CTRR_A_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_LWR_EL12), REG_CTRR_B_LWR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_UPR_EL12), REG_CTRR_B_UPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_A_CTL_EL12), REG_CTRR_A_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CTRR_B_CTL_EL12), REG_CTRR_B_CTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTKCTL_EL1), REG_AGTCNTKCTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTKCTL_EL12), REG_AGTCNTKCTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_PREDAKEYLO_EL1), REG_PREDAKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PREDAKEYHI_EL1), REG_PREDAKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PREDBKEYLO_EL1), REG_PREDBKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PREDBKEYHI_EL1), REG_PREDBKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SIQ_CFG_EL1), REG_SIQ_CFG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTPCTSS_EL0), REG_AGTCNTPCTSS_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTVCTSS_EL0), REG_AGTCNTVCTSS_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AVNCR_EL2), REG_AVNCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_A_LWR_EL2), REG_ACC_CTRR_A_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_A_UPR_EL2), REG_ACC_CTRR_A_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_B_LWR_EL2), REG_ACC_CTRR_B_LWR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_B_UPR_EL2), REG_ACC_CTRR_B_UPR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_A_CTL_EL2), REG_ACC_CTRR_A_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_CTRR_B_CTL_EL2), REG_ACC_CTRR_B_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTPCT_EL0), REG_AGTCNTPCT_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTVCT_EL0), REG_AGTCNTVCT_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_ACFG_EL1), REG_ACFG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AHCR_EL2), REG_AHCR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APL_INTSTATUS_EL1), REG_APL_INTSTATUS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_APL_INTSTATUS_EL2), REG_APL_INTSTATUS_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTHCTL_EL2), REG_AGTCNTHCTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIAKEYLO_EL2), REG_JAPIAKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIAKEYHI_EL2), REG_JAPIAKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIBKEYLO_EL2), REG_JAPIBKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIBKEYHI_EL2), REG_JAPIBKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIAKEYLO_EL1), REG_JAPIAKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIAKEYHI_EL1), REG_JAPIAKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIBKEYLO_EL1), REG_JAPIBKEYLO_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIBKEYHI_EL1), REG_JAPIBKEYHI_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIAKEYLO_EL12), REG_JAPIAKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIAKEYHI_EL12), REG_JAPIAKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIBKEYLO_EL12), REG_JAPIBKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_JAPIBKEYHI_EL12), REG_JAPIBKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTRDIR_EL2), REG_AGTCNTRDIR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AGTCNTRDIR_EL12), REG_AGTCNTRDIR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_JRANGE_EL2), REG_JRANGE_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_JRANGE_EL1), REG_JRANGE_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_JRANGE_EL12), REG_JRANGE_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_JCTL_EL2), REG_JCTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_JCTL_EL1), REG_JCTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_JCTL_EL12), REG_JCTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_JCTL_EL0), REG_JCTL_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_AMDSCR_EL1), REG_AMDSCR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR_EL12), REG_SCTLR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLR_EL12), REG_ACTLR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CPACR_EL12), REG_CPACR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2_EL12), REG_SCTLR2_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_ZCR_EL12), REG_ZCR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TRFCR_EL12), REG_TRFCR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TRCITECR_EL12), REG_TRCITECR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SMCR_EL12), REG_SMCR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLRMASK_EL12), REG_SCTLRMASK_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLRMASK_EL12), REG_ACTLRMASK_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CPACRMASK_EL12), REG_CPACRMASK_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2MASK_EL12), REG_SCTLR2MASK_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TTBR0_EL12), REG_TTBR0_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TTBR1_EL12), REG_TTBR1_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TCR_EL12), REG_TCR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TCR2_EL12), REG_TCR2_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_GCSCR_EL12), REG_GCSCR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPR_EL12), REG_GCSPR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TCRMASK_EL12), REG_TCRMASK_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TCR2MASK_EL12), REG_TCR2MASK_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_EL12), REG_SPSR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_ELR_EL12), REG_ELR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR0_EL12), REG_AFSR0_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR1_EL12), REG_AFSR1_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_ESR_EL12), REG_ESR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TFSR_EL12), REG_TFSR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_FAR_EL12), REG_FAR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_PFAR_EL12), REG_PFAR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_PMSCR_EL12), REG_PMSCR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_PMBSR_EL12), REG_PMBSR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_TRBSR_EL12), REG_TRBSR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR_EL12), REG_MAIR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR2_EL12), REG_MAIR2_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_PIRE0_EL12), REG_PIRE0_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_PIR_EL12), REG_PIR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_POR_EL12), REG_POR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR_EL12), REG_AMAIR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR2_EL12), REG_AMAIR2_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_MPAM1_EL12), REG_MPAM1_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMCTL_EL12), REG_MPAMCTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBW1_EL12), REG_MPAMBW1_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_VBAR_EL12), REG_VBAR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CONTEXTIDR_EL12), REG_CONTEXTIDR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SCXTNUM_EL12), REG_SCXTNUM_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CNTKCTL_EL12), REG_CNTKCTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_TVAL_EL02), REG_CNTP_TVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_CTL_EL02), REG_CNTP_CTL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_CNTP_CVAL_EL02), REG_CNTP_CVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_TVAL_EL02), REG_CNTV_TVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_CTL_EL02), REG_CNTV_CTL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_CNTV_CVAL_EL02), REG_CNTV_CVAL_EL02); - builder.AddMemberWithValue(get_system_register_name(REG_IPI_RR_LOCAL_EL1), REG_IPI_RR_LOCAL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_IPI_RR_GLOBAL_EL1), REG_IPI_RR_GLOBAL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AF_ERR_CFG0), REG_AF_ERR_CFG0); - builder.AddMemberWithValue(get_system_register_name(REG_AP_ERR_CFG0), REG_AP_ERR_CFG0); - builder.AddMemberWithValue(get_system_register_name(REG_AF_ERR_SRC_IDS), REG_AF_ERR_SRC_IDS); - builder.AddMemberWithValue(get_system_register_name(REG_DPC_ERR_STS), REG_DPC_ERR_STS); - builder.AddMemberWithValue(get_system_register_name(REG_DPC_ERR_CTL), REG_DPC_ERR_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_CORE_CFG_EL1), REG_PROD_TRC_CORE_CFG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_CORE_CFG), REG_TRACE_CORE_CFG); - builder.AddMemberWithValue(get_system_register_name(REG_IPI_SR), REG_IPI_SR); - builder.AddMemberWithValue(get_system_register_name(REG_APL_LRTMR_EL2), REG_APL_LRTMR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APL_INTENABLE_EL2), REG_APL_INTENABLE_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_KTRACE_MESSAGE), REG_KTRACE_MESSAGE); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_CORE_CFG_EXT), REG_TRACE_CORE_CFG_EXT); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_CORE_CFG_EL2), REG_PROD_TRC_CORE_CFG_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_HID_PROD_TRC_CORE_CFG_EL1), REG_HID_PROD_TRC_CORE_CFG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_DBG_WRAP_GLB), REG_DBG_WRAP_GLB); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_STREAM_BASE), REG_TRACE_STREAM_BASE); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_STREAM_FILL), REG_TRACE_STREAM_FILL); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_STREAM_BASE1), REG_TRACE_STREAM_BASE1); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_STREAM_FILL1), REG_TRACE_STREAM_FILL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_STREAM_IRQ), REG_TRACE_STREAM_IRQ); - builder.AddMemberWithValue(get_system_register_name(REG_WATCHDOGDIAG0), REG_WATCHDOGDIAG0); - builder.AddMemberWithValue(get_system_register_name(REG_WATCHDOGDIAG1), REG_WATCHDOGDIAG1); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_AUX_CTL), REG_TRACE_AUX_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_IPI_CR), REG_IPI_CR); - builder.AddMemberWithValue(get_system_register_name(REG_UTRIG_EVENT), REG_UTRIG_EVENT); - builder.AddMemberWithValue(get_system_register_name(REG_HID_PROD_TRC_MASK_EL1), REG_HID_PROD_TRC_MASK_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_CTL), REG_TRACE_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_TRACE_DAT), REG_TRACE_DAT); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_BASE0_GL2), REG_PROD_TRC_STRM_BASE0_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_BASE1_GL2), REG_PROD_TRC_STRM_BASE1_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CFG), REG_CPU_CFG); - builder.AddMemberWithValue(get_system_register_name(REG_PBLK_STS), REG_PBLK_STS); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_CTL_EL1), REG_PROD_TRC_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_BASE0_GL1), REG_PROD_TRC_STRM_BASE0_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_BASE1_GL1), REG_PROD_TRC_STRM_BASE1_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_FIQ_EL1), REG_PROD_TRC_STRM_FIQ_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_OVRD), REG_CPU_OVRD); - builder.AddMemberWithValue(get_system_register_name(REG_PBLK_EXE_ST), REG_PBLK_EXE_ST); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_CORE_GL_CTL_GL1), REG_PROD_TRC_CORE_GL_CTL_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_CORE_GL_CTL_GL2), REG_PROD_TRC_CORE_GL_CTL_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_OVRD), REG_ACC_OVRD); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_OVRD1), REG_ACC_OVRD1); - builder.AddMemberWithValue(get_system_register_name(REG_CPM_PWRDN_CTL), REG_CPM_PWRDN_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_BUF_RESTORE0_GL1), REG_PROD_TRC_BUF_RESTORE0_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_BUF_RESTORE1_GL1), REG_PROD_TRC_BUF_RESTORE1_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_EN_GL1), REG_PROD_TRC_EN_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_PRE_LLCFLUSH_TMR), REG_PRE_LLCFLUSH_TMR); - builder.AddMemberWithValue(get_system_register_name(REG_BIUINTFCTL_CFG), REG_BIUINTFCTL_CFG); - builder.AddMemberWithValue(get_system_register_name(REG_BIUINTFWRR_CFG), REG_BIUINTFWRR_CFG); - builder.AddMemberWithValue(get_system_register_name(REG_PRE_TD_TMR), REG_PRE_TD_TMR); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_SLP_WAKE_UP_TMR), REG_ACC_SLP_WAKE_UP_TMR); - builder.AddMemberWithValue(get_system_register_name(REG_PBLK_PSW_DLY), REG_PBLK_PSW_DLY); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_STS), REG_CPU_STS); - builder.AddMemberWithValue(get_system_register_name(REG_HIST_TRIG), REG_HIST_TRIG); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_BUF_RESTORE0_GL2), REG_PROD_TRC_BUF_RESTORE0_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_BUF_RESTORE1_GL2), REG_PROD_TRC_BUF_RESTORE1_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_FILL0_EL1), REG_PROD_TRC_STRM_FILL0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_FILL1_EL1), REG_PROD_TRC_STRM_FILL1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ARRAY_INDEX), REG_ARRAY_INDEX); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_CTL_EL2), REG_PROD_TRC_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_EN_GL2), REG_PROD_TRC_EN_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_STRM_FIQ_EL2), REG_PROD_TRC_STRM_FIQ_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_TRC_CPMU_DUMP_TRIG_EL1), REG_PROD_TRC_CPMU_DUMP_TRIG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PROD_LOSS_COUNT_EL1), REG_PROD_LOSS_COUNT_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SW_TRACE_DATA_EL0), REG_SW_TRACE_DATA_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_IL1_DATA0), REG_IL1_DATA0); - builder.AddMemberWithValue(get_system_register_name(REG_IL1_DATA1), REG_IL1_DATA1); - builder.AddMemberWithValue(get_system_register_name(REG_DL1_DATA0), REG_DL1_DATA0); - builder.AddMemberWithValue(get_system_register_name(REG_DL1_DATA1), REG_DL1_DATA1); - builder.AddMemberWithValue(get_system_register_name(REG_MMUDATA0), REG_MMUDATA0); - builder.AddMemberWithValue(get_system_register_name(REG_MMUDATA1), REG_MMUDATA1); - builder.AddMemberWithValue(get_system_register_name(REG_DL1_DATA2), REG_DL1_DATA2); - builder.AddMemberWithValue(get_system_register_name(REG_IL1_DATA2), REG_IL1_DATA2); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DATA0), REG_LLC_DATA0); - builder.AddMemberWithValue(get_system_register_name(REG_LLC_DATA1), REG_LLC_DATA1); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR_EL3), REG_SCTLR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ACTLR_EL3), REG_ACTLR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SCTLR2_EL3), REG_SCTLR2_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SCR_EL3), REG_SCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SDER32_EL3), REG_SDER32_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_CPTR_EL3), REG_CPTR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_FGWTE3_EL3), REG_FGWTE3_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ZCR_EL3), REG_ZCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SCR2_EL3), REG_SCR2_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SMCR_EL3), REG_SMCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MDCR_EL3), REG_MDCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_TTBR0_EL3), REG_TTBR0_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_TCR_EL3), REG_TCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_GPTBR_EL3), REG_GPTBR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_GPCBW_EL3), REG_GPCBW_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_GPCCR_EL3), REG_GPCCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_GCSCR_EL3), REG_GCSCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_GCSPR_EL3), REG_GCSPR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_EL3), REG_SPSR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ELR_EL3), REG_ELR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SP_EL2), REG_SP_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR0_EL3), REG_AFSR0_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR1_EL3), REG_AFSR1_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ESR_EL3), REG_ESR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_VSESR_EL3), REG_VSESR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_TFSR_EL3), REG_TFSR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_FAR_EL3), REG_FAR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MFAR_EL3), REG_MFAR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_PMBSR_EL3), REG_PMBSR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_TRBSR_EL3), REG_TRBSR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR2_EL3), REG_MAIR2_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MAIR_EL3), REG_MAIR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_PIR_EL3), REG_PIR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_POR_EL3), REG_POR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR_EL3), REG_AMAIR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_AMAIR2_EL3), REG_AMAIR2_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MPAM3_EL3), REG_MPAM3_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMCTL_EL3), REG_MPAMCTL_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MPAMBW3_EL3), REG_MPAMBW3_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MECID_RL_A_EL3), REG_MECID_RL_A_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_VBAR_EL3), REG_VBAR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_RVBAR_EL3), REG_RVBAR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_RMR_EL3), REG_RMR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_VDISR_EL3), REG_VDISR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_APR_EL3), REG_ICC_APR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PCR_EL3), REG_ICC_PCR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_DOMHPPIR_EL3), REG_ICC_DOMHPPIR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_DOMAINR0_EL3), REG_ICC_PPI_DOMAINR0_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_DOMAINR1_EL3), REG_ICC_PPI_DOMAINR1_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_DOMAINR2_EL3), REG_ICC_PPI_DOMAINR2_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_PPI_DOMAINR3_EL3), REG_ICC_PPI_DOMAINR3_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_CR0_EL3), REG_ICC_CR0_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_HPPIR_EL3), REG_ICC_HPPIR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_CTLR_EL3), REG_ICC_CTLR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_SRE_EL3), REG_ICC_SRE_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_ICC_IGRPEN1_EL3), REG_ICC_IGRPEN1_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDR_EL3), REG_TPIDR_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_SCXTNUM_EL3), REG_SCXTNUM_EL3); - builder.AddMemberWithValue(get_system_register_name(REG_MMU_ERR_STS), REG_MMU_ERR_STS); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR1_GL1), REG_AFSR1_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR1_GL2), REG_AFSR1_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_AFSR1_GL12), REG_AFSR1_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_BP_OBJC_ADR_EL1), REG_BP_OBJC_ADR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_BP_OBJC_CTL_EL1), REG_BP_OBJC_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SP_GL11), REG_SP_GL11); - builder.AddMemberWithValue(get_system_register_name(REG_MMU_SESR_EL2), REG_MMU_SESR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_CONFIG_EL1), REG_SPRR_CONFIG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_HPFAR_GL2), REG_HPFAR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_CONFIG_EL1), REG_GXF_CONFIG_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_AMRANGE_EL1), REG_SPRR_AMRANGE_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_CONFIG_EL2), REG_GXF_CONFIG_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_EL0), REG_SPRR_UPERM_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_EL1), REG_SPRR_PPERM_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_EL2), REG_SPRR_PPERM_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APGAKEYLO_EL12), REG_APGAKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APGAKEYHI_EL12), REG_APGAKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_KERNKEYLO_EL12), REG_KERNKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_KERNKEYHI_EL12), REG_KERNKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_AFPCR_EL0), REG_AFPCR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_SP_GL22), REG_SP_GL22); - builder.AddMemberWithValue(get_system_register_name(REG_AMXIDR_EL1), REG_AMXIDR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UMPRR_EL1), REG_SPRR_UMPRR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PMPRR_EL1), REG_SPRR_PMPRR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PMPRR_EL2), REG_SPRR_PMPRR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_SH01_EL1), REG_SPRR_UPERM_SH01_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_SH02_EL1), REG_SPRR_UPERM_SH02_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_SH03_EL1), REG_SPRR_UPERM_SH03_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_SH04_EL1), REG_SPRR_UPERM_SH04_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_SH05_EL1), REG_SPRR_UPERM_SH05_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_SH06_EL1), REG_SPRR_UPERM_SH06_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_UPERM_SH07_EL1), REG_SPRR_UPERM_SH07_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH01_EL1), REG_SPRR_PPERM_SH01_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH02_EL1), REG_SPRR_PPERM_SH02_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH03_EL1), REG_SPRR_PPERM_SH03_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH04_EL1), REG_SPRR_PPERM_SH04_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH05_EL1), REG_SPRR_PPERM_SH05_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH06_EL1), REG_SPRR_PPERM_SH06_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH07_EL1), REG_SPRR_PPERM_SH07_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH01_EL2), REG_SPRR_PPERM_SH01_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH02_EL2), REG_SPRR_PPERM_SH02_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH03_EL2), REG_SPRR_PPERM_SH03_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH04_EL2), REG_SPRR_PPERM_SH04_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH05_EL2), REG_SPRR_PPERM_SH05_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH06_EL2), REG_SPRR_PPERM_SH06_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH07_EL2), REG_SPRR_PPERM_SH07_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PMPRR_EL12), REG_SPRR_PMPRR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH01_EL12), REG_SPRR_PPERM_SH01_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH02_EL12), REG_SPRR_PPERM_SH02_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH03_EL12), REG_SPRR_PPERM_SH03_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH04_EL12), REG_SPRR_PPERM_SH04_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH05_EL12), REG_SPRR_PPERM_SH05_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH06_EL12), REG_SPRR_PPERM_SH06_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_SH07_EL12), REG_SPRR_PPERM_SH07_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APIAKEYLO_EL12), REG_APIAKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APIAKEYHI_EL12), REG_APIAKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APIBKEYLO_EL12), REG_APIBKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APIBKEYHI_EL12), REG_APIBKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APDAKEYLO_EL12), REG_APDAKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APDAKEYHI_EL12), REG_APDAKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APDBKEYLO_EL12), REG_APDBKEYLO_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APDBKEYHI_EL12), REG_APDBKEYHI_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CURRENTG), REG_CURRENTG); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_ENTRY_EL1), REG_GXF_ENTRY_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_PABENTRY_EL1), REG_GXF_PABENTRY_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ASPSR_EL1), REG_ASPSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_ADSPSR_EL0), REG_ADSPSR_EL0); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR1_GL2), REG_PMCR1_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_ASPSR_EL2), REG_ASPSR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_PMCR1_GL1), REG_PMCR1_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_VBAR_GL12), REG_VBAR_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_GL12), REG_SPSR_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_ASPSR_GL12), REG_ASPSR_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_ESR_GL12), REG_ESR_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_ELR_GL12), REG_ELR_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_FAR_GL12), REG_FAR_GL12); - builder.AddMemberWithValue(get_system_register_name(REG_SP_GL1), REG_SP_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDR_GL1), REG_TPIDR_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_VBAR_GL1), REG_VBAR_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_GL1), REG_SPSR_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_ASPSR_GL1), REG_ASPSR_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_ESR_GL1), REG_ESR_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_ELR_GL1), REG_ELR_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_FAR_GL1), REG_FAR_GL1); - builder.AddMemberWithValue(get_system_register_name(REG_SP_GL2), REG_SP_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_TPIDR_GL2), REG_TPIDR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_VBAR_GL2), REG_VBAR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPSR_GL2), REG_SPSR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_ASPSR_GL2), REG_ASPSR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_ESR_GL2), REG_ESR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_ELR_GL2), REG_ELR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_FAR_GL2), REG_FAR_GL2); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_ENTRY_EL2), REG_GXF_ENTRY_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_PABENTRY_EL2), REG_GXF_PABENTRY_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APCTL_EL2), REG_APCTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APSTS_EL2), REG_APSTS_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APSTS_EL1), REG_APSTS_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_KERNKEYLO_EL2), REG_KERNKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_KERNKEYHI_EL2), REG_KERNKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_ASPSR_EL12), REG_ASPSR_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APIAKEYLO_EL2), REG_APIAKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APIAKEYHI_EL2), REG_APIAKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APIBKEYLO_EL2), REG_APIBKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APIBKEYHI_EL2), REG_APIBKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APDAKEYLO_EL2), REG_APDAKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APDAKEYHI_EL2), REG_APDAKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APDBKEYLO_EL2), REG_APDBKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APDBKEYHI_EL2), REG_APDBKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APGAKEYLO_EL2), REG_APGAKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APGAKEYHI_EL2), REG_APGAKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_CONFIG_EL2), REG_SPRR_CONFIG_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_AMRANGE_EL2), REG_SPRR_AMRANGE_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VMKEYLO_EL2), REG_VMKEYLO_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_VMKEYHI_EL2), REG_VMKEYHI_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_MMU_SFAR_EL2), REG_MMU_SFAR_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_APSTS_EL12), REG_APSTS_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_APCTL_EL12), REG_APCTL_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_CONFIG_EL12), REG_GXF_CONFIG_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_ENTRY_EL12), REG_GXF_ENTRY_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_GXF_PABENTRY_EL12), REG_GXF_PABENTRY_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_CONFIG_EL12), REG_SPRR_CONFIG_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_AMRANGE_EL12), REG_SPRR_AMRANGE_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_MMU_SESR_CTL_EL2), REG_MMU_SESR_CTL_EL2); - builder.AddMemberWithValue(get_system_register_name(REG_SPRR_PPERM_EL12), REG_SPRR_PPERM_EL12); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPS_TVAL_EL1), REG_CNTPS_TVAL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPS_CTL_EL1), REG_CNTPS_CTL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_CNTPS_CVAL_EL1), REG_CNTPS_CVAL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_PWRDNSAVE0), REG_PWRDNSAVE0); - builder.AddMemberWithValue(get_system_register_name(REG_NRG_ACC_CTL), REG_NRG_ACC_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT0), REG_AON_CNT0); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT0), REG_CPU_CNT0); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCR0_EL1), REG_UPMCR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC8), REG_UPMC8); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT8), REG_AON_CNT8); - builder.AddMemberWithValue(get_system_register_name(REG_PWRDNSAVE1), REG_PWRDNSAVE1); - builder.AddMemberWithValue(get_system_register_name(REG_CORE_NRG_ACC_DAT), REG_CORE_NRG_ACC_DAT); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL0), REG_AON_CNT_CTL0); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL0), REG_CPU_CNT_CTL0); - builder.AddMemberWithValue(get_system_register_name(REG_UPMESR0_EL1), REG_UPMESR0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC9), REG_UPMC9); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL8), REG_AON_CNT_CTL8); - builder.AddMemberWithValue(get_system_register_name(REG_ACC_PWR_DN_SAVE), REG_ACC_PWR_DN_SAVE); - builder.AddMemberWithValue(get_system_register_name(REG_CPM_NRG_ACC_DAT), REG_CPM_NRG_ACC_DAT); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT1), REG_AON_CNT1); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT1), REG_CPU_CNT1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMSWCTRL_EL1), REG_UPMSWCTRL_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC10), REG_UPMC10); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT9), REG_AON_CNT9); - builder.AddMemberWithValue(get_system_register_name(REG_CORE_SRM_NRG_ACC_DAT), REG_CORE_SRM_NRG_ACC_DAT); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL1), REG_AON_CNT_CTL1); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL1), REG_CPU_CNT_CTL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMECM0_EL1), REG_UPMECM0_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC11), REG_UPMC11); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL9), REG_AON_CNT_CTL9); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL), REG_AON_CNT_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_CPM_SRM_NRG_ACC_DAT), REG_CPM_SRM_NRG_ACC_DAT); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT2), REG_AON_CNT2); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT2), REG_CPU_CNT2); - builder.AddMemberWithValue(get_system_register_name(REG_UPMECM1_EL1), REG_UPMECM1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC12), REG_UPMC12); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT10), REG_AON_CNT10); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL), REG_CPU_CNT_CTL); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL2), REG_AON_CNT_CTL2); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL2), REG_CPU_CNT_CTL2); - builder.AddMemberWithValue(get_system_register_name(REG_UPMPCM_EL1), REG_UPMPCM_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC13), REG_UPMC13); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL10), REG_AON_CNT_CTL10); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT3), REG_AON_CNT3); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT3), REG_CPU_CNT3); - builder.AddMemberWithValue(get_system_register_name(REG_UPMSR_EL1), REG_UPMSR_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC14), REG_UPMC14); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT11), REG_AON_CNT11); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL3), REG_AON_CNT_CTL3); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL3), REG_CPU_CNT_CTL3); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC0), REG_UPMC0); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC15), REG_UPMC15); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL11), REG_AON_CNT_CTL11); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT4), REG_AON_CNT4); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT4), REG_CPU_CNT4); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC1), REG_UPMC1); - builder.AddMemberWithValue(get_system_register_name(REG_UPMECM2_EL1), REG_UPMECM2_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL4), REG_AON_CNT_CTL4); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL4), REG_CPU_CNT_CTL4); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC2), REG_UPMC2); - builder.AddMemberWithValue(get_system_register_name(REG_UPMECM3_EL1), REG_UPMECM3_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT5), REG_AON_CNT5); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT5), REG_CPU_CNT5); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC3), REG_UPMC3); - builder.AddMemberWithValue(get_system_register_name(REG_UPMCR1_EL1), REG_UPMCR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL5), REG_AON_CNT_CTL5); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL5), REG_CPU_CNT_CTL5); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC4), REG_UPMC4); - builder.AddMemberWithValue(get_system_register_name(REG_UPMESR1_EL1), REG_UPMESR1_EL1); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT6), REG_AON_CNT6); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT6), REG_CPU_CNT6); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC5), REG_UPMC5); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL6), REG_AON_CNT_CTL6); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL6), REG_CPU_CNT_CTL6); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC6), REG_UPMC6); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT7), REG_AON_CNT7); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT7), REG_CPU_CNT7); - builder.AddMemberWithValue(get_system_register_name(REG_UPMC7), REG_UPMC7); - builder.AddMemberWithValue(get_system_register_name(REG_AON_CNT_CTL7), REG_AON_CNT_CTL7); - builder.AddMemberWithValue(get_system_register_name(REG_CPU_CNT_CTL7), REG_CPU_CNT_CTL7); - }); - Ref _enum = builder.Finalize(); - return _enum; -} - -Ref get_system_register_enum_type(Ref view) -{ - Ref _enum = get_system_register_enum(); - Ref enumType = Type::EnumerationType(view->GetDefaultArchitecture(), _enum, 4, false); - return enumType; -} - -QualifiedName get_system_register_enum_type_name(Ref view) -{ - Ref enumType = get_system_register_enum_type(view); - QualifiedName systemRegName = QualifiedName("SystemReg"); - string enumId = Type::GenerateAutoTypeId(view->GetDefaultArchitecture()->GetName(), systemRegName); - QualifiedName enumTypeName = view->DefineType(enumId, systemRegName, enumType); - return enumTypeName; -} - -const vector& get_system_registers() -{ - static vector system_regs { - REG_PSTATE_SPSEL, - REG_DAIFSET, - REG_DAIFCLR, - REG_IC_IALLUIS, - REG_IC_IALLU, - REG_GCSPUSHX, - REG_GCSPOPCX, - REG_GCSPOPX, - REG_GSB_SYS, - REG_GSB_ACK, - REG_GIC_CDDIS, - REG_GIC_CDEN, - REG_GIC_CDPRI, - REG_GIC_CDAFF, - REG_GIC_CDPEND, - REG_GIC_CDRCFG, - REG_GIC_CDEOI, - REG_GIC_CDDI, - REG_GIC_CDHM, - REG_GICR_CDIA, - REG_GICR_CDNMIA, - REG_BRB_IALL, - REG_BRB_INJ, - REG_TRCIT, - REG_CFP_RCTX, - REG_DVP_RCTX, - REG_COSP_RCTX, - REG_CPP_RCTX, - REG_IC_IVAU, - REG_GCSPUSHM, - REG_GCSPOPM, - REG_GCSSS1, - REG_GCSSS2, - REG_MLBI_ALLE1, - REG_MLBI_VMALLE1, - REG_MLBI_VPIDE1, - REG_MLBI_VPMGE1, - REG_GIC_VDDIS, - REG_GIC_VDEN, - REG_GIC_VDPRI, - REG_GIC_VDAFF, - REG_GIC_VDPEND, - REG_GIC_VDRCFG, - REG_GIC_VDDI, - REG_GIC_VDHM, - REG_APAS, - REG_GIC_LDDIS, - REG_GIC_LDEN, - REG_GIC_LDPRI, - REG_GIC_LDAFF, - REG_GIC_LDPEND, - REG_GIC_LDRCFG, - REG_GIC_LDDI, - REG_GIC_LDHM, - REG_OSDTRRX_EL1, - REG_DBGBVR0_EL1, - REG_DBGBCR0_EL1, - REG_DBGWVR0_EL1, - REG_DBGWCR0_EL1, - REG_DBGBVR1_EL1, - REG_DBGBCR1_EL1, - REG_DBGWVR1_EL1, - REG_DBGWCR1_EL1, - REG_MDCCINT_EL1, - REG_MDSCR_EL1, - REG_DBGBVR2_EL1, - REG_DBGBCR2_EL1, - REG_DBGWVR2_EL1, - REG_DBGWCR2_EL1, - REG_OSDTRTX_EL1, - REG_DBGBVR3_EL1, - REG_DBGBCR3_EL1, - REG_DBGWVR3_EL1, - REG_DBGWCR3_EL1, - REG_MDSELR_EL1, - REG_DBGBVR4_EL1, - REG_DBGBCR4_EL1, - REG_DBGWVR4_EL1, - REG_DBGWCR4_EL1, - REG_MDSTEPOP_EL1, - REG_DBGBVR5_EL1, - REG_DBGBCR5_EL1, - REG_DBGWVR5_EL1, - REG_DBGWCR5_EL1, - REG_DBGWFAR, - REG_OSECCR_EL1, - REG_DBGBVR6_EL1, - REG_DBGBCR6_EL1, - REG_DBGWVR6_EL1, - REG_DBGWCR6_EL1, - REG_DBGBVR7_EL1, - REG_DBGBCR7_EL1, - REG_DBGWVR7_EL1, - REG_DBGWCR7_EL1, - REG_DBGBVR8_EL1, - REG_DBGBCR8_EL1, - REG_DBGWVR8_EL1, - REG_DBGWCR8_EL1, - REG_DBGBVR9_EL1, - REG_DBGBCR9_EL1, - REG_DBGWVR9_EL1, - REG_DBGWCR9_EL1, - REG_DBGBVR10_EL1, - REG_DBGBCR10_EL1, - REG_DBGWVR10_EL1, - REG_DBGWCR10_EL1, - REG_DBGBVR11_EL1, - REG_DBGBCR11_EL1, - REG_DBGWVR11_EL1, - REG_DBGWCR11_EL1, - REG_DBGBVR12_EL1, - REG_DBGBCR12_EL1, - REG_DBGWVR12_EL1, - REG_DBGWCR12_EL1, - REG_DBGBVR13_EL1, - REG_DBGBCR13_EL1, - REG_DBGWVR13_EL1, - REG_DBGWCR13_EL1, - REG_DBGBVR14_EL1, - REG_DBGBCR14_EL1, - REG_DBGWVR14_EL1, - REG_DBGWCR14_EL1, - REG_DBGBVR15_EL1, - REG_DBGBCR15_EL1, - REG_DBGWVR15_EL1, - REG_DBGWCR15_EL1, - REG_MDRAR_EL1, - REG_OSLAR_EL1, - REG_OSLSR_EL1, - REG_OSDLR_EL1, - REG_DBGPRCR_EL1, - REG_DBGCLAIMSET_EL1, - REG_DBGCLAIMCLR_EL1, - REG_DBGAUTHSTATUS_EL1, - REG_SPMCGCR0_EL1, - REG_SPMCGCR1_EL1, - REG_SPMACCESSR_EL1, - REG_SPMIIDR_EL1, - REG_SPMDEVARCH_EL1, - REG_SPMDEVAFF_EL1, - REG_SPMCFGR_EL1, - REG_SPMINTENSET_EL1, - REG_SPMINTENCLR_EL1, - REG_PMEVCNTSVR0_EL1, - REG_PMEVCNTSVR1_EL1, - REG_PMEVCNTSVR2_EL1, - REG_PMEVCNTSVR3_EL1, - REG_PMEVCNTSVR4_EL1, - REG_PMEVCNTSVR5_EL1, - REG_PMEVCNTSVR6_EL1, - REG_PMEVCNTSVR7_EL1, - REG_PMEVCNTSVR8_EL1, - REG_PMEVCNTSVR9_EL1, - REG_PMEVCNTSVR10_EL1, - REG_PMEVCNTSVR11_EL1, - REG_PMEVCNTSVR12_EL1, - REG_PMEVCNTSVR13_EL1, - REG_PMEVCNTSVR14_EL1, - REG_PMEVCNTSVR15_EL1, - REG_PMEVCNTSVR16_EL1, - REG_PMEVCNTSVR17_EL1, - REG_PMEVCNTSVR18_EL1, - REG_PMEVCNTSVR19_EL1, - REG_PMEVCNTSVR20_EL1, - REG_PMEVCNTSVR21_EL1, - REG_PMEVCNTSVR22_EL1, - REG_PMEVCNTSVR23_EL1, - REG_PMEVCNTSVR24_EL1, - REG_PMEVCNTSVR25_EL1, - REG_PMEVCNTSVR26_EL1, - REG_PMEVCNTSVR27_EL1, - REG_PMEVCNTSVR28_EL1, - REG_PMEVCNTSVR29_EL1, - REG_PMEVCNTSVR30_EL1, - REG_PMCCNTSVR_EL1, - REG_PMICNTSVR_EL1, - REG_TRCTRACEIDR, - REG_TRCVICTLR, - REG_TRCSEQEVR0, - REG_TRCCNTRLDVR0, - REG_TRCIDR8, - REG_TRCIMSPEC0, - REG_TRCPRGCTLR, - REG_TRCQCTLR, - REG_TRCVIIECTLR, - REG_TRCSEQEVR1, - REG_TRCCNTRLDVR1, - REG_TRCIDR9, - REG_TRCIMSPEC1, - REG_TRCITEEDCR, - REG_TRCVISSCTLR, - REG_TRCSEQEVR2, - REG_TRCCNTRLDVR2, - REG_TRCIDR10, - REG_TRCIMSPEC2, - REG_TRCSTATR, - REG_TRCVIPCSSCTLR, - REG_TRCCNTRLDVR3, - REG_TRCIDR11, - REG_TRCIMSPEC3, - REG_TRCCONFIGR, - REG_TRCCNTCTLR0, - REG_TRCIDR12, - REG_TRCIMSPEC4, - REG_TRCCNTCTLR1, - REG_TRCIDR13, - REG_TRCIMSPEC5, - REG_TRCAUXCTLR, - REG_TRCSEQRSTEVR, - REG_TRCCNTCTLR2, - REG_TRCIMSPEC6, - REG_TRCSEQSTR, - REG_TRCCNTCTLR3, - REG_TRCIMSPEC7, - REG_TRCEVENTCTL0R, - REG_TRCEXTINSELR0, - REG_TRCCNTVR0, - REG_TRCIDR0, - REG_TRCEVENTCTL1R, - REG_TRCEXTINSELR1, - REG_TRCCNTVR1, - REG_TRCIDR1, - REG_TRCRSR, - REG_TRCEXTINSELR2, - REG_TRCCNTVR2, - REG_TRCIDR2, - REG_TRCSTALLCTLR, - REG_TRCEXTINSELR3, - REG_TRCCNTVR3, - REG_TRCIDR3, - REG_TRCTSCTLR, - REG_TRCIDR4, - REG_TRCSYNCPR, - REG_TRCIDR5, - REG_TRCCCCTLR, - REG_TRCIDR6, - REG_TRCBBCTLR, - REG_TRCIDR7, - REG_TRCRSCTLR0, - REG_TRCRSCTLR16, - REG_TRCSSCCR0, - REG_TRCSSPCICR0, - REG_TRCRSCTLR1, - REG_TRCRSCTLR17, - REG_TRCSSCCR1, - REG_TRCSSPCICR1, - REG_TRCOSLSR, - REG_TRCRSCTLR2, - REG_TRCRSCTLR18, - REG_TRCSSCCR2, - REG_TRCSSPCICR2, - REG_TRCRSCTLR3, - REG_TRCRSCTLR19, - REG_TRCSSCCR3, - REG_TRCSSPCICR3, - REG_TRCRSCTLR4, - REG_TRCRSCTLR20, - REG_TRCSSCCR4, - REG_TRCSSPCICR4, - REG_TRCRSCTLR5, - REG_TRCRSCTLR21, - REG_TRCSSCCR5, - REG_TRCSSPCICR5, - REG_TRCRSCTLR6, - REG_TRCRSCTLR22, - REG_TRCSSCCR6, - REG_TRCSSPCICR6, - REG_TRCRSCTLR7, - REG_TRCRSCTLR23, - REG_TRCSSCCR7, - REG_TRCSSPCICR7, - REG_TRCRSCTLR8, - REG_TRCRSCTLR24, - REG_TRCSSCSR0, - REG_TRCRSCTLR9, - REG_TRCRSCTLR25, - REG_TRCSSCSR1, - REG_TRCRSCTLR10, - REG_TRCRSCTLR26, - REG_TRCSSCSR2, - REG_TRCRSCTLR11, - REG_TRCRSCTLR27, - REG_TRCSSCSR3, - REG_TRCRSCTLR12, - REG_TRCRSCTLR28, - REG_TRCSSCSR4, - REG_TRCRSCTLR13, - REG_TRCRSCTLR29, - REG_TRCSSCSR5, - REG_TRCRSCTLR14, - REG_TRCRSCTLR30, - REG_TRCSSCSR6, - REG_TRCRSCTLR15, - REG_TRCRSCTLR31, - REG_TRCSSCSR7, - REG_TRCACVR0, - REG_TRCACVR8, - REG_TRCACATR0, - REG_TRCACATR8, - REG_TRCACVR1, - REG_TRCACVR9, - REG_TRCACATR1, - REG_TRCACATR9, - REG_TRCACVR2, - REG_TRCACVR10, - REG_TRCACATR2, - REG_TRCACATR10, - REG_TRCACVR3, - REG_TRCACVR11, - REG_TRCACATR3, - REG_TRCACATR11, - REG_TRCACVR4, - REG_TRCACVR12, - REG_TRCACATR4, - REG_TRCACATR12, - REG_TRCACVR5, - REG_TRCACVR13, - REG_TRCACATR5, - REG_TRCACATR13, - REG_TRCACVR6, - REG_TRCACVR14, - REG_TRCACATR6, - REG_TRCACATR14, - REG_TRCACVR7, - REG_TRCACVR15, - REG_TRCACATR7, - REG_TRCACATR15, - REG_TRCCIDCVR0, - REG_TRCVMIDCVR0, - REG_TRCCIDCCTLR0, - REG_TRCCIDCCTLR1, - REG_TRCCIDCVR1, - REG_TRCVMIDCVR1, - REG_TRCVMIDCCTLR0, - REG_TRCVMIDCCTLR1, - REG_TRCCIDCVR2, - REG_TRCVMIDCVR2, - REG_TRCCIDCVR3, - REG_TRCVMIDCVR3, - REG_TRCCIDCVR4, - REG_TRCVMIDCVR4, - REG_TRCCIDCVR5, - REG_TRCVMIDCVR5, - REG_TRCCIDCVR6, - REG_TRCVMIDCVR6, - REG_TRCCIDCVR7, - REG_TRCVMIDCVR7, - REG_TRCDEVID, - REG_TRCCLAIMSET, - REG_TRCCLAIMCLR, - REG_TRCAUTHSTATUS, - REG_TRCDEVARCH, - REG_BRBINF0_EL1, - REG_BRBSRC0_EL1, - REG_BRBTGT0_EL1, - REG_BRBINF16_EL1, - REG_BRBSRC16_EL1, - REG_BRBTGT16_EL1, - REG_BRBINF1_EL1, - REG_BRBSRC1_EL1, - REG_BRBTGT1_EL1, - REG_BRBINF17_EL1, - REG_BRBSRC17_EL1, - REG_BRBTGT17_EL1, - REG_BRBINF2_EL1, - REG_BRBSRC2_EL1, - REG_BRBTGT2_EL1, - REG_BRBINF18_EL1, - REG_BRBSRC18_EL1, - REG_BRBTGT18_EL1, - REG_BRBINF3_EL1, - REG_BRBSRC3_EL1, - REG_BRBTGT3_EL1, - REG_BRBINF19_EL1, - REG_BRBSRC19_EL1, - REG_BRBTGT19_EL1, - REG_BRBINF4_EL1, - REG_BRBSRC4_EL1, - REG_BRBTGT4_EL1, - REG_BRBINF20_EL1, - REG_BRBSRC20_EL1, - REG_BRBTGT20_EL1, - REG_BRBINF5_EL1, - REG_BRBSRC5_EL1, - REG_BRBTGT5_EL1, - REG_BRBINF21_EL1, - REG_BRBSRC21_EL1, - REG_BRBTGT21_EL1, - REG_BRBINF6_EL1, - REG_BRBSRC6_EL1, - REG_BRBTGT6_EL1, - REG_BRBINF22_EL1, - REG_BRBSRC22_EL1, - REG_BRBTGT22_EL1, - REG_BRBINF7_EL1, - REG_BRBSRC7_EL1, - REG_BRBTGT7_EL1, - REG_BRBINF23_EL1, - REG_BRBSRC23_EL1, - REG_BRBTGT23_EL1, - REG_BRBINF8_EL1, - REG_BRBSRC8_EL1, - REG_BRBTGT8_EL1, - REG_BRBINF24_EL1, - REG_BRBSRC24_EL1, - REG_BRBTGT24_EL1, - REG_BRBINF9_EL1, - REG_BRBSRC9_EL1, - REG_BRBTGT9_EL1, - REG_BRBINF25_EL1, - REG_BRBSRC25_EL1, - REG_BRBTGT25_EL1, - REG_BRBINF10_EL1, - REG_BRBSRC10_EL1, - REG_BRBTGT10_EL1, - REG_BRBINF26_EL1, - REG_BRBSRC26_EL1, - REG_BRBTGT26_EL1, - REG_BRBINF11_EL1, - REG_BRBSRC11_EL1, - REG_BRBTGT11_EL1, - REG_BRBINF27_EL1, - REG_BRBSRC27_EL1, - REG_BRBTGT27_EL1, - REG_BRBINF12_EL1, - REG_BRBSRC12_EL1, - REG_BRBTGT12_EL1, - REG_BRBINF28_EL1, - REG_BRBSRC28_EL1, - REG_BRBTGT28_EL1, - REG_BRBINF13_EL1, - REG_BRBSRC13_EL1, - REG_BRBTGT13_EL1, - REG_BRBINF29_EL1, - REG_BRBSRC29_EL1, - REG_BRBTGT29_EL1, - REG_BRBINF14_EL1, - REG_BRBSRC14_EL1, - REG_BRBTGT14_EL1, - REG_BRBINF30_EL1, - REG_BRBSRC30_EL1, - REG_BRBTGT30_EL1, - REG_BRBINF15_EL1, - REG_BRBSRC15_EL1, - REG_BRBTGT15_EL1, - REG_BRBINF31_EL1, - REG_BRBSRC31_EL1, - REG_BRBTGT31_EL1, - REG_BRBCR_EL1, - REG_BRBFCR_EL1, - REG_BRBTS_EL1, - REG_BRBINFINJ_EL1, - REG_BRBSRCINJ_EL1, - REG_BRBTGTINJ_EL1, - REG_BRBIDR0_EL1, - REG_TEECR32_EL1, - REG_TEEHBR32_EL1, - REG_MDCCSR_EL0, - REG_DBGDTR_EL0, - REG_DBGDTRRX_EL0, - REG_SPMCR_EL0, - REG_SPMCNTENSET_EL0, - REG_SPMCNTENCLR_EL0, - REG_SPMOVSCLR_EL0, - REG_SPMZR_EL0, - REG_SPMSELR_EL0, - REG_SPMOVSSET_EL0, - REG_SPMEVCNTR0_EL0, - REG_SPMEVCNTR1_EL0, - REG_SPMEVCNTR2_EL0, - REG_SPMEVCNTR3_EL0, - REG_SPMEVCNTR4_EL0, - REG_SPMEVCNTR5_EL0, - REG_SPMEVCNTR6_EL0, - REG_SPMEVCNTR7_EL0, - REG_SPMEVCNTR8_EL0, - REG_SPMEVCNTR9_EL0, - REG_SPMEVCNTR10_EL0, - REG_SPMEVCNTR11_EL0, - REG_SPMEVCNTR12_EL0, - REG_SPMEVCNTR13_EL0, - REG_SPMEVCNTR14_EL0, - REG_SPMEVCNTR15_EL0, - REG_SPMEVTYPER0_EL0, - REG_SPMEVTYPER1_EL0, - REG_SPMEVTYPER2_EL0, - REG_SPMEVTYPER3_EL0, - REG_SPMEVTYPER4_EL0, - REG_SPMEVTYPER5_EL0, - REG_SPMEVTYPER6_EL0, - REG_SPMEVTYPER7_EL0, - REG_SPMEVTYPER8_EL0, - REG_SPMEVTYPER9_EL0, - REG_SPMEVTYPER10_EL0, - REG_SPMEVTYPER11_EL0, - REG_SPMEVTYPER12_EL0, - REG_SPMEVTYPER13_EL0, - REG_SPMEVTYPER14_EL0, - REG_SPMEVTYPER15_EL0, - REG_SPMEVFILTR0_EL0, - REG_SPMEVFILTR1_EL0, - REG_SPMEVFILTR2_EL0, - REG_SPMEVFILTR3_EL0, - REG_SPMEVFILTR4_EL0, - REG_SPMEVFILTR5_EL0, - REG_SPMEVFILTR6_EL0, - REG_SPMEVFILTR7_EL0, - REG_SPMEVFILTR8_EL0, - REG_SPMEVFILTR9_EL0, - REG_SPMEVFILTR10_EL0, - REG_SPMEVFILTR11_EL0, - REG_SPMEVFILTR12_EL0, - REG_SPMEVFILTR13_EL0, - REG_SPMEVFILTR14_EL0, - REG_SPMEVFILTR15_EL0, - REG_SPMEVFILT2R0_EL0, - REG_SPMEVFILT2R1_EL0, - REG_SPMEVFILT2R2_EL0, - REG_SPMEVFILT2R3_EL0, - REG_SPMEVFILT2R4_EL0, - REG_SPMEVFILT2R5_EL0, - REG_SPMEVFILT2R6_EL0, - REG_SPMEVFILT2R7_EL0, - REG_SPMEVFILT2R8_EL0, - REG_SPMEVFILT2R9_EL0, - REG_SPMEVFILT2R10_EL0, - REG_SPMEVFILT2R11_EL0, - REG_SPMEVFILT2R12_EL0, - REG_SPMEVFILT2R13_EL0, - REG_SPMEVFILT2R14_EL0, - REG_SPMEVFILT2R15_EL0, - REG_DBGVCR32_EL2, - REG_BRBCR_EL2, - REG_SPMACCESSR_EL2, - REG_BRBCR_EL12, - REG_SPMACCESSR_EL12, - REG_SPMACCESSR_EL3, - REG_SPMROOTCR_EL3, - REG_SPMSCR_EL1, - REG_MIDR_EL1, - REG_MPIDR_EL1, - REG_REVIDR_EL1, - REG_ID_PFR0_EL1, - REG_ID_PFR1_EL1, - REG_ID_DFR0_EL1, - REG_ID_AFR0_EL1, - REG_ID_MMFR0_EL1, - REG_ID_MMFR1_EL1, - REG_ID_MMFR2_EL1, - REG_ID_MMFR3_EL1, - REG_ID_ISAR0_EL1, - REG_ID_ISAR1_EL1, - REG_ID_ISAR2_EL1, - REG_ID_ISAR3_EL1, - REG_ID_ISAR4_EL1, - REG_ID_ISAR5_EL1, - REG_ID_MMFR4_EL1, - REG_ID_ISAR6_EL1, - REG_MVFR0_EL1, - REG_MVFR1_EL1, - REG_MVFR2_EL1, - REG_ID_AA32RES3_EL1, - REG_ID_PFR2_EL1, - REG_ID_DFR1_EL1, - REG_ID_MMFR5_EL1, - REG_ID_AA32RES7_EL1, - REG_ID_AA64PFR0_EL1, - REG_ID_AA64PFR1_EL1, - REG_ID_AA64PFR2_EL1, - REG_ID_AA64PFR3_EL1, - REG_ID_AA64ZFR0_EL1, - REG_ID_AA64SMFR0_EL1, - REG_ID_AA64ZFR2_EL1, - REG_ID_AA64FPFR0_EL1, - REG_ID_AA64DFR0_EL1, - REG_ID_AA64DFR1_EL1, - REG_ID_AA64DFR2_EL1, - REG_ID_AA64DFR3_EL1, - REG_ID_AA64AFR0_EL1, - REG_ID_AA64AFR1_EL1, - REG_ID_AA64AFR2_EL1, - REG_ID_AA64AFR3_EL1, - REG_ID_AA64ISAR0_EL1, - REG_ID_AA64ISAR1_EL1, - REG_ID_AA64ISAR2_EL1, - REG_ID_AA64ISAR3_EL1, - REG_ID_AA64ISAR4_EL1, - REG_ID_AA64ISAR5_EL1, - REG_ID_AA64ISAR6_EL1, - REG_ID_AA64ISAR7_EL1, - REG_ID_AA64MMFR0_EL1, - REG_ID_AA64MMFR1_EL1, - REG_ID_AA64MMFR2_EL1, - REG_ID_AA64MMFR3_EL1, - REG_ID_AA64MMFR4_EL1, - REG_ID_AA64MMFR5_EL1, - REG_ID_AA64MMFR6_EL1, - REG_ID_AA64MMFR7_EL1, - REG_SCTLR_EL1, - REG_ACTLR_EL1, - REG_CPACR_EL1, - REG_SCTLR2_EL1, - REG_RGSR_EL1, - REG_GCR_EL1, - REG_ZCR_EL1, - REG_TRFCR_EL1, - REG_TRCITECR_EL1, - REG_SMPRI_EL1, - REG_SMCR_EL1, - REG_SCTLRMASK_EL1, - REG_ACTLRMASK_EL1, - REG_CPACRMASK_EL1, - REG_SCTLR2MASK_EL1, - REG_CPACRALIAS_EL1, - REG_ACTLRALIAS_EL1, - REG_SCTLRALIAS_EL1, - REG_SCTLR2ALIAS_EL1, - REG_TTBR0_EL1, - REG_TTBR1_EL1, - REG_TCR_EL1, - REG_TCR2_EL1, - REG_APIAKEYLO_EL1, - REG_APIAKEYHI_EL1, - REG_APIBKEYLO_EL1, - REG_APIBKEYHI_EL1, - REG_APDAKEYLO_EL1, - REG_APDAKEYHI_EL1, - REG_APDBKEYLO_EL1, - REG_APDBKEYHI_EL1, - REG_APGAKEYLO_EL1, - REG_APGAKEYHI_EL1, - REG_GCSCR_EL1, - REG_GCSPR_EL1, - REG_GCSCRE0_EL1, - REG_TCRMASK_EL1, - REG_TCR2MASK_EL1, - REG_TCRALIAS_EL1, - REG_TCR2ALIAS_EL1, - REG_SPSR_EL1, - REG_ELR_EL1, - REG_SP_EL0, - REG_SPSEL, - REG_CURRENTEL, - REG_PAN, - REG_UAO, - REG_ALLINT, - REG_PM, - REG_ICC_PMR_EL1, - REG_AFSR0_EL1, - REG_AFSR1_EL1, - REG_ESR_EL1, - REG_ERRIDR_EL1, - REG_ERRSELR_EL1, - REG_ERXGSR_EL1, - REG_ERXFR_EL1, - REG_ERXCTLR_EL1, - REG_ERXSTATUS_EL1, - REG_ERXADDR_EL1, - REG_ERXPFGF_EL1, - REG_ERXPFGCTL_EL1, - REG_ERXPFGCDN_EL1, - REG_ERXMISC0_EL1, - REG_ERXMISC1_EL1, - REG_ERXMISC2_EL1, - REG_ERXMISC3_EL1, - REG_TFSR_EL1, - REG_TFSRE0_EL1, - REG_FAR_EL1, - REG_PFAR_EL1, - REG_PAR_EL1, - REG_PMSCR_EL1, - REG_PMSNEVFR_EL1, - REG_PMSICR_EL1, - REG_PMSIRR_EL1, - REG_PMSFCR_EL1, - REG_PMSEVFR_EL1, - REG_PMSLATFR_EL1, - REG_PMSIDR_EL1, - REG_PMBLIMITR_EL1, - REG_PMBPTR_EL1, - REG_PMBSR_EL1, - REG_PMSDSFR_EL1, - REG_PMBMAR_EL1, - REG_PMBIDR_EL1, - REG_TRBLIMITR_EL1, - REG_TRBPTR_EL1, - REG_TRBBASER_EL1, - REG_TRBSR_EL1, - REG_TRBMAR_EL1, - REG_TRBMPAM_EL1, - REG_TRBTRG_EL1, - REG_TRBIDR_EL1, - REG_PMSSCR_EL1, - REG_PMINTENSET_EL1, - REG_PMINTENCLR_EL1, - REG_PMUACR_EL1, - REG_PMECR_EL1, - REG_PMMIR_EL1, - REG_PMIAR_EL1, - REG_MAIR_EL1, - REG_MAIR2_EL1, - REG_PIRE0_EL1, - REG_PIR_EL1, - REG_POR_EL1, - REG_S2POR_EL1, - REG_AMAIR_EL1, - REG_AMAIR2_EL1, - REG_LORSA_EL1, - REG_LOREA_EL1, - REG_LORN_EL1, - REG_LORC_EL1, - REG_MPAMIDR_EL1, - REG_MPAMBWIDR_EL1, - REG_TLBIDIDR_EL1, - REG_LORID_EL1, - REG_MPAM1_EL1, - REG_MPAM0_EL1, - REG_MPAMCTL_EL1, - REG_MPAMSM_EL1, - REG_MPAMBW1_EL1, - REG_MPAMBW0_EL1, - REG_MPAMBWSM_EL1, - REG_CTRR_C_LWR_EL1, - REG_CTRR_C_UPR_EL1, - REG_CTRR_D_LWR_EL1, - REG_CTRR_D_UPR_EL1, - REG_CTRR_C_LWR_EL12, - REG_CTRR_C_UPR_EL12, - REG_CTRR_D_LWR_EL12, - REG_CTRR_D_UPR_EL12, - REG_CTRR_C_LWR_EL2, - REG_CTRR_C_UPR_EL2, - REG_CTRR_D_LWR_EL2, - REG_CTRR_D_UPR_EL2, - REG_CTRR_C_CTL_EL1, - REG_CTRR_D_CTL_EL1, - REG_CTRR_C_CTL_EL12, - REG_CTRR_D_CTL_EL12, - REG_CTRR_C_CTL_EL2, - REG_CTRR_D_CTL_EL2, - REG_CTXR_A_LWR_EL1, - REG_CTXR_A_UPR_EL1, - REG_CTXR_B_LWR_EL1, - REG_CTXR_B_UPR_EL1, - REG_CTXR_C_LWR_EL1, - REG_CTXR_C_UPR_EL1, - REG_CTXR_D_LWR_EL1, - REG_CTXR_D_UPR_EL1, - REG_CTXR_A_LWR_EL12, - REG_CTXR_A_UPR_EL12, - REG_CTXR_B_LWR_EL12, - REG_CTXR_B_UPR_EL12, - REG_CTXR_C_LWR_EL12, - REG_CTXR_C_UPR_EL12, - REG_CTXR_D_LWR_EL12, - REG_CTXR_D_UPR_EL12, - REG_CTXR_A_LWR_EL2, - REG_CTXR_A_UPR_EL2, - REG_CTXR_B_LWR_EL2, - REG_CTXR_B_UPR_EL2, - REG_CTXR_C_LWR_EL2, - REG_CTXR_C_UPR_EL2, - REG_CTXR_D_LWR_EL2, - REG_CTXR_D_UPR_EL2, - REG_CTXR_A_CTL_EL1, - REG_CTXR_B_CTL_EL1, - REG_CTXR_C_CTL_EL1, - REG_CTXR_D_CTL_EL1, - REG_CTXR_A_CTL_EL12, - REG_CTXR_B_CTL_EL12, - REG_CTXR_C_CTL_EL12, - REG_CTXR_D_CTL_EL12, - REG_CTXR_A_CTL_EL2, - REG_CTXR_B_CTL_EL2, - REG_CTXR_C_CTL_EL2, - REG_CTXR_D_CTL_EL2, - REG_ACC_CTRR_C_LWR_EL2, - REG_ACC_CTRR_C_UPR_EL2, - REG_ACC_CTRR_D_LWR_EL2, - REG_ACC_CTRR_D_UPR_EL2, - REG_ACC_CTXR_A_LWR_EL2, - REG_ACC_CTXR_A_UPR_EL2, - REG_ACC_CTXR_B_LWR_EL2, - REG_ACC_CTXR_B_UPR_EL2, - REG_ACC_CTXR_C_LWR_EL2, - REG_ACC_CTXR_C_UPR_EL2, - REG_ACC_CTXR_D_LWR_EL2, - REG_ACC_CTXR_D_UPR_EL2, - REG_ACC_CTRR_C_CTL_EL2, - REG_ACC_CTRR_D_CTL_EL2, - REG_ACC_CTXR_A_CTL_EL2, - REG_ACC_CTXR_B_CTL_EL2, - REG_ACC_CTXR_C_CTL_EL2, - REG_ACC_CTXR_D_CTL_EL2, - REG_VBAR_EL1, - REG_RVBAR_EL1, - REG_RMR_EL1, - REG_ISR_EL1, - REG_DISR_EL1, - REG_ICC_IAR0_EL1, - REG_ICC_EOIR0_EL1, - REG_ICC_HPPIR0_EL1, - REG_ICC_BPR0_EL1, - REG_ICC_AP0R0_EL1, - REG_ICC_AP0R1_EL1, - REG_ICC_AP0R2_EL1, - REG_ICC_AP0R3_EL1, - REG_ICC_AP1R0_EL1, - REG_ICC_AP1R1_EL1, - REG_ICC_AP1R2_EL1, - REG_ICC_AP1R3_EL1, - REG_ICC_NMIAR1_EL1, - REG_ICC_PPI_HMR0_EL1, - REG_ICC_PPI_HMR1_EL1, - REG_ICC_IDR0_EL1, - REG_ICC_HPPIR_EL1, - REG_ICC_ICSR_EL1, - REG_ICC_IAFFIDR_EL1, - REG_ICC_PPI_ENABLER0_EL1, - REG_ICC_PPI_ENABLER1_EL1, - REG_ICC_DIR_EL1, - REG_ICC_RPR_EL1, - REG_ICC_SGI1R_EL1, - REG_ICC_ASGI1R_EL1, - REG_ICC_SGI0R_EL1, - REG_ICC_IAR1_EL1, - REG_ICC_EOIR1_EL1, - REG_ICC_HPPIR1_EL1, - REG_ICC_BPR1_EL1, - REG_ICC_CTLR_EL1, - REG_ICC_SRE_EL1, - REG_ICC_IGRPEN0_EL1, - REG_ICC_IGRPEN1_EL1, - REG_ICC_PPI_CACTIVER0_EL1, - REG_ICC_PPI_CACTIVER1_EL1, - REG_ICC_PPI_SACTIVER0_EL1, - REG_ICC_PPI_SACTIVER1_EL1, - REG_ICC_PPI_CPENDR0_EL1, - REG_ICC_PPI_CPENDR1_EL1, - REG_ICC_PPI_SPENDR0_EL1, - REG_ICC_PPI_SPENDR1_EL1, - REG_ICC_PPI_PRIORITYR0_EL1, - REG_ICC_PPI_PRIORITYR1_EL1, - REG_ICC_PPI_PRIORITYR2_EL1, - REG_ICC_PPI_PRIORITYR3_EL1, - REG_ICC_PPI_PRIORITYR4_EL1, - REG_ICC_PPI_PRIORITYR5_EL1, - REG_ICC_PPI_PRIORITYR6_EL1, - REG_ICC_PPI_PRIORITYR7_EL1, - REG_ICC_PPI_PRIORITYR8_EL1, - REG_ICC_PPI_PRIORITYR9_EL1, - REG_ICC_PPI_PRIORITYR10_EL1, - REG_ICC_PPI_PRIORITYR11_EL1, - REG_ICC_PPI_PRIORITYR12_EL1, - REG_ICC_PPI_PRIORITYR13_EL1, - REG_ICC_PPI_PRIORITYR14_EL1, - REG_ICC_PPI_PRIORITYR15_EL1, - REG_CONTEXTIDR_EL1, - REG_RCWSMASK_EL1, - REG_TPIDR_EL1, - REG_ACCDATA_EL1, - REG_RCWMASK_EL1, - REG_SCXTNUM_EL1, - REG_CNTKCTL_EL1, - REG_HID0, - REG_HID25, - REG_HID26, - REG_HID27, - REG_HID28, - REG_HID29, - REG_HID34, - REG_HID1, - REG_HID21, - REG_BIUVCSCUPCMDCRD, - REG_BIUVCSCUPDATCRD, - REG_HID2, - REG_HID30, - REG_HID31, - REG_HID32, - REG_HID33, - REG_HID3, - REG_BIUVCSCUPCMDCRDC2, - REG_BIUVCSCUPDATCRDC2, - REG_HID4, - REG_HID5, - REG_HID6, - REG_HID7, - REG_HID8, - REG_HID9, - REG_HID10, - REG_BLOCK_CMAINT_CFG, - REG_HID11, - REG_HID18, - REG_HID36, - REG_HID37, - REG_HID12, - REG_HID15, - REG_HID19, - REG_BIU_TLIMIT, - REG_HID13, - REG_HID_RCTX_G0CTL, - REG_HID_RCTX_G1CTL, - REG_HID14, - REG_HID16, - REG_LLC_WRR2, - REG_BIU_AFI_CFG, - REG_HID17, - REG_HID24, - REG_HID35, - REG_CCSIDR_EL1, - REG_CLIDR_EL1, - REG_CCSIDR2_EL1, - REG_GMID_EL1, - REG_SMIDR_EL1, - REG_AIDR_EL1, - REG_ICC_APR_EL1, - REG_ICC_CR0_EL1, - REG_ICC_PCR_EL1, - REG_ICC_HAPR_EL1, - REG_PMCR0_EL1, - REG_APPL_CONTEXTPTR, - REG_LD_LATPROF_CTL_EL1, - REG_AON_CPU_MSTALL_CTL01_EL1, - REG_PM_MEMFLT_CTL23_EL1, - REG_AGTCNTV_CTL_EL0, - REG_AGTCNTVCTSS_NOREDIR_EL0, - REG_PMCR1_EL1, - REG_LD_LATPROF_CTR_EL1, - REG_AON_CPU_MSTALL_CTL23_EL1, - REG_PM_MEMFLT_CTL45_EL1, - REG_AGTCNTRDIR_EL1, - REG_AGTCNTKCTL_NOREDIR_EL1, - REG_PMCR2_EL1, - REG_LD_LATPROF_STS_EL1, - REG_AON_CPU_MSTALL_CTL45_EL1, - REG_AGTCNTHP_CVAL_EL2, - REG_CNTVCT_NOREDIR_EL0, - REG_AGTCNTP_CVAL_NOREDIR_EL0, - REG_PMCR3_EL1, - REG_LD_LATPROF_INF_EL1, - REG_AON_CPU_MSTALL_CTL67_EL1, - REG_AGTCNTHP_TVAL_EL2, - REG_CNTPCTSS_NOREDIR_EL0, - REG_AGTCNTP_TVAL_NOREDIR_EL0, - REG_PMCR4_EL1, - REG_LD_LATPROF_CTL_EL2, - REG_AON_CPU_MEMFLT_CTL01_EL1, - REG_AGTCNTHP_CTL_EL2, - REG_CNTVCTSS_NOREDIR_EL0, - REG_AGTCNTP_CTL_NOREDIR_EL0, - REG_PMESR0_EL1, - REG_LD_LATPROF_CMD_EL1, - REG_AON_CPU_MEMFLT_CTL23_EL1, - REG_AGTCNTHV_CVAL_EL2, - REG_AGTCNTV_CVAL_NOREDIR_EL0, - REG_PMESR1_EL1, - REG_PMCR1_EL2, - REG_AON_CPU_MEMFLT_CTL45_EL1, - REG_AGTCNTHV_TVAL_EL2, - REG_CNTKCTL_NOREDIR_EL1, - REG_AGTCNTV_TVAL_NOREDIR_EL0, - REG_OPMAT0_EL1, - REG_PMCR1_EL12, - REG_AON_CPU_MEMFLT_CTL67_EL1, - REG_AGTCNTHV_CTL_EL2, - REG_CNTP_CVAL_NOREDIR_EL0, - REG_AGTCNTV_CTL_NOREDIR_EL0, - REG_OPMAT1_EL1, - REG_PMCR1_GL12, - REG_AON_CPU_MSTALL_CTR0_EL1, - REG_AGTCNTFRQ_EL0, - REG_CNTP_TVAL_NOREDIR_EL0, - REG_CNTPCT_NOREDIR_EL0, - REG_OPMSK0_EL1, - REG_LD_LATPROF_CTL_EL12, - REG_AON_CPU_MSTALL_CTR1_EL1, - REG_AGTCNTVOFF_EL2, - REG_CNTP_CTL_NOREDIR_EL0, - REG_CNTV_CTL_NOREDIR_EL0, - REG_OPMSK1_EL1, - REG_LD_LATPROF_INF_EL2, - REG_AON_CPU_MSTALL_CTR2_EL1, - REG_AGTCNTP_CVAL_EL0, - REG_CNTV_CVAL_NOREDIR_EL0, - REG_AGTCNTPCT_NOREDIR_EL0, - REG_AON_CPU_MSTALL_CTR3_EL1, - REG_AGTCNTP_TVAL_EL0, - REG_CNTV_TVAL_NOREDIR_EL0, - REG_VMSA_HV_LOCK_EL2, - REG_PMSWCTRL_EL1, - REG_PMCR5_EL0, - REG_AON_CPU_MSTALL_CTR4_EL1, - REG_PMCOMPARE0_EL1, - REG_PMCOMPARE1_EL1, - REG_VMSA_NV_LOCK_EL2, - REG_PMSR_EL1, - REG_AON_CPU_MSTALL_CTR5_EL1, - REG_AGTCNTP_CTL_EL0, - REG_PMCOMPARE5_EL1, - REG_PMCOMPARE6_EL1, - REG_PMCOMPARE7_EL1, - REG_PMCR_BVRNG4_EL1, - REG_PM_PMI_PC, - REG_AON_CPU_MSTALL_CTR6_EL1, - REG_AGTCNTV_CVAL_EL0, - REG_AGTCNTVCT_NOREDIR_EL0, - REG_PMCR_BVRNG5_EL1, - REG_AON_CPU_MSTALL_CTR7_EL1, - REG_AGTCNTV_TVAL_EL0, - REG_AGTCNTPCTSS_NOREDIR_EL0, - REG_CSSELR_EL1, - REG_PMC0, - REG_UPMCFILTER0, - REG_UPMCFILTER1, - REG_UPMCFILTER2, - REG_UPMCFILTER3, - REG_UPMCFILTER4, - REG_UPMCFILTER5, - REG_UPMCFILTER6, - REG_PMC1, - REG_UPMCFILTER7, - REG_PMC2, - REG_PMC3, - REG_PMC4, - REG_PMC5, - REG_PMC6, - REG_PMC7, - REG_PMC8, - REG_PMC9, - REG_PMTRHLD6_EL1, - REG_PMTRHLD4_EL1, - REG_PMTRHLD2_EL1, - REG_PMMMAP_EL1, - REG_CTR_EL0, - REG_DCZID_EL0, - REG_RNDR, - REG_RNDRRS, - REG_GCSPR_EL0, - REG_NZCV, - REG_DAIF, - REG_SVCR, - REG_DIT, - REG_SSBS, - REG_TCO, - REG_FPCR, - REG_FPSR, - REG_FPMR, - REG_DSPSR_EL0, - REG_DLR_EL0, - REG_PMICNTR_EL0, - REG_PMICFILTR_EL0, - REG_PMCR_EL0, - REG_PMCNTENSET_EL0, - REG_PMCNTENCLR_EL0, - REG_PMOVSCLR_EL0, - REG_PMSWINC_EL0, - REG_PMSELR_EL0, - REG_PMCEID0_EL0, - REG_PMCEID1_EL0, - REG_PMCCNTR_EL0, - REG_PMXEVTYPER_EL0, - REG_PMXEVCNTR_EL0, - REG_PMZR_EL0, - REG_PMUSERENR_EL0, - REG_PMOVSSET_EL0, - REG_POR_EL0, - REG_TPIDR_EL0, - REG_TPIDRRO_EL0, - REG_TPIDR2_EL0, - REG_SCXTNUM_EL0, - REG_AMCR_EL0, - REG_AMCFGR_EL0, - REG_AMCGCR_EL0, - REG_AMUSERENR_EL0, - REG_AMCNTENCLR0_EL0, - REG_AMCNTENSET0_EL0, - REG_AMCG1IDR_EL0, - REG_AMCNTENCLR1_EL0, - REG_AMCNTENSET1_EL0, - REG_AMEVCNTR00_EL0, - REG_AMEVCNTR01_EL0, - REG_AMEVCNTR02_EL0, - REG_AMEVCNTR03_EL0, - REG_AMEVTYPER00_EL0, - REG_AMEVTYPER01_EL0, - REG_AMEVTYPER02_EL0, - REG_AMEVTYPER03_EL0, - REG_AMEVCNTR10_EL0, - REG_AMEVCNTR11_EL0, - REG_AMEVCNTR12_EL0, - REG_AMEVCNTR13_EL0, - REG_AMEVCNTR14_EL0, - REG_AMEVCNTR15_EL0, - REG_AMEVCNTR16_EL0, - REG_AMEVCNTR17_EL0, - REG_AMEVCNTR18_EL0, - REG_AMEVCNTR19_EL0, - REG_AMEVCNTR110_EL0, - REG_AMEVCNTR111_EL0, - REG_AMEVCNTR112_EL0, - REG_AMEVCNTR113_EL0, - REG_AMEVCNTR114_EL0, - REG_AMEVCNTR115_EL0, - REG_AMEVTYPER10_EL0, - REG_AMEVTYPER11_EL0, - REG_AMEVTYPER12_EL0, - REG_AMEVTYPER13_EL0, - REG_AMEVTYPER14_EL0, - REG_AMEVTYPER15_EL0, - REG_AMEVTYPER16_EL0, - REG_AMEVTYPER17_EL0, - REG_AMEVTYPER18_EL0, - REG_AMEVTYPER19_EL0, - REG_AMEVTYPER110_EL0, - REG_AMEVTYPER111_EL0, - REG_AMEVTYPER112_EL0, - REG_AMEVTYPER113_EL0, - REG_AMEVTYPER114_EL0, - REG_AMEVTYPER115_EL0, - REG_CNTFRQ_EL0, - REG_CNTPCT_EL0, - REG_CNTVCT_EL0, - REG_CNTPCTSS_EL0, - REG_CNTVCTSS_EL0, - REG_CNTP_TVAL_EL0, - REG_CNTP_CTL_EL0, - REG_CNTP_CVAL_EL0, - REG_CNTV_TVAL_EL0, - REG_CNTV_CTL_EL0, - REG_CNTV_CVAL_EL0, - REG_PMEVCNTR0_EL0, - REG_PMEVCNTR1_EL0, - REG_PMEVCNTR2_EL0, - REG_PMEVCNTR3_EL0, - REG_PMEVCNTR4_EL0, - REG_PMEVCNTR5_EL0, - REG_PMEVCNTR6_EL0, - REG_PMEVCNTR7_EL0, - REG_PMEVCNTR8_EL0, - REG_PMEVCNTR9_EL0, - REG_PMEVCNTR10_EL0, - REG_PMEVCNTR11_EL0, - REG_PMEVCNTR12_EL0, - REG_PMEVCNTR13_EL0, - REG_PMEVCNTR14_EL0, - REG_PMEVCNTR15_EL0, - REG_PMEVCNTR16_EL0, - REG_PMEVCNTR17_EL0, - REG_PMEVCNTR18_EL0, - REG_PMEVCNTR19_EL0, - REG_PMEVCNTR20_EL0, - REG_PMEVCNTR21_EL0, - REG_PMEVCNTR22_EL0, - REG_PMEVCNTR23_EL0, - REG_PMEVCNTR24_EL0, - REG_PMEVCNTR25_EL0, - REG_PMEVCNTR26_EL0, - REG_PMEVCNTR27_EL0, - REG_PMEVCNTR28_EL0, - REG_PMEVCNTR29_EL0, - REG_PMEVCNTR30_EL0, - REG_PMEVTYPER0_EL0, - REG_PMEVTYPER1_EL0, - REG_PMEVTYPER2_EL0, - REG_PMEVTYPER3_EL0, - REG_PMEVTYPER4_EL0, - REG_PMEVTYPER5_EL0, - REG_PMEVTYPER6_EL0, - REG_PMEVTYPER7_EL0, - REG_PMEVTYPER8_EL0, - REG_PMEVTYPER9_EL0, - REG_PMEVTYPER10_EL0, - REG_PMEVTYPER11_EL0, - REG_PMEVTYPER12_EL0, - REG_PMEVTYPER13_EL0, - REG_PMEVTYPER14_EL0, - REG_PMEVTYPER15_EL0, - REG_PMEVTYPER16_EL0, - REG_PMEVTYPER17_EL0, - REG_PMEVTYPER18_EL0, - REG_PMEVTYPER19_EL0, - REG_PMEVTYPER20_EL0, - REG_PMEVTYPER21_EL0, - REG_PMEVTYPER22_EL0, - REG_PMEVTYPER23_EL0, - REG_PMEVTYPER24_EL0, - REG_PMEVTYPER25_EL0, - REG_PMEVTYPER26_EL0, - REG_PMEVTYPER27_EL0, - REG_PMEVTYPER28_EL0, - REG_PMEVTYPER29_EL0, - REG_PMEVTYPER30_EL0, - REG_PMCCFILTR_EL0, - REG_LSU_ERR_STS, - REG_AFLATCTL1_EL1, - REG_AFLATVALBIN0_EL1, - REG_AFLATINFLO_EL1, - REG_LSU_ERR_CTL, - REG_AFLATCTL2_EL1, - REG_AFLATVALBIN1_EL1, - REG_AFLATINFHI_EL1, - REG_AFLATCTL3_EL1, - REG_AFLATVALBIN2_EL1, - REG_AFLATCTL4_EL1, - REG_AFLATVALBIN3_EL1, - REG_LLC_FILL_CTL, - REG_AFLATCTL5_LO_EL1, - REG_AFLATVALBIN4_EL1, - REG_AFLATCTL5_HI_EL1, - REG_LLC_FILL_DAT, - REG_AFLATVALBIN5_EL1, - REG_AFLATVALBIN6_EL1, - REG_LLC_RAM_CONFIG, - REG_AFLATVALBIN7_EL1, - REG_LLC_ERR_STS, - REG_CMAINT_BCAST_LIST_0, - REG_CMAINT_BCAST_LIST_1, - REG_CMAINT_BCAST_CTL, - REG_LLC_ERR_ADR, - REG_LLC_ERR_CTL, - REG_LLC_ERR_INJ, - REG_LLC_ERR_INF, - REG_USERTAGSEL_EL1, - REG_UUSERTAG_EL0, - REG_KUSERTAG_EL1, - REG_HUSERTAG_EL2, - REG_LLC_TRACE_CTL0, - REG_LLC_TRACE_CTL1, - REG_LLC_UP_REQ_VC, - REG_LLC_UP_REQ_VC_THRESH, - REG_LLC_UP_REQ_VC_2, - REG_LLC_UP_REQ_VC_THRESH_2, - REG_LLC_DRAM_HASH0, - REG_LLC_DRAM_HASH1, - REG_LLC_DRAM_HASH2, - REG_LLC_DRAM_HASH3, - REG_LLC_TRACE_CTL2, - REG_LLC_DRAM_HASH4, - REG_LLC_UP_REQ_VC_3, - REG_LLC_UP_REQ_VC_THRESH_3, - REG_LLC_UP_REQ_VC_4, - REG_LLC_UP_REQ_VC_THRESH_4, - REG_LLC_HASH0, - REG_LLC_HASH1, - REG_LLC_HASH2, - REG_LLC_HASH3, - REG_LLC_WRR, - REG_LLC_DRAM_HASH5, - REG_LLC_DRAM_HASH6, - REG_VPIDR_EL2, - REG_VMPIDR_EL2, - REG_SCTLR_EL2, - REG_ACTLR_EL2, - REG_SCTLR2_EL2, - REG_HCR_EL2, - REG_MDCR_EL2, - REG_CPTR_EL2, - REG_HSTR_EL2, - REG_HFGRTR_EL2, - REG_HFGWTR_EL2, - REG_HFGITR_EL2, - REG_HACR_EL2, - REG_ZCR_EL2, - REG_TRFCR_EL2, - REG_HCRX_EL2, - REG_TRCITECR_EL2, - REG_SMPRIMAP_EL2, - REG_SMCR_EL2, - REG_SDER32_EL2, - REG_SCTLRMASK_EL2, - REG_ACTLRMASK_EL2, - REG_CPTRMASK_EL2, - REG_SCTLR2MASK_EL2, - REG_NVHCR_EL2, - REG_NVHCRX_EL2, - REG_NVHCRMASK_EL2, - REG_NVHCRXMASK_EL2, - REG_HCRMASK_EL2, - REG_HCRXMASK_EL2, - REG_TTBR0_EL2, - REG_TTBR1_EL2, - REG_TCR_EL2, - REG_TCR2_EL2, - REG_VTTBR_EL2, - REG_VTCR_EL2, - REG_VNCR_EL2, - REG_HDBSSBR_EL2, - REG_HDBSSPROD_EL2, - REG_HACDBSBR_EL2, - REG_HACDBSCONS_EL2, - REG_GCSCR_EL2, - REG_GCSPR_EL2, - REG_VSTTBR_EL2, - REG_VSTCR_EL2, - REG_TCRMASK_EL2, - REG_TCR2MASK_EL2, - REG_VTLBID0_EL2, - REG_VTLBID1_EL2, - REG_VTLBID2_EL2, - REG_VTLBID3_EL2, - REG_VTLBIDOS0_EL2, - REG_VTLBIDOS1_EL2, - REG_VTLBIDOS2_EL2, - REG_VTLBIDOS3_EL2, - REG_DACR32_EL2, - REG_HDFGRTR2_EL2, - REG_HDFGWTR2_EL2, - REG_HFGRTR2_EL2, - REG_HFGWTR2_EL2, - REG_HDFGRTR_EL2, - REG_HDFGWTR_EL2, - REG_HAFGRTR_EL2, - REG_HFGITR2_EL2, - REG_SPSR_EL2, - REG_ELR_EL2, - REG_SP_EL1, - REG_SPSR_IRQ, - REG_SPSR_ABT, - REG_SPSR_UND, - REG_SPSR_FIQ, - REG_IFSR32_EL2, - REG_AFSR0_EL2, - REG_AFSR1_EL2, - REG_ESR_EL2, - REG_VSESR_EL2, - REG_FPEXC32_EL2, - REG_TFSR_EL2, - REG_FAR_EL2, - REG_HPFAR_EL2, - REG_PFAR_EL2, - REG_PMSCR_EL2, - REG_PMBSR_EL2, - REG_TRBSR_EL2, - REG_MAIR2_EL2, - REG_MAIR_EL2, - REG_PIRE0_EL2, - REG_PIR_EL2, - REG_POR_EL2, - REG_S2PIR_EL2, - REG_AMAIR_EL2, - REG_AMAIR2_EL2, - REG_MPAMHCR_EL2, - REG_MPAMVPMV_EL2, - REG_MPAM2_EL2, - REG_MPAMCTL_EL2, - REG_MPAMBW2_EL2, - REG_MPAMBWCAP_EL2, - REG_MPAMVPM0_EL2, - REG_MPAMVPM1_EL2, - REG_MPAMVPM2_EL2, - REG_MPAMVPM3_EL2, - REG_MPAMVPM4_EL2, - REG_MPAMVPM5_EL2, - REG_MPAMVPM6_EL2, - REG_MPAMVPM7_EL2, - REG_MPAMVIDCR_EL2, - REG_MPAMVIDSR_EL2, - REG_MECID_P0_EL2, - REG_MECID_A0_EL2, - REG_MECID_P1_EL2, - REG_MECID_A1_EL2, - REG_MECIDR_EL2, - REG_VMECID_P_EL2, - REG_VMECID_A_EL2, - REG_VBAR_EL2, - REG_RVBAR_EL2, - REG_RMR_EL2, - REG_VDISR_EL2, - REG_ICH_AP0R0_EL2, - REG_ICH_AP0R1_EL2, - REG_ICH_AP0R2_EL2, - REG_ICH_AP0R3_EL2, - REG_ICH_APR_EL2, - REG_ICH_HPPIR_EL2, - REG_ICH_AP1R0_EL2, - REG_ICH_AP1R1_EL2, - REG_ICH_AP1R2_EL2, - REG_ICH_AP1R3_EL2, - REG_ICH_HFGRTR_EL2, - REG_ICC_SRE_EL2, - REG_ICH_HFGWTR_EL2, - REG_ICH_HFGITR_EL2, - REG_ICH_PPI_DVIR0_EL2, - REG_ICH_PPI_DVIR1_EL2, - REG_ICH_PPI_ENABLER0_EL2, - REG_ICH_PPI_ENABLER1_EL2, - REG_ICH_PPI_PENDR0_EL2, - REG_ICH_PPI_PENDR1_EL2, - REG_ICH_PPI_ACTIVER0_EL2, - REG_ICH_PPI_ACTIVER1_EL2, - REG_ICH_HCR_EL2, - REG_ICH_VTR_EL2, - REG_ICH_MISR_EL2, - REG_ICH_EISR_EL2, - REG_ICH_VCTLR_EL2, - REG_ICH_ELRSR_EL2, - REG_ICH_CONTEXTR_EL2, - REG_ICH_VMCR_EL2, - REG_ICH_LR0_EL2, - REG_ICH_LR1_EL2, - REG_ICH_LR2_EL2, - REG_ICH_LR3_EL2, - REG_ICH_LR4_EL2, - REG_ICH_LR5_EL2, - REG_ICH_LR6_EL2, - REG_ICH_LR7_EL2, - REG_ICH_LR8_EL2, - REG_ICH_LR9_EL2, - REG_ICH_LR10_EL2, - REG_ICH_LR11_EL2, - REG_ICH_LR12_EL2, - REG_ICH_LR13_EL2, - REG_ICH_LR14_EL2, - REG_ICH_LR15_EL2, - REG_ICH_PPI_PRIORITYR0_EL2, - REG_ICH_PPI_PRIORITYR1_EL2, - REG_ICH_PPI_PRIORITYR2_EL2, - REG_ICH_PPI_PRIORITYR3_EL2, - REG_ICH_PPI_PRIORITYR4_EL2, - REG_ICH_PPI_PRIORITYR5_EL2, - REG_ICH_PPI_PRIORITYR6_EL2, - REG_ICH_PPI_PRIORITYR7_EL2, - REG_ICH_PPI_PRIORITYR8_EL2, - REG_ICH_PPI_PRIORITYR9_EL2, - REG_ICH_PPI_PRIORITYR10_EL2, - REG_ICH_PPI_PRIORITYR11_EL2, - REG_ICH_PPI_PRIORITYR12_EL2, - REG_ICH_PPI_PRIORITYR13_EL2, - REG_ICH_PPI_PRIORITYR14_EL2, - REG_ICH_PPI_PRIORITYR15_EL2, - REG_CONTEXTIDR_EL2, - REG_TPIDR_EL2, - REG_SCXTNUM_EL2, - REG_AMEVCNTVOFF00_EL2, - REG_AMEVCNTVOFF01_EL2, - REG_AMEVCNTVOFF02_EL2, - REG_AMEVCNTVOFF03_EL2, - REG_AMEVCNTVOFF04_EL2, - REG_AMEVCNTVOFF05_EL2, - REG_AMEVCNTVOFF06_EL2, - REG_AMEVCNTVOFF07_EL2, - REG_AMEVCNTVOFF08_EL2, - REG_AMEVCNTVOFF09_EL2, - REG_AMEVCNTVOFF010_EL2, - REG_AMEVCNTVOFF011_EL2, - REG_AMEVCNTVOFF012_EL2, - REG_AMEVCNTVOFF013_EL2, - REG_AMEVCNTVOFF014_EL2, - REG_AMEVCNTVOFF015_EL2, - REG_AMEVCNTVOFF10_EL2, - REG_AMEVCNTVOFF11_EL2, - REG_AMEVCNTVOFF12_EL2, - REG_AMEVCNTVOFF13_EL2, - REG_AMEVCNTVOFF14_EL2, - REG_AMEVCNTVOFF15_EL2, - REG_AMEVCNTVOFF16_EL2, - REG_AMEVCNTVOFF17_EL2, - REG_AMEVCNTVOFF18_EL2, - REG_AMEVCNTVOFF19_EL2, - REG_AMEVCNTVOFF110_EL2, - REG_AMEVCNTVOFF111_EL2, - REG_AMEVCNTVOFF112_EL2, - REG_AMEVCNTVOFF113_EL2, - REG_AMEVCNTVOFF114_EL2, - REG_AMEVCNTVOFF115_EL2, - REG_CNTVOFF_EL2, - REG_CNTPOFF_EL2, - REG_CNTHCTL_EL2, - REG_CNTHP_TVAL_EL2, - REG_CNTHP_CTL_EL2, - REG_CNTHP_CVAL_EL2, - REG_CNTHV_TVAL_EL2, - REG_CNTHV_CTL_EL2, - REG_CNTHV_CVAL_EL2, - REG_CNTHVS_TVAL_EL2, - REG_CNTHVS_CTL_EL2, - REG_CNTHVS_CVAL_EL2, - REG_CNTHPS_TVAL_EL2, - REG_CNTHPS_CTL_EL2, - REG_CNTHPS_CVAL_EL2, - REG_FED_ERR_STS, - REG_FED_ERR_CTL, - REG_APCTL_EL1, - REG_KERNKEYLO_EL1, - REG_KERNKEYHI_EL1, - REG_VMSA_LOCK_EL1, - REG_AMX_STATE_T_EL1, - REG_AMX_CONFIG_EL1, - REG_VMSA_LOCK_EL2, - REG_CTRR_B_UPR_EL1, - REG_CTRR_B_LWR_EL1, - REG_SP_SETUP_GL1, - REG_SP_SETUP_GL2, - REG_CTRR_B_CTL_EL1, - REG_CTRR_A_LWR_EL1, - REG_CTRR_A_UPR_EL1, - REG_CTRR_A_CTL_EL1, - REG_VMSA_LOCK_EL12, - REG_AGTCNTV_CTL_EL02, - REG_AMX_STATE_EL1, - REG_AMX_STATUS_EL1, - REG_AGTCNTP_CVAL_EL02, - REG_REDIR_ACNTP_TVAL_EL02, - REG_AGTCNTP_CTL_EL02, - REG_AGTCNTV_CVAL_EL02, - REG_AGTCNTV_TVAL_EL02, - REG_AMX_CONFIG_EL12, - REG_AMX_CONFIG_EL2, - REG_SPRR_HUPERM_EL0, - REG_SPRR_VUPERM_EL0, - REG_CTRR_A_CTL_EL2, - REG_CTRR_B_CTL_EL2, - REG_CTRR_A_LWR_EL2, - REG_CTRR_A_UPR_EL2, - REG_CTRR_B_LWR_EL2, - REG_CTRR_B_UPR_EL2, - REG_SPRR_HUMPRR_EL2, - REG_SPRR_HUPERM_SH01_EL2, - REG_SPRR_HUPERM_SH02_EL2, - REG_SPRR_HUPERM_SH03_EL2, - REG_SPRR_HUPERM_SH04_EL2, - REG_SPRR_HUPERM_SH05_EL2, - REG_SPRR_HUPERM_SH06_EL2, - REG_SPRR_HUPERM_SH07_EL2, - REG_SPRR_VUMPRR_EL1, - REG_SPRR_VUPERM_SH01_EL1, - REG_SPRR_VUPERM_SH02_EL1, - REG_SPRR_VUPERM_SH03_EL1, - REG_SPRR_VUPERM_SH04_EL1, - REG_SPRR_VUPERM_SH05_EL1, - REG_SPRR_VUPERM_SH06_EL1, - REG_SPRR_VUPERM_SH07_EL1, - REG_CTRR_A_LWR_EL12, - REG_CTRR_A_UPR_EL12, - REG_CTRR_B_LWR_EL12, - REG_CTRR_B_UPR_EL12, - REG_CTRR_A_CTL_EL12, - REG_CTRR_B_CTL_EL12, - REG_AGTCNTKCTL_EL1, - REG_AGTCNTKCTL_EL12, - REG_PREDAKEYLO_EL1, - REG_PREDAKEYHI_EL1, - REG_PREDBKEYLO_EL1, - REG_PREDBKEYHI_EL1, - REG_SIQ_CFG_EL1, - REG_AGTCNTPCTSS_EL0, - REG_AGTCNTVCTSS_EL0, - REG_AVNCR_EL2, - REG_ACC_CTRR_A_LWR_EL2, - REG_ACC_CTRR_A_UPR_EL2, - REG_ACC_CTRR_B_LWR_EL2, - REG_ACC_CTRR_B_UPR_EL2, - REG_ACC_CTRR_A_CTL_EL2, - REG_ACC_CTRR_B_CTL_EL2, - REG_AGTCNTPCT_EL0, - REG_AGTCNTVCT_EL0, - REG_ACFG_EL1, - REG_AHCR_EL2, - REG_APL_INTSTATUS_EL1, - REG_APL_INTSTATUS_EL2, - REG_AGTCNTHCTL_EL2, - REG_JAPIAKEYLO_EL2, - REG_JAPIAKEYHI_EL2, - REG_JAPIBKEYLO_EL2, - REG_JAPIBKEYHI_EL2, - REG_JAPIAKEYLO_EL1, - REG_JAPIAKEYHI_EL1, - REG_JAPIBKEYLO_EL1, - REG_JAPIBKEYHI_EL1, - REG_JAPIAKEYLO_EL12, - REG_JAPIAKEYHI_EL12, - REG_JAPIBKEYLO_EL12, - REG_JAPIBKEYHI_EL12, - REG_AGTCNTRDIR_EL2, - REG_AGTCNTRDIR_EL12, - REG_JRANGE_EL2, - REG_JRANGE_EL1, - REG_JRANGE_EL12, - REG_JCTL_EL2, - REG_JCTL_EL1, - REG_JCTL_EL12, - REG_JCTL_EL0, - REG_AMDSCR_EL1, - REG_SCTLR_EL12, - REG_ACTLR_EL12, - REG_CPACR_EL12, - REG_SCTLR2_EL12, - REG_ZCR_EL12, - REG_TRFCR_EL12, - REG_TRCITECR_EL12, - REG_SMCR_EL12, - REG_SCTLRMASK_EL12, - REG_ACTLRMASK_EL12, - REG_CPACRMASK_EL12, - REG_SCTLR2MASK_EL12, - REG_TTBR0_EL12, - REG_TTBR1_EL12, - REG_TCR_EL12, - REG_TCR2_EL12, - REG_GCSCR_EL12, - REG_GCSPR_EL12, - REG_TCRMASK_EL12, - REG_TCR2MASK_EL12, - REG_SPSR_EL12, - REG_ELR_EL12, - REG_AFSR0_EL12, - REG_AFSR1_EL12, - REG_ESR_EL12, - REG_TFSR_EL12, - REG_FAR_EL12, - REG_PFAR_EL12, - REG_PMSCR_EL12, - REG_PMBSR_EL12, - REG_TRBSR_EL12, - REG_MAIR_EL12, - REG_MAIR2_EL12, - REG_PIRE0_EL12, - REG_PIR_EL12, - REG_POR_EL12, - REG_AMAIR_EL12, - REG_AMAIR2_EL12, - REG_MPAM1_EL12, - REG_MPAMCTL_EL12, - REG_MPAMBW1_EL12, - REG_VBAR_EL12, - REG_CONTEXTIDR_EL12, - REG_SCXTNUM_EL12, - REG_CNTKCTL_EL12, - REG_CNTP_TVAL_EL02, - REG_CNTP_CTL_EL02, - REG_CNTP_CVAL_EL02, - REG_CNTV_TVAL_EL02, - REG_CNTV_CTL_EL02, - REG_CNTV_CVAL_EL02, - REG_IPI_RR_LOCAL_EL1, - REG_IPI_RR_GLOBAL_EL1, - REG_AF_ERR_CFG0, - REG_AP_ERR_CFG0, - REG_AF_ERR_SRC_IDS, - REG_DPC_ERR_STS, - REG_DPC_ERR_CTL, - REG_PROD_TRC_CORE_CFG_EL1, - REG_TRACE_CORE_CFG, - REG_IPI_SR, - REG_APL_LRTMR_EL2, - REG_APL_INTENABLE_EL2, - REG_KTRACE_MESSAGE, - REG_TRACE_CORE_CFG_EXT, - REG_PROD_TRC_CORE_CFG_EL2, - REG_HID_PROD_TRC_CORE_CFG_EL1, - REG_DBG_WRAP_GLB, - REG_TRACE_STREAM_BASE, - REG_TRACE_STREAM_FILL, - REG_TRACE_STREAM_BASE1, - REG_TRACE_STREAM_FILL1, - REG_TRACE_STREAM_IRQ, - REG_WATCHDOGDIAG0, - REG_WATCHDOGDIAG1, - REG_TRACE_AUX_CTL, - REG_IPI_CR, - REG_UTRIG_EVENT, - REG_HID_PROD_TRC_MASK_EL1, - REG_TRACE_CTL, - REG_TRACE_DAT, - REG_PROD_TRC_STRM_BASE0_GL2, - REG_PROD_TRC_STRM_BASE1_GL2, - REG_CPU_CFG, - REG_PBLK_STS, - REG_PROD_TRC_CTL_EL1, - REG_PROD_TRC_STRM_BASE0_GL1, - REG_PROD_TRC_STRM_BASE1_GL1, - REG_PROD_TRC_STRM_FIQ_EL1, - REG_CPU_OVRD, - REG_PBLK_EXE_ST, - REG_PROD_TRC_CORE_GL_CTL_GL1, - REG_PROD_TRC_CORE_GL_CTL_GL2, - REG_ACC_OVRD, - REG_ACC_OVRD1, - REG_CPM_PWRDN_CTL, - REG_PROD_TRC_BUF_RESTORE0_GL1, - REG_PROD_TRC_BUF_RESTORE1_GL1, - REG_PROD_TRC_EN_GL1, - REG_PRE_LLCFLUSH_TMR, - REG_BIUINTFCTL_CFG, - REG_BIUINTFWRR_CFG, - REG_PRE_TD_TMR, - REG_ACC_SLP_WAKE_UP_TMR, - REG_PBLK_PSW_DLY, - REG_CPU_STS, - REG_HIST_TRIG, - REG_PROD_TRC_BUF_RESTORE0_GL2, - REG_PROD_TRC_BUF_RESTORE1_GL2, - REG_PROD_TRC_STRM_FILL0_EL1, - REG_PROD_TRC_STRM_FILL1_EL1, - REG_ARRAY_INDEX, - REG_PROD_TRC_CTL_EL2, - REG_PROD_TRC_EN_GL2, - REG_PROD_TRC_STRM_FIQ_EL2, - REG_PROD_TRC_CPMU_DUMP_TRIG_EL1, - REG_PROD_LOSS_COUNT_EL1, - REG_SW_TRACE_DATA_EL0, - REG_IL1_DATA0, - REG_IL1_DATA1, - REG_DL1_DATA0, - REG_DL1_DATA1, - REG_MMUDATA0, - REG_MMUDATA1, - REG_DL1_DATA2, - REG_IL1_DATA2, - REG_LLC_DATA0, - REG_LLC_DATA1, - REG_SCTLR_EL3, - REG_ACTLR_EL3, - REG_SCTLR2_EL3, - REG_SCR_EL3, - REG_SDER32_EL3, - REG_CPTR_EL3, - REG_FGWTE3_EL3, - REG_ZCR_EL3, - REG_SCR2_EL3, - REG_SMCR_EL3, - REG_MDCR_EL3, - REG_TTBR0_EL3, - REG_TCR_EL3, - REG_GPTBR_EL3, - REG_GPCBW_EL3, - REG_GPCCR_EL3, - REG_GCSCR_EL3, - REG_GCSPR_EL3, - REG_SPSR_EL3, - REG_ELR_EL3, - REG_SP_EL2, - REG_AFSR0_EL3, - REG_AFSR1_EL3, - REG_ESR_EL3, - REG_VSESR_EL3, - REG_TFSR_EL3, - REG_FAR_EL3, - REG_MFAR_EL3, - REG_PMBSR_EL3, - REG_TRBSR_EL3, - REG_MAIR2_EL3, - REG_MAIR_EL3, - REG_PIR_EL3, - REG_POR_EL3, - REG_AMAIR_EL3, - REG_AMAIR2_EL3, - REG_MPAM3_EL3, - REG_MPAMCTL_EL3, - REG_MPAMBW3_EL3, - REG_MECID_RL_A_EL3, - REG_VBAR_EL3, - REG_RVBAR_EL3, - REG_RMR_EL3, - REG_VDISR_EL3, - REG_ICC_APR_EL3, - REG_ICC_PCR_EL3, - REG_ICC_DOMHPPIR_EL3, - REG_ICC_PPI_DOMAINR0_EL3, - REG_ICC_PPI_DOMAINR1_EL3, - REG_ICC_PPI_DOMAINR2_EL3, - REG_ICC_PPI_DOMAINR3_EL3, - REG_ICC_CR0_EL3, - REG_ICC_HPPIR_EL3, - REG_ICC_CTLR_EL3, - REG_ICC_SRE_EL3, - REG_ICC_IGRPEN1_EL3, - REG_TPIDR_EL3, - REG_SCXTNUM_EL3, - REG_MMU_ERR_STS, - REG_AFSR1_GL1, - REG_AFSR1_GL2, - REG_AFSR1_GL12, - REG_BP_OBJC_ADR_EL1, - REG_BP_OBJC_CTL_EL1, - REG_SP_GL11, - REG_MMU_SESR_EL2, - REG_SPRR_CONFIG_EL1, - REG_HPFAR_GL2, - REG_GXF_CONFIG_EL1, - REG_SPRR_AMRANGE_EL1, - REG_GXF_CONFIG_EL2, - REG_SPRR_UPERM_EL0, - REG_SPRR_PPERM_EL1, - REG_SPRR_PPERM_EL2, - REG_APGAKEYLO_EL12, - REG_APGAKEYHI_EL12, - REG_KERNKEYLO_EL12, - REG_KERNKEYHI_EL12, - REG_AFPCR_EL0, - REG_SP_GL22, - REG_AMXIDR_EL1, - REG_SPRR_UMPRR_EL1, - REG_SPRR_PMPRR_EL1, - REG_SPRR_PMPRR_EL2, - REG_SPRR_UPERM_SH01_EL1, - REG_SPRR_UPERM_SH02_EL1, - REG_SPRR_UPERM_SH03_EL1, - REG_SPRR_UPERM_SH04_EL1, - REG_SPRR_UPERM_SH05_EL1, - REG_SPRR_UPERM_SH06_EL1, - REG_SPRR_UPERM_SH07_EL1, - REG_SPRR_PPERM_SH01_EL1, - REG_SPRR_PPERM_SH02_EL1, - REG_SPRR_PPERM_SH03_EL1, - REG_SPRR_PPERM_SH04_EL1, - REG_SPRR_PPERM_SH05_EL1, - REG_SPRR_PPERM_SH06_EL1, - REG_SPRR_PPERM_SH07_EL1, - REG_SPRR_PPERM_SH01_EL2, - REG_SPRR_PPERM_SH02_EL2, - REG_SPRR_PPERM_SH03_EL2, - REG_SPRR_PPERM_SH04_EL2, - REG_SPRR_PPERM_SH05_EL2, - REG_SPRR_PPERM_SH06_EL2, - REG_SPRR_PPERM_SH07_EL2, - REG_SPRR_PMPRR_EL12, - REG_SPRR_PPERM_SH01_EL12, - REG_SPRR_PPERM_SH02_EL12, - REG_SPRR_PPERM_SH03_EL12, - REG_SPRR_PPERM_SH04_EL12, - REG_SPRR_PPERM_SH05_EL12, - REG_SPRR_PPERM_SH06_EL12, - REG_SPRR_PPERM_SH07_EL12, - REG_APIAKEYLO_EL12, - REG_APIAKEYHI_EL12, - REG_APIBKEYLO_EL12, - REG_APIBKEYHI_EL12, - REG_APDAKEYLO_EL12, - REG_APDAKEYHI_EL12, - REG_APDBKEYLO_EL12, - REG_APDBKEYHI_EL12, - REG_CURRENTG, - REG_GXF_ENTRY_EL1, - REG_GXF_PABENTRY_EL1, - REG_ASPSR_EL1, - REG_ADSPSR_EL0, - REG_PMCR1_GL2, - REG_ASPSR_EL2, - REG_PMCR1_GL1, - REG_VBAR_GL12, - REG_SPSR_GL12, - REG_ASPSR_GL12, - REG_ESR_GL12, - REG_ELR_GL12, - REG_FAR_GL12, - REG_SP_GL1, - REG_TPIDR_GL1, - REG_VBAR_GL1, - REG_SPSR_GL1, - REG_ASPSR_GL1, - REG_ESR_GL1, - REG_ELR_GL1, - REG_FAR_GL1, - REG_SP_GL2, - REG_TPIDR_GL2, - REG_VBAR_GL2, - REG_SPSR_GL2, - REG_ASPSR_GL2, - REG_ESR_GL2, - REG_ELR_GL2, - REG_FAR_GL2, - REG_GXF_ENTRY_EL2, - REG_GXF_PABENTRY_EL2, - REG_APCTL_EL2, - REG_APSTS_EL2, - REG_APSTS_EL1, - REG_KERNKEYLO_EL2, - REG_KERNKEYHI_EL2, - REG_ASPSR_EL12, - REG_APIAKEYLO_EL2, - REG_APIAKEYHI_EL2, - REG_APIBKEYLO_EL2, - REG_APIBKEYHI_EL2, - REG_APDAKEYLO_EL2, - REG_APDAKEYHI_EL2, - REG_APDBKEYLO_EL2, - REG_APDBKEYHI_EL2, - REG_APGAKEYLO_EL2, - REG_APGAKEYHI_EL2, - REG_SPRR_CONFIG_EL2, - REG_SPRR_AMRANGE_EL2, - REG_VMKEYLO_EL2, - REG_VMKEYHI_EL2, - REG_MMU_SFAR_EL2, - REG_APSTS_EL12, - REG_APCTL_EL12, - REG_GXF_CONFIG_EL12, - REG_GXF_ENTRY_EL12, - REG_GXF_PABENTRY_EL12, - REG_SPRR_CONFIG_EL12, - REG_SPRR_AMRANGE_EL12, - REG_MMU_SESR_CTL_EL2, - REG_SPRR_PPERM_EL12, - REG_CNTPS_TVAL_EL1, - REG_CNTPS_CTL_EL1, - REG_CNTPS_CVAL_EL1, - REG_PWRDNSAVE0, - REG_NRG_ACC_CTL, - REG_AON_CNT0, - REG_CPU_CNT0, - REG_UPMCR0_EL1, - REG_UPMC8, - REG_AON_CNT8, - REG_PWRDNSAVE1, - REG_CORE_NRG_ACC_DAT, - REG_AON_CNT_CTL0, - REG_CPU_CNT_CTL0, - REG_UPMESR0_EL1, - REG_UPMC9, - REG_AON_CNT_CTL8, - REG_ACC_PWR_DN_SAVE, - REG_CPM_NRG_ACC_DAT, - REG_AON_CNT1, - REG_CPU_CNT1, - REG_UPMSWCTRL_EL1, - REG_UPMC10, - REG_AON_CNT9, - REG_CORE_SRM_NRG_ACC_DAT, - REG_AON_CNT_CTL1, - REG_CPU_CNT_CTL1, - REG_UPMECM0_EL1, - REG_UPMC11, - REG_AON_CNT_CTL9, - REG_AON_CNT_CTL, - REG_CPM_SRM_NRG_ACC_DAT, - REG_AON_CNT2, - REG_CPU_CNT2, - REG_UPMECM1_EL1, - REG_UPMC12, - REG_AON_CNT10, - REG_CPU_CNT_CTL, - REG_AON_CNT_CTL2, - REG_CPU_CNT_CTL2, - REG_UPMPCM_EL1, - REG_UPMC13, - REG_AON_CNT_CTL10, - REG_AON_CNT3, - REG_CPU_CNT3, - REG_UPMSR_EL1, - REG_UPMC14, - REG_AON_CNT11, - REG_AON_CNT_CTL3, - REG_CPU_CNT_CTL3, - REG_UPMC0, - REG_UPMC15, - REG_AON_CNT_CTL11, - REG_AON_CNT4, - REG_CPU_CNT4, - REG_UPMC1, - REG_UPMECM2_EL1, - REG_AON_CNT_CTL4, - REG_CPU_CNT_CTL4, - REG_UPMC2, - REG_UPMECM3_EL1, - REG_AON_CNT5, - REG_CPU_CNT5, - REG_UPMC3, - REG_UPMCR1_EL1, - REG_AON_CNT_CTL5, - REG_CPU_CNT_CTL5, - REG_UPMC4, - REG_UPMESR1_EL1, - REG_AON_CNT6, - REG_CPU_CNT6, - REG_UPMC5, - REG_AON_CNT_CTL6, - REG_CPU_CNT_CTL6, - REG_UPMC6, - REG_AON_CNT7, - REG_CPU_CNT7, - REG_UPMC7, - REG_AON_CNT_CTL7, - REG_CPU_CNT_CTL7, - }; - return system_regs; -} - diff --git a/arch/arm64/sysregs_enum.h b/arch/arm64/sysregs_enum.h deleted file mode 100644 index 6fbfd9c93..000000000 --- a/arch/arm64/sysregs_enum.h +++ /dev/null @@ -1,17 +0,0 @@ -/* GENERATED FILE - DO NOT MODIFY - SUBMIT GITHUB ISSUE IF PROBLEM FOUND */ -#pragma once - -#include - -#include "binaryninjaapi.h" -#include "disassembler/sysregs_gen.h" -#include "disassembler/sysregs_fmt_gen.h" - -using namespace BinaryNinja; -using namespace std; - -Ref get_system_register_enum(); -Ref get_system_register_enum_type(Ref view); -QualifiedName get_system_register_enum_type_name(Ref view); -const vector& get_system_registers(); - diff --git a/arch/arm64/system_operations.cpp b/arch/arm64/system_operations.cpp new file mode 100644 index 000000000..b822486d5 --- /dev/null +++ b/arch/arm64/system_operations.cpp @@ -0,0 +1,230 @@ +#include "system_operations.h" + +#include "base/assertions.h" + +#include +#include +#include + + +using namespace BinaryNinja; +using namespace std; + +namespace { +// The distinct instructions in exarmo's system operation table, in order of first appearance. +const vector& Instructions() +{ + static vector instructions = [] { + vector found; + for (const exarmo_aarch64_sysop_def& op : exarmo_aarch64_sysops) + { + // op0 is 1 for an operation SYS encodes and 0 for a PSTATE field that MSR sets. + if (op.op0 != 1) + continue; + + if (std::find(found.begin(), found.end(), op.instruction) == found.end()) + found.push_back(op.instruction); + } + + BN_RELEASE_ASSERT(found.size() == EXARMO_AARCH64_SYSOP_INSTRUCTION_COUNT); + return found; + }(); + + return instructions; +} + + +string InstructionName(exarmo_aarch64_mnemonic instruction) +{ + exarmo_aarch64_str name = exarmo_aarch64_mnemonic_name(instruction); + return string(name.data, name.length); +} + + +// The first of the instruction's operations that takes a register, or null if none does. exarmo +// guarantees they all take it the same way. +const exarmo_aarch64_sysop_def* RegisterRow(exarmo_aarch64_mnemonic instruction) +{ + for (const exarmo_aarch64_sysop_def& op : exarmo_aarch64_sysops) + { + if (op.op0 == 1 && op.instruction == instruction && op.reg_use != EXARMO_AARCH64_SYSOP_REG_NONE) + return &op; + } + + return nullptr; +} + + +exarmo_aarch64_mnemonic IntrinsicInstruction(uint32_t intrinsic) +{ + return Instructions()[(intrinsic - SysOpIntrinsicBase) / SysOpIntrinsicsPerInstruction]; +} + + +bool IntrinsicTakesRegister(uint32_t intrinsic) +{ + return (intrinsic - SysOpIntrinsicBase) % SysOpIntrinsicsPerInstruction; +} +} + + +uint32_t SysOpIntrinsic(exarmo_aarch64_mnemonic instruction, bool withRegister) +{ + const vector& instructions = Instructions(); + auto found = std::find(instructions.begin(), instructions.end(), instruction); + if (found == instructions.end()) + return ARM64_INTRIN_INVALID; + + size_t index = found - instructions.begin(); + return SysOpIntrinsicBase + (uint32_t)index * SysOpIntrinsicsPerInstruction + (withRegister ? 1 : 0); +} + + +const vector& SysOpLiftedIntrinsics() +{ + static vector lifted = [] { + const vector& instructions = Instructions(); + vector reached(instructions.size() * SysOpIntrinsicsPerInstruction); + for (const exarmo_aarch64_sysop_def& op : exarmo_aarch64_sysops) + { + if (op.op0 != 1) + continue; + + size_t index = std::find(instructions.begin(), instructions.end(), op.instruction) + - instructions.begin(); + + // An operation that writes XZR lifts to the intrinsic without the register. + if (op.reg_use != EXARMO_AARCH64_SYSOP_REG_REQUIRED + || op.reg_access == EXARMO_AARCH64_SYSOP_REG_WRITE) + reached[index * SysOpIntrinsicsPerInstruction] = true; + if (op.reg_use != EXARMO_AARCH64_SYSOP_REG_NONE) + reached[index * SysOpIntrinsicsPerInstruction + 1] = true; + } + + vector ids; + for (size_t i = 0; i < reached.size(); i++) + { + if (reached[i]) + ids.push_back(SysOpIntrinsicBase + (uint32_t)i); + } + + return ids; + }(); + + return lifted; +} + + +string SysOpIntrinsicName(uint32_t intrinsic) +{ + if (!IsSysOpIntrinsic(intrinsic)) + return ""; + + return "__" + InstructionName(IntrinsicInstruction(intrinsic)); +} + + +vector SysOpIntrinsicInputs(Architecture* arch, uint32_t intrinsic) +{ + if (!IsSysOpIntrinsic(intrinsic)) + return {}; + + exarmo_aarch64_mnemonic instruction = IntrinsicInstruction(intrinsic); + + vector inputs {NameAndType(InstructionName(instruction) + "_op", + Confidence>( + Type::EnumerationType(arch, SystemOperationEnumeration(instruction), 4, false), + BN_FULL_CONFIDENCE))}; + + const exarmo_aarch64_sysop_def* row = RegisterRow(instruction); + if (IntrinsicTakesRegister(intrinsic) && row && row->reg_access == EXARMO_AARCH64_SYSOP_REG_READ) + inputs.push_back(NameAndType(Type::IntegerType(row->reg_bits / 8, false))); + + return inputs; +} + + +vector>> SysOpIntrinsicOutputs(uint32_t intrinsic) +{ + if (!IsSysOpIntrinsic(intrinsic)) + return {}; + + const exarmo_aarch64_sysop_def* row = RegisterRow(IntrinsicInstruction(intrinsic)); + if (IntrinsicTakesRegister(intrinsic) && row && row->reg_access == EXARMO_AARCH64_SYSOP_REG_WRITE) + return {Type::IntegerType(row->reg_bits / 8, false)}; + + return {}; +} + + +Ref SystemOperationEnumeration(exarmo_aarch64_mnemonic instruction) +{ + // One per instruction, in the order Instructions() gives them. + static vector> enumerations = [] { + vector> built; + for (exarmo_aarch64_mnemonic each : Instructions()) + { + EnumerationBuilder builder; + for (const exarmo_aarch64_sysop_def& op : exarmo_aarch64_sysops) + { + if (op.op0 != 1 || op.instruction != each) + continue; + + builder.AddMemberWithValue(string(op.name.data, op.name.length), op.encoding); + } + built.push_back(builder.Finalize()); + } + return built; + }(); + + const vector& instructions = Instructions(); + auto found = std::find(instructions.begin(), instructions.end(), instruction); + if (found == instructions.end()) + return EnumerationBuilder().Finalize(); + + return enumerations[found - instructions.begin()]; +} + + +Ref PstateFieldEnumeration() +{ + static Ref fields = [] { + EnumerationBuilder builder; + for (const exarmo_aarch64_sysop_def& op : exarmo_aarch64_sysops) + { + if (op.op0 != 0) + continue; + + builder.AddMemberWithValue(string(op.name.data, op.name.length), op.encoding); + } + return builder.Finalize(); + }(); + + return fields; +} + + +bool SystemOperationAt( + uint32_t op1, uint32_t crn, uint32_t crm, uint32_t op2, exarmo_aarch64_sysop_def& out) +{ + for (const exarmo_aarch64_sysop_def& def : exarmo_aarch64_sysops) + { + if (def.op0 != 1 || def.op1 != op1 || def.crn != crn || def.crm != crm || def.op2 != op2) + continue; + + out = def; + return true; + } + + return false; +} + + +uint32_t SystemOperationNumber(const exarmo_aarch64_operand& operand) +{ + if (operand.kind != EXARMO_AARCH64_OPERAND_SYSOP + || operand.sysop.index >= EXARMO_AARCH64_SYSOP_COUNT) + return 0; + + return exarmo_aarch64_sysops[operand.sysop.index].encoding; +} diff --git a/arch/arm64/system_operations.h b/arch/arm64/system_operations.h new file mode 100644 index 000000000..81c0deed5 --- /dev/null +++ b/arch/arm64/system_operations.h @@ -0,0 +1,67 @@ +#pragma once + +#include "binaryninjaapi.h" +#include "il.h" + +#include "exarmo/aarch64.h" + +#include +#include +#include + +// AT, DC, IC, TLBI and similar instructions are SYS aliases that select an operation from a +// per-instruction table. Their intrinsic names come from exarmo's table. + +// Each instruction gets two intrinsics, one taking only the operation and one also taking the +// register. An intrinsic's argument list is fixed, but whether an operation takes a register varies. +constexpr uint32_t SysOpIntrinsicsPerInstruction = 2; +constexpr uint32_t SysOpIntrinsicBase = ARM64_INTRIN_NORMAL_END; +constexpr uint32_t SysOpIntrinsicCount = + EXARMO_AARCH64_SYSOP_INSTRUCTION_COUNT * SysOpIntrinsicsPerInstruction; +constexpr uint32_t SysOpIntrinsicEnd = SysOpIntrinsicBase + SysOpIntrinsicCount; + +inline bool IsSysOpIntrinsic(uint32_t intrinsic) +{ + return intrinsic >= SysOpIntrinsicBase && intrinsic < SysOpIntrinsicEnd; +} + +// The intrinsic an instruction lifts to, with or without the register. Returns +// ARM64_INTRIN_INVALID for an instruction not in exarmo's system operation table. +uint32_t SysOpIntrinsic(exarmo_aarch64_mnemonic instruction, bool withRegister); + +// The system operation intrinsics that some lift can produce, in id order. A variant that no +// operation of its instruction can reach is left out. +const std::vector& SysOpLiftedIntrinsics(); + +// The instruction's mnemonic prefixed with `__`. +std::string SysOpIntrinsicName(uint32_t intrinsic); + +// The operation, followed by the source register for an intrinsic that takes one. The register is +// as wide as the transfer, which is 128 bits for TLBIP. +std::vector SysOpIntrinsicInputs( + BinaryNinja::Architecture* arch, uint32_t intrinsic); + +// The destination register, for an intrinsic whose instruction writes one, as GICR does. Empty +// otherwise. +std::vector>> SysOpIntrinsicOutputs( + uint32_t intrinsic); + +// The operations of one instruction, as an enumeration a lifted intrinsic takes. Each member's +// value is the operation's op1:CRn:CRm:op2 encoding. +BinaryNinja::Ref SystemOperationEnumeration( + exarmo_aarch64_mnemonic instruction); + +// The PSTATE fields MSR (immediate) sets, as an enumeration valued by each field's encoding. +BinaryNinja::Ref PstateFieldEnumeration(); + +// Find the operation SYS encodes with these fields. Returns false if none matches. TLBI and TLBIP +// share 240 encodings at CRn 8 and 9, so `out.instruction` may name either. Rely only on its name +// and encoding. +bool SystemOperationAt( + uint32_t op1, uint32_t crn, uint32_t crm, uint32_t op2, exarmo_aarch64_sysop_def& out); + +// The encoding of the system operation or PSTATE field an operand names, matching the values of +// SystemOperationEnumeration and PstateFieldEnumeration. Zero for any other operand. The operand's +// own field can't be used because its layout differs between instructions and, for PSTATE fields, +// includes MSR's immediate. +uint32_t SystemOperationNumber(const exarmo_aarch64_operand& operand); diff --git a/arch/arm64/system_registers.cpp b/arch/arm64/system_registers.cpp new file mode 100644 index 000000000..18cc1aeb4 --- /dev/null +++ b/arch/arm64/system_registers.cpp @@ -0,0 +1,85 @@ +#include "system_registers.h" + +#include "apple_vendor.h" + +#include "exarmo/aarch64.h" + +#include +#include + +using namespace BinaryNinja; +using namespace std; + +namespace { +// exarmo_aarch64_sysregs is sorted by encoding. A register with separate read and write names has +// one entry per name, and the MRS name comes first. +const exarmo_aarch64_sysreg_def* ArchitecturalRegister(SystemRegister reg) +{ + if (reg.Value() >= SYSREG_END) + return nullptr; + + auto found = std::lower_bound(std::begin(exarmo_aarch64_sysregs), + std::end(exarmo_aarch64_sysregs), (uint16_t)reg.Value(), + [](const exarmo_aarch64_sysreg_def& entry, uint16_t value) { + return entry.encoding < value; + }); + + if (found == std::end(exarmo_aarch64_sysregs) || found->encoding != reg.Value()) + return nullptr; + + return found; +} +} + + +string_view SystemRegisterName(SystemRegister reg) +{ + if (const exarmo_aarch64_sysreg_def* architectural = ArchitecturalRegister(reg)) + return string_view(architectural->name.data, architectural->name.length); + + return AppleVendorSystemRegisterName(reg.Value()); +} + + +const vector& SystemRegisters() +{ + static vector registers = [] { + vector all; + for (const exarmo_aarch64_sysreg_def& def : exarmo_aarch64_sysregs) + { + // Skip the second entry of a register with separate read and write names. + if (all.empty() || all.back() != SystemRegister(def.encoding)) + all.push_back(SystemRegister(def.encoding)); + } + + vector vendor; + AppleVendorGetSystemRegisters(vendor); + for (uint32_t reg : vendor) + all.push_back(SystemRegister(reg)); + + return all; + }(); + + return registers; +} + + +Ref SystemRegisterEnumeration() +{ + static Ref registers = [] { + EnumerationBuilder builder; + // Add both names of a register with separate read and write names, so that either one + // resolves. + for (const exarmo_aarch64_sysreg_def& def : exarmo_aarch64_sysregs) + builder.AddMemberWithValue(string(def.name.data, def.name.length), def.encoding); + + vector vendor; + AppleVendorGetSystemRegisters(vendor); + for (uint32_t reg : vendor) + builder.AddMemberWithValue(string(AppleVendorSystemRegisterName(reg)), reg); + + return builder.Finalize(); + }(); + + return registers; +} diff --git a/arch/arm64/system_registers.h b/arch/arm64/system_registers.h new file mode 100644 index 000000000..86bf262fb --- /dev/null +++ b/arch/arm64/system_registers.h @@ -0,0 +1,37 @@ +#pragma once + +#include "base/strong_typedef.h" +#include "binaryninjaapi.h" + +#include "exarmo/aarch64.h" + +#include +#include +#include + +// A system register, identified by its op0:op1:CRn:CRm:op2 encoding. MRS and MSR can only name +// encodings with op0 of 2 or 3, which puts every system register at 0x8000 or above, clear of +// Register's numbers. +using SystemRegister = bn::base::StrongTypedef; + +constexpr uint32_t SYSREG_NONE = 0; +// Every named system register is below 0xFFFC, where the fake registers il.h numbers begin. +constexpr uint32_t SYSREG_END = 0xFFFC; + +// The system register an MRS or MSR names. Both number it by the same op0:op1:CRn:CRm:op2. +inline SystemRegister ToSystemRegister(exarmo_aarch64_sysreg sysreg) +{ + return SystemRegister(sysreg.encoding); +} + +// The architectural name of a system register, or Apple's name for an encoding ARM leaves +// IMPLEMENTATION DEFINED. Empty for any other number. A register with different names for reading +// and writing reports the name MRS uses. +std::string_view SystemRegisterName(SystemRegister reg); + +// Every system register that has a name, architectural or vendor. +const std::vector& SystemRegisters(); + +// The system registers as an enumeration a lifted MRS or MSR takes. +BinaryNinja::Ref SystemRegisterEnumeration(); diff --git a/arch/arm64/test_disasm.py b/arch/arm64/test_disasm.py deleted file mode 100755 index 77cf4b6c9..000000000 --- a/arch/arm64/test_disasm.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python - -# this tests disassembly through the binja API, ensuring binja <- arch <- disassembler -# -# that's an important distinction versus testing just the disassembler - -import re, struct, os, sys, ctypes - -import binaryninja -print("binaryninja.__file__:", binaryninja.__file__) - -sys.path.append('./disassembler') -import disasm_test - - -arch = None -def disassemble(addr, insnum): - global arch - if not arch: - arch = binaryninja.Architecture['aarch64'] - data = struct.pack('= N_SAMPLES: + # A word under no encoding is one the corpus records as unallocated. + if current_encoding is None or samples >= N_SAMPLES: continue (b0, b1, b2, b3, instxt) = m.group(1, 2, 3, 4, 5) data = codecs.decode(b3 + b2 + b1 + b0, "hex_codec") @@ -139,7 +116,7 @@ def gather_samples(mnems, encodings): samples += 1 continue - print("unable to parse line (%d): %r" % (i + 1, line)) + print("unable to parse line (%s:%d): %r" % (path, i + 1, line)) sys.exit(-1) diff --git a/arch/arm64/unpack_lookup.c b/arch/arm64/unpack_lookup.c deleted file mode 100644 index c446514df..000000000 --- a/arch/arm64/unpack_lookup.c +++ /dev/null @@ -1,454 +0,0 @@ -#include - -#include "disassembler/arm64dis.h" - -Register* v_unpack_lookup[15][32] = { - {// ARRSPEC_NONE = 0 - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, (Register[]) {REG_NONE}, - (Register[]) {REG_NONE}, (Register[]) {REG_NONE}}, - {// ARRSPEC_FULL = 1 - (Register[]) {REG_V0}, (Register[]) {REG_V1}, (Register[]) {REG_V2}, (Register[]) {REG_V3}, - (Register[]) {REG_V4}, (Register[]) {REG_V5}, (Register[]) {REG_V6}, (Register[]) {REG_V7}, - (Register[]) {REG_V8}, (Register[]) {REG_V9}, (Register[]) {REG_V10}, - (Register[]) {REG_V11}, (Register[]) {REG_V12}, (Register[]) {REG_V13}, - (Register[]) {REG_V14}, (Register[]) {REG_V15}, (Register[]) {REG_V16}, - (Register[]) {REG_V17}, (Register[]) {REG_V18}, (Register[]) {REG_V19}, - (Register[]) {REG_V20}, (Register[]) {REG_V21}, (Register[]) {REG_V22}, - (Register[]) {REG_V23}, (Register[]) {REG_V24}, (Register[]) {REG_V25}, - (Register[]) {REG_V26}, (Register[]) {REG_V27}, (Register[]) {REG_V28}, - (Register[]) {REG_V29}, (Register[]) {REG_V30}, (Register[]) {REG_V31}}, - {// ARRSPEC_2DOUBLES = 2 - (Register[]) {REG_V0_D0, REG_V0_D1}, (Register[]) {REG_V1_D0, REG_V1_D1}, - (Register[]) {REG_V2_D0, REG_V2_D1}, (Register[]) {REG_V3_D0, REG_V3_D1}, - (Register[]) {REG_V4_D0, REG_V4_D1}, (Register[]) {REG_V5_D0, REG_V5_D1}, - (Register[]) {REG_V6_D0, REG_V6_D1}, (Register[]) {REG_V7_D0, REG_V7_D1}, - (Register[]) {REG_V8_D0, REG_V8_D1}, (Register[]) {REG_V9_D0, REG_V9_D1}, - (Register[]) {REG_V10_D0, REG_V10_D1}, (Register[]) {REG_V11_D0, REG_V11_D1}, - (Register[]) {REG_V12_D0, REG_V12_D1}, (Register[]) {REG_V13_D0, REG_V13_D1}, - (Register[]) {REG_V14_D0, REG_V14_D1}, (Register[]) {REG_V15_D0, REG_V15_D1}, - (Register[]) {REG_V16_D0, REG_V16_D1}, (Register[]) {REG_V17_D0, REG_V17_D1}, - (Register[]) {REG_V18_D0, REG_V18_D1}, (Register[]) {REG_V19_D0, REG_V19_D1}, - (Register[]) {REG_V20_D0, REG_V20_D1}, (Register[]) {REG_V21_D0, REG_V21_D1}, - (Register[]) {REG_V22_D0, REG_V22_D1}, (Register[]) {REG_V23_D0, REG_V23_D1}, - (Register[]) {REG_V24_D0, REG_V24_D1}, (Register[]) {REG_V25_D0, REG_V25_D1}, - (Register[]) {REG_V26_D0, REG_V26_D1}, (Register[]) {REG_V27_D0, REG_V27_D1}, - (Register[]) {REG_V28_D0, REG_V28_D1}, (Register[]) {REG_V29_D0, REG_V29_D1}, - (Register[]) {REG_V30_D0, REG_V30_D1}, (Register[]) {REG_V31_D0, REG_V31_D1}}, - {// ARRSPEC_4SINGLES = 3 - (Register[]) {REG_V0_S0, REG_V0_S1, REG_V0_S2, REG_V0_S3}, - (Register[]) {REG_V1_S0, REG_V1_S1, REG_V1_S2, REG_V1_S3}, - (Register[]) {REG_V2_S0, REG_V2_S1, REG_V2_S2, REG_V2_S3}, - (Register[]) {REG_V3_S0, REG_V3_S1, REG_V3_S2, REG_V3_S3}, - (Register[]) {REG_V4_S0, REG_V4_S1, REG_V4_S2, REG_V4_S3}, - (Register[]) {REG_V5_S0, REG_V5_S1, REG_V5_S2, REG_V5_S3}, - (Register[]) {REG_V6_S0, REG_V6_S1, REG_V6_S2, REG_V6_S3}, - (Register[]) {REG_V7_S0, REG_V7_S1, REG_V7_S2, REG_V7_S3}, - (Register[]) {REG_V8_S0, REG_V8_S1, REG_V8_S2, REG_V8_S3}, - (Register[]) {REG_V9_S0, REG_V9_S1, REG_V9_S2, REG_V9_S3}, - (Register[]) {REG_V10_S0, REG_V10_S1, REG_V10_S2, REG_V10_S3}, - (Register[]) {REG_V11_S0, REG_V11_S1, REG_V11_S2, REG_V11_S3}, - (Register[]) {REG_V12_S0, REG_V12_S1, REG_V12_S2, REG_V12_S3}, - (Register[]) {REG_V13_S0, REG_V13_S1, REG_V13_S2, REG_V13_S3}, - (Register[]) {REG_V14_S0, REG_V14_S1, REG_V14_S2, REG_V14_S3}, - (Register[]) {REG_V15_S0, REG_V15_S1, REG_V15_S2, REG_V15_S3}, - (Register[]) {REG_V16_S0, REG_V16_S1, REG_V16_S2, REG_V16_S3}, - (Register[]) {REG_V17_S0, REG_V17_S1, REG_V17_S2, REG_V17_S3}, - (Register[]) {REG_V18_S0, REG_V18_S1, REG_V18_S2, REG_V18_S3}, - (Register[]) {REG_V19_S0, REG_V19_S1, REG_V19_S2, REG_V19_S3}, - (Register[]) {REG_V20_S0, REG_V20_S1, REG_V20_S2, REG_V20_S3}, - (Register[]) {REG_V21_S0, REG_V21_S1, REG_V21_S2, REG_V21_S3}, - (Register[]) {REG_V22_S0, REG_V22_S1, REG_V22_S2, REG_V22_S3}, - (Register[]) {REG_V23_S0, REG_V23_S1, REG_V23_S2, REG_V23_S3}, - (Register[]) {REG_V24_S0, REG_V24_S1, REG_V24_S2, REG_V24_S3}, - (Register[]) {REG_V25_S0, REG_V25_S1, REG_V25_S2, REG_V25_S3}, - (Register[]) {REG_V26_S0, REG_V26_S1, REG_V26_S2, REG_V26_S3}, - (Register[]) {REG_V27_S0, REG_V27_S1, REG_V27_S2, REG_V27_S3}, - (Register[]) {REG_V28_S0, REG_V28_S1, REG_V28_S2, REG_V28_S3}, - (Register[]) {REG_V29_S0, REG_V29_S1, REG_V29_S2, REG_V29_S3}, - (Register[]) {REG_V30_S0, REG_V30_S1, REG_V30_S2, REG_V30_S3}, - (Register[]) {REG_V31_S0, REG_V31_S1, REG_V31_S2, REG_V31_S3}}, - {// ARRSPEC_8HALVES = 4 - (Register[]) { - REG_V0_H0, REG_V0_H1, REG_V0_H2, REG_V0_H3, REG_V0_H4, REG_V0_H5, REG_V0_H6, REG_V0_H7}, - (Register[]) { - REG_V1_H0, REG_V1_H1, REG_V1_H2, REG_V1_H3, REG_V1_H4, REG_V1_H5, REG_V1_H6, REG_V1_H7}, - (Register[]) { - REG_V2_H0, REG_V2_H1, REG_V2_H2, REG_V2_H3, REG_V2_H4, REG_V2_H5, REG_V2_H6, REG_V2_H7}, - (Register[]) { - REG_V3_H0, REG_V3_H1, REG_V3_H2, REG_V3_H3, REG_V3_H4, REG_V3_H5, REG_V3_H6, REG_V3_H7}, - (Register[]) { - REG_V4_H0, REG_V4_H1, REG_V4_H2, REG_V4_H3, REG_V4_H4, REG_V4_H5, REG_V4_H6, REG_V4_H7}, - (Register[]) { - REG_V5_H0, REG_V5_H1, REG_V5_H2, REG_V5_H3, REG_V5_H4, REG_V5_H5, REG_V5_H6, REG_V5_H7}, - (Register[]) { - REG_V6_H0, REG_V6_H1, REG_V6_H2, REG_V6_H3, REG_V6_H4, REG_V6_H5, REG_V6_H6, REG_V6_H7}, - (Register[]) { - REG_V7_H0, REG_V7_H1, REG_V7_H2, REG_V7_H3, REG_V7_H4, REG_V7_H5, REG_V7_H6, REG_V7_H7}, - (Register[]) { - REG_V8_H0, REG_V8_H1, REG_V8_H2, REG_V8_H3, REG_V8_H4, REG_V8_H5, REG_V8_H6, REG_V8_H7}, - (Register[]) { - REG_V9_H0, REG_V9_H1, REG_V9_H2, REG_V9_H3, REG_V9_H4, REG_V9_H5, REG_V9_H6, REG_V9_H7}, - (Register[]) {REG_V10_H0, REG_V10_H1, REG_V10_H2, REG_V10_H3, REG_V10_H4, REG_V10_H5, - REG_V10_H6, REG_V10_H7}, - (Register[]) {REG_V11_H0, REG_V11_H1, REG_V11_H2, REG_V11_H3, REG_V11_H4, REG_V11_H5, - REG_V11_H6, REG_V11_H7}, - (Register[]) {REG_V12_H0, REG_V12_H1, REG_V12_H2, REG_V12_H3, REG_V12_H4, REG_V12_H5, - REG_V12_H6, REG_V12_H7}, - (Register[]) {REG_V13_H0, REG_V13_H1, REG_V13_H2, REG_V13_H3, REG_V13_H4, REG_V13_H5, - REG_V13_H6, REG_V13_H7}, - (Register[]) {REG_V14_H0, REG_V14_H1, REG_V14_H2, REG_V14_H3, REG_V14_H4, REG_V14_H5, - REG_V14_H6, REG_V14_H7}, - (Register[]) {REG_V15_H0, REG_V15_H1, REG_V15_H2, REG_V15_H3, REG_V15_H4, REG_V15_H5, - REG_V15_H6, REG_V15_H7}, - (Register[]) {REG_V16_H0, REG_V16_H1, REG_V16_H2, REG_V16_H3, REG_V16_H4, REG_V16_H5, - REG_V16_H6, REG_V16_H7}, - (Register[]) {REG_V17_H0, REG_V17_H1, REG_V17_H2, REG_V17_H3, REG_V17_H4, REG_V17_H5, - REG_V17_H6, REG_V17_H7}, - (Register[]) {REG_V18_H0, REG_V18_H1, REG_V18_H2, REG_V18_H3, REG_V18_H4, REG_V18_H5, - REG_V18_H6, REG_V18_H7}, - (Register[]) {REG_V19_H0, REG_V19_H1, REG_V19_H2, REG_V19_H3, REG_V19_H4, REG_V19_H5, - REG_V19_H6, REG_V19_H7}, - (Register[]) {REG_V20_H0, REG_V20_H1, REG_V20_H2, REG_V20_H3, REG_V20_H4, REG_V20_H5, - REG_V20_H6, REG_V20_H7}, - (Register[]) {REG_V21_H0, REG_V21_H1, REG_V21_H2, REG_V21_H3, REG_V21_H4, REG_V21_H5, - REG_V21_H6, REG_V21_H7}, - (Register[]) {REG_V22_H0, REG_V22_H1, REG_V22_H2, REG_V22_H3, REG_V22_H4, REG_V22_H5, - REG_V22_H6, REG_V22_H7}, - (Register[]) {REG_V23_H0, REG_V23_H1, REG_V23_H2, REG_V23_H3, REG_V23_H4, REG_V23_H5, - REG_V23_H6, REG_V23_H7}, - (Register[]) {REG_V24_H0, REG_V24_H1, REG_V24_H2, REG_V24_H3, REG_V24_H4, REG_V24_H5, - REG_V24_H6, REG_V24_H7}, - (Register[]) {REG_V25_H0, REG_V25_H1, REG_V25_H2, REG_V25_H3, REG_V25_H4, REG_V25_H5, - REG_V25_H6, REG_V25_H7}, - (Register[]) {REG_V26_H0, REG_V26_H1, REG_V26_H2, REG_V26_H3, REG_V26_H4, REG_V26_H5, - REG_V26_H6, REG_V26_H7}, - (Register[]) {REG_V27_H0, REG_V27_H1, REG_V27_H2, REG_V27_H3, REG_V27_H4, REG_V27_H5, - REG_V27_H6, REG_V27_H7}, - (Register[]) {REG_V28_H0, REG_V28_H1, REG_V28_H2, REG_V28_H3, REG_V28_H4, REG_V28_H5, - REG_V28_H6, REG_V28_H7}, - (Register[]) {REG_V29_H0, REG_V29_H1, REG_V29_H2, REG_V29_H3, REG_V29_H4, REG_V29_H5, - REG_V29_H6, REG_V29_H7}, - (Register[]) {REG_V30_H0, REG_V30_H1, REG_V30_H2, REG_V30_H3, REG_V30_H4, REG_V30_H5, - REG_V30_H6, REG_V30_H7}, - (Register[]) {REG_V31_H0, REG_V31_H1, REG_V31_H2, REG_V31_H3, REG_V31_H4, REG_V31_H5, - REG_V31_H6, REG_V31_H7}}, - { - // ARRSPEC_16BYTES = 5 - (Register[]) {REG_V0_B0, REG_V0_B1, REG_V0_B2, REG_V0_B3, REG_V0_B4, REG_V0_B5, REG_V0_B6, - REG_V0_B7, REG_V0_B8, REG_V0_B9, REG_V0_B10, REG_V0_B11, REG_V0_B12, REG_V0_B13, - REG_V0_B14, REG_V0_B15}, - (Register[]) {REG_V1_B0, REG_V1_B1, REG_V1_B2, REG_V1_B3, REG_V1_B4, REG_V1_B5, REG_V1_B6, - REG_V1_B7, REG_V1_B8, REG_V1_B9, REG_V1_B10, REG_V1_B11, REG_V1_B12, REG_V1_B13, - REG_V1_B14, REG_V1_B15}, - (Register[]) {REG_V2_B0, REG_V2_B1, REG_V2_B2, REG_V2_B3, REG_V2_B4, REG_V2_B5, REG_V2_B6, - REG_V2_B7, REG_V2_B8, REG_V2_B9, REG_V2_B10, REG_V2_B11, REG_V2_B12, REG_V2_B13, - REG_V2_B14, REG_V2_B15}, - (Register[]) {REG_V3_B0, REG_V3_B1, REG_V3_B2, REG_V3_B3, REG_V3_B4, REG_V3_B5, REG_V3_B6, - REG_V3_B7, REG_V3_B8, REG_V3_B9, REG_V3_B10, REG_V3_B11, REG_V3_B12, REG_V3_B13, - REG_V3_B14, REG_V3_B15}, - (Register[]) {REG_V4_B0, REG_V4_B1, REG_V4_B2, REG_V4_B3, REG_V4_B4, REG_V4_B5, REG_V4_B6, - REG_V4_B7, REG_V4_B8, REG_V4_B9, REG_V4_B10, REG_V4_B11, REG_V4_B12, REG_V4_B13, - REG_V4_B14, REG_V4_B15}, - (Register[]) {REG_V5_B0, REG_V5_B1, REG_V5_B2, REG_V5_B3, REG_V5_B4, REG_V5_B5, REG_V5_B6, - REG_V5_B7, REG_V5_B8, REG_V5_B9, REG_V5_B10, REG_V5_B11, REG_V5_B12, REG_V5_B13, - REG_V5_B14, REG_V5_B15}, - (Register[]) {REG_V6_B0, REG_V6_B1, REG_V6_B2, REG_V6_B3, REG_V6_B4, REG_V6_B5, REG_V6_B6, - REG_V6_B7, REG_V6_B8, REG_V6_B9, REG_V6_B10, REG_V6_B11, REG_V6_B12, REG_V6_B13, - REG_V6_B14, REG_V6_B15}, - (Register[]) {REG_V7_B0, REG_V7_B1, REG_V7_B2, REG_V7_B3, REG_V7_B4, REG_V7_B5, REG_V7_B6, - REG_V7_B7, REG_V7_B8, REG_V7_B9, REG_V7_B10, REG_V7_B11, REG_V7_B12, REG_V7_B13, - REG_V7_B14, REG_V7_B15}, - (Register[]) {REG_V8_B0, REG_V8_B1, REG_V8_B2, REG_V8_B3, REG_V8_B4, REG_V8_B5, REG_V8_B6, - REG_V8_B7, REG_V8_B8, REG_V8_B9, REG_V8_B10, REG_V8_B11, REG_V8_B12, REG_V8_B13, - REG_V8_B14, REG_V8_B15}, - (Register[]) {REG_V9_B0, REG_V9_B1, REG_V9_B2, REG_V9_B3, REG_V9_B4, REG_V9_B5, REG_V9_B6, - REG_V9_B7, REG_V9_B8, REG_V9_B9, REG_V9_B10, REG_V9_B11, REG_V9_B12, REG_V9_B13, - REG_V9_B14, REG_V9_B15}, - (Register[]) {REG_V10_B0, REG_V10_B1, REG_V10_B2, REG_V10_B3, REG_V10_B4, REG_V10_B5, - REG_V10_B6, REG_V10_B7, REG_V10_B8, REG_V10_B9, REG_V10_B10, REG_V10_B11, REG_V10_B12, - REG_V10_B13, REG_V10_B14, REG_V10_B15}, - (Register[]) {REG_V11_B0, REG_V11_B1, REG_V11_B2, REG_V11_B3, REG_V11_B4, REG_V11_B5, - REG_V11_B6, REG_V11_B7, REG_V11_B8, REG_V11_B9, REG_V11_B10, REG_V11_B11, REG_V11_B12, - REG_V11_B13, REG_V11_B14, REG_V11_B15}, - (Register[]) {REG_V12_B0, REG_V12_B1, REG_V12_B2, REG_V12_B3, REG_V12_B4, REG_V12_B5, - REG_V12_B6, REG_V12_B7, REG_V12_B8, REG_V12_B9, REG_V12_B10, REG_V12_B11, REG_V12_B12, - REG_V12_B13, REG_V12_B14, REG_V12_B15}, - (Register[]) {REG_V13_B0, REG_V13_B1, REG_V13_B2, REG_V13_B3, REG_V13_B4, REG_V13_B5, - REG_V13_B6, REG_V13_B7, REG_V13_B8, REG_V13_B9, REG_V13_B10, REG_V13_B11, REG_V13_B12, - REG_V13_B13, REG_V13_B14, REG_V13_B15}, - (Register[]) {REG_V14_B0, REG_V14_B1, REG_V14_B2, REG_V14_B3, REG_V14_B4, REG_V14_B5, - REG_V14_B6, REG_V14_B7, REG_V14_B8, REG_V14_B9, REG_V14_B10, REG_V14_B11, REG_V14_B12, - REG_V14_B13, REG_V14_B14, REG_V14_B15}, - (Register[]) {REG_V15_B0, REG_V15_B1, REG_V15_B2, REG_V15_B3, REG_V15_B4, REG_V15_B5, - REG_V15_B6, REG_V15_B7, REG_V15_B8, REG_V15_B9, REG_V15_B10, REG_V15_B11, REG_V15_B12, - REG_V15_B13, REG_V15_B14, REG_V15_B15}, - (Register[]) {REG_V16_B0, REG_V16_B1, REG_V16_B2, REG_V16_B3, REG_V16_B4, REG_V16_B5, - REG_V16_B6, REG_V16_B7, REG_V16_B8, REG_V16_B9, REG_V16_B10, REG_V16_B11, REG_V16_B12, - REG_V16_B13, REG_V16_B14, REG_V16_B15}, - (Register[]) {REG_V17_B0, REG_V17_B1, REG_V17_B2, REG_V17_B3, REG_V17_B4, REG_V17_B5, - REG_V17_B6, REG_V17_B7, REG_V17_B8, REG_V17_B9, REG_V17_B10, REG_V17_B11, REG_V17_B12, - REG_V17_B13, REG_V17_B14, REG_V17_B15}, - (Register[]) {REG_V18_B0, REG_V18_B1, REG_V18_B2, REG_V18_B3, REG_V18_B4, REG_V18_B5, - REG_V18_B6, REG_V18_B7, REG_V18_B8, REG_V18_B9, REG_V18_B10, REG_V18_B11, REG_V18_B12, - REG_V18_B13, REG_V18_B14, REG_V18_B15}, - (Register[]) {REG_V19_B0, REG_V19_B1, REG_V19_B2, REG_V19_B3, REG_V19_B4, REG_V19_B5, - REG_V19_B6, REG_V19_B7, REG_V19_B8, REG_V19_B9, REG_V19_B10, REG_V19_B11, REG_V19_B12, - REG_V19_B13, REG_V19_B14, REG_V19_B15}, - (Register[]) {REG_V20_B0, REG_V20_B1, REG_V20_B2, REG_V20_B3, REG_V20_B4, REG_V20_B5, - REG_V20_B6, REG_V20_B7, REG_V20_B8, REG_V20_B9, REG_V20_B10, REG_V20_B11, REG_V20_B12, - REG_V20_B13, REG_V20_B14, REG_V20_B15}, - (Register[]) {REG_V21_B0, REG_V21_B1, REG_V21_B2, REG_V21_B3, REG_V21_B4, REG_V21_B5, - REG_V21_B6, REG_V21_B7, REG_V21_B8, REG_V21_B9, REG_V21_B10, REG_V21_B11, REG_V21_B12, - REG_V21_B13, REG_V21_B14, REG_V21_B15}, - (Register[]) {REG_V22_B0, REG_V22_B1, REG_V22_B2, REG_V22_B3, REG_V22_B4, REG_V22_B5, - REG_V22_B6, REG_V22_B7, REG_V22_B8, REG_V22_B9, REG_V22_B10, REG_V22_B11, REG_V22_B12, - REG_V22_B13, REG_V22_B14, REG_V22_B15}, - (Register[]) {REG_V23_B0, REG_V23_B1, REG_V23_B2, REG_V23_B3, REG_V23_B4, REG_V23_B5, - REG_V23_B6, REG_V23_B7, REG_V23_B8, REG_V23_B9, REG_V23_B10, REG_V23_B11, REG_V23_B12, - REG_V23_B13, REG_V23_B14, REG_V23_B15}, - (Register[]) {REG_V24_B0, REG_V24_B1, REG_V24_B2, REG_V24_B3, REG_V24_B4, REG_V24_B5, - REG_V24_B6, REG_V24_B7, REG_V24_B8, REG_V24_B9, REG_V24_B10, REG_V24_B11, REG_V24_B12, - REG_V24_B13, REG_V24_B14, REG_V24_B15}, - (Register[]) {REG_V25_B0, REG_V25_B1, REG_V25_B2, REG_V25_B3, REG_V25_B4, REG_V25_B5, - REG_V25_B6, REG_V25_B7, REG_V25_B8, REG_V25_B9, REG_V25_B10, REG_V25_B11, REG_V25_B12, - REG_V25_B13, REG_V25_B14, REG_V25_B15}, - (Register[]) {REG_V26_B0, REG_V26_B1, REG_V26_B2, REG_V26_B3, REG_V26_B4, REG_V26_B5, - REG_V26_B6, REG_V26_B7, REG_V26_B8, REG_V26_B9, REG_V26_B10, REG_V26_B11, REG_V26_B12, - REG_V26_B13, REG_V26_B14, REG_V26_B15}, - (Register[]) {REG_V27_B0, REG_V27_B1, REG_V27_B2, REG_V27_B3, REG_V27_B4, REG_V27_B5, - REG_V27_B6, REG_V27_B7, REG_V27_B8, REG_V27_B9, REG_V27_B10, REG_V27_B11, REG_V27_B12, - REG_V27_B13, REG_V27_B14, REG_V27_B15}, - (Register[]) {REG_V28_B0, REG_V28_B1, REG_V28_B2, REG_V28_B3, REG_V28_B4, REG_V28_B5, - REG_V28_B6, REG_V28_B7, REG_V28_B8, REG_V28_B9, REG_V28_B10, REG_V28_B11, REG_V28_B12, - REG_V28_B13, REG_V28_B14, REG_V28_B15}, - (Register[]) {REG_V29_B0, REG_V29_B1, REG_V29_B2, REG_V29_B3, REG_V29_B4, REG_V29_B5, - REG_V29_B6, REG_V29_B7, REG_V29_B8, REG_V29_B9, REG_V29_B10, REG_V29_B11, REG_V29_B12, - REG_V29_B13, REG_V29_B14, REG_V29_B15}, - (Register[]) {REG_V30_B0, REG_V30_B1, REG_V30_B2, REG_V30_B3, REG_V30_B4, REG_V30_B5, - REG_V30_B6, REG_V30_B7, REG_V30_B8, REG_V30_B9, REG_V30_B10, REG_V30_B11, REG_V30_B12, - REG_V30_B13, REG_V30_B14, REG_V30_B15}, - (Register[]) {REG_V31_B0, REG_V31_B1, REG_V31_B2, REG_V31_B3, REG_V31_B4, REG_V31_B5, - REG_V31_B6, REG_V31_B7, REG_V31_B8, REG_V31_B9, REG_V31_B10, REG_V31_B11, REG_V31_B12, - REG_V31_B13, REG_V31_B14, REG_V31_B15}, - }, - {// ARRSPEC_1DOUBLE = 6 - (Register[]) {REG_V0_D0}, (Register[]) {REG_V1_D0}, (Register[]) {REG_V2_D0}, - (Register[]) {REG_V3_D0}, (Register[]) {REG_V4_D0}, (Register[]) {REG_V5_D0}, - (Register[]) {REG_V6_D0}, (Register[]) {REG_V7_D0}, (Register[]) {REG_V8_D0}, - (Register[]) {REG_V9_D0}, (Register[]) {REG_V10_D0}, (Register[]) {REG_V11_D0}, - (Register[]) {REG_V12_D0}, (Register[]) {REG_V13_D0}, (Register[]) {REG_V14_D0}, - (Register[]) {REG_V15_D0}, (Register[]) {REG_V16_D0}, (Register[]) {REG_V17_D0}, - (Register[]) {REG_V18_D0}, (Register[]) {REG_V19_D0}, (Register[]) {REG_V20_D0}, - (Register[]) {REG_V21_D0}, (Register[]) {REG_V22_D0}, (Register[]) {REG_V23_D0}, - (Register[]) {REG_V24_D0}, (Register[]) {REG_V25_D0}, (Register[]) {REG_V26_D0}, - (Register[]) {REG_V27_D0}, (Register[]) {REG_V28_D0}, (Register[]) {REG_V29_D0}, - (Register[]) {REG_V30_D0}, (Register[]) {REG_V31_D0}}, - {// ARRSPEC_2SINGLES = 7 - (Register[]) {REG_V0_S0, REG_V0_S1}, (Register[]) {REG_V1_S0, REG_V1_S1}, - (Register[]) {REG_V2_S0, REG_V2_S1}, (Register[]) {REG_V3_S0, REG_V3_S1}, - (Register[]) {REG_V4_S0, REG_V4_S1}, (Register[]) {REG_V5_S0, REG_V5_S1}, - (Register[]) {REG_V6_S0, REG_V6_S1}, (Register[]) {REG_V7_S0, REG_V7_S1}, - (Register[]) {REG_V8_S0, REG_V8_S1}, (Register[]) {REG_V9_S0, REG_V9_S1}, - (Register[]) {REG_V10_S0, REG_V10_S1}, (Register[]) {REG_V11_S0, REG_V11_S1}, - (Register[]) {REG_V12_S0, REG_V12_S1}, (Register[]) {REG_V13_S0, REG_V13_S1}, - (Register[]) {REG_V14_S0, REG_V14_S1}, (Register[]) {REG_V15_S0, REG_V15_S1}, - (Register[]) {REG_V16_S0, REG_V16_S1}, (Register[]) {REG_V17_S0, REG_V17_S1}, - (Register[]) {REG_V18_S0, REG_V18_S1}, (Register[]) {REG_V19_S0, REG_V19_S1}, - (Register[]) {REG_V20_S0, REG_V20_S1}, (Register[]) {REG_V21_S0, REG_V21_S1}, - (Register[]) {REG_V22_S0, REG_V22_S1}, (Register[]) {REG_V23_S0, REG_V23_S1}, - (Register[]) {REG_V24_S0, REG_V24_S1}, (Register[]) {REG_V25_S0, REG_V25_S1}, - (Register[]) {REG_V26_S0, REG_V26_S1}, (Register[]) {REG_V27_S0, REG_V27_S1}, - (Register[]) {REG_V28_S0, REG_V28_S1}, (Register[]) {REG_V29_S0, REG_V29_S1}, - (Register[]) {REG_V30_S0, REG_V30_S1}, (Register[]) {REG_V31_S0, REG_V31_S1}}, - {// ARRSPEC_4HALVES = 8 - (Register[]) {REG_V0_H0, REG_V0_H1, REG_V0_H2, REG_V0_H3}, - (Register[]) {REG_V1_H0, REG_V1_H1, REG_V1_H2, REG_V1_H3}, - (Register[]) {REG_V2_H0, REG_V2_H1, REG_V2_H2, REG_V2_H3}, - (Register[]) {REG_V3_H0, REG_V3_H1, REG_V3_H2, REG_V3_H3}, - (Register[]) {REG_V4_H0, REG_V4_H1, REG_V4_H2, REG_V4_H3}, - (Register[]) {REG_V5_H0, REG_V5_H1, REG_V5_H2, REG_V5_H3}, - (Register[]) {REG_V6_H0, REG_V6_H1, REG_V6_H2, REG_V6_H3}, - (Register[]) {REG_V7_H0, REG_V7_H1, REG_V7_H2, REG_V7_H3}, - (Register[]) {REG_V8_H0, REG_V8_H1, REG_V8_H2, REG_V8_H3}, - (Register[]) {REG_V9_H0, REG_V9_H1, REG_V9_H2, REG_V9_H3}, - (Register[]) {REG_V10_H0, REG_V10_H1, REG_V10_H2, REG_V10_H3}, - (Register[]) {REG_V11_H0, REG_V11_H1, REG_V11_H2, REG_V11_H3}, - (Register[]) {REG_V12_H0, REG_V12_H1, REG_V12_H2, REG_V12_H3}, - (Register[]) {REG_V13_H0, REG_V13_H1, REG_V13_H2, REG_V13_H3}, - (Register[]) {REG_V14_H0, REG_V14_H1, REG_V14_H2, REG_V14_H3}, - (Register[]) {REG_V15_H0, REG_V15_H1, REG_V15_H2, REG_V15_H3}, - (Register[]) {REG_V16_H0, REG_V16_H1, REG_V16_H2, REG_V16_H3}, - (Register[]) {REG_V17_H0, REG_V17_H1, REG_V17_H2, REG_V17_H3}, - (Register[]) {REG_V18_H0, REG_V18_H1, REG_V18_H2, REG_V18_H3}, - (Register[]) {REG_V19_H0, REG_V19_H1, REG_V19_H2, REG_V19_H3}, - (Register[]) {REG_V20_H0, REG_V20_H1, REG_V20_H2, REG_V20_H3}, - (Register[]) {REG_V21_H0, REG_V21_H1, REG_V21_H2, REG_V21_H3}, - (Register[]) {REG_V22_H0, REG_V22_H1, REG_V22_H2, REG_V22_H3}, - (Register[]) {REG_V23_H0, REG_V23_H1, REG_V23_H2, REG_V23_H3}, - (Register[]) {REG_V24_H0, REG_V24_H1, REG_V24_H2, REG_V24_H3}, - (Register[]) {REG_V25_H0, REG_V25_H1, REG_V25_H2, REG_V25_H3}, - (Register[]) {REG_V26_H0, REG_V26_H1, REG_V26_H2, REG_V26_H3}, - (Register[]) {REG_V27_H0, REG_V27_H1, REG_V27_H2, REG_V27_H3}, - (Register[]) {REG_V28_H0, REG_V28_H1, REG_V28_H2, REG_V28_H3}, - (Register[]) {REG_V29_H0, REG_V29_H1, REG_V29_H2, REG_V29_H3}, - (Register[]) {REG_V30_H0, REG_V30_H1, REG_V30_H2, REG_V30_H3}, - (Register[]) {REG_V31_H0, REG_V31_H1, REG_V31_H2, REG_V31_H3}}, - { - // ARRSPEC_8BYTES = 9 - (Register[]) { - REG_V0_B0, REG_V0_B1, REG_V0_B2, REG_V0_B3, REG_V0_B4, REG_V0_B5, REG_V0_B6, REG_V0_B7}, - (Register[]) { - REG_V1_B0, REG_V1_B1, REG_V1_B2, REG_V1_B3, REG_V1_B4, REG_V1_B5, REG_V1_B6, REG_V1_B7}, - (Register[]) { - REG_V2_B0, REG_V2_B1, REG_V2_B2, REG_V2_B3, REG_V2_B4, REG_V2_B5, REG_V2_B6, REG_V2_B7}, - (Register[]) { - REG_V3_B0, REG_V3_B1, REG_V3_B2, REG_V3_B3, REG_V3_B4, REG_V3_B5, REG_V3_B6, REG_V3_B7}, - (Register[]) { - REG_V4_B0, REG_V4_B1, REG_V4_B2, REG_V4_B3, REG_V4_B4, REG_V4_B5, REG_V4_B6, REG_V4_B7}, - (Register[]) { - REG_V5_B0, REG_V5_B1, REG_V5_B2, REG_V5_B3, REG_V5_B4, REG_V5_B5, REG_V5_B6, REG_V5_B7}, - (Register[]) { - REG_V6_B0, REG_V6_B1, REG_V6_B2, REG_V6_B3, REG_V6_B4, REG_V6_B5, REG_V6_B6, REG_V6_B7}, - (Register[]) { - REG_V7_B0, REG_V7_B1, REG_V7_B2, REG_V7_B3, REG_V7_B4, REG_V7_B5, REG_V7_B6, REG_V7_B7}, - (Register[]) { - REG_V8_B0, REG_V8_B1, REG_V8_B2, REG_V8_B3, REG_V8_B4, REG_V8_B5, REG_V8_B6, REG_V8_B7}, - (Register[]) { - REG_V9_B0, REG_V9_B1, REG_V9_B2, REG_V9_B3, REG_V9_B4, REG_V9_B5, REG_V9_B6, REG_V9_B7}, - (Register[]) {REG_V10_B0, REG_V10_B1, REG_V10_B2, REG_V10_B3, REG_V10_B4, REG_V10_B5, - REG_V10_B6, REG_V10_B7}, - (Register[]) {REG_V11_B0, REG_V11_B1, REG_V11_B2, REG_V11_B3, REG_V11_B4, REG_V11_B5, - REG_V11_B6, REG_V11_B7}, - (Register[]) {REG_V12_B0, REG_V12_B1, REG_V12_B2, REG_V12_B3, REG_V12_B4, REG_V12_B5, - REG_V12_B6, REG_V12_B7}, - (Register[]) {REG_V13_B0, REG_V13_B1, REG_V13_B2, REG_V13_B3, REG_V13_B4, REG_V13_B5, - REG_V13_B6, REG_V13_B7}, - (Register[]) {REG_V14_B0, REG_V14_B1, REG_V14_B2, REG_V14_B3, REG_V14_B4, REG_V14_B5, - REG_V14_B6, REG_V14_B7}, - (Register[]) {REG_V15_B0, REG_V15_B1, REG_V15_B2, REG_V15_B3, REG_V15_B4, REG_V15_B5, - REG_V15_B6, REG_V15_B7}, - (Register[]) {REG_V16_B0, REG_V16_B1, REG_V16_B2, REG_V16_B3, REG_V16_B4, REG_V16_B5, - REG_V16_B6, REG_V16_B7}, - (Register[]) {REG_V17_B0, REG_V17_B1, REG_V17_B2, REG_V17_B3, REG_V17_B4, REG_V17_B5, - REG_V17_B6, REG_V17_B7}, - (Register[]) {REG_V18_B0, REG_V18_B1, REG_V18_B2, REG_V18_B3, REG_V18_B4, REG_V18_B5, - REG_V18_B6, REG_V18_B7}, - (Register[]) {REG_V19_B0, REG_V19_B1, REG_V19_B2, REG_V19_B3, REG_V19_B4, REG_V19_B5, - REG_V19_B6, REG_V19_B7}, - (Register[]) {REG_V20_B0, REG_V20_B1, REG_V20_B2, REG_V20_B3, REG_V20_B4, REG_V20_B5, - REG_V20_B6, REG_V20_B7}, - (Register[]) {REG_V21_B0, REG_V21_B1, REG_V21_B2, REG_V21_B3, REG_V21_B4, REG_V21_B5, - REG_V21_B6, REG_V21_B7}, - (Register[]) {REG_V22_B0, REG_V22_B1, REG_V22_B2, REG_V22_B3, REG_V22_B4, REG_V22_B5, - REG_V22_B6, REG_V22_B7}, - (Register[]) {REG_V23_B0, REG_V23_B1, REG_V23_B2, REG_V23_B3, REG_V23_B4, REG_V23_B5, - REG_V23_B6, REG_V23_B7}, - (Register[]) {REG_V24_B0, REG_V24_B1, REG_V24_B2, REG_V24_B3, REG_V24_B4, REG_V24_B5, - REG_V24_B6, REG_V24_B7}, - (Register[]) {REG_V25_B0, REG_V25_B1, REG_V25_B2, REG_V25_B3, REG_V25_B4, REG_V25_B5, - REG_V25_B6, REG_V25_B7}, - (Register[]) {REG_V26_B0, REG_V26_B1, REG_V26_B2, REG_V26_B3, REG_V26_B4, REG_V26_B5, - REG_V26_B6, REG_V26_B7}, - (Register[]) {REG_V27_B0, REG_V27_B1, REG_V27_B2, REG_V27_B3, REG_V27_B4, REG_V27_B5, - REG_V27_B6, REG_V27_B7}, - (Register[]) {REG_V28_B0, REG_V28_B1, REG_V28_B2, REG_V28_B3, REG_V28_B4, REG_V28_B5, - REG_V28_B6, REG_V28_B7}, - (Register[]) {REG_V29_B0, REG_V29_B1, REG_V29_B2, REG_V29_B3, REG_V29_B4, REG_V29_B5, - REG_V29_B6, REG_V29_B7}, - (Register[]) {REG_V30_B0, REG_V30_B1, REG_V30_B2, REG_V30_B3, REG_V30_B4, REG_V30_B5, - REG_V30_B6, REG_V30_B7}, - (Register[]) {REG_V31_B0, REG_V31_B1, REG_V31_B2, REG_V31_B3, REG_V31_B4, REG_V31_B5, - REG_V31_B6, REG_V31_B7}, - }, - {// ARRSPEC_1SINGLE = 10 - (Register[]) {REG_V0_S0}, (Register[]) {REG_V1_S0}, (Register[]) {REG_V2_S0}, - (Register[]) {REG_V3_S0}, (Register[]) {REG_V4_S0}, (Register[]) {REG_V5_S0}, - (Register[]) {REG_V6_S0}, (Register[]) {REG_V7_S0}, (Register[]) {REG_V8_S0}, - (Register[]) {REG_V9_S0}, (Register[]) {REG_V10_S0}, (Register[]) {REG_V11_S0}, - (Register[]) {REG_V12_S0}, (Register[]) {REG_V13_S0}, (Register[]) {REG_V14_S0}, - (Register[]) {REG_V15_S0}, (Register[]) {REG_V16_S0}, (Register[]) {REG_V17_S0}, - (Register[]) {REG_V18_S0}, (Register[]) {REG_V19_S0}, (Register[]) {REG_V20_S0}, - (Register[]) {REG_V21_S0}, (Register[]) {REG_V22_S0}, (Register[]) {REG_V23_S0}}, - {// ARRSPEC_2HALVES = 11 - (Register[]) {REG_V0_H0, REG_V0_H1}, (Register[]) {REG_V1_H0, REG_V1_H1}, - (Register[]) {REG_V2_H0, REG_V2_H1}, (Register[]) {REG_V3_H0, REG_V3_H1}, - (Register[]) {REG_V4_H0, REG_V4_H1}, (Register[]) {REG_V5_H0, REG_V5_H1}, - (Register[]) {REG_V6_H0, REG_V6_H1}, (Register[]) {REG_V7_H0, REG_V7_H1}, - (Register[]) {REG_V8_H0, REG_V8_H1}, (Register[]) {REG_V9_H0, REG_V9_H1}, - (Register[]) {REG_V10_H0, REG_V10_H1}, (Register[]) {REG_V11_H0, REG_V11_H1}, - (Register[]) {REG_V12_H0, REG_V12_H1}, (Register[]) {REG_V13_H0, REG_V13_H1}, - (Register[]) {REG_V14_H0, REG_V14_H1}, (Register[]) {REG_V15_H0, REG_V15_H1}, - (Register[]) {REG_V16_H0, REG_V16_H1}, (Register[]) {REG_V17_H0, REG_V17_H1}, - (Register[]) {REG_V18_H0, REG_V18_H1}, (Register[]) {REG_V19_H0, REG_V19_H1}, - (Register[]) {REG_V20_H0, REG_V20_H1}, (Register[]) {REG_V21_H0, REG_V21_H1}, - (Register[]) {REG_V22_H0, REG_V22_H1}, (Register[]) {REG_V23_H0, REG_V23_H1}, - (Register[]) {REG_V24_H0, REG_V24_H1}, (Register[]) {REG_V25_H0, REG_V25_H1}, - (Register[]) {REG_V26_H0, REG_V26_H1}, (Register[]) {REG_V27_H0, REG_V27_H1}, - (Register[]) {REG_V28_H0, REG_V28_H1}, (Register[]) {REG_V29_H0, REG_V29_H1}, - (Register[]) {REG_V30_H0, REG_V30_H1}, (Register[]) {REG_V31_H0, REG_V31_H1}}, - {// ARRSPEC_4BYTES = 12 - (Register[]) {REG_V0_B0, REG_V0_B1, REG_V0_B2, REG_V0_B3}, - (Register[]) {REG_V1_B0, REG_V1_B1, REG_V1_B2, REG_V1_B3}, - (Register[]) {REG_V2_B0, REG_V2_B1, REG_V2_B2, REG_V2_B3}, - (Register[]) {REG_V3_B0, REG_V3_B1, REG_V3_B2, REG_V3_B3}, - (Register[]) {REG_V4_B0, REG_V4_B1, REG_V4_B2, REG_V4_B3}, - (Register[]) {REG_V5_B0, REG_V5_B1, REG_V5_B2, REG_V5_B3}, - (Register[]) {REG_V6_B0, REG_V6_B1, REG_V6_B2, REG_V6_B3}, - (Register[]) {REG_V7_B0, REG_V7_B1, REG_V7_B2, REG_V7_B3}, - (Register[]) {REG_V8_B0, REG_V8_B1, REG_V8_B2, REG_V8_B3}, - (Register[]) {REG_V9_B0, REG_V9_B1, REG_V9_B2, REG_V9_B3}, - (Register[]) {REG_V10_B0, REG_V10_B1, REG_V10_B2, REG_V10_B3}, - (Register[]) {REG_V11_B0, REG_V11_B1, REG_V11_B2, REG_V11_B3}, - (Register[]) {REG_V12_B0, REG_V12_B1, REG_V12_B2, REG_V12_B3}, - (Register[]) {REG_V13_B0, REG_V13_B1, REG_V13_B2, REG_V13_B3}, - (Register[]) {REG_V14_B0, REG_V14_B1, REG_V14_B2, REG_V14_B3}, - (Register[]) {REG_V15_B0, REG_V15_B1, REG_V15_B2, REG_V15_B3}, - (Register[]) {REG_V16_B0, REG_V16_B1, REG_V16_B2, REG_V16_B3}, - (Register[]) {REG_V17_B0, REG_V17_B1, REG_V17_B2, REG_V17_B3}, - (Register[]) {REG_V18_B0, REG_V18_B1, REG_V18_B2, REG_V18_B3}, - (Register[]) {REG_V19_B0, REG_V19_B1, REG_V19_B2, REG_V19_B3}, - (Register[]) {REG_V20_B0, REG_V20_B1, REG_V20_B2, REG_V20_B3}, - (Register[]) {REG_V21_B0, REG_V21_B1, REG_V21_B2, REG_V21_B3}, - (Register[]) {REG_V22_B0, REG_V22_B1, REG_V22_B2, REG_V22_B3}, - (Register[]) {REG_V23_B0, REG_V23_B1, REG_V23_B2, REG_V23_B3}, - (Register[]) {REG_V24_B0, REG_V24_B1, REG_V24_B2, REG_V24_B3}, - (Register[]) {REG_V25_B0, REG_V25_B1, REG_V25_B2, REG_V25_B3}, - (Register[]) {REG_V26_B0, REG_V26_B1, REG_V26_B2, REG_V26_B3}, - (Register[]) {REG_V27_B0, REG_V27_B1, REG_V27_B2, REG_V27_B3}, - (Register[]) {REG_V28_B0, REG_V28_B1, REG_V28_B2, REG_V28_B3}, - (Register[]) {REG_V29_B0, REG_V29_B1, REG_V29_B2, REG_V29_B3}, - (Register[]) {REG_V30_B0, REG_V30_B1, REG_V30_B2, REG_V30_B3}, - (Register[]) {REG_V31_B0, REG_V31_B1, REG_V31_B2, REG_V31_B3}}, - {// ARRSPEC_1HALF = 13 - (Register[]) {REG_V0_H0}, (Register[]) {REG_V1_H0}, (Register[]) {REG_V2_H0}, - (Register[]) {REG_V3_H0}, (Register[]) {REG_V4_H0}, (Register[]) {REG_V5_H0}, - (Register[]) {REG_V6_H0}, (Register[]) {REG_V7_H0}, (Register[]) {REG_V8_H0}, - (Register[]) {REG_V9_H0}, (Register[]) {REG_V10_H0}, (Register[]) {REG_V11_H0}, - (Register[]) {REG_V12_H0}, (Register[]) {REG_V13_H0}, (Register[]) {REG_V14_H0}, - (Register[]) {REG_V15_H0}, (Register[]) {REG_V16_H0}, (Register[]) {REG_V17_H0}, - (Register[]) {REG_V18_H0}, (Register[]) {REG_V19_H0}, (Register[]) {REG_V20_H0}, - (Register[]) {REG_V21_H0}, (Register[]) {REG_V22_H0}, (Register[]) {REG_V23_H0}, - (Register[]) {REG_V24_H0}, (Register[]) {REG_V25_H0}, (Register[]) {REG_V26_H0}, - (Register[]) {REG_V27_H0}, (Register[]) {REG_V28_H0}, (Register[]) {REG_V29_H0}, - (Register[]) {REG_V30_H0}, (Register[]) {REG_V31_H0}}, - {// ARRSPEC_1BYTE = 14 - (Register[]) {REG_V0_B0}, (Register[]) {REG_V1_B0}, (Register[]) {REG_V2_B0}, - (Register[]) {REG_V3_B0}, (Register[]) {REG_V4_B0}, (Register[]) {REG_V5_B0}, - (Register[]) {REG_V6_B0}, (Register[]) {REG_V7_B0}, (Register[]) {REG_V8_B0}, - (Register[]) {REG_V9_B0}, (Register[]) {REG_V10_B0}, (Register[]) {REG_V11_B0}, - (Register[]) {REG_V12_B0}, (Register[]) {REG_V13_B0}, (Register[]) {REG_V14_B0}, - (Register[]) {REG_V15_B0}, (Register[]) {REG_V16_B0}, (Register[]) {REG_V17_B0}, - (Register[]) {REG_V18_B0}, (Register[]) {REG_V19_B0}, (Register[]) {REG_V20_B0}, - (Register[]) {REG_V21_B0}, (Register[]) {REG_V22_B0}, (Register[]) {REG_V23_B0}, - (Register[]) {REG_V24_B0}, (Register[]) {REG_V25_B0}, (Register[]) {REG_V26_B0}, - (Register[]) {REG_V27_B0}, (Register[]) {REG_V28_B0}, (Register[]) {REG_V29_B0}, - (Register[]) {REG_V30_B0}, (Register[]) {REG_V31_B0}}}; From 4473cb536eef5ba40d79c2e42ee47a904a50ae88 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 25 Sep 2026 19:16:38 -0700 Subject: [PATCH 3/5] [aarch64] Report only the registers AArch64 actually has The `Register` enumeration numbered its members by position. A register's number is saved with any variable held in it, so inserting or removing a member renumbered everything after it and could break saved databases. Every register is now numbered explicitly, with the number it already had, and the name table asserts that its length matches. `REG_PF0` to `REG_PF31`, the old decoder's prefetch operations, are gone without moving any other register. The old decoder gave every register file 32 entries, so the architecture reported p16 to p31 beside the 16 predicate registers SVE defines, and named p29 twice where p28 belonged. It now reports only p0 to p15. ZT0 was in the enumeration but in none of the lists Binary Ninja reads, so it had no size. It is now reported as the 512-bit register it is. --- arch/arm64/arch_arm64.cpp | 28 +- arch/arm64/il.h | 6 +- arch/arm64/registers.cpp | 17 +- arch/arm64/registers.h | 2586 ++++++++++++++++++------------------- 4 files changed, 1289 insertions(+), 1348 deletions(-) diff --git a/arch/arm64/arch_arm64.cpp b/arch/arm64/arch_arm64.cpp index 90f5bdb4b..125a7709e 100644 --- a/arch/arm64/arch_arm64.cpp +++ b/arch/arm64/arch_arm64.cpp @@ -1560,8 +1560,8 @@ class Arm64Architecture : public Architecture // SVE REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_P6, REG_P7, REG_P8, REG_P9, REG_P10, REG_P11, REG_P12, REG_P13, REG_P14, REG_P15, - REG_P16, REG_P17, REG_P18, REG_P19, REG_P20, REG_P21, REG_P22, REG_P23, - REG_P24, REG_P25, REG_P26, REG_P27, REG_P29, REG_P29, REG_P30, REG_P31, + // SME + REG_ZT0, }; return r; } @@ -1734,10 +1734,8 @@ class Arm64Architecture : public Architecture REG_Z24, REG_Z25, REG_Z26, REG_Z27, REG_Z28, REG_Z29, REG_Z30, REG_Z31, REG_P0, REG_P1, REG_P2, REG_P3, REG_P4, REG_P5, REG_P6, REG_P7, REG_P8, REG_P9, REG_P10, REG_P11, REG_P12, REG_P13, REG_P14, REG_P15, - REG_P16, REG_P17, REG_P18, REG_P19, REG_P20, REG_P21, REG_P22, REG_P23, - REG_P24, REG_P25, REG_P26, REG_P27, REG_P28, REG_P29, REG_P30, REG_P31, - /* system registers -- removed because they're not registers anymore */ - + // SME + REG_ZT0, /* fake registers */ FAKEREG_SYSREG_UNKNOWN, /* acts as an input/output to ARM64_INTRIN_MSR, ARM64_INTRIN_MRS intrinsics when the sysreg @@ -2065,23 +2063,9 @@ class Arm64Architecture : public Architecture case REG_P13: case REG_P14: case REG_P15: - case REG_P16: - case REG_P17: - case REG_P18: - case REG_P19: - case REG_P20: - case REG_P21: - case REG_P22: - case REG_P23: - case REG_P24: - case REG_P25: - case REG_P26: - case REG_P27: - case REG_P28: - case REG_P29: - case REG_P30: - case REG_P31: return RegisterInfo(reg, 0, 32); + case REG_ZT0: + return RegisterInfo(reg, 0, 64); } if (reg >= REG_V0_B0 && reg <= REG_V31_B15) { diff --git a/arch/arm64/il.h b/arch/arm64/il.h index 5589d352a..67888fe5a 100644 --- a/arch/arm64/il.h +++ b/arch/arm64/il.h @@ -135,10 +135,12 @@ enum Arm64Intrinsic : uint32_t enum Arm64FakeRegister : uint32_t { - FAKEREG_SYSREG_UNKNOWN = SYSREG_END + 1, - FAKEREG_SYSCALL_INFO = SYSREG_END + 2 + FAKEREG_SYSREG_UNKNOWN = 65533, + FAKEREG_SYSCALL_INFO = 65534 }; +static_assert(FAKEREG_SYSREG_UNKNOWN >= SYSREG_END); + bool GetLowLevelILForInstruction(BinaryNinja::Architecture* arch, uint64_t addr, BinaryNinja::LowLevelILFunction& il, const exarmo_aarch64_instruction& instr, size_t addrSize, bool alignmentRequired, std::function preferIntrinsics); diff --git a/arch/arm64/registers.cpp b/arch/arm64/registers.cpp index d87969089..9356c2aec 100644 --- a/arch/arm64/registers.cpp +++ b/arch/arm64/registers.cpp @@ -1,6 +1,7 @@ #include "registers.h" #include +#include #include //----------------------------------------------------------------------------- @@ -161,13 +162,15 @@ static const std::string_view RegisterString[] = {"NONE", "w0", "w1", "w2", "w3" "z28", "z29", "z30", "z31", /* scalable predicate registers */ "p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", - "p15", "p16", "p17", "p18", "p19", "p20", "p21", "p22", "p23", "p24", "p25", "p26", "p27", - "p28", "p29", "p30", "p31", - /* prefetch operations (TODO: remove these as registers) */ - "pldl1keep", "pldl1strm", "pldl2keep", "pldl2strm", "pldl3keep", "pldl3strm", "#0x6", "#0x7", - "plil1keep", "plil1strm", "plil2keep", "plil2strm", "plil3keep", "plil3strm", "#0xe", "#0xf", - "pstl1keep", "pstl1strm", "pstl2keep", "pstl2strm", "pstl3keep", "pstl3strm", "#0x16", "#0x17", - "#0x18", "#0x19", "#0x1a", "#0x1b", "#0x1c", "#0x1d", "#0x1e", "#0x1f", "zt0", "END"}; + "p15", + /* Unused. These keep zt0's saved number unchanged. */ + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", + "zt0", "END"}; + +// Indexed by Register, whose numbers are fixed. +static_assert(std::size(RegisterString) == REG_END + 1); std::string_view RegisterName(enum Register r) { diff --git a/arch/arm64/registers.h b/arch/arm64/registers.h index 5f32baac0..08fd3c75d 100644 --- a/arch/arm64/registers.h +++ b/arch/arm64/registers.h @@ -18,1329 +18,1281 @@ // existing register. enum Register { - REG_NONE, - REG_W0, - REG_W1, - REG_W2, - REG_W3, - REG_W4, - REG_W5, - REG_W6, - REG_W7, - REG_W8, - REG_W9, - REG_W10, - REG_W11, - REG_W12, - REG_W13, - REG_W14, - REG_W15, - REG_W16, - REG_W17, - REG_W18, - REG_W19, - REG_W20, - REG_W21, - REG_W22, - REG_W23, - REG_W24, - REG_W25, - REG_W26, - REG_W27, - REG_W28, - REG_W29, - REG_W30, - REG_WZR, - REG_WSP, - REG_X0, - REG_X1, - REG_X2, - REG_X3, - REG_X4, - REG_X5, - REG_X6, - REG_X7, - REG_X8, - REG_X9, - REG_X10, - REG_X11, - REG_X12, - REG_X13, - REG_X14, - REG_X15, - REG_X16, - REG_X17, - REG_X18, - REG_X19, - REG_X20, - REG_X21, - REG_X22, - REG_X23, - REG_X24, - REG_X25, - REG_X26, - REG_X27, - REG_X28, - REG_X29, - REG_X30, - REG_XZR, - REG_SP, - REG_V0, - REG_V1, - REG_V2, - REG_V3, - REG_V4, - REG_V5, - REG_V6, - REG_V7, - REG_V8, - REG_V9, - REG_V10, - REG_V11, - REG_V12, - REG_V13, - REG_V14, - REG_V15, - REG_V16, - REG_V17, - REG_V18, - REG_V19, - REG_V20, - REG_V21, - REG_V22, - REG_V23, - REG_V24, - REG_V25, - REG_V26, - REG_V27, - REG_V28, - REG_V29, - REG_V30, - REG_V31, - REG_B0, - REG_B1, - REG_B2, - REG_B3, - REG_B4, - REG_B5, - REG_B6, - REG_B7, - REG_B8, - REG_B9, - REG_B10, - REG_B11, - REG_B12, - REG_B13, - REG_B14, - REG_B15, - REG_B16, - REG_B17, - REG_B18, - REG_B19, - REG_B20, - REG_B21, - REG_B22, - REG_B23, - REG_B24, - REG_B25, - REG_B26, - REG_B27, - REG_B28, - REG_B29, - REG_B30, - REG_B31, - REG_H0, - REG_H1, - REG_H2, - REG_H3, - REG_H4, - REG_H5, - REG_H6, - REG_H7, - REG_H8, - REG_H9, - REG_H10, - REG_H11, - REG_H12, - REG_H13, - REG_H14, - REG_H15, - REG_H16, - REG_H17, - REG_H18, - REG_H19, - REG_H20, - REG_H21, - REG_H22, - REG_H23, - REG_H24, - REG_H25, - REG_H26, - REG_H27, - REG_H28, - REG_H29, - REG_H30, - REG_H31, - REG_S0, - REG_S1, - REG_S2, - REG_S3, - REG_S4, - REG_S5, - REG_S6, - REG_S7, - REG_S8, - REG_S9, - REG_S10, - REG_S11, - REG_S12, - REG_S13, - REG_S14, - REG_S15, - REG_S16, - REG_S17, - REG_S18, - REG_S19, - REG_S20, - REG_S21, - REG_S22, - REG_S23, - REG_S24, - REG_S25, - REG_S26, - REG_S27, - REG_S28, - REG_S29, - REG_S30, - REG_S31, - REG_D0, - REG_D1, - REG_D2, - REG_D3, - REG_D4, - REG_D5, - REG_D6, - REG_D7, - REG_D8, - REG_D9, - REG_D10, - REG_D11, - REG_D12, - REG_D13, - REG_D14, - REG_D15, - REG_D16, - REG_D17, - REG_D18, - REG_D19, - REG_D20, - REG_D21, - REG_D22, - REG_D23, - REG_D24, - REG_D25, - REG_D26, - REG_D27, - REG_D28, - REG_D29, - REG_D30, - REG_D31, - REG_Q0, - REG_Q1, - REG_Q2, - REG_Q3, - REG_Q4, - REG_Q5, - REG_Q6, - REG_Q7, - REG_Q8, - REG_Q9, - REG_Q10, - REG_Q11, - REG_Q12, - REG_Q13, - REG_Q14, - REG_Q15, - REG_Q16, - REG_Q17, - REG_Q18, - REG_Q19, - REG_Q20, - REG_Q21, - REG_Q22, - REG_Q23, - REG_Q24, - REG_Q25, - REG_Q26, - REG_Q27, - REG_Q28, - REG_Q29, - REG_Q30, - REG_Q31, + REG_NONE = 0, + REG_W0 = 1, + REG_W1 = 2, + REG_W2 = 3, + REG_W3 = 4, + REG_W4 = 5, + REG_W5 = 6, + REG_W6 = 7, + REG_W7 = 8, + REG_W8 = 9, + REG_W9 = 10, + REG_W10 = 11, + REG_W11 = 12, + REG_W12 = 13, + REG_W13 = 14, + REG_W14 = 15, + REG_W15 = 16, + REG_W16 = 17, + REG_W17 = 18, + REG_W18 = 19, + REG_W19 = 20, + REG_W20 = 21, + REG_W21 = 22, + REG_W22 = 23, + REG_W23 = 24, + REG_W24 = 25, + REG_W25 = 26, + REG_W26 = 27, + REG_W27 = 28, + REG_W28 = 29, + REG_W29 = 30, + REG_W30 = 31, + REG_WZR = 32, + REG_WSP = 33, + REG_X0 = 34, + REG_X1 = 35, + REG_X2 = 36, + REG_X3 = 37, + REG_X4 = 38, + REG_X5 = 39, + REG_X6 = 40, + REG_X7 = 41, + REG_X8 = 42, + REG_X9 = 43, + REG_X10 = 44, + REG_X11 = 45, + REG_X12 = 46, + REG_X13 = 47, + REG_X14 = 48, + REG_X15 = 49, + REG_X16 = 50, + REG_X17 = 51, + REG_X18 = 52, + REG_X19 = 53, + REG_X20 = 54, + REG_X21 = 55, + REG_X22 = 56, + REG_X23 = 57, + REG_X24 = 58, + REG_X25 = 59, + REG_X26 = 60, + REG_X27 = 61, + REG_X28 = 62, + REG_X29 = 63, + REG_X30 = 64, + REG_XZR = 65, + REG_SP = 66, + REG_V0 = 67, + REG_V1 = 68, + REG_V2 = 69, + REG_V3 = 70, + REG_V4 = 71, + REG_V5 = 72, + REG_V6 = 73, + REG_V7 = 74, + REG_V8 = 75, + REG_V9 = 76, + REG_V10 = 77, + REG_V11 = 78, + REG_V12 = 79, + REG_V13 = 80, + REG_V14 = 81, + REG_V15 = 82, + REG_V16 = 83, + REG_V17 = 84, + REG_V18 = 85, + REG_V19 = 86, + REG_V20 = 87, + REG_V21 = 88, + REG_V22 = 89, + REG_V23 = 90, + REG_V24 = 91, + REG_V25 = 92, + REG_V26 = 93, + REG_V27 = 94, + REG_V28 = 95, + REG_V29 = 96, + REG_V30 = 97, + REG_V31 = 98, + REG_B0 = 99, + REG_B1 = 100, + REG_B2 = 101, + REG_B3 = 102, + REG_B4 = 103, + REG_B5 = 104, + REG_B6 = 105, + REG_B7 = 106, + REG_B8 = 107, + REG_B9 = 108, + REG_B10 = 109, + REG_B11 = 110, + REG_B12 = 111, + REG_B13 = 112, + REG_B14 = 113, + REG_B15 = 114, + REG_B16 = 115, + REG_B17 = 116, + REG_B18 = 117, + REG_B19 = 118, + REG_B20 = 119, + REG_B21 = 120, + REG_B22 = 121, + REG_B23 = 122, + REG_B24 = 123, + REG_B25 = 124, + REG_B26 = 125, + REG_B27 = 126, + REG_B28 = 127, + REG_B29 = 128, + REG_B30 = 129, + REG_B31 = 130, + REG_H0 = 131, + REG_H1 = 132, + REG_H2 = 133, + REG_H3 = 134, + REG_H4 = 135, + REG_H5 = 136, + REG_H6 = 137, + REG_H7 = 138, + REG_H8 = 139, + REG_H9 = 140, + REG_H10 = 141, + REG_H11 = 142, + REG_H12 = 143, + REG_H13 = 144, + REG_H14 = 145, + REG_H15 = 146, + REG_H16 = 147, + REG_H17 = 148, + REG_H18 = 149, + REG_H19 = 150, + REG_H20 = 151, + REG_H21 = 152, + REG_H22 = 153, + REG_H23 = 154, + REG_H24 = 155, + REG_H25 = 156, + REG_H26 = 157, + REG_H27 = 158, + REG_H28 = 159, + REG_H29 = 160, + REG_H30 = 161, + REG_H31 = 162, + REG_S0 = 163, + REG_S1 = 164, + REG_S2 = 165, + REG_S3 = 166, + REG_S4 = 167, + REG_S5 = 168, + REG_S6 = 169, + REG_S7 = 170, + REG_S8 = 171, + REG_S9 = 172, + REG_S10 = 173, + REG_S11 = 174, + REG_S12 = 175, + REG_S13 = 176, + REG_S14 = 177, + REG_S15 = 178, + REG_S16 = 179, + REG_S17 = 180, + REG_S18 = 181, + REG_S19 = 182, + REG_S20 = 183, + REG_S21 = 184, + REG_S22 = 185, + REG_S23 = 186, + REG_S24 = 187, + REG_S25 = 188, + REG_S26 = 189, + REG_S27 = 190, + REG_S28 = 191, + REG_S29 = 192, + REG_S30 = 193, + REG_S31 = 194, + REG_D0 = 195, + REG_D1 = 196, + REG_D2 = 197, + REG_D3 = 198, + REG_D4 = 199, + REG_D5 = 200, + REG_D6 = 201, + REG_D7 = 202, + REG_D8 = 203, + REG_D9 = 204, + REG_D10 = 205, + REG_D11 = 206, + REG_D12 = 207, + REG_D13 = 208, + REG_D14 = 209, + REG_D15 = 210, + REG_D16 = 211, + REG_D17 = 212, + REG_D18 = 213, + REG_D19 = 214, + REG_D20 = 215, + REG_D21 = 216, + REG_D22 = 217, + REG_D23 = 218, + REG_D24 = 219, + REG_D25 = 220, + REG_D26 = 221, + REG_D27 = 222, + REG_D28 = 223, + REG_D29 = 224, + REG_D30 = 225, + REG_D31 = 226, + REG_Q0 = 227, + REG_Q1 = 228, + REG_Q2 = 229, + REG_Q3 = 230, + REG_Q4 = 231, + REG_Q5 = 232, + REG_Q6 = 233, + REG_Q7 = 234, + REG_Q8 = 235, + REG_Q9 = 236, + REG_Q10 = 237, + REG_Q11 = 238, + REG_Q12 = 239, + REG_Q13 = 240, + REG_Q14 = 241, + REG_Q15 = 242, + REG_Q16 = 243, + REG_Q17 = 244, + REG_Q18 = 245, + REG_Q19 = 246, + REG_Q20 = 247, + REG_Q21 = 248, + REG_Q22 = 249, + REG_Q23 = 250, + REG_Q24 = 251, + REG_Q25 = 252, + REG_Q26 = 253, + REG_Q27 = 254, + REG_Q28 = 255, + REG_Q29 = 256, + REG_Q30 = 257, + REG_Q31 = 258, // B vector - REG_V0_B0, - REG_V0_B1, - REG_V0_B2, - REG_V0_B3, - REG_V0_B4, - REG_V0_B5, - REG_V0_B6, - REG_V0_B7, - REG_V0_B8, - REG_V0_B9, - REG_V0_B10, - REG_V0_B11, - REG_V0_B12, - REG_V0_B13, - REG_V0_B14, - REG_V0_B15, - REG_V1_B0, - REG_V1_B1, - REG_V1_B2, - REG_V1_B3, - REG_V1_B4, - REG_V1_B5, - REG_V1_B6, - REG_V1_B7, - REG_V1_B8, - REG_V1_B9, - REG_V1_B10, - REG_V1_B11, - REG_V1_B12, - REG_V1_B13, - REG_V1_B14, - REG_V1_B15, - REG_V2_B0, - REG_V2_B1, - REG_V2_B2, - REG_V2_B3, - REG_V2_B4, - REG_V2_B5, - REG_V2_B6, - REG_V2_B7, - REG_V2_B8, - REG_V2_B9, - REG_V2_B10, - REG_V2_B11, - REG_V2_B12, - REG_V2_B13, - REG_V2_B14, - REG_V2_B15, - REG_V3_B0, - REG_V3_B1, - REG_V3_B2, - REG_V3_B3, - REG_V3_B4, - REG_V3_B5, - REG_V3_B6, - REG_V3_B7, - REG_V3_B8, - REG_V3_B9, - REG_V3_B10, - REG_V3_B11, - REG_V3_B12, - REG_V3_B13, - REG_V3_B14, - REG_V3_B15, - REG_V4_B0, - REG_V4_B1, - REG_V4_B2, - REG_V4_B3, - REG_V4_B4, - REG_V4_B5, - REG_V4_B6, - REG_V4_B7, - REG_V4_B8, - REG_V4_B9, - REG_V4_B10, - REG_V4_B11, - REG_V4_B12, - REG_V4_B13, - REG_V4_B14, - REG_V4_B15, - REG_V5_B0, - REG_V5_B1, - REG_V5_B2, - REG_V5_B3, - REG_V5_B4, - REG_V5_B5, - REG_V5_B6, - REG_V5_B7, - REG_V5_B8, - REG_V5_B9, - REG_V5_B10, - REG_V5_B11, - REG_V5_B12, - REG_V5_B13, - REG_V5_B14, - REG_V5_B15, - REG_V6_B0, - REG_V6_B1, - REG_V6_B2, - REG_V6_B3, - REG_V6_B4, - REG_V6_B5, - REG_V6_B6, - REG_V6_B7, - REG_V6_B8, - REG_V6_B9, - REG_V6_B10, - REG_V6_B11, - REG_V6_B12, - REG_V6_B13, - REG_V6_B14, - REG_V6_B15, - REG_V7_B0, - REG_V7_B1, - REG_V7_B2, - REG_V7_B3, - REG_V7_B4, - REG_V7_B5, - REG_V7_B6, - REG_V7_B7, - REG_V7_B8, - REG_V7_B9, - REG_V7_B10, - REG_V7_B11, - REG_V7_B12, - REG_V7_B13, - REG_V7_B14, - REG_V7_B15, - REG_V8_B0, - REG_V8_B1, - REG_V8_B2, - REG_V8_B3, - REG_V8_B4, - REG_V8_B5, - REG_V8_B6, - REG_V8_B7, - REG_V8_B8, - REG_V8_B9, - REG_V8_B10, - REG_V8_B11, - REG_V8_B12, - REG_V8_B13, - REG_V8_B14, - REG_V8_B15, - REG_V9_B0, - REG_V9_B1, - REG_V9_B2, - REG_V9_B3, - REG_V9_B4, - REG_V9_B5, - REG_V9_B6, - REG_V9_B7, - REG_V9_B8, - REG_V9_B9, - REG_V9_B10, - REG_V9_B11, - REG_V9_B12, - REG_V9_B13, - REG_V9_B14, - REG_V9_B15, - REG_V10_B0, - REG_V10_B1, - REG_V10_B2, - REG_V10_B3, - REG_V10_B4, - REG_V10_B5, - REG_V10_B6, - REG_V10_B7, - REG_V10_B8, - REG_V10_B9, - REG_V10_B10, - REG_V10_B11, - REG_V10_B12, - REG_V10_B13, - REG_V10_B14, - REG_V10_B15, - REG_V11_B0, - REG_V11_B1, - REG_V11_B2, - REG_V11_B3, - REG_V11_B4, - REG_V11_B5, - REG_V11_B6, - REG_V11_B7, - REG_V11_B8, - REG_V11_B9, - REG_V11_B10, - REG_V11_B11, - REG_V11_B12, - REG_V11_B13, - REG_V11_B14, - REG_V11_B15, - REG_V12_B0, - REG_V12_B1, - REG_V12_B2, - REG_V12_B3, - REG_V12_B4, - REG_V12_B5, - REG_V12_B6, - REG_V12_B7, - REG_V12_B8, - REG_V12_B9, - REG_V12_B10, - REG_V12_B11, - REG_V12_B12, - REG_V12_B13, - REG_V12_B14, - REG_V12_B15, - REG_V13_B0, - REG_V13_B1, - REG_V13_B2, - REG_V13_B3, - REG_V13_B4, - REG_V13_B5, - REG_V13_B6, - REG_V13_B7, - REG_V13_B8, - REG_V13_B9, - REG_V13_B10, - REG_V13_B11, - REG_V13_B12, - REG_V13_B13, - REG_V13_B14, - REG_V13_B15, - REG_V14_B0, - REG_V14_B1, - REG_V14_B2, - REG_V14_B3, - REG_V14_B4, - REG_V14_B5, - REG_V14_B6, - REG_V14_B7, - REG_V14_B8, - REG_V14_B9, - REG_V14_B10, - REG_V14_B11, - REG_V14_B12, - REG_V14_B13, - REG_V14_B14, - REG_V14_B15, - REG_V15_B0, - REG_V15_B1, - REG_V15_B2, - REG_V15_B3, - REG_V15_B4, - REG_V15_B5, - REG_V15_B6, - REG_V15_B7, - REG_V15_B8, - REG_V15_B9, - REG_V15_B10, - REG_V15_B11, - REG_V15_B12, - REG_V15_B13, - REG_V15_B14, - REG_V15_B15, - REG_V16_B0, - REG_V16_B1, - REG_V16_B2, - REG_V16_B3, - REG_V16_B4, - REG_V16_B5, - REG_V16_B6, - REG_V16_B7, - REG_V16_B8, - REG_V16_B9, - REG_V16_B10, - REG_V16_B11, - REG_V16_B12, - REG_V16_B13, - REG_V16_B14, - REG_V16_B15, - REG_V17_B0, - REG_V17_B1, - REG_V17_B2, - REG_V17_B3, - REG_V17_B4, - REG_V17_B5, - REG_V17_B6, - REG_V17_B7, - REG_V17_B8, - REG_V17_B9, - REG_V17_B10, - REG_V17_B11, - REG_V17_B12, - REG_V17_B13, - REG_V17_B14, - REG_V17_B15, - REG_V18_B0, - REG_V18_B1, - REG_V18_B2, - REG_V18_B3, - REG_V18_B4, - REG_V18_B5, - REG_V18_B6, - REG_V18_B7, - REG_V18_B8, - REG_V18_B9, - REG_V18_B10, - REG_V18_B11, - REG_V18_B12, - REG_V18_B13, - REG_V18_B14, - REG_V18_B15, - REG_V19_B0, - REG_V19_B1, - REG_V19_B2, - REG_V19_B3, - REG_V19_B4, - REG_V19_B5, - REG_V19_B6, - REG_V19_B7, - REG_V19_B8, - REG_V19_B9, - REG_V19_B10, - REG_V19_B11, - REG_V19_B12, - REG_V19_B13, - REG_V19_B14, - REG_V19_B15, - REG_V20_B0, - REG_V20_B1, - REG_V20_B2, - REG_V20_B3, - REG_V20_B4, - REG_V20_B5, - REG_V20_B6, - REG_V20_B7, - REG_V20_B8, - REG_V20_B9, - REG_V20_B10, - REG_V20_B11, - REG_V20_B12, - REG_V20_B13, - REG_V20_B14, - REG_V20_B15, - REG_V21_B0, - REG_V21_B1, - REG_V21_B2, - REG_V21_B3, - REG_V21_B4, - REG_V21_B5, - REG_V21_B6, - REG_V21_B7, - REG_V21_B8, - REG_V21_B9, - REG_V21_B10, - REG_V21_B11, - REG_V21_B12, - REG_V21_B13, - REG_V21_B14, - REG_V21_B15, - REG_V22_B0, - REG_V22_B1, - REG_V22_B2, - REG_V22_B3, - REG_V22_B4, - REG_V22_B5, - REG_V22_B6, - REG_V22_B7, - REG_V22_B8, - REG_V22_B9, - REG_V22_B10, - REG_V22_B11, - REG_V22_B12, - REG_V22_B13, - REG_V22_B14, - REG_V22_B15, - REG_V23_B0, - REG_V23_B1, - REG_V23_B2, - REG_V23_B3, - REG_V23_B4, - REG_V23_B5, - REG_V23_B6, - REG_V23_B7, - REG_V23_B8, - REG_V23_B9, - REG_V23_B10, - REG_V23_B11, - REG_V23_B12, - REG_V23_B13, - REG_V23_B14, - REG_V23_B15, - REG_V24_B0, - REG_V24_B1, - REG_V24_B2, - REG_V24_B3, - REG_V24_B4, - REG_V24_B5, - REG_V24_B6, - REG_V24_B7, - REG_V24_B8, - REG_V24_B9, - REG_V24_B10, - REG_V24_B11, - REG_V24_B12, - REG_V24_B13, - REG_V24_B14, - REG_V24_B15, - REG_V25_B0, - REG_V25_B1, - REG_V25_B2, - REG_V25_B3, - REG_V25_B4, - REG_V25_B5, - REG_V25_B6, - REG_V25_B7, - REG_V25_B8, - REG_V25_B9, - REG_V25_B10, - REG_V25_B11, - REG_V25_B12, - REG_V25_B13, - REG_V25_B14, - REG_V25_B15, - REG_V26_B0, - REG_V26_B1, - REG_V26_B2, - REG_V26_B3, - REG_V26_B4, - REG_V26_B5, - REG_V26_B6, - REG_V26_B7, - REG_V26_B8, - REG_V26_B9, - REG_V26_B10, - REG_V26_B11, - REG_V26_B12, - REG_V26_B13, - REG_V26_B14, - REG_V26_B15, - REG_V27_B0, - REG_V27_B1, - REG_V27_B2, - REG_V27_B3, - REG_V27_B4, - REG_V27_B5, - REG_V27_B6, - REG_V27_B7, - REG_V27_B8, - REG_V27_B9, - REG_V27_B10, - REG_V27_B11, - REG_V27_B12, - REG_V27_B13, - REG_V27_B14, - REG_V27_B15, - REG_V28_B0, - REG_V28_B1, - REG_V28_B2, - REG_V28_B3, - REG_V28_B4, - REG_V28_B5, - REG_V28_B6, - REG_V28_B7, - REG_V28_B8, - REG_V28_B9, - REG_V28_B10, - REG_V28_B11, - REG_V28_B12, - REG_V28_B13, - REG_V28_B14, - REG_V28_B15, - REG_V29_B0, - REG_V29_B1, - REG_V29_B2, - REG_V29_B3, - REG_V29_B4, - REG_V29_B5, - REG_V29_B6, - REG_V29_B7, - REG_V29_B8, - REG_V29_B9, - REG_V29_B10, - REG_V29_B11, - REG_V29_B12, - REG_V29_B13, - REG_V29_B14, - REG_V29_B15, - REG_V30_B0, - REG_V30_B1, - REG_V30_B2, - REG_V30_B3, - REG_V30_B4, - REG_V30_B5, - REG_V30_B6, - REG_V30_B7, - REG_V30_B8, - REG_V30_B9, - REG_V30_B10, - REG_V30_B11, - REG_V30_B12, - REG_V30_B13, - REG_V30_B14, - REG_V30_B15, - REG_V31_B0, - REG_V31_B1, - REG_V31_B2, - REG_V31_B3, - REG_V31_B4, - REG_V31_B5, - REG_V31_B6, - REG_V31_B7, - REG_V31_B8, - REG_V31_B9, - REG_V31_B10, - REG_V31_B11, - REG_V31_B12, - REG_V31_B13, - REG_V31_B14, - REG_V31_B15, + REG_V0_B0 = 259, + REG_V0_B1 = 260, + REG_V0_B2 = 261, + REG_V0_B3 = 262, + REG_V0_B4 = 263, + REG_V0_B5 = 264, + REG_V0_B6 = 265, + REG_V0_B7 = 266, + REG_V0_B8 = 267, + REG_V0_B9 = 268, + REG_V0_B10 = 269, + REG_V0_B11 = 270, + REG_V0_B12 = 271, + REG_V0_B13 = 272, + REG_V0_B14 = 273, + REG_V0_B15 = 274, + REG_V1_B0 = 275, + REG_V1_B1 = 276, + REG_V1_B2 = 277, + REG_V1_B3 = 278, + REG_V1_B4 = 279, + REG_V1_B5 = 280, + REG_V1_B6 = 281, + REG_V1_B7 = 282, + REG_V1_B8 = 283, + REG_V1_B9 = 284, + REG_V1_B10 = 285, + REG_V1_B11 = 286, + REG_V1_B12 = 287, + REG_V1_B13 = 288, + REG_V1_B14 = 289, + REG_V1_B15 = 290, + REG_V2_B0 = 291, + REG_V2_B1 = 292, + REG_V2_B2 = 293, + REG_V2_B3 = 294, + REG_V2_B4 = 295, + REG_V2_B5 = 296, + REG_V2_B6 = 297, + REG_V2_B7 = 298, + REG_V2_B8 = 299, + REG_V2_B9 = 300, + REG_V2_B10 = 301, + REG_V2_B11 = 302, + REG_V2_B12 = 303, + REG_V2_B13 = 304, + REG_V2_B14 = 305, + REG_V2_B15 = 306, + REG_V3_B0 = 307, + REG_V3_B1 = 308, + REG_V3_B2 = 309, + REG_V3_B3 = 310, + REG_V3_B4 = 311, + REG_V3_B5 = 312, + REG_V3_B6 = 313, + REG_V3_B7 = 314, + REG_V3_B8 = 315, + REG_V3_B9 = 316, + REG_V3_B10 = 317, + REG_V3_B11 = 318, + REG_V3_B12 = 319, + REG_V3_B13 = 320, + REG_V3_B14 = 321, + REG_V3_B15 = 322, + REG_V4_B0 = 323, + REG_V4_B1 = 324, + REG_V4_B2 = 325, + REG_V4_B3 = 326, + REG_V4_B4 = 327, + REG_V4_B5 = 328, + REG_V4_B6 = 329, + REG_V4_B7 = 330, + REG_V4_B8 = 331, + REG_V4_B9 = 332, + REG_V4_B10 = 333, + REG_V4_B11 = 334, + REG_V4_B12 = 335, + REG_V4_B13 = 336, + REG_V4_B14 = 337, + REG_V4_B15 = 338, + REG_V5_B0 = 339, + REG_V5_B1 = 340, + REG_V5_B2 = 341, + REG_V5_B3 = 342, + REG_V5_B4 = 343, + REG_V5_B5 = 344, + REG_V5_B6 = 345, + REG_V5_B7 = 346, + REG_V5_B8 = 347, + REG_V5_B9 = 348, + REG_V5_B10 = 349, + REG_V5_B11 = 350, + REG_V5_B12 = 351, + REG_V5_B13 = 352, + REG_V5_B14 = 353, + REG_V5_B15 = 354, + REG_V6_B0 = 355, + REG_V6_B1 = 356, + REG_V6_B2 = 357, + REG_V6_B3 = 358, + REG_V6_B4 = 359, + REG_V6_B5 = 360, + REG_V6_B6 = 361, + REG_V6_B7 = 362, + REG_V6_B8 = 363, + REG_V6_B9 = 364, + REG_V6_B10 = 365, + REG_V6_B11 = 366, + REG_V6_B12 = 367, + REG_V6_B13 = 368, + REG_V6_B14 = 369, + REG_V6_B15 = 370, + REG_V7_B0 = 371, + REG_V7_B1 = 372, + REG_V7_B2 = 373, + REG_V7_B3 = 374, + REG_V7_B4 = 375, + REG_V7_B5 = 376, + REG_V7_B6 = 377, + REG_V7_B7 = 378, + REG_V7_B8 = 379, + REG_V7_B9 = 380, + REG_V7_B10 = 381, + REG_V7_B11 = 382, + REG_V7_B12 = 383, + REG_V7_B13 = 384, + REG_V7_B14 = 385, + REG_V7_B15 = 386, + REG_V8_B0 = 387, + REG_V8_B1 = 388, + REG_V8_B2 = 389, + REG_V8_B3 = 390, + REG_V8_B4 = 391, + REG_V8_B5 = 392, + REG_V8_B6 = 393, + REG_V8_B7 = 394, + REG_V8_B8 = 395, + REG_V8_B9 = 396, + REG_V8_B10 = 397, + REG_V8_B11 = 398, + REG_V8_B12 = 399, + REG_V8_B13 = 400, + REG_V8_B14 = 401, + REG_V8_B15 = 402, + REG_V9_B0 = 403, + REG_V9_B1 = 404, + REG_V9_B2 = 405, + REG_V9_B3 = 406, + REG_V9_B4 = 407, + REG_V9_B5 = 408, + REG_V9_B6 = 409, + REG_V9_B7 = 410, + REG_V9_B8 = 411, + REG_V9_B9 = 412, + REG_V9_B10 = 413, + REG_V9_B11 = 414, + REG_V9_B12 = 415, + REG_V9_B13 = 416, + REG_V9_B14 = 417, + REG_V9_B15 = 418, + REG_V10_B0 = 419, + REG_V10_B1 = 420, + REG_V10_B2 = 421, + REG_V10_B3 = 422, + REG_V10_B4 = 423, + REG_V10_B5 = 424, + REG_V10_B6 = 425, + REG_V10_B7 = 426, + REG_V10_B8 = 427, + REG_V10_B9 = 428, + REG_V10_B10 = 429, + REG_V10_B11 = 430, + REG_V10_B12 = 431, + REG_V10_B13 = 432, + REG_V10_B14 = 433, + REG_V10_B15 = 434, + REG_V11_B0 = 435, + REG_V11_B1 = 436, + REG_V11_B2 = 437, + REG_V11_B3 = 438, + REG_V11_B4 = 439, + REG_V11_B5 = 440, + REG_V11_B6 = 441, + REG_V11_B7 = 442, + REG_V11_B8 = 443, + REG_V11_B9 = 444, + REG_V11_B10 = 445, + REG_V11_B11 = 446, + REG_V11_B12 = 447, + REG_V11_B13 = 448, + REG_V11_B14 = 449, + REG_V11_B15 = 450, + REG_V12_B0 = 451, + REG_V12_B1 = 452, + REG_V12_B2 = 453, + REG_V12_B3 = 454, + REG_V12_B4 = 455, + REG_V12_B5 = 456, + REG_V12_B6 = 457, + REG_V12_B7 = 458, + REG_V12_B8 = 459, + REG_V12_B9 = 460, + REG_V12_B10 = 461, + REG_V12_B11 = 462, + REG_V12_B12 = 463, + REG_V12_B13 = 464, + REG_V12_B14 = 465, + REG_V12_B15 = 466, + REG_V13_B0 = 467, + REG_V13_B1 = 468, + REG_V13_B2 = 469, + REG_V13_B3 = 470, + REG_V13_B4 = 471, + REG_V13_B5 = 472, + REG_V13_B6 = 473, + REG_V13_B7 = 474, + REG_V13_B8 = 475, + REG_V13_B9 = 476, + REG_V13_B10 = 477, + REG_V13_B11 = 478, + REG_V13_B12 = 479, + REG_V13_B13 = 480, + REG_V13_B14 = 481, + REG_V13_B15 = 482, + REG_V14_B0 = 483, + REG_V14_B1 = 484, + REG_V14_B2 = 485, + REG_V14_B3 = 486, + REG_V14_B4 = 487, + REG_V14_B5 = 488, + REG_V14_B6 = 489, + REG_V14_B7 = 490, + REG_V14_B8 = 491, + REG_V14_B9 = 492, + REG_V14_B10 = 493, + REG_V14_B11 = 494, + REG_V14_B12 = 495, + REG_V14_B13 = 496, + REG_V14_B14 = 497, + REG_V14_B15 = 498, + REG_V15_B0 = 499, + REG_V15_B1 = 500, + REG_V15_B2 = 501, + REG_V15_B3 = 502, + REG_V15_B4 = 503, + REG_V15_B5 = 504, + REG_V15_B6 = 505, + REG_V15_B7 = 506, + REG_V15_B8 = 507, + REG_V15_B9 = 508, + REG_V15_B10 = 509, + REG_V15_B11 = 510, + REG_V15_B12 = 511, + REG_V15_B13 = 512, + REG_V15_B14 = 513, + REG_V15_B15 = 514, + REG_V16_B0 = 515, + REG_V16_B1 = 516, + REG_V16_B2 = 517, + REG_V16_B3 = 518, + REG_V16_B4 = 519, + REG_V16_B5 = 520, + REG_V16_B6 = 521, + REG_V16_B7 = 522, + REG_V16_B8 = 523, + REG_V16_B9 = 524, + REG_V16_B10 = 525, + REG_V16_B11 = 526, + REG_V16_B12 = 527, + REG_V16_B13 = 528, + REG_V16_B14 = 529, + REG_V16_B15 = 530, + REG_V17_B0 = 531, + REG_V17_B1 = 532, + REG_V17_B2 = 533, + REG_V17_B3 = 534, + REG_V17_B4 = 535, + REG_V17_B5 = 536, + REG_V17_B6 = 537, + REG_V17_B7 = 538, + REG_V17_B8 = 539, + REG_V17_B9 = 540, + REG_V17_B10 = 541, + REG_V17_B11 = 542, + REG_V17_B12 = 543, + REG_V17_B13 = 544, + REG_V17_B14 = 545, + REG_V17_B15 = 546, + REG_V18_B0 = 547, + REG_V18_B1 = 548, + REG_V18_B2 = 549, + REG_V18_B3 = 550, + REG_V18_B4 = 551, + REG_V18_B5 = 552, + REG_V18_B6 = 553, + REG_V18_B7 = 554, + REG_V18_B8 = 555, + REG_V18_B9 = 556, + REG_V18_B10 = 557, + REG_V18_B11 = 558, + REG_V18_B12 = 559, + REG_V18_B13 = 560, + REG_V18_B14 = 561, + REG_V18_B15 = 562, + REG_V19_B0 = 563, + REG_V19_B1 = 564, + REG_V19_B2 = 565, + REG_V19_B3 = 566, + REG_V19_B4 = 567, + REG_V19_B5 = 568, + REG_V19_B6 = 569, + REG_V19_B7 = 570, + REG_V19_B8 = 571, + REG_V19_B9 = 572, + REG_V19_B10 = 573, + REG_V19_B11 = 574, + REG_V19_B12 = 575, + REG_V19_B13 = 576, + REG_V19_B14 = 577, + REG_V19_B15 = 578, + REG_V20_B0 = 579, + REG_V20_B1 = 580, + REG_V20_B2 = 581, + REG_V20_B3 = 582, + REG_V20_B4 = 583, + REG_V20_B5 = 584, + REG_V20_B6 = 585, + REG_V20_B7 = 586, + REG_V20_B8 = 587, + REG_V20_B9 = 588, + REG_V20_B10 = 589, + REG_V20_B11 = 590, + REG_V20_B12 = 591, + REG_V20_B13 = 592, + REG_V20_B14 = 593, + REG_V20_B15 = 594, + REG_V21_B0 = 595, + REG_V21_B1 = 596, + REG_V21_B2 = 597, + REG_V21_B3 = 598, + REG_V21_B4 = 599, + REG_V21_B5 = 600, + REG_V21_B6 = 601, + REG_V21_B7 = 602, + REG_V21_B8 = 603, + REG_V21_B9 = 604, + REG_V21_B10 = 605, + REG_V21_B11 = 606, + REG_V21_B12 = 607, + REG_V21_B13 = 608, + REG_V21_B14 = 609, + REG_V21_B15 = 610, + REG_V22_B0 = 611, + REG_V22_B1 = 612, + REG_V22_B2 = 613, + REG_V22_B3 = 614, + REG_V22_B4 = 615, + REG_V22_B5 = 616, + REG_V22_B6 = 617, + REG_V22_B7 = 618, + REG_V22_B8 = 619, + REG_V22_B9 = 620, + REG_V22_B10 = 621, + REG_V22_B11 = 622, + REG_V22_B12 = 623, + REG_V22_B13 = 624, + REG_V22_B14 = 625, + REG_V22_B15 = 626, + REG_V23_B0 = 627, + REG_V23_B1 = 628, + REG_V23_B2 = 629, + REG_V23_B3 = 630, + REG_V23_B4 = 631, + REG_V23_B5 = 632, + REG_V23_B6 = 633, + REG_V23_B7 = 634, + REG_V23_B8 = 635, + REG_V23_B9 = 636, + REG_V23_B10 = 637, + REG_V23_B11 = 638, + REG_V23_B12 = 639, + REG_V23_B13 = 640, + REG_V23_B14 = 641, + REG_V23_B15 = 642, + REG_V24_B0 = 643, + REG_V24_B1 = 644, + REG_V24_B2 = 645, + REG_V24_B3 = 646, + REG_V24_B4 = 647, + REG_V24_B5 = 648, + REG_V24_B6 = 649, + REG_V24_B7 = 650, + REG_V24_B8 = 651, + REG_V24_B9 = 652, + REG_V24_B10 = 653, + REG_V24_B11 = 654, + REG_V24_B12 = 655, + REG_V24_B13 = 656, + REG_V24_B14 = 657, + REG_V24_B15 = 658, + REG_V25_B0 = 659, + REG_V25_B1 = 660, + REG_V25_B2 = 661, + REG_V25_B3 = 662, + REG_V25_B4 = 663, + REG_V25_B5 = 664, + REG_V25_B6 = 665, + REG_V25_B7 = 666, + REG_V25_B8 = 667, + REG_V25_B9 = 668, + REG_V25_B10 = 669, + REG_V25_B11 = 670, + REG_V25_B12 = 671, + REG_V25_B13 = 672, + REG_V25_B14 = 673, + REG_V25_B15 = 674, + REG_V26_B0 = 675, + REG_V26_B1 = 676, + REG_V26_B2 = 677, + REG_V26_B3 = 678, + REG_V26_B4 = 679, + REG_V26_B5 = 680, + REG_V26_B6 = 681, + REG_V26_B7 = 682, + REG_V26_B8 = 683, + REG_V26_B9 = 684, + REG_V26_B10 = 685, + REG_V26_B11 = 686, + REG_V26_B12 = 687, + REG_V26_B13 = 688, + REG_V26_B14 = 689, + REG_V26_B15 = 690, + REG_V27_B0 = 691, + REG_V27_B1 = 692, + REG_V27_B2 = 693, + REG_V27_B3 = 694, + REG_V27_B4 = 695, + REG_V27_B5 = 696, + REG_V27_B6 = 697, + REG_V27_B7 = 698, + REG_V27_B8 = 699, + REG_V27_B9 = 700, + REG_V27_B10 = 701, + REG_V27_B11 = 702, + REG_V27_B12 = 703, + REG_V27_B13 = 704, + REG_V27_B14 = 705, + REG_V27_B15 = 706, + REG_V28_B0 = 707, + REG_V28_B1 = 708, + REG_V28_B2 = 709, + REG_V28_B3 = 710, + REG_V28_B4 = 711, + REG_V28_B5 = 712, + REG_V28_B6 = 713, + REG_V28_B7 = 714, + REG_V28_B8 = 715, + REG_V28_B9 = 716, + REG_V28_B10 = 717, + REG_V28_B11 = 718, + REG_V28_B12 = 719, + REG_V28_B13 = 720, + REG_V28_B14 = 721, + REG_V28_B15 = 722, + REG_V29_B0 = 723, + REG_V29_B1 = 724, + REG_V29_B2 = 725, + REG_V29_B3 = 726, + REG_V29_B4 = 727, + REG_V29_B5 = 728, + REG_V29_B6 = 729, + REG_V29_B7 = 730, + REG_V29_B8 = 731, + REG_V29_B9 = 732, + REG_V29_B10 = 733, + REG_V29_B11 = 734, + REG_V29_B12 = 735, + REG_V29_B13 = 736, + REG_V29_B14 = 737, + REG_V29_B15 = 738, + REG_V30_B0 = 739, + REG_V30_B1 = 740, + REG_V30_B2 = 741, + REG_V30_B3 = 742, + REG_V30_B4 = 743, + REG_V30_B5 = 744, + REG_V30_B6 = 745, + REG_V30_B7 = 746, + REG_V30_B8 = 747, + REG_V30_B9 = 748, + REG_V30_B10 = 749, + REG_V30_B11 = 750, + REG_V30_B12 = 751, + REG_V30_B13 = 752, + REG_V30_B14 = 753, + REG_V30_B15 = 754, + REG_V31_B0 = 755, + REG_V31_B1 = 756, + REG_V31_B2 = 757, + REG_V31_B3 = 758, + REG_V31_B4 = 759, + REG_V31_B5 = 760, + REG_V31_B6 = 761, + REG_V31_B7 = 762, + REG_V31_B8 = 763, + REG_V31_B9 = 764, + REG_V31_B10 = 765, + REG_V31_B11 = 766, + REG_V31_B12 = 767, + REG_V31_B13 = 768, + REG_V31_B14 = 769, + REG_V31_B15 = 770, // H vector - REG_V0_H0, - REG_V0_H1, - REG_V0_H2, - REG_V0_H3, - REG_V0_H4, - REG_V0_H5, - REG_V0_H6, - REG_V0_H7, - REG_V1_H0, - REG_V1_H1, - REG_V1_H2, - REG_V1_H3, - REG_V1_H4, - REG_V1_H5, - REG_V1_H6, - REG_V1_H7, - REG_V2_H0, - REG_V2_H1, - REG_V2_H2, - REG_V2_H3, - REG_V2_H4, - REG_V2_H5, - REG_V2_H6, - REG_V2_H7, - REG_V3_H0, - REG_V3_H1, - REG_V3_H2, - REG_V3_H3, - REG_V3_H4, - REG_V3_H5, - REG_V3_H6, - REG_V3_H7, - REG_V4_H0, - REG_V4_H1, - REG_V4_H2, - REG_V4_H3, - REG_V4_H4, - REG_V4_H5, - REG_V4_H6, - REG_V4_H7, - REG_V5_H0, - REG_V5_H1, - REG_V5_H2, - REG_V5_H3, - REG_V5_H4, - REG_V5_H5, - REG_V5_H6, - REG_V5_H7, - REG_V6_H0, - REG_V6_H1, - REG_V6_H2, - REG_V6_H3, - REG_V6_H4, - REG_V6_H5, - REG_V6_H6, - REG_V6_H7, - REG_V7_H0, - REG_V7_H1, - REG_V7_H2, - REG_V7_H3, - REG_V7_H4, - REG_V7_H5, - REG_V7_H6, - REG_V7_H7, - REG_V8_H0, - REG_V8_H1, - REG_V8_H2, - REG_V8_H3, - REG_V8_H4, - REG_V8_H5, - REG_V8_H6, - REG_V8_H7, - REG_V9_H0, - REG_V9_H1, - REG_V9_H2, - REG_V9_H3, - REG_V9_H4, - REG_V9_H5, - REG_V9_H6, - REG_V9_H7, - REG_V10_H0, - REG_V10_H1, - REG_V10_H2, - REG_V10_H3, - REG_V10_H4, - REG_V10_H5, - REG_V10_H6, - REG_V10_H7, - REG_V11_H0, - REG_V11_H1, - REG_V11_H2, - REG_V11_H3, - REG_V11_H4, - REG_V11_H5, - REG_V11_H6, - REG_V11_H7, - REG_V12_H0, - REG_V12_H1, - REG_V12_H2, - REG_V12_H3, - REG_V12_H4, - REG_V12_H5, - REG_V12_H6, - REG_V12_H7, - REG_V13_H0, - REG_V13_H1, - REG_V13_H2, - REG_V13_H3, - REG_V13_H4, - REG_V13_H5, - REG_V13_H6, - REG_V13_H7, - REG_V14_H0, - REG_V14_H1, - REG_V14_H2, - REG_V14_H3, - REG_V14_H4, - REG_V14_H5, - REG_V14_H6, - REG_V14_H7, - REG_V15_H0, - REG_V15_H1, - REG_V15_H2, - REG_V15_H3, - REG_V15_H4, - REG_V15_H5, - REG_V15_H6, - REG_V15_H7, - REG_V16_H0, - REG_V16_H1, - REG_V16_H2, - REG_V16_H3, - REG_V16_H4, - REG_V16_H5, - REG_V16_H6, - REG_V16_H7, - REG_V17_H0, - REG_V17_H1, - REG_V17_H2, - REG_V17_H3, - REG_V17_H4, - REG_V17_H5, - REG_V17_H6, - REG_V17_H7, - REG_V18_H0, - REG_V18_H1, - REG_V18_H2, - REG_V18_H3, - REG_V18_H4, - REG_V18_H5, - REG_V18_H6, - REG_V18_H7, - REG_V19_H0, - REG_V19_H1, - REG_V19_H2, - REG_V19_H3, - REG_V19_H4, - REG_V19_H5, - REG_V19_H6, - REG_V19_H7, - REG_V20_H0, - REG_V20_H1, - REG_V20_H2, - REG_V20_H3, - REG_V20_H4, - REG_V20_H5, - REG_V20_H6, - REG_V20_H7, - REG_V21_H0, - REG_V21_H1, - REG_V21_H2, - REG_V21_H3, - REG_V21_H4, - REG_V21_H5, - REG_V21_H6, - REG_V21_H7, - REG_V22_H0, - REG_V22_H1, - REG_V22_H2, - REG_V22_H3, - REG_V22_H4, - REG_V22_H5, - REG_V22_H6, - REG_V22_H7, - REG_V23_H0, - REG_V23_H1, - REG_V23_H2, - REG_V23_H3, - REG_V23_H4, - REG_V23_H5, - REG_V23_H6, - REG_V23_H7, - REG_V24_H0, - REG_V24_H1, - REG_V24_H2, - REG_V24_H3, - REG_V24_H4, - REG_V24_H5, - REG_V24_H6, - REG_V24_H7, - REG_V25_H0, - REG_V25_H1, - REG_V25_H2, - REG_V25_H3, - REG_V25_H4, - REG_V25_H5, - REG_V25_H6, - REG_V25_H7, - REG_V26_H0, - REG_V26_H1, - REG_V26_H2, - REG_V26_H3, - REG_V26_H4, - REG_V26_H5, - REG_V26_H6, - REG_V26_H7, - REG_V27_H0, - REG_V27_H1, - REG_V27_H2, - REG_V27_H3, - REG_V27_H4, - REG_V27_H5, - REG_V27_H6, - REG_V27_H7, - REG_V28_H0, - REG_V28_H1, - REG_V28_H2, - REG_V28_H3, - REG_V28_H4, - REG_V28_H5, - REG_V28_H6, - REG_V28_H7, - REG_V29_H0, - REG_V29_H1, - REG_V29_H2, - REG_V29_H3, - REG_V29_H4, - REG_V29_H5, - REG_V29_H6, - REG_V29_H7, - REG_V30_H0, - REG_V30_H1, - REG_V30_H2, - REG_V30_H3, - REG_V30_H4, - REG_V30_H5, - REG_V30_H6, - REG_V30_H7, - REG_V31_H0, - REG_V31_H1, - REG_V31_H2, - REG_V31_H3, - REG_V31_H4, - REG_V31_H5, - REG_V31_H6, - REG_V31_H7, + REG_V0_H0 = 771, + REG_V0_H1 = 772, + REG_V0_H2 = 773, + REG_V0_H3 = 774, + REG_V0_H4 = 775, + REG_V0_H5 = 776, + REG_V0_H6 = 777, + REG_V0_H7 = 778, + REG_V1_H0 = 779, + REG_V1_H1 = 780, + REG_V1_H2 = 781, + REG_V1_H3 = 782, + REG_V1_H4 = 783, + REG_V1_H5 = 784, + REG_V1_H6 = 785, + REG_V1_H7 = 786, + REG_V2_H0 = 787, + REG_V2_H1 = 788, + REG_V2_H2 = 789, + REG_V2_H3 = 790, + REG_V2_H4 = 791, + REG_V2_H5 = 792, + REG_V2_H6 = 793, + REG_V2_H7 = 794, + REG_V3_H0 = 795, + REG_V3_H1 = 796, + REG_V3_H2 = 797, + REG_V3_H3 = 798, + REG_V3_H4 = 799, + REG_V3_H5 = 800, + REG_V3_H6 = 801, + REG_V3_H7 = 802, + REG_V4_H0 = 803, + REG_V4_H1 = 804, + REG_V4_H2 = 805, + REG_V4_H3 = 806, + REG_V4_H4 = 807, + REG_V4_H5 = 808, + REG_V4_H6 = 809, + REG_V4_H7 = 810, + REG_V5_H0 = 811, + REG_V5_H1 = 812, + REG_V5_H2 = 813, + REG_V5_H3 = 814, + REG_V5_H4 = 815, + REG_V5_H5 = 816, + REG_V5_H6 = 817, + REG_V5_H7 = 818, + REG_V6_H0 = 819, + REG_V6_H1 = 820, + REG_V6_H2 = 821, + REG_V6_H3 = 822, + REG_V6_H4 = 823, + REG_V6_H5 = 824, + REG_V6_H6 = 825, + REG_V6_H7 = 826, + REG_V7_H0 = 827, + REG_V7_H1 = 828, + REG_V7_H2 = 829, + REG_V7_H3 = 830, + REG_V7_H4 = 831, + REG_V7_H5 = 832, + REG_V7_H6 = 833, + REG_V7_H7 = 834, + REG_V8_H0 = 835, + REG_V8_H1 = 836, + REG_V8_H2 = 837, + REG_V8_H3 = 838, + REG_V8_H4 = 839, + REG_V8_H5 = 840, + REG_V8_H6 = 841, + REG_V8_H7 = 842, + REG_V9_H0 = 843, + REG_V9_H1 = 844, + REG_V9_H2 = 845, + REG_V9_H3 = 846, + REG_V9_H4 = 847, + REG_V9_H5 = 848, + REG_V9_H6 = 849, + REG_V9_H7 = 850, + REG_V10_H0 = 851, + REG_V10_H1 = 852, + REG_V10_H2 = 853, + REG_V10_H3 = 854, + REG_V10_H4 = 855, + REG_V10_H5 = 856, + REG_V10_H6 = 857, + REG_V10_H7 = 858, + REG_V11_H0 = 859, + REG_V11_H1 = 860, + REG_V11_H2 = 861, + REG_V11_H3 = 862, + REG_V11_H4 = 863, + REG_V11_H5 = 864, + REG_V11_H6 = 865, + REG_V11_H7 = 866, + REG_V12_H0 = 867, + REG_V12_H1 = 868, + REG_V12_H2 = 869, + REG_V12_H3 = 870, + REG_V12_H4 = 871, + REG_V12_H5 = 872, + REG_V12_H6 = 873, + REG_V12_H7 = 874, + REG_V13_H0 = 875, + REG_V13_H1 = 876, + REG_V13_H2 = 877, + REG_V13_H3 = 878, + REG_V13_H4 = 879, + REG_V13_H5 = 880, + REG_V13_H6 = 881, + REG_V13_H7 = 882, + REG_V14_H0 = 883, + REG_V14_H1 = 884, + REG_V14_H2 = 885, + REG_V14_H3 = 886, + REG_V14_H4 = 887, + REG_V14_H5 = 888, + REG_V14_H6 = 889, + REG_V14_H7 = 890, + REG_V15_H0 = 891, + REG_V15_H1 = 892, + REG_V15_H2 = 893, + REG_V15_H3 = 894, + REG_V15_H4 = 895, + REG_V15_H5 = 896, + REG_V15_H6 = 897, + REG_V15_H7 = 898, + REG_V16_H0 = 899, + REG_V16_H1 = 900, + REG_V16_H2 = 901, + REG_V16_H3 = 902, + REG_V16_H4 = 903, + REG_V16_H5 = 904, + REG_V16_H6 = 905, + REG_V16_H7 = 906, + REG_V17_H0 = 907, + REG_V17_H1 = 908, + REG_V17_H2 = 909, + REG_V17_H3 = 910, + REG_V17_H4 = 911, + REG_V17_H5 = 912, + REG_V17_H6 = 913, + REG_V17_H7 = 914, + REG_V18_H0 = 915, + REG_V18_H1 = 916, + REG_V18_H2 = 917, + REG_V18_H3 = 918, + REG_V18_H4 = 919, + REG_V18_H5 = 920, + REG_V18_H6 = 921, + REG_V18_H7 = 922, + REG_V19_H0 = 923, + REG_V19_H1 = 924, + REG_V19_H2 = 925, + REG_V19_H3 = 926, + REG_V19_H4 = 927, + REG_V19_H5 = 928, + REG_V19_H6 = 929, + REG_V19_H7 = 930, + REG_V20_H0 = 931, + REG_V20_H1 = 932, + REG_V20_H2 = 933, + REG_V20_H3 = 934, + REG_V20_H4 = 935, + REG_V20_H5 = 936, + REG_V20_H6 = 937, + REG_V20_H7 = 938, + REG_V21_H0 = 939, + REG_V21_H1 = 940, + REG_V21_H2 = 941, + REG_V21_H3 = 942, + REG_V21_H4 = 943, + REG_V21_H5 = 944, + REG_V21_H6 = 945, + REG_V21_H7 = 946, + REG_V22_H0 = 947, + REG_V22_H1 = 948, + REG_V22_H2 = 949, + REG_V22_H3 = 950, + REG_V22_H4 = 951, + REG_V22_H5 = 952, + REG_V22_H6 = 953, + REG_V22_H7 = 954, + REG_V23_H0 = 955, + REG_V23_H1 = 956, + REG_V23_H2 = 957, + REG_V23_H3 = 958, + REG_V23_H4 = 959, + REG_V23_H5 = 960, + REG_V23_H6 = 961, + REG_V23_H7 = 962, + REG_V24_H0 = 963, + REG_V24_H1 = 964, + REG_V24_H2 = 965, + REG_V24_H3 = 966, + REG_V24_H4 = 967, + REG_V24_H5 = 968, + REG_V24_H6 = 969, + REG_V24_H7 = 970, + REG_V25_H0 = 971, + REG_V25_H1 = 972, + REG_V25_H2 = 973, + REG_V25_H3 = 974, + REG_V25_H4 = 975, + REG_V25_H5 = 976, + REG_V25_H6 = 977, + REG_V25_H7 = 978, + REG_V26_H0 = 979, + REG_V26_H1 = 980, + REG_V26_H2 = 981, + REG_V26_H3 = 982, + REG_V26_H4 = 983, + REG_V26_H5 = 984, + REG_V26_H6 = 985, + REG_V26_H7 = 986, + REG_V27_H0 = 987, + REG_V27_H1 = 988, + REG_V27_H2 = 989, + REG_V27_H3 = 990, + REG_V27_H4 = 991, + REG_V27_H5 = 992, + REG_V27_H6 = 993, + REG_V27_H7 = 994, + REG_V28_H0 = 995, + REG_V28_H1 = 996, + REG_V28_H2 = 997, + REG_V28_H3 = 998, + REG_V28_H4 = 999, + REG_V28_H5 = 1000, + REG_V28_H6 = 1001, + REG_V28_H7 = 1002, + REG_V29_H0 = 1003, + REG_V29_H1 = 1004, + REG_V29_H2 = 1005, + REG_V29_H3 = 1006, + REG_V29_H4 = 1007, + REG_V29_H5 = 1008, + REG_V29_H6 = 1009, + REG_V29_H7 = 1010, + REG_V30_H0 = 1011, + REG_V30_H1 = 1012, + REG_V30_H2 = 1013, + REG_V30_H3 = 1014, + REG_V30_H4 = 1015, + REG_V30_H5 = 1016, + REG_V30_H6 = 1017, + REG_V30_H7 = 1018, + REG_V31_H0 = 1019, + REG_V31_H1 = 1020, + REG_V31_H2 = 1021, + REG_V31_H3 = 1022, + REG_V31_H4 = 1023, + REG_V31_H5 = 1024, + REG_V31_H6 = 1025, + REG_V31_H7 = 1026, // S vector - REG_V0_S0, - REG_V0_S1, - REG_V0_S2, - REG_V0_S3, - REG_V1_S0, - REG_V1_S1, - REG_V1_S2, - REG_V1_S3, - REG_V2_S0, - REG_V2_S1, - REG_V2_S2, - REG_V2_S3, - REG_V3_S0, - REG_V3_S1, - REG_V3_S2, - REG_V3_S3, - REG_V4_S0, - REG_V4_S1, - REG_V4_S2, - REG_V4_S3, - REG_V5_S0, - REG_V5_S1, - REG_V5_S2, - REG_V5_S3, - REG_V6_S0, - REG_V6_S1, - REG_V6_S2, - REG_V6_S3, - REG_V7_S0, - REG_V7_S1, - REG_V7_S2, - REG_V7_S3, - REG_V8_S0, - REG_V8_S1, - REG_V8_S2, - REG_V8_S3, - REG_V9_S0, - REG_V9_S1, - REG_V9_S2, - REG_V9_S3, - REG_V10_S0, - REG_V10_S1, - REG_V10_S2, - REG_V10_S3, - REG_V11_S0, - REG_V11_S1, - REG_V11_S2, - REG_V11_S3, - REG_V12_S0, - REG_V12_S1, - REG_V12_S2, - REG_V12_S3, - REG_V13_S0, - REG_V13_S1, - REG_V13_S2, - REG_V13_S3, - REG_V14_S0, - REG_V14_S1, - REG_V14_S2, - REG_V14_S3, - REG_V15_S0, - REG_V15_S1, - REG_V15_S2, - REG_V15_S3, - REG_V16_S0, - REG_V16_S1, - REG_V16_S2, - REG_V16_S3, - REG_V17_S0, - REG_V17_S1, - REG_V17_S2, - REG_V17_S3, - REG_V18_S0, - REG_V18_S1, - REG_V18_S2, - REG_V18_S3, - REG_V19_S0, - REG_V19_S1, - REG_V19_S2, - REG_V19_S3, - REG_V20_S0, - REG_V20_S1, - REG_V20_S2, - REG_V20_S3, - REG_V21_S0, - REG_V21_S1, - REG_V21_S2, - REG_V21_S3, - REG_V22_S0, - REG_V22_S1, - REG_V22_S2, - REG_V22_S3, - REG_V23_S0, - REG_V23_S1, - REG_V23_S2, - REG_V23_S3, - REG_V24_S0, - REG_V24_S1, - REG_V24_S2, - REG_V24_S3, - REG_V25_S0, - REG_V25_S1, - REG_V25_S2, - REG_V25_S3, - REG_V26_S0, - REG_V26_S1, - REG_V26_S2, - REG_V26_S3, - REG_V27_S0, - REG_V27_S1, - REG_V27_S2, - REG_V27_S3, - REG_V28_S0, - REG_V28_S1, - REG_V28_S2, - REG_V28_S3, - REG_V29_S0, - REG_V29_S1, - REG_V29_S2, - REG_V29_S3, - REG_V30_S0, - REG_V30_S1, - REG_V30_S2, - REG_V30_S3, - REG_V31_S0, - REG_V31_S1, - REG_V31_S2, - REG_V31_S3, + REG_V0_S0 = 1027, + REG_V0_S1 = 1028, + REG_V0_S2 = 1029, + REG_V0_S3 = 1030, + REG_V1_S0 = 1031, + REG_V1_S1 = 1032, + REG_V1_S2 = 1033, + REG_V1_S3 = 1034, + REG_V2_S0 = 1035, + REG_V2_S1 = 1036, + REG_V2_S2 = 1037, + REG_V2_S3 = 1038, + REG_V3_S0 = 1039, + REG_V3_S1 = 1040, + REG_V3_S2 = 1041, + REG_V3_S3 = 1042, + REG_V4_S0 = 1043, + REG_V4_S1 = 1044, + REG_V4_S2 = 1045, + REG_V4_S3 = 1046, + REG_V5_S0 = 1047, + REG_V5_S1 = 1048, + REG_V5_S2 = 1049, + REG_V5_S3 = 1050, + REG_V6_S0 = 1051, + REG_V6_S1 = 1052, + REG_V6_S2 = 1053, + REG_V6_S3 = 1054, + REG_V7_S0 = 1055, + REG_V7_S1 = 1056, + REG_V7_S2 = 1057, + REG_V7_S3 = 1058, + REG_V8_S0 = 1059, + REG_V8_S1 = 1060, + REG_V8_S2 = 1061, + REG_V8_S3 = 1062, + REG_V9_S0 = 1063, + REG_V9_S1 = 1064, + REG_V9_S2 = 1065, + REG_V9_S3 = 1066, + REG_V10_S0 = 1067, + REG_V10_S1 = 1068, + REG_V10_S2 = 1069, + REG_V10_S3 = 1070, + REG_V11_S0 = 1071, + REG_V11_S1 = 1072, + REG_V11_S2 = 1073, + REG_V11_S3 = 1074, + REG_V12_S0 = 1075, + REG_V12_S1 = 1076, + REG_V12_S2 = 1077, + REG_V12_S3 = 1078, + REG_V13_S0 = 1079, + REG_V13_S1 = 1080, + REG_V13_S2 = 1081, + REG_V13_S3 = 1082, + REG_V14_S0 = 1083, + REG_V14_S1 = 1084, + REG_V14_S2 = 1085, + REG_V14_S3 = 1086, + REG_V15_S0 = 1087, + REG_V15_S1 = 1088, + REG_V15_S2 = 1089, + REG_V15_S3 = 1090, + REG_V16_S0 = 1091, + REG_V16_S1 = 1092, + REG_V16_S2 = 1093, + REG_V16_S3 = 1094, + REG_V17_S0 = 1095, + REG_V17_S1 = 1096, + REG_V17_S2 = 1097, + REG_V17_S3 = 1098, + REG_V18_S0 = 1099, + REG_V18_S1 = 1100, + REG_V18_S2 = 1101, + REG_V18_S3 = 1102, + REG_V19_S0 = 1103, + REG_V19_S1 = 1104, + REG_V19_S2 = 1105, + REG_V19_S3 = 1106, + REG_V20_S0 = 1107, + REG_V20_S1 = 1108, + REG_V20_S2 = 1109, + REG_V20_S3 = 1110, + REG_V21_S0 = 1111, + REG_V21_S1 = 1112, + REG_V21_S2 = 1113, + REG_V21_S3 = 1114, + REG_V22_S0 = 1115, + REG_V22_S1 = 1116, + REG_V22_S2 = 1117, + REG_V22_S3 = 1118, + REG_V23_S0 = 1119, + REG_V23_S1 = 1120, + REG_V23_S2 = 1121, + REG_V23_S3 = 1122, + REG_V24_S0 = 1123, + REG_V24_S1 = 1124, + REG_V24_S2 = 1125, + REG_V24_S3 = 1126, + REG_V25_S0 = 1127, + REG_V25_S1 = 1128, + REG_V25_S2 = 1129, + REG_V25_S3 = 1130, + REG_V26_S0 = 1131, + REG_V26_S1 = 1132, + REG_V26_S2 = 1133, + REG_V26_S3 = 1134, + REG_V27_S0 = 1135, + REG_V27_S1 = 1136, + REG_V27_S2 = 1137, + REG_V27_S3 = 1138, + REG_V28_S0 = 1139, + REG_V28_S1 = 1140, + REG_V28_S2 = 1141, + REG_V28_S3 = 1142, + REG_V29_S0 = 1143, + REG_V29_S1 = 1144, + REG_V29_S2 = 1145, + REG_V29_S3 = 1146, + REG_V30_S0 = 1147, + REG_V30_S1 = 1148, + REG_V30_S2 = 1149, + REG_V30_S3 = 1150, + REG_V31_S0 = 1151, + REG_V31_S1 = 1152, + REG_V31_S2 = 1153, + REG_V31_S3 = 1154, // D vector - REG_V0_D0, - REG_V0_D1, - REG_V1_D0, - REG_V1_D1, - REG_V2_D0, - REG_V2_D1, - REG_V3_D0, - REG_V3_D1, - REG_V4_D0, - REG_V4_D1, - REG_V5_D0, - REG_V5_D1, - REG_V6_D0, - REG_V6_D1, - REG_V7_D0, - REG_V7_D1, - REG_V8_D0, - REG_V8_D1, - REG_V9_D0, - REG_V9_D1, - REG_V10_D0, - REG_V10_D1, - REG_V11_D0, - REG_V11_D1, - REG_V12_D0, - REG_V12_D1, - REG_V13_D0, - REG_V13_D1, - REG_V14_D0, - REG_V14_D1, - REG_V15_D0, - REG_V15_D1, - REG_V16_D0, - REG_V16_D1, - REG_V17_D0, - REG_V17_D1, - REG_V18_D0, - REG_V18_D1, - REG_V19_D0, - REG_V19_D1, - REG_V20_D0, - REG_V20_D1, - REG_V21_D0, - REG_V21_D1, - REG_V22_D0, - REG_V22_D1, - REG_V23_D0, - REG_V23_D1, - REG_V24_D0, - REG_V24_D1, - REG_V25_D0, - REG_V25_D1, - REG_V26_D0, - REG_V26_D1, - REG_V27_D0, - REG_V27_D1, - REG_V28_D0, - REG_V28_D1, - REG_V29_D0, - REG_V29_D1, - REG_V30_D0, - REG_V30_D1, - REG_V31_D0, - REG_V31_D1, + REG_V0_D0 = 1155, + REG_V0_D1 = 1156, + REG_V1_D0 = 1157, + REG_V1_D1 = 1158, + REG_V2_D0 = 1159, + REG_V2_D1 = 1160, + REG_V3_D0 = 1161, + REG_V3_D1 = 1162, + REG_V4_D0 = 1163, + REG_V4_D1 = 1164, + REG_V5_D0 = 1165, + REG_V5_D1 = 1166, + REG_V6_D0 = 1167, + REG_V6_D1 = 1168, + REG_V7_D0 = 1169, + REG_V7_D1 = 1170, + REG_V8_D0 = 1171, + REG_V8_D1 = 1172, + REG_V9_D0 = 1173, + REG_V9_D1 = 1174, + REG_V10_D0 = 1175, + REG_V10_D1 = 1176, + REG_V11_D0 = 1177, + REG_V11_D1 = 1178, + REG_V12_D0 = 1179, + REG_V12_D1 = 1180, + REG_V13_D0 = 1181, + REG_V13_D1 = 1182, + REG_V14_D0 = 1183, + REG_V14_D1 = 1184, + REG_V15_D0 = 1185, + REG_V15_D1 = 1186, + REG_V16_D0 = 1187, + REG_V16_D1 = 1188, + REG_V17_D0 = 1189, + REG_V17_D1 = 1190, + REG_V18_D0 = 1191, + REG_V18_D1 = 1192, + REG_V19_D0 = 1193, + REG_V19_D1 = 1194, + REG_V20_D0 = 1195, + REG_V20_D1 = 1196, + REG_V21_D0 = 1197, + REG_V21_D1 = 1198, + REG_V22_D0 = 1199, + REG_V22_D1 = 1200, + REG_V23_D0 = 1201, + REG_V23_D1 = 1202, + REG_V24_D0 = 1203, + REG_V24_D1 = 1204, + REG_V25_D0 = 1205, + REG_V25_D1 = 1206, + REG_V26_D0 = 1207, + REG_V26_D1 = 1208, + REG_V27_D0 = 1209, + REG_V27_D1 = 1210, + REG_V28_D0 = 1211, + REG_V28_D1 = 1212, + REG_V29_D0 = 1213, + REG_V29_D1 = 1214, + REG_V30_D0 = 1215, + REG_V30_D1 = 1216, + REG_V31_D0 = 1217, + REG_V31_D1 = 1218, // Q vector is already defined REG_V0, REG_V1, ..., REG_V31 // SVE - REG_Z0, - REG_Z1, - REG_Z2, - REG_Z3, - REG_Z4, - REG_Z5, - REG_Z6, - REG_Z7, - REG_Z8, - REG_Z9, - REG_Z10, - REG_Z11, - REG_Z12, - REG_Z13, - REG_Z14, - REG_Z15, - REG_Z16, - REG_Z17, - REG_Z18, - REG_Z19, - REG_Z20, - REG_Z21, - REG_Z22, - REG_Z23, - REG_Z24, - REG_Z25, - REG_Z26, - REG_Z27, - REG_Z28, - REG_Z29, - REG_Z30, - REG_Z31, - REG_P0, - REG_P1, - REG_P2, - REG_P3, - REG_P4, - REG_P5, - REG_P6, - REG_P7, - REG_P8, - REG_P9, - REG_P10, - REG_P11, - REG_P12, - REG_P13, - REG_P14, - REG_P15, - REG_P16, - REG_P17, - REG_P18, - REG_P19, - REG_P20, - REG_P21, - REG_P22, - REG_P23, - REG_P24, - REG_P25, - REG_P26, - REG_P27, - REG_P28, - REG_P29, - REG_P30, - REG_P31, - REG_PF0, - REG_PF1, - REG_PF2, - REG_PF3, - REG_PF4, - REG_PF5, - REG_PF6, - REG_PF7, - REG_PF8, - REG_PF9, - REG_PF10, - REG_PF11, - REG_PF12, - REG_PF13, - REG_PF14, - REG_PF15, - REG_PF16, - REG_PF17, - REG_PF18, - REG_PF19, - REG_PF20, - REG_PF21, - REG_PF22, - REG_PF23, - REG_PF24, - REG_PF25, - REG_PF26, - REG_PF27, - REG_PF28, - REG_PF29, - REG_PF30, - REG_PF31, - REG_ZT0, - REG_END + REG_Z0 = 1219, + REG_Z1 = 1220, + REG_Z2 = 1221, + REG_Z3 = 1222, + REG_Z4 = 1223, + REG_Z5 = 1224, + REG_Z6 = 1225, + REG_Z7 = 1226, + REG_Z8 = 1227, + REG_Z9 = 1228, + REG_Z10 = 1229, + REG_Z11 = 1230, + REG_Z12 = 1231, + REG_Z13 = 1232, + REG_Z14 = 1233, + REG_Z15 = 1234, + REG_Z16 = 1235, + REG_Z17 = 1236, + REG_Z18 = 1237, + REG_Z19 = 1238, + REG_Z20 = 1239, + REG_Z21 = 1240, + REG_Z22 = 1241, + REG_Z23 = 1242, + REG_Z24 = 1243, + REG_Z25 = 1244, + REG_Z26 = 1245, + REG_Z27 = 1246, + REG_Z28 = 1247, + REG_Z29 = 1248, + REG_Z30 = 1249, + REG_Z31 = 1250, + REG_P0 = 1251, + REG_P1 = 1252, + REG_P2 = 1253, + REG_P3 = 1254, + REG_P4 = 1255, + REG_P5 = 1256, + REG_P6 = 1257, + REG_P7 = 1258, + REG_P8 = 1259, + REG_P9 = 1260, + REG_P10 = 1261, + REG_P11 = 1262, + REG_P12 = 1263, + REG_P13 = 1264, + REG_P14 = 1265, + REG_P15 = 1266, + REG_ZT0 = 1315, + REG_END = 1316, }; // The name the architecture writes a register under. Empty where the number names none. From 210361673ca997b43fe8dbb341d05ffa33c43d37 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 25 Sep 2026 19:16:38 -0700 Subject: [PATCH 4/5] [aarch64] Fix branch handling of NV, BRK, HLT and AlwaysBranch NV was treated as never true, but the architecture defines it as always true, like AL. So b.nv was lifted as never taken, conditional selects picked their second source, and CCMP set the flags from its immediate. b.nv is now an unconditional branch. The never-true reading came from the fix for #6613, so that inverting b.al would give a never-taken branch. Both b.al and b.nv always branch, so the branch patches are no longer offered for them, as for b. BRK and HLT lift to a trap that ends the block, but instruction info let the block continue into the bytes after them. They now end the block, as UDF does. AlwaysBranch set only four of Rt's five bits, turning `cbnz x3` into `cbz x15`. It now uses the zero register. AlwaysBranch and InvertBranch now decline instructions they can't rewrite. --- arch/arm64/arch_arm64.cpp | 37 +++++++++++----------- arch/arm64/arm64test.py | 64 ++++++++++++++++++++++++++++++++++++++- arch/arm64/il.cpp | 50 +++++++++++++++--------------- 3 files changed, 106 insertions(+), 45 deletions(-) diff --git a/arch/arm64/arch_arm64.cpp b/arch/arm64/arch_arm64.cpp index 125a7709e..86145ad35 100644 --- a/arch/arm64/arch_arm64.cpp +++ b/arch/arm64/arch_arm64.cpp @@ -475,12 +475,15 @@ class Arm64Architecture : public Architecture } - // Whether this is B.cond or BC.cond, including b.al and b.nv. + // Whether this is B.cond or BC.cond with a condition that can fail. b.al and b.nv always branch, + // so they are unconditional branches in a conditional encoding. bool IsConditionalBranch(const exarmo_aarch64_instruction& instr) { exarmo_aarch64_encoding encoding = exarmo_aarch64_instruction_encoding(&instr); - return encoding == EXARMO_AARCH64_ENC_BOnlyCondbranch - || encoding == EXARMO_AARCH64_ENC_BcOnlyCondbranch; + if (encoding != EXARMO_AARCH64_ENC_BOnlyCondbranch && encoding != EXARMO_AARCH64_ENC_BcOnlyCondbranch) + return false; + + return exarmo_aarch64_instruction_branch(&instr, 0).conditional; } @@ -512,16 +515,6 @@ class Arm64Architecture : public Architecture break; } - // b.nv is read as never taken, so only the instruction after it follows. B.cond and - // BC.cond write their condition as their first operand. - exarmo_aarch64_operand condition; - if (IsConditionalBranch(instr) && exarmo_aarch64_instruction_operands(&instr, &condition, 1) - && condition.cond == EXARMO_AARCH64_COND_NV) - { - result.AddBranch(FalseBranch, addr + 4); - break; - } - if (!branch.conditional) { result.AddBranch(UnconditionalBranch, branch.target); @@ -555,10 +548,10 @@ class Arm64Architecture : public Architecture result.AddBranch(SystemCall); break; - // Of the instructions that raise an exception, only UDF ends the block. + // BRK, HLT and UDF all lift to a trap that ends the block. case EXARMO_AARCH64_BRANCH_EXCEPTION: - if (exarmo_aarch64_instruction_mnemonic(&instr) == EXARMO_AARCH64_UDF) - result.AddBranch(ExceptionBranch); + case EXARMO_AARCH64_BRANCH_HALT: + result.AddBranch(ExceptionBranch); break; // An indirect call returns to the instruction after it, so it ends no block. @@ -1109,10 +1102,14 @@ class Arm64Architecture : public Architecture // unconditional branch instruction. *value = (5 << 26) | (((uint32_t)((branch.target - addr) >> 2)) & 0x03ffffff); } - else + else if (IsTestAndBranch(instr) || IsCompareAndBranch(instr)) { // Force to a *BZ, then change the register to zero register (WZR or XZR, determined by bit 31) - *value = (*value & ~(1 << 24)) | 0x0f; + *value = (*value & ~(1 << 24)) | 0x1f; + } + else + { + return false; } return true; } @@ -1135,6 +1132,10 @@ class Arm64Architecture : public Architecture // invert bit 24 *value ^= (1 << 24); } + else + { + return false; + } return true; } diff --git a/arch/arm64/arm64test.py b/arch/arm64/arm64test.py index 3386ba640..79eb1faa1 100755 --- a/arch/arm64/arm64test.py +++ b/arch/arm64/arm64test.py @@ -12390,6 +12390,11 @@ (b'\x1F\x81\x70\xB1', 'LLIL_ADD.q{*}(LLIL_REG.q(x8),LLIL_CONST.q(0xC20000))'), # add w22, w30, #0x7e6, with no shift written (b'\xD6\x9B\x1F\x11', 'LLIL_SET_REG.d(w22,LLIL_ADD.d(LLIL_REG.d(w30),LLIL_CONST.d(0x7E6)))'), + # b.al and b.nv both branch every time, past the epilogue's mov to its ret + # b.al 0x8 + (b'\x4E\x00\x00\x54', 'LLIL_GOTO(2); LLIL_RET(LLIL_REG.q(lr))'), + # b.nv 0x8 + (b'\x4F\x00\x00\x54', 'LLIL_GOTO(2); LLIL_RET(LLIL_REG.q(lr))'), # irg x0, x1, with no Xm written, excludes no tags (b'\x20\x10\xDF\x9A', 'LLIL_INTRINSIC([x0],__irg,[LLIL_REG.q(x1),LLIL_CONST.q(0x0)])'), # irg x0, x1, x2 @@ -12986,6 +12991,25 @@ ' LLIL_SET_FLAG(c,LLIL_CONST(0));' + \ ' LLIL_SET_FLAG(v,LLIL_CONST(0));' + \ ' LLIL_GOTO(8)'), # ccmp w8, #30, #8, mi + # nv holds as al does, so each of these behaves as if the condition held + (b'\xC1\xF8\x52\x7A', 'LLIL_IF(LLIL_CONST(1),1,3);' + \ + ' LLIL_SUB.d{*}(LLIL_REG.d(w6),LLIL_CONST.d(0x12));' + \ + ' LLIL_GOTO(8);' + \ + ' LLIL_SET_FLAG(n,LLIL_CONST(0));' + \ + ' LLIL_SET_FLAG(z,LLIL_CONST(0));' + \ + ' LLIL_SET_FLAG(c,LLIL_CONST(0));' + \ + ' LLIL_SET_FLAG(v,LLIL_CONST(1));' + \ + ' LLIL_GOTO(8)'), # ccmp w6, #18, #1, nv + (b'\x20\xF0\x82\x9A', 'LLIL_IF(LLIL_CONST(1),1,3);' + \ + ' LLIL_SET_REG.q(x0,LLIL_REG.q(x1));' + \ + ' LLIL_GOTO(5);' + \ + ' LLIL_SET_REG.q(x0,LLIL_REG.q(x2));' + \ + ' LLIL_GOTO(5)'), # csel x0, x1, x2, nv + (b'\x20\xFC\x22\x1E', 'LLIL_IF(LLIL_CONST(1),1,3);' + \ + ' LLIL_SET_REG.d(s0,LLIL_REG.d(s1));' + \ + ' LLIL_GOTO(5);' + \ + ' LLIL_SET_REG.d(s0,LLIL_REG.d(s2));' + \ + ' LLIL_GOTO(5)'), # fcsel s0, s1, s2, nv (b'\x1F\x20\x03\xD5', 'LLIL_NOP()'), # nop, gets optimized from function ] @@ -13233,6 +13257,21 @@ (b'\x00\x70\x40\x4c', ['{v0.16b}', '[x0]']), ] +# The Always Branch and Invert Branch patches of each branch, or None where no branch patch is +# offered. +patch_test_cases = [ + # b.eq 0x8 becomes b 0x8, or b.ne 0x8 + (b'\x40\x00\x00\x54', b'\x02\x00\x00\x14', b'\x41\x00\x00\x54'), + # cbnz x3, 0x8 becomes cbz xzr, 0x8, or cbz x3, 0x8 + (b'\x43\x00\x00\xb5', b'\x5f\x00\x00\xb4', b'\x43\x00\x00\xb4'), + # tbz w0, #0x0, 0x8 becomes tbz wzr, #0x0, 0x8, or tbnz w0, #0x0, 0x8 + (b'\x40\x00\x00\x36', b'\x5f\x00\x00\x36', b'\x40\x00\x00\x37'), + # b.al 0x8 and b.nv 0x8 always branch, as b 0x8 does + (b'\x4e\x00\x00\x54', None, None), + (b'\x4f\x00\x00\x54', None, None), + (b'\x02\x00\x00\x14', None, None), +] + test_cases = \ tests_apple_vendor + \ tests_tenter + \ @@ -13529,6 +13568,28 @@ def test_all_operands(no_fail=False): return True +def test_all_patches(no_fail=False): + arch = binaryninja.Architecture['aarch64'] + for test_i, (data, expected_always, expected_inverted) in enumerate(patch_test_cases): + available = expected_always is not None + actual = ( + arch.is_always_branch_patch_available(data), + arch.is_never_branch_patch_available(data), + arch.is_invert_branch_patch_available(data), + arch.always_branch(data) if available else None, + arch.invert_branch(data) if available else None, + ) + expected = (available, available, available, expected_always, expected_inverted) + if actual != expected: + print('PATCH MISMATCH AT TEST %d!' % test_i) + print('\t input: %s %s' % (data.hex(), disassemble(data))) + print('\texpected: %s' % (expected,)) + print('\t actual: %s' % (actual,)) + if not no_fail: + return False + + return True + def test_all_position_dependent(no_fail=False): for test_i, (data, addr, expected_lift) in enumerate(tests_position_dependent): actual_lift, _ = lift_at(data, addr) @@ -13547,7 +13608,8 @@ def run_all(no_fail=False): position_dependent_ok = test_all_position_dependent(no_fail) disassembly_ok = test_all_disassembly(no_fail) operands_ok = test_all_operands(no_fail) - if lifts_ok and position_dependent_ok and disassembly_ok and operands_ok: + patches_ok = test_all_patches(no_fail) + if lifts_ok and position_dependent_ok and disassembly_ok and operands_ok and patches_ok: print('success!', file=sys.stderr) return True diff --git a/arch/arm64/il.cpp b/arch/arm64/il.cpp index 6bc65efe7..f9a4bf163 100644 --- a/arch/arm64/il.cpp +++ b/arch/arm64/il.cpp @@ -23,9 +23,10 @@ static uint32_t GetFlagWriteTypeForEffect(exarmo_aarch64_flag_effect effect) return effect.float_compare ? IL_FLAG_WRITE_ALL_FLOAT : IL_FLAG_WRITE_ALL; } -static ExprId GetCondition(LowLevelILFunction& il, exarmo_aarch64_cond cond) +// The IL expression for the condition `operand` names. +static ExprId GetCondition(LowLevelILFunction& il, const exarmo_aarch64_operand& operand) { - switch (cond) + switch ((exarmo_aarch64_cond)operand.cond) { case EXARMO_AARCH64_COND_EQ: return il.FlagGroup(IL_FLAG_GROUP_EQ); @@ -55,11 +56,12 @@ static ExprId GetCondition(LowLevelILFunction& il, exarmo_aarch64_cond cond) return il.FlagGroup(IL_FLAG_GROUP_GT); case EXARMO_AARCH64_COND_LE: return il.FlagGroup(IL_FLAG_GROUP_LE); + // In ARM's ConditionHolds pseudocode, AL and NV both evaluate true. case EXARMO_AARCH64_COND_AL: - return il.Const(0, 1); // Always branch case EXARMO_AARCH64_COND_NV: + return il.Const(0, 1); default: - return il.Const(0, 0); // Never branch + return il.Const(0, 0); } } @@ -1060,25 +1062,21 @@ bool GetLowLevelILForInstruction( break; // B carries the condition as an operand, so one case covers the unconditional branch and - // every conditional one. b.al branches every time, and b.nv is read as never taken. + // every conditional one. b.al and b.nv branch every time, and jump directly so that the + // block does not gain an edge nothing takes. case EXARMO_AARCH64_B: case EXARMO_AARCH64_BC: { - if (IS_COND_O(operand1) && operand1.cond == 0xf) - { - il.AddInstruction(DirectJump(arch, il, addr + 4, addrSize)); - break; - } - exarmo_aarch64_operand& target = IS_COND_O(operand1) ? operand2 : operand1; - if (!IS_COND_O(operand1) || (operand1.cond & 0xe) == 0xe) + if (!IS_COND_O(operand1) || operand1.cond == EXARMO_AARCH64_COND_AL + || operand1.cond == EXARMO_AARCH64_COND_NV) { il.AddInstruction(DirectJump(arch, il, LabelTarget(target, addr), addrSize)); break; } - ConditionalJump(arch, il, GetCondition(il, (exarmo_aarch64_cond)operand1.cond), addrSize, - LabelTarget(target, addr), addr + 4); + ConditionalJump( + arch, il, GetCondition(il, operand1), addrSize, LabelTarget(target, addr), addr + 4); return false; } case EXARMO_AARCH64_BL: @@ -1242,7 +1240,7 @@ bool GetLowLevelILForInstruction( { LowLevelILLabel trueCode, falseCode, done; - il.AddInstruction(il.If(GetCondition(il, (exarmo_aarch64_cond)operand4.cond), trueCode, falseCode)); + il.AddInstruction(il.If(GetCondition(il, operand4), trueCode, falseCode)); il.MarkLabel(trueCode); il.AddInstruction(il.Add(REGSZ_O(operand1), ILREG_O(operand1), @@ -1274,7 +1272,7 @@ bool GetLowLevelILForInstruction( { LowLevelILLabel trueCode, falseCode, done; - il.AddInstruction(il.If(GetCondition(il, (exarmo_aarch64_cond)operand4.cond), trueCode, falseCode)); + il.AddInstruction(il.If(GetCondition(il, operand4), trueCode, falseCode)); il.MarkLabel(trueCode); il.AddInstruction(il.Sub(REGSZ_O(operand1), ILREG_O(operand1), @@ -1297,43 +1295,43 @@ bool GetLowLevelILForInstruction( break; case EXARMO_AARCH64_CSEL: case EXARMO_AARCH64_FCSEL: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand4.cond), ILSETREG_O(operand1, ILREG_O(operand2)), + GenIfElse(il, GetCondition(il, operand4), ILSETREG_O(operand1, ILREG_O(operand2)), ILSETREG_O(operand1, ILREG_O(operand3))); break; case EXARMO_AARCH64_CSINC: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand4.cond), ILSETREG_O(operand1, ILREG_O(operand2)), + GenIfElse(il, GetCondition(il, operand4), ILSETREG_O(operand1, ILREG_O(operand2)), ILSETREG_O(operand1, ILADDREG_O(operand3, il.Const(REGSZ_O(operand1), 1)))); break; case EXARMO_AARCH64_CSINV: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand4.cond), ILSETREG_O(operand1, ILREG_O(operand2)), + GenIfElse(il, GetCondition(il, operand4), ILSETREG_O(operand1, ILREG_O(operand2)), ILSETREG_O(operand1, il.Not(REGSZ_O(operand1), ILREG_O(operand3)))); break; case EXARMO_AARCH64_CSNEG: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand4.cond), ILSETREG_O(operand1, ILREG_O(operand2)), + GenIfElse(il, GetCondition(il, operand4), ILSETREG_O(operand1, ILREG_O(operand2)), ILSETREG_O(operand1, il.Neg(REGSZ_O(operand1), ILREG_O(operand3)))); break; case EXARMO_AARCH64_CSET: il.AddInstruction( ILSETREG_O(operand1, - il.BoolToInt(REGSZ_O(operand1), GetCondition(il, (exarmo_aarch64_cond)operand2.cond)))); + il.BoolToInt(REGSZ_O(operand1), GetCondition(il, operand2)))); break; case EXARMO_AARCH64_CSETM: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand2.cond), + GenIfElse(il, GetCondition(il, operand2), ILSETREG_O(operand1, il.Const(REGSZ_O(operand1), -1)), ILSETREG_O(operand1, il.Const(REGSZ_O(operand1), 0))); break; case EXARMO_AARCH64_CINC: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand3.cond), + GenIfElse(il, GetCondition(il, operand3), ILSETREG_O(operand1, ILADDREG_O(operand2, il.Const(REGSZ_O(operand1), 1))), ILSETREG_O(operand1, ILREG_O(operand2))); break; case EXARMO_AARCH64_CINV: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand3.cond), + GenIfElse(il, GetCondition(il, operand3), ILSETREG_O(operand1, il.Not(REGSZ_O(operand1), ILREG_O(operand2))), ILSETREG_O(operand1, ILREG_O(operand2))); break; case EXARMO_AARCH64_CNEG: - GenIfElse(il, GetCondition(il, (exarmo_aarch64_cond)operand3.cond), + GenIfElse(il, GetCondition(il, operand3), ILSETREG_O(operand1, il.Neg(REGSZ_O(operand1), ILREG_O(operand2))), ILSETREG_O(operand1, ILREG_O(operand2))); break; @@ -1514,7 +1512,7 @@ bool GetLowLevelILForInstruction( { LowLevelILLabel trueCode, falseCode, done; - il.AddInstruction(il.If(GetCondition(il, (exarmo_aarch64_cond)operand4.cond), trueCode, falseCode)); + il.AddInstruction(il.If(GetCondition(il, operand4), trueCode, falseCode)); il.MarkLabel(trueCode); il.AddInstruction(il.FloatSub(REGSZ_O(operand1), ILREG_O(operand1), From 510a903207a7c18ef638720aaa3840e0d51813cb Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Fri, 25 Sep 2026 19:16:38 -0700 Subject: [PATCH 5/5] [aarch64] Fix lifting of MVNI and the atomic read-modify-write instructions The atomic read-modify-write instructions loaded the old value with `LLIL_SET_REG(temp0, ...)` of size zero, since a temporary has no size the register table knows. They now load into a temporary of the size they load. MVNI dropped an MSL written on its immediate, so `mvni v0.4s, #0x12, msl #8` lifted as ~0x12 rather than ~0x12ff, and it wrote the inverted element across the whole vector register, which set every lane above the lowest to all ones. It now writes each lane as MOVI does. ReadILOperand now reads immediates through ExtractImmediate, so every lift that reads an immediate through it applies whatever shift the immediate is written with, not only LSL. --- arch/arm64/arm64test.py | 656 ++++++++++++++++++++-------------------- arch/arm64/il.cpp | 75 +++-- 2 files changed, 382 insertions(+), 349 deletions(-) diff --git a/arch/arm64/arm64test.py b/arch/arm64/arm64test.py index 79eb1faa1..a53141496 100755 --- a/arch/arm64/arm64test.py +++ b/arch/arm64/arm64test.py @@ -492,7 +492,21 @@ ] tests_mvni = [ - (b'\xE2\x05\x01\x6F', 'LLIL_SET_REG.o(v2,LLIL_NOT.o(LLIL_CONST.o(0x2F)))'), # mvni v2.4s, #0x2f + # mvni v2.4s, #0x2f + (b'\xE2\x05\x01\x6F', 'LLIL_SET_REG.d(v2.s[0],LLIL_NOT.d(LLIL_CONST.d(0x2F)));' + \ + ' LLIL_SET_REG.d(v2.s[1],LLIL_NOT.d(LLIL_CONST.d(0x2F)));' + \ + ' LLIL_SET_REG.d(v2.s[2],LLIL_NOT.d(LLIL_CONST.d(0x2F)));' + \ + ' LLIL_SET_REG.d(v2.s[3],LLIL_NOT.d(LLIL_CONST.d(0x2F)))'), + # mvni v0.4s, #0x12, msl #0x8 + (b'\x40\xC6\x00\x6F', 'LLIL_SET_REG.d(v0.s[0],LLIL_NOT.d(LLIL_CONST.d(0x12FF)));' + \ + ' LLIL_SET_REG.d(v0.s[1],LLIL_NOT.d(LLIL_CONST.d(0x12FF)));' + \ + ' LLIL_SET_REG.d(v0.s[2],LLIL_NOT.d(LLIL_CONST.d(0x12FF)));' + \ + ' LLIL_SET_REG.d(v0.s[3],LLIL_NOT.d(LLIL_CONST.d(0x12FF)))'), + # mvni v1.4h, #0x5, lsl #0x8 + (b'\xA1\xA4\x00\x2F', 'LLIL_SET_REG.w(v1.h[0],LLIL_NOT.w(LLIL_CONST.w(0x500)));' + \ + ' LLIL_SET_REG.w(v1.h[1],LLIL_NOT.w(LLIL_CONST.w(0x500)));' + \ + ' LLIL_SET_REG.w(v1.h[2],LLIL_NOT.w(LLIL_CONST.w(0x500)));' + \ + ' LLIL_SET_REG.w(v1.h[3],LLIL_NOT.w(LLIL_CONST.w(0x500)))'), ] # https://github.com/Vector35/binaryninja-api/issues/2791 @@ -1645,513 +1659,513 @@ tests_ldadd = [ # ldaddab w13, w7, [lr] LDADDAB_32_memop - (b'\xC7\x03\xAD\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(lr)));' + \ + (b'\xC7\x03\xAD\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.b(LLIL_REG.q(lr),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w13)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddab w0, w22, [x28] LDADDAB_32_memop - (b'\x96\x03\xA0\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ + (b'\x96\x03\xA0\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x28),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w0)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddab w18, w23, [x18] LDADDAB_32_memop - (b'\x57\x02\xB2\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x18)));' + \ + (b'\x57\x02\xB2\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x18),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w18)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w23,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddab w11, w18, [x19] LDADDAB_32_memop - (b'\x72\x02\xAB\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ + (b'\x72\x02\xAB\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x19),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w11)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddab w26, w2, [x22] LDADDAB_32_memop - (b'\xC2\x02\xBA\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x22)));' + \ + (b'\xC2\x02\xBA\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x22),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w26)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddab w15, w8, [x2] LDADDAB_32_memop - (b'\x48\x00\xAF\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x2)));' + \ + (b'\x48\x00\xAF\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x2),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w15)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddab w10, w8, [x17] LDADDAB_32_memop - (b'\x28\x02\xAA\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ + (b'\x28\x02\xAA\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x17),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w10)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddab w12, w18, [x9] LDADDAB_32_memop - (b'\x32\x01\xAC\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x9)));' + \ + (b'\x32\x01\xAC\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x9),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w12)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddah w9, w16, [x11] LDADDAH_32_memop - (b'\x70\x01\xA9\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x11)));' + \ + (b'\x70\x01\xA9\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x11),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w9)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddah w14, w16, [x28] LDADDAH_32_memop - (b'\x90\x03\xAE\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ + (b'\x90\x03\xAE\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x28),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w14)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddah w15, w30, [x21] LDADDAH_32_memop - (b'\xBE\x02\xAF\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x21)));' + \ + (b'\xBE\x02\xAF\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x21),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w15)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w30,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddah w17, w23, [x22] LDADDAH_32_memop - (b'\xD7\x02\xB1\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ + (b'\xD7\x02\xB1\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x22),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w17)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w23,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddah w7, w22, [x18] LDADDAH_32_memop - (b'\x56\x02\xA7\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x18)));' + \ + (b'\x56\x02\xA7\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x18),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w7)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddah w4, w6, [x9] LDADDAH_32_memop - (b'\x26\x01\xA4\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ + (b'\x26\x01\xA4\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x9),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w4)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w6,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddah w8, w29, [x16] LDADDAH_32_memop - (b'\x1D\x02\xA8\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x16)));' + \ + (b'\x1D\x02\xA8\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x16),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w8)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddah w11, w28, [x8] LDADDAH_32_memop - (b'\x1C\x01\xAB\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x8)));' + \ + (b'\x1C\x01\xAB\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x8),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w11)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalb w14, w2, [x14] LDADDALB_32_memop - (b'\xC2\x01\xEE\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x14)));' + \ + (b'\xC2\x01\xEE\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x14),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w14)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalb w0, w24, [x16] LDADDALB_32_memop - (b'\x18\x02\xE0\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x16)));' + \ + (b'\x18\x02\xE0\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x16),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w0)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalb w14, w18, [x24] LDADDALB_32_memop - (b'\x12\x03\xEE\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ + (b'\x12\x03\xEE\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x24),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w14)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalb w25, w28, [x24] LDADDALB_32_memop - (b'\x1C\x03\xF9\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ + (b'\x1C\x03\xF9\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x24),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w25)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalb w25, w19, [sp] LDADDALB_32_memop - (b'\xF3\x03\xF9\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(sp)));' + \ + (b'\xF3\x03\xF9\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.b(LLIL_REG.q(sp),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w25)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w19,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalb w10, w15, [x24] LDADDALB_32_memop - (b'\x0F\x03\xEA\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ + (b'\x0F\x03\xEA\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x24),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w10)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w15,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalb w10, w10, [x10] LDADDALB_32_memop - (b'\x4A\x01\xEA\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x10)));' + \ + (b'\x4A\x01\xEA\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x10),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w10)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w10,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalb w18, w12, [x28] LDADDALB_32_memop - (b'\x8C\x03\xF2\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ + (b'\x8C\x03\xF2\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x28),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w18)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddalh w21, w30, [sp] LDADDALH_32_memop - (b'\xFE\x03\xF5\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(sp)));' + \ + (b'\xFE\x03\xF5\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.w(LLIL_REG.q(sp),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w21)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w30,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalh w24, wzr, [x19] LDADDALH_32_memop - (b'\x7F\x02\xF8\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x19)));' + \ + (b'\x7F\x02\xF8\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x19),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w24)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalh w27, w23, [x23] LDADDALH_32_memop - (b'\xF7\x02\xFB\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x23)));' + \ + (b'\xF7\x02\xFB\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x23),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w27)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w23,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalh w28, w30, [x15] LDADDALH_32_memop - (b'\xFE\x01\xFC\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x15)));' + \ + (b'\xFE\x01\xFC\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x15),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w28)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w30,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalh w5, w9, [x2] LDADDALH_32_memop - (b'\x49\x00\xE5\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ + (b'\x49\x00\xE5\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x2),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w5)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalh w9, w29, [x1] LDADDALH_32_memop - (b'\x3D\x00\xE9\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ + (b'\x3D\x00\xE9\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x1),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w9)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalh w16, w14, [x11] LDADDALH_32_memop - (b'\x6E\x01\xF0\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x11)));' + \ + (b'\x6E\x01\xF0\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x11),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w16)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddalh w14, wzr, [x21] LDADDALH_32_memop - (b'\xBF\x02\xEE\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x21)));' + \ + (b'\xBF\x02\xEE\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x21),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w14)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddal w17, w13, [x7] LDADDAL_32_memop - (b'\xED\x00\xF1\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ + (b'\xED\x00\xF1\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x7),LLIL_ADD.d(LLIL_REG.d(w17),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal w7, w27, [x3] LDADDAL_32_memop - (b'\x7B\x00\xE7\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x3)));' + \ + (b'\x7B\x00\xE7\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x3)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x3),LLIL_ADD.d(LLIL_REG.d(w7),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w27,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal w21, w5, [x0] LDADDAL_32_memop - (b'\x05\x00\xF5\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x0)));' + \ + (b'\x05\x00\xF5\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x0)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x0),LLIL_ADD.d(LLIL_REG.d(w21),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w5,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal w2, w28, [x7] LDADDAL_32_memop - (b'\xFC\x00\xE2\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ + (b'\xFC\x00\xE2\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x7),LLIL_ADD.d(LLIL_REG.d(w2),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal w0, w21, [x16] LDADDAL_32_memop - (b'\x15\x02\xE0\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ + (b'\x15\x02\xE0\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x16),LLIL_ADD.d(LLIL_REG.d(w0),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w21,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal wzr, w16, [x11] LDADDAL_32_memop - (b'\x70\x01\xFF\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x11)));' + \ + (b'\x70\x01\xFF\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x11),LLIL_ADD.d(LLIL_CONST.d(0x0),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal w29, w16, [x10] LDADDAL_32_memop - (b'\x50\x01\xFD\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ + (b'\x50\x01\xFD\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x10),LLIL_ADD.d(LLIL_REG.d(w29),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal w22, w30, [x12] LDADDAL_32_memop - (b'\x9E\x01\xF6\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x12)));' + \ + (b'\x9E\x01\xF6\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x12),LLIL_ADD.d(LLIL_REG.d(w22),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w30,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddal x0, x5, [x1] LDADDAL_64_memop - (b'\x25\x00\xE0\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ + (b'\x25\x00\xE0\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x1),LLIL_ADD.q(LLIL_REG.q(x0),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x5,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddal x6, x13, [x13] LDADDAL_64_memop - (b'\xAD\x01\xE6\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x13)));' + \ + (b'\xAD\x01\xE6\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x13)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x13),LLIL_ADD.q(LLIL_REG.q(x6),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x13,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddal x10, x4, [x18] LDADDAL_64_memop - (b'\x44\x02\xEA\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x18)));' + \ + (b'\x44\x02\xEA\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x18),LLIL_ADD.q(LLIL_REG.q(x10),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x4,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddal x12, x2, [x5] LDADDAL_64_memop - (b'\xA2\x00\xEC\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ + (b'\xA2\x00\xEC\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x5),LLIL_ADD.q(LLIL_REG.q(x12),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x2,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddal x11, x19, [x17] LDADDAL_64_memop - (b'\x33\x02\xEB\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ + (b'\x33\x02\xEB\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x17),LLIL_ADD.q(LLIL_REG.q(x11),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x19,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddal x12, x28, [x23] LDADDAL_64_memop - (b'\xFC\x02\xEC\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x23)));' + \ + (b'\xFC\x02\xEC\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x23),LLIL_ADD.q(LLIL_REG.q(x12),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x28,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddal x6, x7, [x22] LDADDAL_64_memop - (b'\xC7\x02\xE6\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ + (b'\xC7\x02\xE6\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_ADD.q(LLIL_REG.q(x6),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x7,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddal x10, x21, [x8] LDADDAL_64_memop - (b'\x15\x01\xEA\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ + (b'\x15\x01\xEA\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x8),LLIL_ADD.q(LLIL_REG.q(x10),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x21,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda w9, w4, [x4] LDADDA_32_memop - (b'\x84\x00\xA9\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ + (b'\x84\x00\xA9\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x4),LLIL_ADD.d(LLIL_REG.d(w9),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w4,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda w17, w29, [x27] LDADDA_32_memop - (b'\x7D\x03\xB1\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x27)));' + \ + (b'\x7D\x03\xB1\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x27),LLIL_ADD.d(LLIL_REG.d(w17),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda w5, w9, [x7] LDADDA_32_memop - (b'\xE9\x00\xA5\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ + (b'\xE9\x00\xA5\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x7),LLIL_ADD.d(LLIL_REG.d(w5),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda w12, w22, [x25] LDADDA_32_memop - (b'\x36\x03\xAC\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ + (b'\x36\x03\xAC\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x25),LLIL_ADD.d(LLIL_REG.d(w12),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda w19, w12, [x11] LDADDA_32_memop - (b'\x6C\x01\xB3\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x11)));' + \ + (b'\x6C\x01\xB3\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x11),LLIL_ADD.d(LLIL_REG.d(w19),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda w16, w14, [x10] LDADDA_32_memop - (b'\x4E\x01\xB0\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ + (b'\x4E\x01\xB0\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x10),LLIL_ADD.d(LLIL_REG.d(w16),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda w21, w5, [x4] LDADDA_32_memop - (b'\x85\x00\xB5\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ + (b'\x85\x00\xB5\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x4),LLIL_ADD.d(LLIL_REG.d(w21),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w5,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda w22, w14, [x16] LDADDA_32_memop - (b'\x0E\x02\xB6\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ + (b'\x0E\x02\xB6\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x16),LLIL_ADD.d(LLIL_REG.d(w22),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadda x5, x9, [x22] LDADDA_64_memop - (b'\xC9\x02\xA5\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ + (b'\xC9\x02\xA5\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_ADD.q(LLIL_REG.q(x5),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x9,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda x6, x2, [x4] LDADDA_64_memop - (b'\x82\x00\xA6\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x4)));' + \ + (b'\x82\x00\xA6\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x4),LLIL_ADD.q(LLIL_REG.q(x6),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x2,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda x0, x25, [x24] LDADDA_64_memop - (b'\x19\x03\xA0\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x24)));' + \ + (b'\x19\x03\xA0\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x24),LLIL_ADD.q(LLIL_REG.q(x0),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x25,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda x1, x20, [sp] LDADDA_64_memop - (b'\xF4\x03\xA1\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(sp)));' + \ + (b'\xF4\x03\xA1\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.q(LLIL_REG.q(sp),LLIL_ADD.q(LLIL_REG.q(x1),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x20,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda x27, x16, [x20] LDADDA_64_memop - (b'\x90\x02\xBB\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x20)));' + \ + (b'\x90\x02\xBB\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x20)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x20),LLIL_ADD.q(LLIL_REG.q(x27),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x16,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda xzr, x15, [x16] LDADDA_64_memop - (b'\x0F\x02\xBF\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x16)));' + \ + (b'\x0F\x02\xBF\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x16),LLIL_ADD.q(LLIL_CONST.q(0x0),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x15,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda x9, x8, [x1] LDADDA_64_memop - (b'\x28\x00\xA9\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ + (b'\x28\x00\xA9\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x1),LLIL_ADD.q(LLIL_REG.q(x9),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x8,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadda x18, x23, [x17] LDADDA_64_memop - (b'\x37\x02\xB2\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ + (b'\x37\x02\xB2\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x17),LLIL_ADD.q(LLIL_REG.q(x18),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x23,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddb w16, w24, [x10] LDADDB_32_memop - (b'\x58\x01\x30\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x10)));' + \ + (b'\x58\x01\x30\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x10),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w16)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddb w4, w0, [x27] LDADDB_32_memop - (b'\x60\x03\x24\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ + (b'\x60\x03\x24\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x27),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w4)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w0,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddb w9, w7, [x21] LDADDB_32_memop - (b'\xA7\x02\x29\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x21)));' + \ + (b'\xA7\x02\x29\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x21),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w9)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddb w8, w30, [x11] LDADDB_32_memop - (b'\x7E\x01\x28\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ + (b'\x7E\x01\x28\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x11),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w8)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w30,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddb w4, w13, [x19] LDADDB_32_memop - (b'\x6D\x02\x24\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ + (b'\x6D\x02\x24\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x19),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w4)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddb w2, w29, [x14] LDADDB_32_memop - (b'\xDD\x01\x22\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x14)));' + \ + (b'\xDD\x01\x22\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x14),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w2)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddb w4, w22, [x27] LDADDB_32_memop - (b'\x76\x03\x24\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ + (b'\x76\x03\x24\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x27),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w4)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddb w8, w29, [fp] LDADDB_32_memop - (b'\xBD\x03\x28\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ + (b'\xBD\x03\x28\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.b(LLIL_REG.q(fp),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w8)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddh w30, w28, [x27] LDADDH_32_memop - (b'\x7C\x03\x3E\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x27)));' + \ + (b'\x7C\x03\x3E\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x27),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w30)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddh w20, w5, [x24] LDADDH_32_memop - (b'\x05\x03\x34\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x24)));' + \ + (b'\x05\x03\x34\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x24),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w20)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w5,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddh w7, w13, [x28] LDADDH_32_memop - (b'\x8D\x03\x27\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ + (b'\x8D\x03\x27\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x28),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w7)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddh w18, w12, [x17] LDADDH_32_memop - (b'\x2C\x02\x32\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ + (b'\x2C\x02\x32\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x17),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w18)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddh w17, w3, [x4] LDADDH_32_memop - (b'\x83\x00\x31\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x4)));' + \ + (b'\x83\x00\x31\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x4),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w17)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w3,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddh w8, w9, [x12] LDADDH_32_memop - (b'\x89\x01\x28\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ + (b'\x89\x01\x28\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x12),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w8)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddh w8, w7, [x22] LDADDH_32_memop - (b'\xC7\x02\x28\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ + (b'\xC7\x02\x28\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x22),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w8)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddh w5, w23, [lr] LDADDH_32_memop - (b'\xD7\x03\x25\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ + (b'\xD7\x03\x25\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.w(LLIL_REG.q(lr),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w5)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w23,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlb w9, w24, [x5] LDADDLB_32_memop - (b'\xB8\x00\x69\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x5)));' + \ + (b'\xB8\x00\x69\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x5),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w9)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlb w3, w9, [x11] LDADDLB_32_memop - (b'\x69\x01\x63\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ + (b'\x69\x01\x63\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x11),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w3)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlb w29, w7, [x27] LDADDLB_32_memop - (b'\x67\x03\x7D\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ + (b'\x67\x03\x7D\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x27),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w29)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlb w8, w4, [x11] LDADDLB_32_memop - (b'\x64\x01\x68\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ + (b'\x64\x01\x68\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x11),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w8)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w4,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlb w30, w2, [x13] LDADDLB_32_memop - (b'\xA2\x01\x7E\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x13)));' + \ + (b'\xA2\x01\x7E\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x13)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x13),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w30)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlb w19, w11, [x24] LDADDLB_32_memop - (b'\x0B\x03\x73\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ + (b'\x0B\x03\x73\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x24),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w19)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w11,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlb w9, w15, [x17] LDADDLB_32_memop - (b'\x2F\x02\x69\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ + (b'\x2F\x02\x69\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x17),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w9)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w15,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlb w20, w7, [x15] LDADDLB_32_memop - (b'\xE7\x01\x74\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x15)));' + \ + (b'\xE7\x01\x74\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x15),LLIL_ADD.b(LLIL_LOW_PART.b(LLIL_REG.d(w20)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldaddlh w17, w18, [x1] LDADDLH_32_memop - (b'\x32\x00\x71\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ + (b'\x32\x00\x71\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x1),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w17)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlh w16, w8, [x1] LDADDLH_32_memop - (b'\x28\x00\x70\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ + (b'\x28\x00\x70\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x1),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w16)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlh w18, w1, [x28] LDADDLH_32_memop - (b'\x81\x03\x72\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ + (b'\x81\x03\x72\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x28),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w18)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w1,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlh w11, w8, [x25] LDADDLH_32_memop - (b'\x28\x03\x6B\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x25)));' + \ + (b'\x28\x03\x6B\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x25),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w11)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlh w11, w7, [x1] LDADDLH_32_memop - (b'\x27\x00\x6B\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ + (b'\x27\x00\x6B\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x1),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w11)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlh w21, w8, [x28] LDADDLH_32_memop - (b'\x88\x03\x75\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ + (b'\x88\x03\x75\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x28),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w21)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlh w16, w21, [x2] LDADDLH_32_memop - (b'\x55\x00\x70\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ + (b'\x55\x00\x70\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x2),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w16)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w21,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddlh w6, w14, [x25] LDADDLH_32_memop - (b'\x2E\x03\x66\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x25)));' + \ + (b'\x2E\x03\x66\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x25),LLIL_ADD.w(LLIL_LOW_PART.w(LLIL_REG.d(w6)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldaddl w8, w6, [x4] LDADDL_32_memop - (b'\x86\x00\x68\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ + (b'\x86\x00\x68\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x4),LLIL_ADD.d(LLIL_REG.d(w8),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w6,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl w15, w23, [x28] LDADDL_32_memop - (b'\x97\x03\x6F\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x28)));' + \ + (b'\x97\x03\x6F\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x28),LLIL_ADD.d(LLIL_REG.d(w15),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w23,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl w18, w7, [x0] LDADDL_32_memop - (b'\x07\x00\x72\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x0)));' + \ + (b'\x07\x00\x72\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x0)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x0),LLIL_ADD.d(LLIL_REG.d(w18),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl w11, w17, [x25] LDADDL_32_memop - (b'\x31\x03\x6B\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ + (b'\x31\x03\x6B\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x25),LLIL_ADD.d(LLIL_REG.d(w11),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w17,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl w14, w3, [x8] LDADDL_32_memop - (b'\x03\x01\x6E\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ + (b'\x03\x01\x6E\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x8),LLIL_ADD.d(LLIL_REG.d(w14),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w3,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl w15, w18, [x12] LDADDL_32_memop - (b'\x92\x01\x6F\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x12)));' + \ + (b'\x92\x01\x6F\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x12),LLIL_ADD.d(LLIL_REG.d(w15),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl w19, w5, [x18] LDADDL_32_memop - (b'\x45\x02\x73\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ + (b'\x45\x02\x73\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x18),LLIL_ADD.d(LLIL_REG.d(w19),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w5,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl w21, w24, [x7] LDADDL_32_memop - (b'\xF8\x00\x75\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ + (b'\xF8\x00\x75\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x7),LLIL_ADD.d(LLIL_REG.d(w21),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldaddl x19, x17, [x26] LDADDL_64_memop - (b'\x51\x03\x73\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ + (b'\x51\x03\x73\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x26),LLIL_ADD.q(LLIL_REG.q(x19),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x17,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddl x4, x17, [x20] LDADDL_64_memop - (b'\x91\x02\x64\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x20)));' + \ + (b'\x91\x02\x64\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x20)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x20),LLIL_ADD.q(LLIL_REG.q(x4),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x17,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddl x23, x22, [x1] LDADDL_64_memop - (b'\x36\x00\x77\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ + (b'\x36\x00\x77\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x1),LLIL_ADD.q(LLIL_REG.q(x23),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x22,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddl x9, x6, [lr] LDADDL_64_memop - (b'\xC6\x03\x69\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(lr)));' + \ + (b'\xC6\x03\x69\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.q(LLIL_REG.q(lr),LLIL_ADD.q(LLIL_REG.q(x9),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x6,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddl x2, x20, [x0] LDADDL_64_memop - (b'\x14\x00\x62\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x0)));' + \ + (b'\x14\x00\x62\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x0)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x0),LLIL_ADD.q(LLIL_REG.q(x2),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x20,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddl x1, x19, [x26] LDADDL_64_memop - (b'\x53\x03\x61\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ + (b'\x53\x03\x61\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x26),LLIL_ADD.q(LLIL_REG.q(x1),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x19,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddl x22, lr, [x7] LDADDL_64_memop - (b'\xFE\x00\x76\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x7)));' + \ + (b'\xFE\x00\x76\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x7),LLIL_ADD.q(LLIL_REG.q(x22),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(lr,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldaddl x12, x9, [x15] LDADDL_64_memop - (b'\xE9\x01\x6C\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x15)));' + \ + (b'\xE9\x01\x6C\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x15),LLIL_ADD.q(LLIL_REG.q(x12),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x9,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd w24, w11, [fp] LDADD_32_memop - (b'\xAB\x03\x38\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ + (b'\xAB\x03\x38\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.d(LLIL_REG.q(fp),LLIL_ADD.d(LLIL_REG.d(w24),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w11,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd w17, w22, [x12] LDADD_32_memop - (b'\x96\x01\x31\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x12)));' + \ + (b'\x96\x01\x31\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x12),LLIL_ADD.d(LLIL_REG.d(w17),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd w24, w16, [x5] LDADD_32_memop - (b'\xB0\x00\x38\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x5)));' + \ + (b'\xB0\x00\x38\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x5),LLIL_ADD.d(LLIL_REG.d(w24),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd w1, w26, [x16] LDADD_32_memop - (b'\x1A\x02\x21\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ + (b'\x1A\x02\x21\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x16),LLIL_ADD.d(LLIL_REG.d(w1),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w26,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd w18, w4, [x4] LDADD_32_memop - (b'\x84\x00\x32\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ + (b'\x84\x00\x32\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x4),LLIL_ADD.d(LLIL_REG.d(w18),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w4,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd w6, w14, [x23] LDADD_32_memop - (b'\xEE\x02\x26\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x23)));' + \ + (b'\xEE\x02\x26\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x23),LLIL_ADD.d(LLIL_REG.d(w6),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd w25, w29, [x9] LDADD_32_memop - (b'\x3D\x01\x39\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x9)));' + \ + (b'\x3D\x01\x39\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x9),LLIL_ADD.d(LLIL_REG.d(w25),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd w4, w22, [x15] LDADD_32_memop - (b'\xF6\x01\x24\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x15)));' + \ + (b'\xF6\x01\x24\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x15),LLIL_ADD.d(LLIL_REG.d(w4),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldadd x4, x24, [x5] LDADD_64_memop - (b'\xB8\x00\x24\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ + (b'\xB8\x00\x24\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x5),LLIL_ADD.q(LLIL_REG.q(x4),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x24,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd x25, x4, [x7] LDADD_64_memop - (b'\xE4\x00\x39\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x7)));' + \ + (b'\xE4\x00\x39\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x7),LLIL_ADD.q(LLIL_REG.q(x25),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x4,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd x16, x20, [x8] LDADD_64_memop - (b'\x14\x01\x30\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ + (b'\x14\x01\x30\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x8),LLIL_ADD.q(LLIL_REG.q(x16),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x20,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd x15, x14, [x28] LDADD_64_memop - (b'\x8E\x03\x2F\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x28)));' + \ + (b'\x8E\x03\x2F\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x28),LLIL_ADD.q(LLIL_REG.q(x15),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x14,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd x6, x10, [fp] LDADD_64_memop - (b'\xAA\x03\x26\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(fp)));' + \ + (b'\xAA\x03\x26\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.q(LLIL_REG.q(fp),LLIL_ADD.q(LLIL_REG.q(x6),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x10,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd x27, x27, [x19] LDADD_64_memop - (b'\x7B\x02\x3B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x19)));' + \ + (b'\x7B\x02\x3B\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x19),LLIL_ADD.q(LLIL_REG.q(x27),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x27,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd x27, x0, [x23] LDADD_64_memop - (b'\xE0\x02\x3B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x23)));' + \ + (b'\xE0\x02\x3B\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x23),LLIL_ADD.q(LLIL_REG.q(x27),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x0,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldadd x13, fp, [x26] LDADD_64_memop - (b'\x5D\x03\x2D\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ + (b'\x5D\x03\x2D\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x26),LLIL_ADD.q(LLIL_REG.q(x13),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(fp,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # staddb w24, [x23] STADDB_LDADDB_32_memop @@ -2286,768 +2300,768 @@ tests_ld_clr_eor_set = [ # ldclrab w9, w22, [x18] LDCLRAB_32_memop - (b'\x56\x12\xA9\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x18)));' + \ + (b'\x56\x12\xA9\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x18),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w9))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrab w11, w21, [x6] LDCLRAB_32_memop - (b'\xD5\x10\xAB\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x6)));' + \ + (b'\xD5\x10\xAB\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x6),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w11))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w21,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrab w10, w0, [x17] LDCLRAB_32_memop - (b'\x20\x12\xAA\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ + (b'\x20\x12\xAA\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x17),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w10))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w0,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrab w15, w28, [x1] LDCLRAB_32_memop - (b'\x3C\x10\xAF\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x1)));' + \ + (b'\x3C\x10\xAF\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x1),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w15))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrah w28, wzr, [x18] LDCLRAH_32_memop - (b'\x5F\x12\xBC\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x18)));' + \ + (b'\x5F\x12\xBC\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x18),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w28))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrah w20, w24, [x12] LDCLRAH_32_memop - (b'\x98\x11\xB4\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ + (b'\x98\x11\xB4\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x12),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w20))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrah w23, w14, [x15] LDCLRAH_32_memop - (b'\xEE\x11\xB7\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x15)));' + \ + (b'\xEE\x11\xB7\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x15),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w23))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrah w18, w21, [x18] LDCLRAH_32_memop - (b'\x55\x12\xB2\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x18)));' + \ + (b'\x55\x12\xB2\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x18),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w18))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w21,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclralb w30, w18, [x15] LDCLRALB_32_memop - (b'\xF2\x11\xFE\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x15)));' + \ + (b'\xF2\x11\xFE\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x15),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w30))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclralb w27, w15, [x0] LDCLRALB_32_memop - (b'\x0F\x10\xFB\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x0)));' + \ + (b'\x0F\x10\xFB\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x0)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x0),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w27))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w15,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclralb w21, w18, [x3] LDCLRALB_32_memop - (b'\x72\x10\xF5\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x3)));' + \ + (b'\x72\x10\xF5\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x3)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x3),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w21))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclralb w27, w14, [x15] LDCLRALB_32_memop - (b'\xEE\x11\xFB\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x15)));' + \ + (b'\xEE\x11\xFB\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x15),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w27))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclralh w27, w26, [x12] LDCLRALH_32_memop - (b'\x9A\x11\xFB\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ + (b'\x9A\x11\xFB\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x12),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w27))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w26,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclralh w10, w2, [x2] LDCLRALH_32_memop - (b'\x42\x10\xEA\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ + (b'\x42\x10\xEA\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x2),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w10))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclralh w8, w9, [x3] LDCLRALH_32_memop - (b'\x69\x10\xE8\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x3)));' + \ + (b'\x69\x10\xE8\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x3)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x3),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w8))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclralh w20, w2, [x9] LDCLRALH_32_memop - (b'\x22\x11\xF4\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ + (b'\x22\x11\xF4\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x9),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w20))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclral w3, w24, [x23] LDCLRAL_32_memop - (b'\xF8\x12\xE3\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x23)));' + \ + (b'\xF8\x12\xE3\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x23),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w3)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclral w3, w20, [x25] LDCLRAL_32_memop - (b'\x34\x13\xE3\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ + (b'\x34\x13\xE3\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x25),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w3)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w20,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclral w5, w8, [x6] LDCLRAL_32_memop - (b'\xC8\x10\xE5\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x6)));' + \ + (b'\xC8\x10\xE5\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x6),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w5)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclral w10, w9, [fp] LDCLRAL_32_memop - (b'\xA9\x13\xEA\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ + (b'\xA9\x13\xEA\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.d(LLIL_REG.q(fp),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w10)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclral x23, x9, [x16] LDCLRAL_64_memop - (b'\x09\x12\xF7\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x16)));' + \ + (b'\x09\x12\xF7\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x16),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x23)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x9,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclral x13, x15, [x5] LDCLRAL_64_memop - (b'\xAF\x10\xED\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ + (b'\xAF\x10\xED\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x5),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x13)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x15,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclral x20, x28, [x5] LDCLRAL_64_memop - (b'\xBC\x10\xF4\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ + (b'\xBC\x10\xF4\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x5),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x20)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x28,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclral x8, x5, [x2] LDCLRAL_64_memop - (b'\x45\x10\xE8\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x2)));' + \ + (b'\x45\x10\xE8\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x2),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x8)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x5,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclra w24, w3, [x11] LDCLRA_32_memop - (b'\x63\x11\xB8\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x11)));' + \ + (b'\x63\x11\xB8\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x11),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w24)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w3,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclra w21, w21, [x22] LDCLRA_32_memop - (b'\xD5\x12\xB5\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x22)));' + \ + (b'\xD5\x12\xB5\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x22),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w21)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w21,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclra w30, w2, [sp] LDCLRA_32_memop - (b'\xE2\x13\xBE\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(sp)));' + \ + (b'\xE2\x13\xBE\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.d(LLIL_REG.q(sp),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w30)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclra w13, w10, [sp] LDCLRA_32_memop - (b'\xEA\x13\xAD\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(sp)));' + \ + (b'\xEA\x13\xAD\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.d(LLIL_REG.q(sp),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w13)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w10,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclra x20, x14, [x21] LDCLRA_64_memop - (b'\xAE\x12\xB4\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x21)));' + \ + (b'\xAE\x12\xB4\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x21),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x20)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x14,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclra x15, x1, [x17] LDCLRA_64_memop - (b'\x21\x12\xAF\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ + (b'\x21\x12\xAF\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x17),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x15)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x1,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclra x6, x19, [x22] LDCLRA_64_memop - (b'\xD3\x12\xA6\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ + (b'\xD3\x12\xA6\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x6)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x19,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclra x20, x5, [x10] LDCLRA_64_memop - (b'\x45\x11\xB4\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ + (b'\x45\x11\xB4\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x10),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x20)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x5,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclrb w5, w13, [x12] LDCLRB_32_memop - (b'\x8D\x11\x25\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x12)));' + \ + (b'\x8D\x11\x25\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x12),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w5))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrb w3, w18, [x2] LDCLRB_32_memop - (b'\x52\x10\x23\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x2)));' + \ + (b'\x52\x10\x23\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x2),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w3))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrb wzr, w29, [fp] LDCLRB_32_memop - (b'\xBD\x13\x3F\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ + (b'\xBD\x13\x3F\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.b(LLIL_REG.q(fp),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_CONST.d(0x0))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrb w0, w12, [x12] LDCLRB_32_memop - (b'\x8C\x11\x20\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x12)));' + \ + (b'\x8C\x11\x20\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x12),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w0))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrh w11, w16, [x1] LDCLRH_32_memop - (b'\x30\x10\x2B\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ + (b'\x30\x10\x2B\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x1),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w11))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrh w17, w2, [lr] LDCLRH_32_memop - (b'\xC2\x13\x31\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ + (b'\xC2\x13\x31\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.w(LLIL_REG.q(lr),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w17))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrh w26, w30, [x9] LDCLRH_32_memop - (b'\x3E\x11\x3A\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ + (b'\x3E\x11\x3A\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x9),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w26))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w30,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrh w11, w20, [lr] LDCLRH_32_memop - (b'\xD4\x13\x2B\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ + (b'\xD4\x13\x2B\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.w(LLIL_REG.q(lr),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w11))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w20,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrlb w16, w10, [x3] LDCLRLB_32_memop - (b'\x6A\x10\x70\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x3)));' + \ + (b'\x6A\x10\x70\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x3)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x3),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w16))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w10,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrlb w6, w12, [x25] LDCLRLB_32_memop - (b'\x2C\x13\x66\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x25)));' + \ + (b'\x2C\x13\x66\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x25),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w6))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrlb w8, w29, [x17] LDCLRLB_32_memop - (b'\x3D\x12\x68\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ + (b'\x3D\x12\x68\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x17),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w8))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrlb w7, w1, [x11] LDCLRLB_32_memop - (b'\x61\x11\x67\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ + (b'\x61\x11\x67\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x11)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x11),LLIL_AND.b(LLIL_NOT.b(LLIL_LOW_PART.b(LLIL_REG.d(w7))),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w1,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldclrlh wzr, w2, [x17] LDCLRLH_32_memop - (b'\x22\x12\x7F\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ + (b'\x22\x12\x7F\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x17),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_CONST.d(0x0))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w2,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrlh w2, w16, [x27] LDCLRLH_32_memop - (b'\x70\x13\x62\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x27)));' + \ + (b'\x70\x13\x62\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x27),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w2))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrlh w25, w24, [x2] LDCLRLH_32_memop - (b'\x58\x10\x79\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ + (b'\x58\x10\x79\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x2),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w25))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrlh w18, w28, [x16] LDCLRLH_32_memop - (b'\x1C\x12\x72\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x16)));' + \ + (b'\x1C\x12\x72\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x16),LLIL_AND.w(LLIL_NOT.w(LLIL_LOW_PART.w(LLIL_REG.d(w18))),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldclrl wzr, w24, [x28] LDCLRL_32_memop - (b'\x98\x13\x7F\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x28)));' + \ + (b'\x98\x13\x7F\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x28),LLIL_AND.d(LLIL_NOT.d(LLIL_CONST.d(0x0)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclrl w20, w26, [x18] LDCLRL_32_memop - (b'\x5A\x12\x74\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ + (b'\x5A\x12\x74\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x18),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w20)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w26,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclrl w20, w5, [x4] LDCLRL_32_memop - (b'\x85\x10\x74\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ + (b'\x85\x10\x74\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x4),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w20)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w5,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclrl w26, w27, [x1] LDCLRL_32_memop - (b'\x3B\x10\x7A\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x1)));' + \ + (b'\x3B\x10\x7A\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x1),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w26)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w27,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclrl x5, x23, [x6] LDCLRL_64_memop - (b'\xD7\x10\x65\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ + (b'\xD7\x10\x65\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x5)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x23,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclrl fp, x10, [x19] LDCLRL_64_memop - (b'\x6A\x12\x7D\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x19)));' + \ + (b'\x6A\x12\x7D\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x19),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(fp)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x10,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclrl fp, x0, [x10] LDCLRL_64_memop - (b'\x40\x11\x7D\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ + (b'\x40\x11\x7D\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x10),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(fp)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x0,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclrl x8, x0, [x10] LDCLRL_64_memop - (b'\x40\x11\x68\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ + (b'\x40\x11\x68\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x10),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x8)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x0,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclr w2, w16, [x8] LDCLR_32_memop - (b'\x10\x11\x22\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ + (b'\x10\x11\x22\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x8),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w2)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclr w12, w19, [x14] LDCLR_32_memop - (b'\xD3\x11\x2C\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x14)));' + \ + (b'\xD3\x11\x2C\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x14),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w12)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w19,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclr w5, w28, [x17] LDCLR_32_memop - (b'\x3C\x12\x25\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x17)));' + \ + (b'\x3C\x12\x25\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x17),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w5)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclr w13, w1, [x8] LDCLR_32_memop - (b'\x01\x11\x2D\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ + (b'\x01\x11\x2D\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x8),LLIL_AND.d(LLIL_NOT.d(LLIL_REG.d(w13)),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w1,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldclr x26, x0, [x1] LDCLR_64_memop - (b'\x20\x10\x3A\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ + (b'\x20\x10\x3A\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x1),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x26)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x0,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclr x5, x10, [x28] LDCLR_64_memop - (b'\x8A\x13\x25\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x28)));' + \ + (b'\x8A\x13\x25\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x28),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x5)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x10,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclr x8, x7, [x25] LDCLR_64_memop - (b'\x27\x13\x28\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x25)));' + \ + (b'\x27\x13\x28\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x25),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x8)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x7,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldclr x12, x1, [x10] LDCLR_64_memop - (b'\x41\x11\x2C\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ + (b'\x41\x11\x2C\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x10),LLIL_AND.q(LLIL_NOT.q(LLIL_REG.q(x12)),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x1,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeorab w6, w22, [x28] LDEORAB_32_memop - (b'\x96\x23\xA6\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ + (b'\x96\x23\xA6\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x28),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w6)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorab w22, w29, [fp] LDEORAB_32_memop - (b'\xBD\x23\xB6\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ + (b'\xBD\x23\xB6\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.b(LLIL_REG.q(fp),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w22)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorab w23, w29, [x13] LDEORAB_32_memop - (b'\xBD\x21\xB7\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x13)));' + \ + (b'\xBD\x21\xB7\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x13)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x13),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w23)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorab w25, w9, [x26] LDEORAB_32_memop - (b'\x49\x23\xB9\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x26)));' + \ + (b'\x49\x23\xB9\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x26),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w25)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorah w27, w20, [x13] LDEORAH_32_memop - (b'\xB4\x21\xBB\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x13)));' + \ + (b'\xB4\x21\xBB\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x13)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x13),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w27)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w20,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorah w25, w4, [sp] LDEORAH_32_memop - (b'\xE4\x23\xB9\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(sp)));' + \ + (b'\xE4\x23\xB9\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.w(LLIL_REG.q(sp),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w25)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w4,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorah w22, w29, [fp] LDEORAH_32_memop - (b'\xBD\x23\xB6\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(fp)));' + \ + (b'\xBD\x23\xB6\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.w(LLIL_REG.q(fp),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w22)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorah w11, w18, [x22] LDEORAH_32_memop - (b'\xD2\x22\xAB\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ + (b'\xD2\x22\xAB\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x22),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w11)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeoralb w4, w28, [x14] LDEORALB_32_memop - (b'\xDC\x21\xE4\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x14)));' + \ + (b'\xDC\x21\xE4\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x14),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w4)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeoralb w27, w0, [x21] LDEORALB_32_memop - (b'\xA0\x22\xFB\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x21)));' + \ + (b'\xA0\x22\xFB\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x21),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w27)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w0,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeoralb w29, w28, [x19] LDEORALB_32_memop - (b'\x7C\x22\xFD\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ + (b'\x7C\x22\xFD\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x19),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w29)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeoralb w29, w28, [x8] LDEORALB_32_memop - (b'\x1C\x21\xFD\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x8)));' + \ + (b'\x1C\x21\xFD\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x8),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w29)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeoralh wzr, w28, [lr] LDEORALH_32_memop - (b'\xDC\x23\xFF\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ + (b'\xDC\x23\xFF\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.w(LLIL_REG.q(lr),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_CONST.d(0x0)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeoralh w27, w23, [x10] LDEORALH_32_memop - (b'\x57\x21\xFB\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x10)));' + \ + (b'\x57\x21\xFB\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x10),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w27)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w23,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeoralh w5, w11, [x20] LDEORALH_32_memop - (b'\x8B\x22\xE5\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x20)));' + \ + (b'\x8B\x22\xE5\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x20)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x20),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w5)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w11,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeoralh w22, w13, [x17] LDEORALH_32_memop - (b'\x2D\x22\xF6\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ + (b'\x2D\x22\xF6\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x17),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w22)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeoral w3, w11, [x16] LDEORAL_32_memop - (b'\x0B\x22\xE3\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ + (b'\x0B\x22\xE3\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x16),LLIL_XOR.d(LLIL_REG.d(w3),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w11,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeoral w6, w17, [x2] LDEORAL_32_memop - (b'\x51\x20\xE6\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x2)));' + \ + (b'\x51\x20\xE6\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x2),LLIL_XOR.d(LLIL_REG.d(w6),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w17,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeoral w2, w28, [x16] LDEORAL_32_memop - (b'\x1C\x22\xE2\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ + (b'\x1C\x22\xE2\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x16),LLIL_XOR.d(LLIL_REG.d(w2),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeoral w5, w15, [lr] LDEORAL_32_memop - (b'\xCF\x23\xE5\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(lr)));' + \ + (b'\xCF\x23\xE5\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.d(LLIL_REG.q(lr),LLIL_XOR.d(LLIL_REG.d(w5),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w15,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeoral x3, x4, [fp] LDEORAL_64_memop - (b'\xA4\x23\xE3\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(fp)));' + \ + (b'\xA4\x23\xE3\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.q(LLIL_REG.q(fp),LLIL_XOR.q(LLIL_REG.q(x3),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x4,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeoral x23, x24, [x2] LDEORAL_64_memop - (b'\x58\x20\xF7\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x2)));' + \ + (b'\x58\x20\xF7\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x2),LLIL_XOR.q(LLIL_REG.q(x23),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x24,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeoral x11, x24, [x17] LDEORAL_64_memop - (b'\x38\x22\xEB\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ + (b'\x38\x22\xEB\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x17),LLIL_XOR.q(LLIL_REG.q(x11),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x24,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeoral x3, x23, [x28] LDEORAL_64_memop - (b'\x97\x23\xE3\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x28)));' + \ + (b'\x97\x23\xE3\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x28),LLIL_XOR.q(LLIL_REG.q(x3),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x23,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeora w14, w13, [x5] LDEORA_32_memop - (b'\xAD\x20\xAE\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x5)));' + \ + (b'\xAD\x20\xAE\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x5),LLIL_XOR.d(LLIL_REG.d(w14),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeora w25, w29, [x8] LDEORA_32_memop - (b'\x1D\x21\xB9\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ + (b'\x1D\x21\xB9\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x8),LLIL_XOR.d(LLIL_REG.d(w25),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeora w29, w20, [x10] LDEORA_32_memop - (b'\x54\x21\xBD\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ + (b'\x54\x21\xBD\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x10),LLIL_XOR.d(LLIL_REG.d(w29),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w20,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeora w14, w27, [x24] LDEORA_32_memop - (b'\x1B\x23\xAE\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x24)));' + \ + (b'\x1B\x23\xAE\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x24),LLIL_XOR.d(LLIL_REG.d(w14),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w27,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeora x15, x1, [x4] LDEORA_64_memop - (b'\x81\x20\xAF\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x4)));' + \ + (b'\x81\x20\xAF\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x4),LLIL_XOR.q(LLIL_REG.q(x15),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x1,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeora x14, x10, [x16] LDEORA_64_memop - (b'\x0A\x22\xAE\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x16)));' + \ + (b'\x0A\x22\xAE\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x16),LLIL_XOR.q(LLIL_REG.q(x14),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x10,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeora x13, x14, [x21] LDEORA_64_memop - (b'\xAE\x22\xAD\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x21)));' + \ + (b'\xAE\x22\xAD\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x21),LLIL_XOR.q(LLIL_REG.q(x13),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x14,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeora x18, x8, [x6] LDEORA_64_memop - (b'\xC8\x20\xB2\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ + (b'\xC8\x20\xB2\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_XOR.q(LLIL_REG.q(x18),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x8,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeorb w20, w10, [x8] LDEORB_32_memop - (b'\x0A\x21\x34\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x8)));' + \ + (b'\x0A\x21\x34\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x8),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w20)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w10,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorb wzr, w3, [lr] LDEORB_32_memop - (b'\xC3\x23\x3F\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(lr)));' + \ + (b'\xC3\x23\x3F\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.b(LLIL_REG.q(lr),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_CONST.d(0x0)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w3,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorb w3, w28, [x28] LDEORB_32_memop - (b'\x9C\x23\x23\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ + (b'\x9C\x23\x23\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x28),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w3)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorb w17, w0, [x28] LDEORB_32_memop - (b'\x80\x23\x31\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ + (b'\x80\x23\x31\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x28),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w17)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w0,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorh w27, w18, [x23] LDEORH_32_memop - (b'\xF2\x22\x3B\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x23)));' + \ + (b'\xF2\x22\x3B\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x23),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w27)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorh w25, w15, [x19] LDEORH_32_memop - (b'\x6F\x22\x39\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x19)));' + \ + (b'\x6F\x22\x39\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x19),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w25)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w15,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorh w5, w16, [x22] LDEORH_32_memop - (b'\xD0\x22\x25\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ + (b'\xD0\x22\x25\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x22),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w5)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorh w2, w4, [fp] LDEORH_32_memop - (b'\xA4\x23\x22\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(fp)));' + \ + (b'\xA4\x23\x22\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.w(LLIL_REG.q(fp),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w2)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w4,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorlb w26, w18, [x23] LDEORLB_32_memop - (b'\xF2\x22\x7A\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x23)));' + \ + (b'\xF2\x22\x7A\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x23),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w26)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorlb w22, w20, [x24] LDEORLB_32_memop - (b'\x14\x23\x76\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ + (b'\x14\x23\x76\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x24),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w22)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w20,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorlb w8, w12, [fp] LDEORLB_32_memop - (b'\xAC\x23\x68\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ + (b'\xAC\x23\x68\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.b(LLIL_REG.q(fp),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w8)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorlb w14, w22, [x4] LDEORLB_32_memop - (b'\x96\x20\x6E\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x4)));' + \ + (b'\x96\x20\x6E\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x4),LLIL_XOR.b(LLIL_LOW_PART.b(LLIL_REG.d(w14)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldeorlh w12, w26, [x14] LDEORLH_32_memop - (b'\xDA\x21\x6C\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x14)));' + \ + (b'\xDA\x21\x6C\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x14),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w12)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w26,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorlh w24, w24, [sp] LDEORLH_32_memop - (b'\xF8\x23\x78\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(sp)));' + \ + (b'\xF8\x23\x78\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.w(LLIL_REG.q(sp),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w24)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorlh w15, w4, [x12] LDEORLH_32_memop - (b'\x84\x21\x6F\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ + (b'\x84\x21\x6F\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x12),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w15)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w4,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorlh w13, w0, [x9] LDEORLH_32_memop - (b'\x20\x21\x6D\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ + (b'\x20\x21\x6D\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x9),LLIL_XOR.w(LLIL_LOW_PART.w(LLIL_REG.d(w13)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w0,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldeorl w13, w27, [x18] LDEORL_32_memop - (b'\x5B\x22\x6D\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ + (b'\x5B\x22\x6D\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x18),LLIL_XOR.d(LLIL_REG.d(w13),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w27,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeorl w7, w25, [x18] LDEORL_32_memop - (b'\x59\x22\x67\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ + (b'\x59\x22\x67\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x18),LLIL_XOR.d(LLIL_REG.d(w7),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w25,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeorl w8, w24, [x25] LDEORL_32_memop - (b'\x38\x23\x68\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ + (b'\x38\x23\x68\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x25),LLIL_XOR.d(LLIL_REG.d(w8),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeorl w26, w8, [x26] LDEORL_32_memop - (b'\x48\x23\x7A\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x26)));' + \ + (b'\x48\x23\x7A\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x26),LLIL_XOR.d(LLIL_REG.d(w26),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeorl x27, x4, [x5] LDEORL_64_memop - (b'\xA4\x20\x7B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ + (b'\xA4\x20\x7B\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x5)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x5),LLIL_XOR.q(LLIL_REG.q(x27),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x4,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeorl x0, x22, [x19] LDEORL_64_memop - (b'\x76\x22\x60\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x19)));' + \ + (b'\x76\x22\x60\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x19),LLIL_XOR.q(LLIL_REG.q(x0),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x22,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeorl x20, x18, [x8] LDEORL_64_memop - (b'\x12\x21\x74\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ + (b'\x12\x21\x74\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x8),LLIL_XOR.q(LLIL_REG.q(x20),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x18,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeorl x6, fp, [x6] LDEORL_64_memop - (b'\xDD\x20\x66\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ + (b'\xDD\x20\x66\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_XOR.q(LLIL_REG.q(x6),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(fp,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeor w26, w22, [x25] LDEOR_32_memop - (b'\x36\x23\x3A\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ + (b'\x36\x23\x3A\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x25),LLIL_XOR.d(LLIL_REG.d(w26),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeor w19, w0, [x6] LDEOR_32_memop - (b'\xC0\x20\x33\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x6)));' + \ + (b'\xC0\x20\x33\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x6),LLIL_XOR.d(LLIL_REG.d(w19),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w0,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeor w30, w19, [x1] LDEOR_32_memop - (b'\x33\x20\x3E\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x1)));' + \ + (b'\x33\x20\x3E\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x1),LLIL_XOR.d(LLIL_REG.d(w30),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w19,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeor w17, w9, [x26] LDEOR_32_memop - (b'\x49\x23\x31\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x26)));' + \ + (b'\x49\x23\x31\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x26),LLIL_XOR.d(LLIL_REG.d(w17),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w9,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldeor x3, x14, [x18] LDEOR_64_memop - (b'\x4E\x22\x23\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x18)));' + \ + (b'\x4E\x22\x23\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x18),LLIL_XOR.q(LLIL_REG.q(x3),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x14,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeor x11, x25, [x6] LDEOR_64_memop - (b'\xD9\x20\x2B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ + (b'\xD9\x20\x2B\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_XOR.q(LLIL_REG.q(x11),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x25,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeor lr, x13, [lr] LDEOR_64_memop - (b'\xCD\x23\x3E\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(lr)));' + \ + (b'\xCD\x23\x3E\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.q(LLIL_REG.q(lr),LLIL_XOR.q(LLIL_REG.q(lr),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x13,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldeor x27, x2, [sp] LDEOR_64_memop - (b'\xE2\x23\x3B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(sp)));' + \ + (b'\xE2\x23\x3B\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(sp)));' + \ ' LLIL_STORE.q(LLIL_REG.q(sp),LLIL_XOR.q(LLIL_REG.q(x27),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x2,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetab w3, w13, [x28] LDSETAB_32_memop - (b'\x8D\x33\xA3\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ + (b'\x8D\x33\xA3\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x28),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w3)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetab w21, w14, [x20] LDSETAB_32_memop - (b'\x8E\x32\xB5\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x20)));' + \ + (b'\x8E\x32\xB5\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x20)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x20),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w21)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w14,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetab w21, w12, [x25] LDSETAB_32_memop - (b'\x2C\x33\xB5\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x25)));' + \ + (b'\x2C\x33\xB5\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x25),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w21)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetab w23, w12, [x23] LDSETAB_32_memop - (b'\xEC\x32\xB7\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x23)));' + \ + (b'\xEC\x32\xB7\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x23),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w23)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w12,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetah w25, w25, [x12] LDSETAH_32_memop - (b'\x99\x31\xB9\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ + (b'\x99\x31\xB9\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x12),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w25)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w25,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetah w2, w10, [x13] LDSETAH_32_memop - (b'\xAA\x31\xA2\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x13)));' + \ + (b'\xAA\x31\xA2\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x13)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x13),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w2)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w10,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetah w3, w26, [x23] LDSETAH_32_memop - (b'\xFA\x32\xA3\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x23)));' + \ + (b'\xFA\x32\xA3\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x23),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w3)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w26,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetah w29, w25, [x25] LDSETAH_32_memop - (b'\x39\x33\xBD\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x25)));' + \ + (b'\x39\x33\xBD\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x25),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w29)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w25,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetalb w1, w6, [fp] LDSETALB_32_memop - (b'\xA6\x33\xE1\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ + (b'\xA6\x33\xE1\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.b(LLIL_REG.q(fp),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w1)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w6,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetalb w0, w21, [x27] LDSETALB_32_memop - (b'\x75\x33\xE0\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ + (b'\x75\x33\xE0\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x27),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w0)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w21,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetalb w2, w13, [x4] LDSETALB_32_memop - (b'\x8D\x30\xE2\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x4)));' + \ + (b'\x8D\x30\xE2\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x4),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w2)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetalb w22, w17, [x8] LDSETALB_32_memop - (b'\x11\x31\xF6\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x8)));' + \ + (b'\x11\x31\xF6\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x8),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w22)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w17,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetalh w3, w17, [x3] LDSETALH_32_memop - (b'\x71\x30\xE3\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x3)));' + \ + (b'\x71\x30\xE3\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x3)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x3),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w3)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w17,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetalh w22, w28, [x7] LDSETALH_32_memop - (b'\xFC\x30\xF6\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x7)));' + \ + (b'\xFC\x30\xF6\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x7),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w22)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetalh w1, w24, [x3] LDSETALH_32_memop - (b'\x78\x30\xE1\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x3)));' + \ + (b'\x78\x30\xE1\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x3)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x3),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w1)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetalh w11, w22, [x14] LDSETALH_32_memop - (b'\xD6\x31\xEB\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x14)));' + \ + (b'\xD6\x31\xEB\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x14),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w11)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w22,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetal w13, w28, [x2] LDSETAL_32_memop - (b'\x5C\x30\xED\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x2)));' + \ + (b'\x5C\x30\xED\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x2)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x2),LLIL_OR.d(LLIL_REG.d(w13),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldsetal w0, w17, [x15] LDSETAL_32_memop - (b'\xF1\x31\xE0\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x15)));' + \ + (b'\xF1\x31\xE0\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x15)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x15),LLIL_OR.d(LLIL_REG.d(w0),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w17,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldsetal w13, wzr, [x10] LDSETAL_32_memop - (b'\x5F\x31\xED\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ + (b'\x5F\x31\xED\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x10),LLIL_OR.d(LLIL_REG.d(w13),LLIL_ZX.d(LLIL_REG.d(temp0))))'), # ldsetal w16, w8, [x17] LDSETAL_32_memop - (b'\x28\x32\xF0\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x17)));' + \ + (b'\x28\x32\xF0\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x17),LLIL_OR.d(LLIL_REG.d(w16),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w8,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldsetal x12, x21, [x22] LDSETAL_64_memop - (b'\xD5\x32\xEC\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ + (b'\xD5\x32\xEC\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_OR.q(LLIL_REG.q(x12),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x21,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetal x10, lr, [x17] LDSETAL_64_memop - (b'\x3E\x32\xEA\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ + (b'\x3E\x32\xEA\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x17),LLIL_OR.q(LLIL_REG.q(x10),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(lr,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetal x13, x27, [x22] LDSETAL_64_memop - (b'\xDB\x32\xED\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ + (b'\xDB\x32\xED\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_OR.q(LLIL_REG.q(x13),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x27,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetal x5, x19, [x22] LDSETAL_64_memop - (b'\xD3\x32\xE5\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ + (b'\xD3\x32\xE5\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x22),LLIL_OR.q(LLIL_REG.q(x5),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x19,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldseta w23, w5, [x25] LDSETA_32_memop - (b'\x25\x33\xB7\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ + (b'\x25\x33\xB7\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x25)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x25),LLIL_OR.d(LLIL_REG.d(w23),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w5,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldseta w24, w13, [x22] LDSETA_32_memop - (b'\xCD\x32\xB8\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x22)));' + \ + (b'\xCD\x32\xB8\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x22)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x22),LLIL_OR.d(LLIL_REG.d(w24),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldseta w2, w17, [x27] LDSETA_32_memop - (b'\x71\x33\xA2\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x27)));' + \ + (b'\x71\x33\xA2\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x27)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x27),LLIL_OR.d(LLIL_REG.d(w2),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w17,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldseta w22, w20, [x20] LDSETA_32_memop - (b'\x94\x32\xB6\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x20)));' + \ + (b'\x94\x32\xB6\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x20)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x20),LLIL_OR.d(LLIL_REG.d(w22),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w20,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldseta x2, xzr, [x24] LDSETA_64_memop - (b'\x1F\x33\xA2\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x24)));' + \ + (b'\x1F\x33\xA2\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x24),LLIL_OR.q(LLIL_REG.q(x2),LLIL_ZX.q(LLIL_REG.q(temp0))))'), # ldseta x17, x16, [x9] LDSETA_64_memop - (b'\x30\x31\xB1\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x9)));' + \ + (b'\x30\x31\xB1\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x9),LLIL_OR.q(LLIL_REG.q(x17),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x16,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldseta x10, x15, [x1] LDSETA_64_memop - (b'\x2F\x30\xAA\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ + (b'\x2F\x30\xAA\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x1)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x1),LLIL_OR.q(LLIL_REG.q(x10),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x15,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldseta xzr, x19, [x7] LDSETA_64_memop - (b'\xF3\x30\xBF\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x7)));' + \ + (b'\xF3\x30\xBF\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x7),LLIL_OR.q(LLIL_CONST.q(0x0),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x19,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetb w1, w29, [x23] LDSETB_32_memop - (b'\xFD\x32\x21\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x23)));' + \ + (b'\xFD\x32\x21\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x23),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w1)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w29,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetb w8, w18, [x9] LDSETB_32_memop - (b'\x32\x31\x28\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x9)));' + \ + (b'\x32\x31\x28\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x9),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w8)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetb w20, w21, [x7] LDSETB_32_memop - (b'\xF5\x30\x34\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x7)));' + \ + (b'\xF5\x30\x34\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x7)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x7),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w20)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w21,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetb w9, w27, [x28] LDSETB_32_memop - (b'\x9B\x33\x29\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ + (b'\x9B\x33\x29\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x28),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w9)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w27,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldseth wzr, w28, [lr] LDSETH_32_memop - (b'\xDC\x33\x3F\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ + (b'\xDC\x33\x3F\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(lr)));' + \ ' LLIL_STORE.w(LLIL_REG.q(lr),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_CONST.d(0x0)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w28,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldseth w30, w25, [x28] LDSETH_32_memop - (b'\x99\x33\x3E\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ + (b'\x99\x33\x3E\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x28)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x28),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w30)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w25,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldseth w7, w24, [x10] LDSETH_32_memop - (b'\x58\x31\x27\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x10)));' + \ + (b'\x58\x31\x27\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x10),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w7)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldseth w27, w0, [x21] LDSETH_32_memop - (b'\xA0\x32\x3B\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x21)));' + \ + (b'\xA0\x32\x3B\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x21),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w27)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w0,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetlb w5, w30, [x19] LDSETLB_32_memop - (b'\x7E\x32\x65\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ + (b'\x7E\x32\x65\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x19)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x19),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w5)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w30,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetlb w1, w18, [x6] LDSETLB_32_memop - (b'\xD2\x30\x61\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x6)));' + \ + (b'\xD2\x30\x61\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x6),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w1)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w18,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetlb w9, w6, [x26] LDSETLB_32_memop - (b'\x46\x33\x69\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x26)));' + \ + (b'\x46\x33\x69\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x26),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w9)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w6,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetlb w3, w16, [x18] LDSETLB_32_memop - (b'\x50\x32\x63\x38', 'LLIL_SET_REG(temp0,LLIL_LOAD.b(LLIL_REG.q(x18)));' + \ + (b'\x50\x32\x63\x38', 'LLIL_SET_REG.b(temp0,LLIL_LOAD.b(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.b(LLIL_REG.q(x18),LLIL_OR.b(LLIL_LOW_PART.b(LLIL_REG.d(w3)),LLIL_LOW_PART.b(LLIL_REG.b(temp0))));' + \ ' LLIL_SET_REG.d(w16,LLIL_ZX.d(LLIL_LOW_PART.b(LLIL_REG.b(temp0))))'), # ldsetlh w5, w11, [x14] LDSETLH_32_memop - (b'\xCB\x31\x65\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x14)));' + \ + (b'\xCB\x31\x65\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x14),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w5)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w11,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetlh w16, w7, [x12] LDSETLH_32_memop - (b'\x87\x31\x70\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ + (b'\x87\x31\x70\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x12)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x12),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w16)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetlh wzr, w24, [x16] LDSETLH_32_memop - (b'\x18\x32\x7F\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x16)));' + \ + (b'\x18\x32\x7F\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x16)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x16),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_CONST.d(0x0)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w24,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetlh w29, w11, [x8] LDSETLH_32_memop - (b'\x0B\x31\x7D\x78', 'LLIL_SET_REG(temp0,LLIL_LOAD.w(LLIL_REG.q(x8)));' + \ + (b'\x0B\x31\x7D\x78', 'LLIL_SET_REG.w(temp0,LLIL_LOAD.w(LLIL_REG.q(x8)));' + \ ' LLIL_STORE.w(LLIL_REG.q(x8),LLIL_OR.w(LLIL_LOW_PART.w(LLIL_REG.d(w29)),LLIL_LOW_PART.w(LLIL_REG.w(temp0))));' + \ ' LLIL_SET_REG.d(w11,LLIL_ZX.d(LLIL_LOW_PART.w(LLIL_REG.w(temp0))))'), # ldsetl w22, w7, [x9] LDSETL_32_memop - (b'\x27\x31\x76\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x9)));' + \ + (b'\x27\x31\x76\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x9)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x9),LLIL_OR.d(LLIL_REG.d(w22),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w7,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldsetl w11, w10, [x26] LDSETL_32_memop - (b'\x4A\x33\x6B\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x26)));' + \ + (b'\x4A\x33\x6B\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x26),LLIL_OR.d(LLIL_REG.d(w11),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w10,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldsetl w24, w13, [x10] LDSETL_32_memop - (b'\x4D\x31\x78\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ + (b'\x4D\x31\x78\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x10)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x10),LLIL_OR.d(LLIL_REG.d(w24),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldsetl w4, w6, [fp] LDSETL_32_memop - (b'\xA6\x33\x64\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ + (b'\xA6\x33\x64\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.d(LLIL_REG.q(fp),LLIL_OR.d(LLIL_REG.d(w4),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w6,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldsetl x28, x25, [x21] LDSETL_64_memop - (b'\xB9\x32\x7C\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x21)));' + \ + (b'\xB9\x32\x7C\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x21)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x21),LLIL_OR.q(LLIL_REG.q(x28),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x25,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetl x21, x3, [x6] LDSETL_64_memop - (b'\xC3\x30\x75\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ + (b'\xC3\x30\x75\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x6)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x6),LLIL_OR.q(LLIL_REG.q(x21),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x3,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetl x19, x27, [x14] LDSETL_64_memop - (b'\xDB\x31\x73\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x14)));' + \ + (b'\xDB\x31\x73\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x14)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x14),LLIL_OR.q(LLIL_REG.q(x19),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x27,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldsetl x8, x3, [x26] LDSETL_64_memop - (b'\x43\x33\x68\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ + (b'\x43\x33\x68\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x26)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x26),LLIL_OR.q(LLIL_REG.q(x8),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x3,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldset w17, w5, [x24] LDSET_32_memop - (b'\x05\x33\x31\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x24)));' + \ + (b'\x05\x33\x31\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x24),LLIL_OR.d(LLIL_REG.d(w17),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w5,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldset w15, w13, [x24] LDSET_32_memop - (b'\x0D\x33\x2F\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x24)));' + \ + (b'\x0D\x33\x2F\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x24)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x24),LLIL_OR.d(LLIL_REG.d(w15),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w13,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldset w25, w15, [x23] LDSET_32_memop - (b'\xEF\x32\x39\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(x23)));' + \ + (b'\xEF\x32\x39\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(x23)));' + \ ' LLIL_STORE.d(LLIL_REG.q(x23),LLIL_OR.d(LLIL_REG.d(w25),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w15,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldset w12, w25, [fp] LDSET_32_memop - (b'\xB9\x33\x2C\xB8', 'LLIL_SET_REG(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ + (b'\xB9\x33\x2C\xB8', 'LLIL_SET_REG.d(temp0,LLIL_LOAD.d(LLIL_REG.q(fp)));' + \ ' LLIL_STORE.d(LLIL_REG.q(fp),LLIL_OR.d(LLIL_REG.d(w12),LLIL_ZX.d(LLIL_REG.d(temp0))));' + \ ' LLIL_SET_REG.d(w25,LLIL_ZX.d(LLIL_REG.d(temp0)))'), # ldset x7, x0, [x0] LDSET_64_memop - (b'\x00\x30\x27\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x0)));' + \ + (b'\x00\x30\x27\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x0)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x0),LLIL_OR.q(LLIL_REG.q(x7),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x0,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldset x23, x15, [x17] LDSET_64_memop - (b'\x2F\x32\x37\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ + (b'\x2F\x32\x37\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x17)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x17),LLIL_OR.q(LLIL_REG.q(x23),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x15,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldset x11, x15, [x4] LDSET_64_memop - (b'\x8F\x30\x2B\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x4)));' + \ + (b'\x8F\x30\x2B\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x4)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x4),LLIL_OR.q(LLIL_REG.q(x11),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x15,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # ldset x13, x4, [x18] LDSET_64_memop - (b'\x44\x32\x2D\xF8', 'LLIL_SET_REG(temp0,LLIL_LOAD.q(LLIL_REG.q(x18)));' + \ + (b'\x44\x32\x2D\xF8', 'LLIL_SET_REG.q(temp0,LLIL_LOAD.q(LLIL_REG.q(x18)));' + \ ' LLIL_STORE.q(LLIL_REG.q(x18),LLIL_OR.q(LLIL_REG.q(x13),LLIL_ZX.q(LLIL_REG.q(temp0))));' + \ ' LLIL_SET_REG.q(x4,LLIL_ZX.q(LLIL_REG.q(temp0)))'), # stclrb w2, [x7] STCLRB_LDCLRB_32_memop diff --git a/arch/arm64/il.cpp b/arch/arm64/il.cpp index f9a4bf163..e1f1d9ae1 100644 --- a/arch/arm64/il.cpp +++ b/arch/arm64/il.cpp @@ -116,7 +116,10 @@ ExprId ExtractImmediate(LowLevelILFunction& il, exarmo_aarch64_operand& operand, } } - return ILCONST(sizeof_imm, imm & ONES(sizeof_imm * 8)); + if (sizeof_imm < 8) + imm &= ONES(sizeof_imm * 8); + + return ILCONST(sizeof_imm, imm); } // extractSize can be smaller than the register, generating an LLIL_LOWPART @@ -336,13 +339,7 @@ static size_t ReadILOperand( switch (operand.kind) { case EXARMO_AARCH64_OPERAND_IMM: - { - exarmo_aarch64_modifier modifier = operand.imm.modifier; - if (modifier.present && modifier.kind == EXARMO_AARCH64_MOD_LSL && modifier.amount > 0) - return il.Const(resultSize, IMM_O(operand) << modifier.amount); - - return il.Const(resultSize, IMM_O(operand)); - } + return ExtractImmediate(il, operand, resultSize); case EXARMO_AARCH64_OPERAND_LABEL: return il.ConstPointer(8, LabelTarget(operand, addr)); case EXARMO_AARCH64_OPERAND_REG: @@ -685,8 +682,23 @@ static void LoadStoreOperand(LowLevelILFunction& il, bool load, WriteBack(il, operand2, EXARMO_AARCH64_WRITEBACK_POST); } -// Load `reg` from, or store it to, the location operand2 names. `reg` may be an LLIL_TEMP, which a -// lift loads into before working on the value. +// Load `size` bytes from the location `operand` names into LLIL_TEMP(0), for a lift that works on +// the value before writing any register. +static void LoadTemporary( + LowLevelILFunction& il, size_t size, exarmo_aarch64_operand& operand, uint64_t addr) +{ + std::optional address = BeginAccess(il, operand, addr); + if (!address) + { + il.AddInstruction(il.Unimplemented()); + return; + } + + il.AddInstruction(il.SetRegister(size, LLIL_TEMP(0), il.Operand(1, il.Load(size, *address)))); + WriteBack(il, operand, EXARMO_AARCH64_WRITEBACK_POST); +} + +// Load `reg` from, or store it to, the location operand2 names, `size` bytes of it. static void LoadStoreOperandSize(LowLevelILFunction& il, bool load, bool sign_extend, size_t size, Register reg, exarmo_aarch64_operand& operand2, uint64_t addr) { @@ -699,12 +711,9 @@ static void LoadStoreOperandSize(LowLevelILFunction& il, bool load, bool sign_ex if (load) { - // LLIL_TEMP registers will be reported to have size 0, so override with size - size_t extendSize = REGSZ(reg) ? REGSZ(reg) : size; - ExprId value = il.Operand(1, il.Load(size, *address)); - if (extendSize > size) - value = sign_extend ? il.SignExtend(extendSize, value) : il.ZeroExtend(extendSize, value); + if (REGSZ(reg) > size) + value = sign_extend ? il.SignExtend(REGSZ(reg), value) : il.ZeroExtend(REGSZ(reg), value); il.AddInstruction(ILSETREG(reg, value)); } @@ -1970,7 +1979,7 @@ bool GetLowLevelILForInstruction( { // TODO: represent/annotate (model?) acquire/release memory ordering semantics for all LDADD* instructions - LoadStoreOperandSize(il, true, false, REGSZ_O(operand2), (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, REGSZ_O(operand2), operand3, addr); il.AddInstruction(il.Store(REGSZ_O(operand2), ILREG_O(operand3), il.Add(REGSZ_O(operand1), ILREG_O(operand1), @@ -1993,7 +2002,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDADDLB: case EXARMO_AARCH64_LDADDALB: { - LoadStoreOperandSize(il, true, false, 1, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 1, operand3, addr); il.AddInstruction(il.Store(1, ILREG_O(operand3), il.Add(1, il.LowPart(1, ILREG_O(operand1)), il.LowPart(1, il.Register(1, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2013,7 +2022,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDADDLH: case EXARMO_AARCH64_LDADDALH: { - LoadStoreOperandSize(il, true, false, 2, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 2, operand3, addr); il.AddInstruction(il.Store(2, ILREG_O(operand3), il.Add(2, il.LowPart(2, ILREG_O(operand1)), il.LowPart(2, il.Register(2, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2035,7 +2044,7 @@ bool GetLowLevelILForInstruction( { // TODO: represent/annotate (model?) acquire/release memory ordering semantics for all LDCLR* instructions - LoadStoreOperandSize(il, true, false, REGSZ_O(operand2), (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, REGSZ_O(operand2), operand3, addr); il.AddInstruction(il.Store(REGSZ_O(operand2), ILREG_O(operand3), il.And(REGSZ_O(operand1), il.Not(REGSZ_O(operand1), ILREG_O(operand1)), @@ -2060,7 +2069,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDCLRLB: case EXARMO_AARCH64_LDCLRALB: { - LoadStoreOperandSize(il, true, false, 1, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 1, operand3, addr); il.AddInstruction(il.Store(1, ILREG_O(operand3), il.And(1, il.Not(1, il.LowPart(1, ILREG_O(operand1))), il.LowPart(1, il.Register(1, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2080,7 +2089,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDCLRLH: case EXARMO_AARCH64_LDCLRALH: { - LoadStoreOperandSize(il, true, false, 2, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 2, operand3, addr); il.AddInstruction(il.Store(2, ILREG_O(operand3), il.And(2, il.Not(2, il.LowPart(2, ILREG_O(operand1))), il.LowPart(2, il.Register(2, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2102,7 +2111,7 @@ bool GetLowLevelILForInstruction( { // TODO: represent/annotate (model?) acquire/release memory ordering semantics for all LDEOR* instructions - LoadStoreOperandSize(il, true, false, REGSZ_O(operand2), (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, REGSZ_O(operand2), operand3, addr); il.AddInstruction(il.Store(REGSZ_O(operand2), ILREG_O(operand3), il.Xor(REGSZ_O(operand1), ILREG_O(operand1), @@ -2125,7 +2134,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDEORLB: case EXARMO_AARCH64_LDEORALB: { - LoadStoreOperandSize(il, true, false, 1, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 1, operand3, addr); il.AddInstruction(il.Store(1, ILREG_O(operand3), il.Xor(1, il.LowPart(1, ILREG_O(operand1)), il.LowPart(1, il.Register(1, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2145,7 +2154,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDEORLH: case EXARMO_AARCH64_LDEORALH: { - LoadStoreOperandSize(il, true, false, 2, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 2, operand3, addr); il.AddInstruction(il.Store(2, ILREG_O(operand3), il.Xor(2, il.LowPart(2, ILREG_O(operand1)), il.LowPart(2, il.Register(2, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2167,7 +2176,7 @@ bool GetLowLevelILForInstruction( { // TODO: represent/annotate (model?) acquire/release memory ordering semantics for all LDSET* instructions - LoadStoreOperandSize(il, true, false, REGSZ_O(operand2), (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, REGSZ_O(operand2), operand3, addr); il.AddInstruction(il.Store(REGSZ_O(operand2), ILREG_O(operand3), il.Or(REGSZ_O(operand1), ILREG_O(operand1), @@ -2190,7 +2199,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDSETLB: case EXARMO_AARCH64_LDSETALB: { - LoadStoreOperandSize(il, true, false, 1, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 1, operand3, addr); il.AddInstruction(il.Store(1, ILREG_O(operand3), il.Or(1, il.LowPart(1, ILREG_O(operand1)), il.LowPart(1, il.Register(1, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2210,7 +2219,7 @@ bool GetLowLevelILForInstruction( case EXARMO_AARCH64_LDSETLH: case EXARMO_AARCH64_LDSETALH: { - LoadStoreOperandSize(il, true, false, 2, (Register)LLIL_TEMP(0), operand3, addr); + LoadTemporary(il, 2, operand3, addr); il.AddInstruction(il.Store(2, ILREG_O(operand3), il.Or(2, il.LowPart(2, ILREG_O(operand1)), il.LowPart(2, il.Register(2, LLIL_TEMP(0)))))); if (!IS_ZERO_REG(REG_O(operand2))) @@ -2391,8 +2400,18 @@ bool GetLowLevelILForInstruction( il.AddInstruction(ILSETREG(regs[i], ILCONST_O(RegisterSize(regs[i]), operand2))); break; } - case EXARMO_AARCH64_MVN: case EXARMO_AARCH64_MVNI: + { + Register regs[16]; + int n = unpack_vector(operand1, regs); + for (int i = 0; i < n; ++i) + { + size_t size = RegisterSize(regs[i]); + il.AddInstruction(ILSETREG(regs[i], il.Not(size, ILCONST_O(size, operand2)))); + } + break; + } + case EXARMO_AARCH64_MVN: il.AddInstruction(ILSETREG_O( operand1, il.Not(REGSZ_O(operand1), ReadILOperand(il, operand2, REGSZ_O(operand1), addr)))); break;