Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SH] Fix warnings about unhandled switch cases by adding defaults. #2017

Merged
merged 2 commits into from
May 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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