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);
}
}
}