Skip to content

Commit

Permalink
Return InvalidRegister in DwarfEncToReg
Browse files Browse the repository at this point in the history
This makes them all consisent and fixes the 'incomplete without default'
linter warning.
  • Loading branch information
hainest committed Oct 28, 2023
1 parent 6be212f commit 7e46e45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/src/registers/MachRegister.C
Expand Up @@ -1228,6 +1228,7 @@ namespace Dyninst {
case 152: return Dyninst::InvalidReg; // mxcsr
case 153: return Dyninst::InvalidReg; // fcw
case 154: return Dyninst::InvalidReg; // fsw
default: return Dyninst::InvalidReg;
}
break;
case Arch_ppc32:
Expand Down Expand Up @@ -1298,6 +1299,7 @@ namespace Dyninst {
case 63: return Dyninst::ppc32::fpr31;
case 64: return Dyninst::ppc32::cr;
case 65: return Dyninst::InvalidReg; // FPSCR
default: return Dyninst::InvalidReg;
}
// Seperate switch statements to give compilers an easier time of
// optimizing
Expand Down Expand Up @@ -1383,6 +1385,7 @@ namespace Dyninst {
case 63: return Dyninst::ppc64::fpr31;
case 64: return Dyninst::ppc64::cr;
case 65: return Dyninst::InvalidReg; // FPSCR
default: return Dyninst::InvalidReg;
}
// Seperate switch statements to give compilers an easier time of
// optimizing
Expand Down Expand Up @@ -1437,6 +1440,7 @@ namespace Dyninst {
case 30: return Dyninst::aarch64::x30;
case 31: return Dyninst::aarch64::sp;
case 32: return Dyninst::InvalidReg;
default: return Dyninst::InvalidReg;
}
switch(encoding) {
case 64: return Dyninst::aarch64::q0;
Expand Down

0 comments on commit 7e46e45

Please sign in to comment.