8209380: ARM: cleanup maybe-uninitialized and reorder compiler warnings
authoravoitylov
Mon, 13 Aug 2018 12:24:25 +0200
changeset 51381 e354938b4073
parent 51380 e081161320e4
child 51382 0038e99f93bc
8209380: ARM: cleanup maybe-uninitialized and reorder compiler warnings Reviewed-by: dholmes, drwhite, tschatzl
src/hotspot/cpu/arm/assembler_arm_32.hpp
src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp
src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp
--- a/src/hotspot/cpu/arm/assembler_arm_32.hpp	Mon Aug 13 10:28:01 2018 +0200
+++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp	Mon Aug 13 12:24:25 2018 +0200
@@ -1083,6 +1083,7 @@
       break;
     default:
       ShouldNotReachHere();
+      return;
     }
     emit_int32(0xf << 28 | 0x1 << 25 | 0x1 << 23 | 0x1 << 4 |
               (imm8 >> 7) << 24 | ((imm8 & 0x70) >> 4) << 16 | (imm8 & 0xf) |
@@ -1113,6 +1114,7 @@
       break;
     default:
       ShouldNotReachHere();
+      return;
     }
     emit_int32(cond << 28 | 0x1D /* 0b11101 */ << 23 | 0xB /* 0b1011 */ << 8 | 0x1 << 4 |
               quad << 21 | b << 22 |  e << 5 | Rs->encoding() << 12 |
@@ -1143,6 +1145,7 @@
       break;
     default:
       ShouldNotReachHere();
+      return;
     }
     emit_int32(0xF /* 0b1111 */ << 28 | 0x3B /* 0b00111011 */ << 20 | 0x6 /* 0b110 */ << 9 |
                quad << 6 | imm4 << 16 |
--- a/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp	Mon Aug 13 10:28:01 2018 +0200
+++ b/src/hotspot/cpu/arm/c1_CodeStubs_arm.cpp	Mon Aug 13 12:24:25 2018 +0200
@@ -52,13 +52,13 @@
 
 
 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array)
-  : _throw_index_out_of_bounds_exception(false), _index(index), _array(array) {
+  : _index(index), _array(array), _throw_index_out_of_bounds_exception(false) {
   assert(info != NULL, "must have info");
   _info = new CodeEmitInfo(info);
 }
 
 RangeCheckStub::RangeCheckStub(CodeEmitInfo* info, LIR_Opr index)
-  : _throw_index_out_of_bounds_exception(true), _index(index), _array(NULL) {
+  : _index(index), _array(NULL), _throw_index_out_of_bounds_exception(true) {
   assert(info != NULL, "must have info");
   _info = new CodeEmitInfo(info);
 }
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Mon Aug 13 10:28:01 2018 +0200
+++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp	Mon Aug 13 12:24:25 2018 +0200
@@ -3086,7 +3086,7 @@
 
   Label ok;
   if (op->condition() != lir_cond_always) {
-    AsmCondition acond;
+    AsmCondition acond = al;
     switch (op->condition()) {
       case lir_cond_equal:        acond = eq; break;
       case lir_cond_notEqual:     acond = ne; break;
--- a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp	Mon Aug 13 10:28:01 2018 +0200
+++ b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp	Mon Aug 13 12:24:25 2018 +0200
@@ -733,6 +733,7 @@
 
     default:
       ShouldNotReachHere();
+      return;
   }
 #else
   switch (x->op()) {
@@ -757,6 +758,7 @@
         break;
       default:
         ShouldNotReachHere();
+        return;
       }
       LIR_Opr result = call_runtime(x->y(), x->x(), entry, x->type(), NULL);
       set_result(x, result);
@@ -824,7 +826,7 @@
       if (x->op() == Bytecodes::_irem) {
         out_reg = FrameMap::R0_opr;
         __ irem(left_arg->result(), right_arg->result(), out_reg, tmp, info);
-      } else if (x->op() == Bytecodes::_idiv) {
+      } else { // (x->op() == Bytecodes::_idiv)
         out_reg = FrameMap::R1_opr;
         __ idiv(left_arg->result(), right_arg->result(), out_reg, tmp, info);
       }