From d68296dd52b95861d603a860bf35974bb83c91e8 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Sun, 22 Aug 2010 18:24:51 +0000 Subject: [PATCH] Fix various compiler warnings and remove an unused function. git-svn-id: svn://svn.valgrind.org/vex/trunk@2017 --- VEX/priv/guest_arm_helpers.c | 19 +++---------------- VEX/priv/guest_arm_toIR.c | 4 ++++ VEX/priv/host_arm_isel.c | 25 ------------------------- 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/VEX/priv/guest_arm_helpers.c b/VEX/priv/guest_arm_helpers.c index af0cb72bcc..2adbb391c9 100644 --- a/VEX/priv/guest_arm_helpers.c +++ b/VEX/priv/guest_arm_helpers.c @@ -205,8 +205,9 @@ UInt armg_calculate_flag_v ( UInt cc_op, UInt cc_dep1, } /* CALLED FROM GENERATED CODE: CLEAN HELPER */ -/* Calculate the QC flag from the thunk components, in the lowest bit - of the word (bit 0). */ +/* Calculate the QC flag from the arguments, in the lowest bit + of the word (bit 0). Urr, having this out of line is bizarre. + Push back inline. */ UInt armg_calculate_flag_qc ( UInt resL1, UInt resL2, UInt resR1, UInt resR2 ) { @@ -216,20 +217,6 @@ UInt armg_calculate_flag_qc ( UInt resL1, UInt resL2, return 0; } -UInt armg_calculate_flag_idc ( UInt res1, UInt res2, - UInt res3, UInt res4 ) -{ - UInt exp1 = (res1 >> 23) & 0xff; - UInt exp2 = (res2 >> 23) & 0xff; - UInt exp3 = (res3 >> 23) & 0xff; - UInt exp4 = (res4 >> 23) & 0xff; - if ((exp1 == 0) || (exp2 == 0) || (exp3 == 0) || (exp3 == 0)) - return 1; - else - return 0; -} - - /* CALLED FROM GENERATED CODE: CLEAN HELPER */ /* Calculate the specified condition from the thunk components, in the lowest bit of the word (bit 0). */ diff --git a/VEX/priv/guest_arm_toIR.c b/VEX/priv/guest_arm_toIR.c index 5aa3c43735..e2adf09559 100644 --- a/VEX/priv/guest_arm_toIR.c +++ b/VEX/priv/guest_arm_toIR.c @@ -1186,6 +1186,8 @@ static IRExpr* mk_armg_calculate_flag_qc ( IRExpr* resL, IRExpr* resR, Bool Q ) return res; } +// FIXME: this is named wrongly .. looks like a sticky set of +// QC, not a write to it. static void setFlag_QC ( IRExpr* resL, IRExpr* resR, Bool Q, IRTemp condT ) { @@ -2570,6 +2572,8 @@ Bool dis_neon_vdup ( UInt theInstr, IRTemp condT ) op2 = Iop_GetElem32x2; index = imm4 >> 3; size = 32; + } else { + return False; // can this ever happen? } assign(res, unop(op, binop(op2, mkexpr(arg_m), mkU8(index)))); if (Q) { diff --git a/VEX/priv/host_arm_isel.c b/VEX/priv/host_arm_isel.c index d70391569f..28dfc684f9 100644 --- a/VEX/priv/host_arm_isel.c +++ b/VEX/priv/host_arm_isel.c @@ -182,36 +182,11 @@ static IRExpr* binop ( IROp op, IRExpr* a1, IRExpr* a2 ) return IRExpr_Binop(op, a1, a2); } -static IRExpr* triop ( IROp op, IRExpr* a1, IRExpr* a2, IRExpr* a3 ) -{ - return IRExpr_Triop(op, a1, a2, a3); -} - static IRExpr* bind ( Int binder ) { return IRExpr_Binder(binder); } -static IRExpr* mkU64 ( ULong i ) -{ - return IRExpr_Const(IRConst_U64(i)); -} - -static IRExpr* mkU32 ( UInt i ) -{ - return IRExpr_Const(IRConst_U32(i)); -} - -static IRExpr* mkU8 ( UInt i ) -{ - vassert(i < 256); - return IRExpr_Const(IRConst_U8( (UChar)i )); -} - -static IRExpr* mkU128 ( ULong i ) -{ - return binop(Iop_64HLtoV128, mkU64(i), mkU64(i)); -} /*---------------------------------------------------------*/ /*--- ISEL: Forward declarations ---*/ -- 2.47.2