Skip to content

RISCV: Fix operand detection (REAL/ALIAS)#2897

Merged
Rot127 merged 3 commits intocapstone-engine:nextfrom
slate5:fix/operand-set-detection
Apr 20, 2026
Merged

RISCV: Fix operand detection (REAL/ALIAS)#2897
Rot127 merged 3 commits intocapstone-engine:nextfrom
slate5:fix/operand-set-detection

Conversation

@slate5
Copy link
Copy Markdown
Contributor

@slate5 slate5 commented Apr 17, 2026

Your checklist for this pull request

  • I've documented or updated the documentation of every API function and struct this PR changes.
  • I've added tests that prove my fix is effective or that my feature works (if possible)

Detailed description

Fixing issue #2896

Also adding a new expected field (uses_alias_details) to cstest.

Test plan

cstool -d riscv64 67800000
 0  67 80 00 00  ret	
	ID: 31 (jalr)
	Is alias: 1698 (ret) with ALIAS operand set

	Groups: jump 

cstool -dr riscv64 67800000
 0  67 80 00 00  ret	
	ID: 31 (jalr)
	Is alias: 1698 (ret) with REAL operand set
	op_count: 3
		operands[0].type: REG = zero
		operands[0].access: WRITE
		operands[1].type: REG = ra
		operands[1].access: READ
		operands[2].type: IMM = 0x0
		operands[2].access: READ

	Groups: ret 

Closing issues

closes #2896

@github-actions github-actions Bot added the RISCV Arch label Apr 17, 2026
Comment thread suite/cstest/src/test_case.c Outdated
Copy link
Copy Markdown
Collaborator

@Rot127 Rot127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the test extension!

@moste00
Copy link
Copy Markdown
Contributor

moste00 commented Apr 19, 2026

LGTM

@Rot127 Rot127 merged commit 1d9a198 into capstone-engine:next Apr 20, 2026
35 checks passed
@slate5 slate5 deleted the fix/operand-set-detection branch April 20, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RISCV Arch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RISCV cstool flags "ALIAS" operand set as "REAL".

3 participants