]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
This is a fix to Bug 354797 which added the vbit test support for the
authorCarl Love <cel@us.ibm.com>
Wed, 25 Nov 2015 17:48:25 +0000 (17:48 +0000)
committerCarl Love <cel@us.ibm.com>
Wed, 25 Nov 2015 17:48:25 +0000 (17:48 +0000)
Power 8 instructions.

The patch for bug 354797 moved the declaration for rc outside of the
architecture #ifdef.  This results in an message about rc being unused
on architectures other then s390 and powerpc.  This commit eliminates
the issue by:

powerpc: move rc declaration into #ifdef for powerpc.
      Remove tab, put in missing break.

s390: remove rc declaration from inside case statement.  Put rc declaration
      before the switch statement but within the #ifdef for s390 so it will
      be declared for use in both case clauses.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15738

memcheck/tests/vbit-test/irops.c

index b45c326a6adcde0c7b4da0caa7c6e7857e170315..83fcd02f8e09151724a8513a068a976a0b0ba51c 100644 (file)
@@ -1092,7 +1092,6 @@ STATIC_ASSERT \
 irop_t *
 get_irop(IROp op)
 {
-   int rc;
    unsigned i;
 
    for (i = 0; i < sizeof irops / sizeof *irops; ++i) {
@@ -1100,6 +1099,8 @@ get_irop(IROp op)
       if (p->op == op) {
 #ifdef __s390x__
 #define S390X_FEATURES "../../../tests/s390x_features"
+        int rc;
+
          switch (op) {
          case Iop_I32StoD64:    // CDFTR
          case Iop_I32StoD128:   // CXFTR
@@ -1151,7 +1152,6 @@ get_irop(IROp op)
          case Iop_D128toF32:
          case Iop_D128toF64:
          case Iop_D128toF128: {
-            int rc;
             /* These IROps require the Perform Floating Point Operation
                facility */
             rc = system(S390X_FEATURES " s390x-pfpo");
@@ -1171,6 +1171,7 @@ get_irop(IROp op)
 #endif
 #ifdef __powerpc__
 #define  MIN_POWER_ISA  "../../../tests/min_power_isa"
+         int rc;
 
          switch (op) {
          case Iop_DivS64E:
@@ -1193,7 +1194,9 @@ get_irop(IROp op)
             if (rc > 2) {
                panic(" ERROR, min_power_isa() return code is invalid.\n");
             }
-                       }
+         }
+         break;
+
          case Iop_PwBitMtxXpose64x2:
          case Iop_Clz64x2:
          case Iop_BCDAdd: