Skip to content

Commit 077b578

Browse files
author
Wesley Ceraso Prudencio
authored
Fixes the lvalue for movu.b and movu.w
As with all other mov instructions, the second address is the lvalue, the one to receive the data. For movu.b and movu.w the first address was receiving its own data.
1 parent c5594d2 commit 077b578

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Ghidra/Processors/SuperH/data/languages/superh.sinc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,15 @@ disppc2: @(disp,pc) is disp_00_07 & pc
488488
:movu.b @(l_disp_00_11, l_rm_20_23), l_rn_24_27
489489
is l_opcode_28_31=0b0011 & l_rn_24_27 & l_rm_20_23 & l_opcode_16_19=0b0001 & l_opcode_12_15=0b1000 & l_disp_00_11
490490
{
491-
l_rm_20_23 = zext(*:1 (l_disp_00_11 + l_rm_20_23));
491+
l_rn_24_27 = zext(*:1 (l_disp_00_11 + l_rm_20_23));
492492
}
493493

494494
# MOVU.W @(disp12,Rm), Rn 0011nnnnmmmm0001 1001dddddddddddd (disp×2+Rm) → zero extension → Rn
495495
:movu.w @(disp, l_rm_20_23), l_rn_24_27
496496
is l_opcode_28_31=0b0011 & l_rn_24_27 & l_rm_20_23 & l_opcode_16_19=0b0001 & l_opcode_12_15=0b1001 & l_disp_00_11
497497
[ disp = l_disp_00_11 * 2; ]
498498
{
499-
l_rm_20_23 = zext(*:2 (disp + l_rm_20_23));
499+
l_rn_24_27 = zext(*:2 (disp + l_rm_20_23));
500500
}
501501

502502
simm20: "#"value is l_simm20_20_23 & l_imm20_00_15

0 commit comments

Comments
 (0)