< prev index next >

src/cpu/x86/vm/c1_LIRAssembler_x86.cpp

Print this page
rev 9088 : 8139040: Fix initializations before ShouldNotReachHere() etc. and enable -Wuninitialized on linux.
Reviewed-by: stuefe, coleenp

@@ -1665,12 +1665,12 @@
   Register dst = op->result_opr()->as_register();
   ciKlass* k = op->klass();
   Register Rtmp1 = noreg;
 
   // check if it needs to be profiled
-  ciMethodData* md;
-  ciProfileData* data;
+  ciMethodData* md = NULL;
+  ciProfileData* data = NULL;
 
   if (op->should_profile()) {
     ciMethod* method = op->profiled_method();
     assert(method != NULL, "Should have method");
     int bci = op->profiled_bci();

@@ -1825,12 +1825,12 @@
     Register Rtmp1 = op->tmp3()->as_register();
 
     CodeStub* stub = op->stub();
 
     // check if it needs to be profiled
-    ciMethodData* md;
-    ciProfileData* data;
+    ciMethodData* md = NULL;
+    ciProfileData* data = NULL;
 
     if (op->should_profile()) {
       ciMethod* method = op->profiled_method();
       assert(method != NULL, "Should have method");
       int bci = op->profiled_bci();

@@ -1993,11 +1993,11 @@
     Unimplemented();
   }
 }
 
 void LIR_Assembler::cmove(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2, LIR_Opr result, BasicType type) {
-  Assembler::Condition acond, ncond;
+  Assembler::Condition acond = Assembler::equal, ncond = Assembler::notEqual;
   switch (condition) {
     case lir_cond_equal:        acond = Assembler::equal;        ncond = Assembler::notEqual;     break;
     case lir_cond_notEqual:     acond = Assembler::notEqual;     ncond = Assembler::equal;        break;
     case lir_cond_less:         acond = Assembler::less;         ncond = Assembler::greaterEqual; break;
     case lir_cond_lessEqual:    acond = Assembler::lessEqual;    ncond = Assembler::greater;      break;

@@ -3184,11 +3184,11 @@
 
   assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
 
   int elem_size = type2aelembytes(basic_type);
   int shift_amount;
-  Address::ScaleFactor scale;
+  Address::ScaleFactor scale = Address::no_scale;
 
   switch (elem_size) {
     case 1 :
       shift_amount = 0;
       scale = Address::times_1;
< prev index next >