Index: src/arm64/stub-cache-arm64.cc |
diff --git a/src/arm64/stub-cache-arm64.cc b/src/arm64/stub-cache-arm64.cc |
index d52493e1536cf3ac8541193365f24c7237141ec8..c3b48a5815e6037c390e5367a7ad254eed9b4d39 100644 |
--- a/src/arm64/stub-cache-arm64.cc |
+++ b/src/arm64/stub-cache-arm64.cc |
@@ -1276,10 +1276,11 @@ Register* StoreStubCompiler::registers() { |
Register* KeyedStoreStubCompiler::registers() { |
- // receiver, name, scratch1, scratch2, scratch3. |
+ // receiver, name, scratch1/map, scratch2, scratch3. |
Register receiver = KeyedStoreIC::ReceiverRegister(); |
Register name = KeyedStoreIC::NameRegister(); |
- static Register registers[] = { receiver, name, x3, x4, x5 }; |
+ Register map = KeyedStoreIC::MapRegister(); |
+ static Register registers[] = { receiver, name, map, x4, x5 }; |
return registers; |
} |
@@ -1370,7 +1371,10 @@ Handle<Code> BaseLoadStoreStubCompiler::CompilePolymorphicIC( |
Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; |
__ JumpIfSmi(receiver(), smi_target); |
+ // Polymorphic keyed stores may use the map register |
Register map_reg = scratch1(); |
+ ASSERT(kind() != Code::KEYED_STORE_IC || |
+ map_reg.is(KeyedStoreIC::MapRegister())); |
__ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); |
int receiver_count = types->length(); |
int number_of_handled_maps = 0; |