|
From: <sv...@va...> - 2016-08-19 11:48:07
|
Author: sewardj
Date: Fri Aug 19 12:47:59 2016
New Revision: 3246
Log:
Add a dummy initialisation and a dummy path to avoid warnings with gcc -Og.
Neither are actually necessary, but gcc's flow analysis at -Og is weaker than
at -O or above and so it produces false warnings here. No functional change.
Modified:
trunk/priv/guest_ppc_toIR.c
trunk/priv/host_ppc_defs.c
Modified: trunk/priv/guest_ppc_toIR.c
==============================================================================
--- trunk/priv/guest_ppc_toIR.c (original)
+++ trunk/priv/guest_ppc_toIR.c Fri Aug 19 12:47:59 2016
@@ -3469,6 +3469,10 @@
tsrc = unop( Iop_64HIto32, mkexpr( src ) );
mask = mkU32( 0x7FF );
shift_by = mkU8( 52 - 32 );
+
+ } else {
+ /*NOTREACHED*/
+ vassert(0); // Stops gcc complaining at "-Og"
}
return binop( Iop_And32, binop( Iop_Shr32, tsrc, shift_by ), mask );
Modified: trunk/priv/host_ppc_defs.c
==============================================================================
--- trunk/priv/host_ppc_defs.c (original)
+++ trunk/priv/host_ppc_defs.c Fri Aug 19 12:47:59 2016
@@ -5242,7 +5242,7 @@
case Pin_AvUnary: {
UInt v_dst = vregEnc(i->Pin.AvUnary.dst);
UInt v_src = vregEnc(i->Pin.AvUnary.src);
- UInt opc2, opc3;
+ UInt opc2 = 0xFFFFFFFF, opc3 = 0xFFFFFFFF; /* invalid */
switch (i->Pin.AvUnary.op) {
case Pav_MOV: opc2 = 1156; break; // vor vD,vS,vS
|