Enhance shift value and types of shift instructions.#2638
Merged
kabeor merged 2 commits intocapstone-engine:nextfrom Mar 9, 2025
Merged
Enhance shift value and types of shift instructions.#2638kabeor merged 2 commits intocapstone-engine:nextfrom
kabeor merged 2 commits intocapstone-engine:nextfrom
Conversation
Shifts via registers now save the register id in cs_arch64_op.shift.value and set the shift type accordingly.
kabeor
approved these changes
Mar 9, 2025
kabeor
pushed a commit
that referenced
this pull request
Apr 2, 2025
* Fix wrong version requirement of tricore instructions: (#2620) crc32.b crc32b.w crc32l.w crcn popcnt.w shuffle Remove invalid instruction: BISR_rc_v161 Learn up misconfigure of nor and not * Switch to ubuntu-24.04-arm runner image (#2625) * Build Tarball before DEB/RPM package. (#2627) Because it was run after the RPM/DEB package build it contained the 'build' directory with all its files. Which made it way too big. * Add aliases mapping for MIPS & test for id, alias_id (#2635) * Add checks for MIPS details on cstest_py (#2640) * Give the user some guidance where to add missing enumeration values. (#2639) * - Added missing files for sdist archive (#2624) * cmake: Fix building capstone as sub-project (#2629) * cmake: Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR capstone can be built as sub-project through cmake's fetch_content mechanism. In this case, `CMAKE_SOURCE_DIR` refers to the parent project (that has nothing to do with capstone), while `PROJECT_SOURCE_DIR` refers to the root of the capstone source tree. Recently introduced changes to enable CPack (#2590) are using the wrong variable and are hence breaking builds that use capstone through fetch_content. Use the correct variable to fix this issue. * cmake: Only include cpack in top-level builds Do not include cpack in builds where capstone is used through fetch_content. * Update operand type enums of all arch modules to the one in `capstone.h` (#2633) * Set all operand types to the main CS_OP_ types from capstone.h. * Add test cases from issue. * Enhance shift value and types of shift instructions. (#2638) * Enhance shift value and types of shift instructions. Shifts via registers now save the register id in cs_arch64_op.shift.value and set the shift type accordingly. * Sort table * Fix build for compilers requiring explicit static for inline functions.. (#2645) * Tms32c64x Little Endian (#2648) * Add little endian support for TMS320c64x. This requires now to initialize TMS320c64x with the CS_MODE_BIG_ENDIAN flag. * Fix typo * Add Call group to svc, smc and hvc. (#2651) * Decode BH field in print_insn_detail_ppc (#2662) --------- Co-authored-by: Changqing Jing <changqing.jing@bmw.com> Co-authored-by: @Antelox <anteloxrce@gmail.com> Co-authored-by: Giovanni <561184+wargio@users.noreply.github.com> Co-authored-by: Philipp Wagner <mail@philipp-wagner.com> Co-authored-by: Tim Haines <thaines.astro@gmail.com>
kabeor
pushed a commit
that referenced
this pull request
Apr 9, 2025
* Enhance shift value and types of shift instructions. Shifts via registers now save the register id in cs_arch64_op.shift.value and set the shift type accordingly. * Sort table
Rot127
added a commit
that referenced
this pull request
Apr 11, 2025
* Enhance shift value and types of shift instructions. Shifts via registers now save the register id in cs_arch64_op.shift.value and set the shift type accordingly. * Sort table
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shifts via registers now save the register id in cs_arch64_op.shift.value and set the shift type accordingly.
Your checklist for this pull request
Detailed description
This streamlines the whole shift operands for AArch64.
It fixes the bug of #2631 (shift immediate was not saved in
shift.value).Additionally, if a register is used for shifting, it saves this register in
shift.value.This is the same behavior as the ARM module have. And is in general more convenient.
Test plan
Added tests for all common shift instructions and their variants.
Closing issues
closes #2631