Skip to content

Commit

Permalink
[v5][SuperH] Fix missing setting detail->sh (#2465)
Browse files Browse the repository at this point in the history
detail->sh is never set. Which makes the detailed output related to
operands is always missing.
  • Loading branch information
david942j committed Sep 19, 2024
1 parent 5cca005 commit 36a9619
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/SH/SHDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,8 @@ bool SH_getInstruction(csh ud, const uint8_t *code, size_t code_len,
*size = 0;
return MCDisassembler_Fail;
} else {
if (detail)
detail->sh = info->op;
return MCDisassembler_Success;
}
}
Expand Down
4 changes: 4 additions & 0 deletions suite/cstest/issues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,3 +1062,7 @@
!# issue 2418
!# CS_ARCH_ARM, CS_MODE_THUMB, CS_OPT_DETAIL
0x0: 0x86,0xf3,0x00,0x89 == msr cpsr_fc, r6 ; operands[0].type: SYSREG = 144

!# issue 2424
!# CS_ARCH_SH, CS_MODE_SH2A | CS_MODE_BIG_ENDIAN, CS_OPT_DETAIL
0x0: 0x32,0x11,0x92,0x00 == movu.w @(1024,r1),r2 ; operands[0].type: MEM ; operands[0].mem.reg: REG = r1 ; operands[0].mem.disp: 0x400 ; address mode: Register Indirect with Predecrement ; operands[1].type: REG = r2

0 comments on commit 36a9619

Please sign in to comment.