]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
dis_pc_relative, case 0x002: remove a path that cannot be taken. That
authorJulian Seward <jseward@acm.org>
Tue, 19 Jul 2016 05:32:50 +0000 (05:32 +0000)
committerJulian Seward <jseward@acm.org>
Tue, 19 Jul 2016 05:32:50 +0000 (05:32 +0000)
stops gcc -Og complaining.  It complains because at that relatively
low level of optimisation, its flow analysis is apparently too weak to
see that the removed path cannot be taken and so it complains
(wrongly) about a possibly uninitialised use of |result|.  No
functional change.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3226

VEX/priv/guest_ppc_toIR.c

index 2c8617a200a5cbc6b71caa85663970f3a8b9303a..2fa952be92d2058cc73fdc6dfb7c113c46e5ab22 100644 (file)
@@ -7603,13 +7603,11 @@ static Bool dis_pc_relative ( UInt theInstr )
 
          if ( ty == Ity_I32 ) {
             result = binop( Iop_Add32, nia, mkU32( D << 16 ) );
-
-         } else if ( ty == Ity_I64 ) {
-            result = binop( Iop_Add64, nia, mkU64( D << 16 ) );
-
          } else {
-            vex_printf("dis_pc_relative(unsupported type)\n");
+            vassert( ty == Ity_I64 );
+            result = binop( Iop_Add64, nia, mkU64( D << 16 ) );
          }
+
          putIReg( rT_addr, result);
       }
       break;