Skip to content

Commit

Permalink
Merge pull request #2017 from Rot127/fix_sh_warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeor committed May 16, 2023
2 parents 3e06196 + 8738f01 commit 7a3dc32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/SH/SHDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ static bool op4xx5(uint16_t code, uint64_t address, MCInst *MI, cs_mode mode,
sh_info *info, cs_detail *detail)
{
int r = (code >> 8) & 0x0f;
enum direction rw;
enum direction rw = read;
static const struct ri_list list[] = {
{0, SH_INS_ROTR, ISA_ALL, none},
{1, SH_INS_CMP_PL, ISA_ALL, none},
Expand Down Expand Up @@ -904,7 +904,7 @@ static bool op4xxb(uint16_t code, uint64_t address, MCInst *MI, cs_mode mode,
int sz = 0;
int grp = SH_GRP_INVALID;
sh_op_mem_type memop = SH_OP_MEM_INVALID;
enum direction rw;
enum direction rw = read;
static const struct ri_list list[] = {
{0, SH_INS_JSR, ISA_ALL, none},
{1, SH_INS_TAS, ISA_ALL, none},
Expand Down
8 changes: 8 additions & 0 deletions arch/SH/SHInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ static void print_dsp_double(SStream *O, sh_info *info, int xy)

for (i = 0; i < 2; i++) {
switch(info->op.operands[xy].dsp.operand[i]) {
default:
break;
case SH_OP_DSP_REG_IND:
SStream_concat(O, "@%s", s_reg_names[info->op.operands[xy].dsp.r[i]]);
break;
Expand Down Expand Up @@ -219,6 +221,8 @@ static void print_dsp(SStream *O, sh_info *info)
}
for (i = 0; i < 2; i++) {
switch(info->op.operands[0].dsp.operand[i]) {
default:
break;
case SH_OP_DSP_REG_PRE:
SStream_concat(O, "@-%s", s_reg_names[info->op.operands[0].dsp.r[i]]);
break;
Expand All @@ -244,6 +248,8 @@ static void print_dsp(SStream *O, sh_info *info)
break;
case 3: // Parallel
switch(info->op.operands[2].dsp.cc) {
default:
break;
case SH_DSP_CC_DCT:
SStream_concat0(O,"dct ");
break;
Expand All @@ -255,6 +261,8 @@ static void print_dsp(SStream *O, sh_info *info)
case SH_INS_DSP_PSUB_PMULS:
case SH_INS_DSP_PADD_PMULS:
switch(info->op.operands[2].dsp.insn) {
default:
break;
case SH_INS_DSP_PSUB_PMULS:
SStream_concat0(O, "psub ");
break;
Expand Down

0 comments on commit 7a3dc32

Please sign in to comment.