hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
changeset 202 dc13bf0e5d5d
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
equal deleted inserted replaced
201:7893b7ce2d8d 202:dc13bf0e5d5d
   544   __ jcc(Assembler::zero, noLoop);
   544   __ jcc(Assembler::zero, noLoop);
   545 
   545 
   546   // set rsi.edi to the end of the arrays (arrays have same length)
   546   // set rsi.edi to the end of the arrays (arrays have same length)
   547   // negate the index
   547   // negate the index
   548 
   548 
   549   __ leal(rsi, Address(rsi, rax, Address::times_2, type2aelembytes[T_CHAR]));
   549   __ leal(rsi, Address(rsi, rax, Address::times_2, type2aelembytes(T_CHAR)));
   550   __ leal(rdi, Address(rdi, rax, Address::times_2, type2aelembytes[T_CHAR]));
   550   __ leal(rdi, Address(rdi, rax, Address::times_2, type2aelembytes(T_CHAR)));
   551   __ negl(rax);
   551   __ negl(rax);
   552 
   552 
   553   // compare the strings in a loop
   553   // compare the strings in a loop
   554 
   554 
   555   Label loop;
   555   Label loop;
  1230 }
  1230 }
  1231 
  1231 
  1232 
  1232 
  1233 NEEDS_CLEANUP; // This could be static?
  1233 NEEDS_CLEANUP; // This could be static?
  1234 Address::ScaleFactor LIR_Assembler::array_element_size(BasicType type) const {
  1234 Address::ScaleFactor LIR_Assembler::array_element_size(BasicType type) const {
  1235   int elem_size = type2aelembytes[type];
  1235   int elem_size = type2aelembytes(type);
  1236   switch (elem_size) {
  1236   switch (elem_size) {
  1237     case 1: return Address::times_1;
  1237     case 1: return Address::times_1;
  1238     case 2: return Address::times_2;
  1238     case 2: return Address::times_2;
  1239     case 4: return Address::times_4;
  1239     case 4: return Address::times_4;
  1240     case 8: return Address::times_8;
  1240     case 8: return Address::times_8;
  2737     return;
  2737     return;
  2738   }
  2738   }
  2739 
  2739 
  2740   assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
  2740   assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
  2741 
  2741 
  2742   int elem_size = type2aelembytes[basic_type];
  2742   int elem_size = type2aelembytes(basic_type);
  2743   int shift_amount;
  2743   int shift_amount;
  2744   Address::ScaleFactor scale;
  2744   Address::ScaleFactor scale;
  2745 
  2745 
  2746   switch (elem_size) {
  2746   switch (elem_size) {
  2747     case 1 :
  2747     case 1 :