Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index 5ee624f4b6fedd39b96b6c12634d05bd50e67ea1..7001c18f34ed129a6a5dc0d96b6b42c472071a0e 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -2068,7 +2068,14 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
- if (instr->access().IsExternalMemory() && instr->access().offset() == 0) { |
+ // Use the special mov rax, moffs64 encoding for external |
+ // memory accesses with 64-bit word-sized values. |
+ if (instr->access().IsExternalMemory() && |
+ instr->access().offset() == 0 && |
+ (instr->access().representation().IsSmi() || |
+ instr->access().representation().IsTagged() || |
+ instr->access().representation().IsHeapObject() || |
+ instr->access().representation().IsExternal())) { |
LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); |
return DefineFixed(new(zone()) LLoadNamedField(obj), rax); |
} |