OSDN Git Service

Merge "Do not use kDiesAtEntry when inputs must be in specific reg."
authorNicolas Geoffray <ngeoffray@google.com>
Tue, 7 Oct 2014 11:29:10 +0000 (11:29 +0000)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Tue, 7 Oct 2014 11:29:11 +0000 (11:29 +0000)
1  2 
compiler/optimizing/code_generator_x86.cc

@@@ -1445,12 -1449,11 +1453,12 @@@ void LocationsBuilderX86::VisitArraySet
      locations->SetInAt(0, Location::RequiresRegister(), dies_at_entry);
      locations->SetInAt(
          1, Location::RegisterOrConstant(instruction->InputAt(1)), dies_at_entry);
-     if (value_type == Primitive::kPrimBoolean || value_type == Primitive::kPrimByte) {
+     if (is_byte_type) {
        // Ensure the value is in a byte register.
 -      locations->SetInAt(2, X86CpuLocation(EAX), dies_at_entry);
 +      locations->SetInAt(2, Location::ByteRegisterOrConstant(
 +          X86ManagedRegister::FromCpuRegister(EAX), instruction->InputAt(2)), dies_at_entry);
      } else {
 -      locations->SetInAt(2, Location::RequiresRegister(), dies_at_entry);
 +      locations->SetInAt(2, Location::RegisterOrConstant(instruction->InputAt(2)), dies_at_entry);
      }
    }
  }