]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: remove several compiler warnings
authorPetar Jovanovic <mips32r2@gmail.com>
Sat, 3 Feb 2018 22:28:30 +0000 (23:28 +0100)
committerPetar Jovanovic <mips32r2@gmail.com>
Sat, 3 Feb 2018 22:28:30 +0000 (23:28 +0100)
A few warnings have showed up with recent changes on trunk:

warning: parameter names (without types) in function declaration
warning: no previous prototype for 'showRotxOp'
warning: unused variable 'src1' [-Wunused-variable]

Fixing it.
Thanks Paul Floyd for reporting one of the issues.

VEX/priv/host_mips_defs.c
VEX/priv/host_mips_defs.h
VEX/priv/host_mips_isel.c

index a88ad1a84e4d49b8aecde2d3cda2e5582e8686e8..64a769dcfd6e2ab307dab1e4298118d0104d4aa9 100644 (file)
@@ -975,6 +975,9 @@ const HChar *showRotxOp(MIPSRotxOp op) {
       case Rotx64:
          ret = "rotx64";
          break;
+      default:
+         vpanic("showRotxOp");
+         break;
    }
 
    return ret;
index 8834ae9693a104c24b87af04d1de2df771e479ef..494ba4ea218144d77252843b2b71c527d2d68fa4 100644 (file)
@@ -544,14 +544,14 @@ typedef enum {
 
 } MIPSFpOp;
 
-extern const HChar *showRotxOp(MIPSRotxOp);
+extern const HChar *showMIPSFpOp(MIPSFpOp);
 
 typedef enum {
    Rotx32,
    Rotx64
 } MIPSRotxOp;
 
-extern const HChar *showMIPSFpOp(MIPSFpOp);
+extern const HChar *showRotxOp(MIPSRotxOp);
 
 /* Move from/to fpr to/from gpr */
 typedef enum {
index e3ada211aebe3b76a83e52f125bdac480309c8b0..f1b65717519a6adf28ffc89c55afb21feb140df4 100644 (file)
@@ -2393,6 +2393,7 @@ static HReg iselWordExpr_R_wrk(ISelEnv * env, IRExpr * e)
       return r_dst;
    }
 
+#if (__mips_isa_rev >= 6)
    case Iex_Qop: {
       HReg dst = newVRegI(env);
       HReg src1 = iselWordExpr_R(env, e->Iex.Qop.details->arg1);
@@ -2400,19 +2401,18 @@ static HReg iselWordExpr_R_wrk(ISelEnv * env, IRExpr * e)
       HReg src3 = iselWordExpr_R(env, e->Iex.Qop.details->arg3);
       HReg src4 = iselWordExpr_R(env, e->Iex.Qop.details->arg4);
       switch (e->Iex.Qop.details->op) {
-#if (__mips_isa_rev >= 6)
         case Iop_Rotx32:
           addInstr(env, MIPSInstr_Bitswap(Rotx32, dst, src1, src2, src3, src4));
           break;
         case Iop_Rotx64:
           addInstr(env, MIPSInstr_Bitswap(Rotx64, dst, src1, src2, src3, src4));
           break;
-#endif
         default:
           break;
       }
       return dst;
    }
+#endif
 
    default:
       break;