ppc: cleaning up
diff --git a/arch/PowerPC/PPCInstPrinter.c b/arch/PowerPC/PPCInstPrinter.c
index 5f3702f..ee6aeb9 100644
--- a/arch/PowerPC/PPCInstPrinter.c
+++ b/arch/PowerPC/PPCInstPrinter.c
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-/* Capstone Disassembler Engine */
-/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013> */
+/* Capstone Disassembly Engine */
+/* By Nguyen Anh Quynh <aquynh@gmail.com>, 2013-2014 */
#include <stdio.h>
#include <stdlib.h>
@@ -27,8 +27,6 @@
#include "../../MathExtras.h"
#include "PPCMapping.h"
-//#include "PPCMapping.h"
-
static const char *getRegisterName(unsigned RegNo);
static void printOperand(MCInst *MI, unsigned OpNo, SStream *O);
static void printInstruction(MCInst *MI, SStream *O, MCRegisterInfo *MRI);
@@ -127,18 +125,6 @@
}
}
- // For fast-isel, a COPY_TO_REGCLASS may survive this long. This is
- // used when converting a 32-bit float to a 64-bit float as part of
- // conversion to an integer (see PPCFastISel.cpp:SelectFPToI()),
- // as otherwise we have problems with incorrect register classes
- // in machine instruction verification. For now, just avoid trying
- // to print it as such an instruction has no effect (a 32-bit float
- // in a register is already in 64-bit form, just with lower
- // precision). FIXME: Is there a better solution?
-
- //if (MCInst_getOpcode(MI) == TargetOpcode_COPY_TO_REGCLASS)
- // return;
-
printInstruction(MI, O, NULL);
}
@@ -152,6 +138,7 @@
if (!strcmp(Modifier, "cc")) {
switch ((ppc_predicate)Code) {
+ default: // unreachable
case PPC_PRED_LT_MINUS:
case PPC_PRED_LT_PLUS:
case PPC_PRED_LT:
@@ -193,7 +180,6 @@
SStream_concat(O, "nu");
return;
}
- // llvm_unreachable("Invalid predicate code");
}
if (!strcmp(Modifier, "pm")) {
@@ -227,6 +213,8 @@
case PPC_PRED_NU_PLUS:
SStream_concat(O, "+");
return;
+ default: // unreachable
+ return;
}
// llvm_unreachable("Invalid predicate code");
}