}
if (instr->HasResult() && instr->MustSignExtendResult(chunk())) {
+ // We sign extend the dehoisted key at the definition point when the pointer
+ // size is 64-bit. For x32 port, we sign extend the dehoisted key at the use
+ // points and MustSignExtendResult is always false. We can't use
+ // STATIC_ASSERT here as the pointer size is 32-bit for x32.
+ ASSERT(kPointerSize == kInt64Size);
if (instr->result()->IsRegister()) {
Register result_reg = ToRegister(instr->result());
__ movsxlq(result_reg, result_reg);
void LChunkBuilder::FindDehoistedKeyDefinitions(HValue* candidate) {
+ // We sign extend the dehoisted key at the definition point when the pointer
+ // size is 64-bit. For x32 port, we sign extend the dehoisted key at the use
+ // points and should not invoke this function. We can't use STATIC_ASSERT
+ // here as the pointer size is 32-bit for x32.
+ ASSERT(kPointerSize == kInt64Size);
BitVector* dehoisted_key_ids = chunk_->GetDehoistedKeyIds();
if (dehoisted_key_ids->Contains(candidate->id())) return;
dehoisted_key_ids->Add(candidate->id());
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
LInstruction* result = NULL;
- if (instr->IsDehoisted()) {
+ if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) {
FindDehoistedKeyDefinitions(instr->key());
}
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
ElementsKind elements_kind = instr->elements_kind();
- if (instr->IsDehoisted()) {
+ if ((kPointerSize == kInt64Size) && instr->IsDehoisted()) {
FindDehoistedKeyDefinitions(instr->key());
}