Label next, next_loop, prepare_next;
Label load_smi_map, compare_map;
Label start_polymorphic;
+ ExternalReference virtual_register =
+ ExternalReference::vector_store_virtual_register(masm->isolate());
__ push(receiver);
__ push(vector);
__ pop(vector);
__ pop(receiver);
__ lea(handler, FieldOperand(handler, Code::kHeaderSize));
- __ xchg(handler, Operand(esp, 0));
- __ ret(0);
+ __ mov(Operand::StaticVariable(virtual_register), handler);
+ __ pop(handler); // Pop "value".
+ __ jmp(Operand::StaticVariable(virtual_register));
// Polymorphic, we have to loop from 2 to N
__ j(not_equal, &prepare_next);
__ mov(handler, FieldOperand(feedback, counter, times_half_pointer_size,
FixedArray::kHeaderSize + kPointerSize));
+ __ lea(handler, FieldOperand(handler, Code::kHeaderSize));
__ pop(key);
__ pop(vector);
__ pop(receiver);
- __ lea(handler, FieldOperand(handler, Code::kHeaderSize));
- __ xchg(handler, Operand(esp, 0));
- __ ret(0);
+ __ mov(Operand::StaticVariable(virtual_register), handler);
+ __ pop(handler); // Pop "value".
+ __ jmp(Operand::StaticVariable(virtual_register));
__ bind(&prepare_next);
__ add(counter, Immediate(Smi::FromInt(2)));
Label* miss) {
// The store ic value is on the stack.
DCHECK(weak_cell.is(VectorStoreICDescriptor::ValueRegister()));
+ ExternalReference virtual_register =
+ ExternalReference::vector_store_virtual_register(masm->isolate());
// feedback initially contains the feedback array
Label compare_smi_map;
FixedArray::kHeaderSize + kPointerSize));
__ lea(weak_cell, FieldOperand(weak_cell, Code::kHeaderSize));
// Put the store ic value back in it's register.
- __ xchg(weak_cell, Operand(esp, 0));
- // "return" to the handler.
- __ ret(0);
+ __ mov(Operand::StaticVariable(virtual_register), weak_cell);
+ __ pop(weak_cell); // Pop "value".
+ // jump to the handler.
+ __ jmp(Operand::StaticVariable(virtual_register));
// In microbenchmarks, it made sense to unroll this code so that the call to
// the handler is duplicated for a HeapObject receiver and a Smi receiver.
__ mov(weak_cell, FieldOperand(vector, slot, times_half_pointer_size,
FixedArray::kHeaderSize + kPointerSize));
__ lea(weak_cell, FieldOperand(weak_cell, Code::kHeaderSize));
- // Put the store ic value back in it's register.
- __ xchg(weak_cell, Operand(esp, 0));
- // "return" to the handler.
- __ ret(0);
+ __ mov(Operand::StaticVariable(virtual_register), weak_cell);
+ __ pop(weak_cell); // Pop "value".
+ // jump to the handler.
+ __ jmp(Operand::StaticVariable(virtual_register));
}
Label load_smi_map, compare_map;
Label transition_call;
Label pop_and_miss;
+ ExternalReference virtual_register =
+ ExternalReference::vector_store_virtual_register(masm->isolate());
__ push(receiver);
__ push(vector);
__ pop(vector);
__ pop(receiver);
__ lea(feedback, FieldOperand(feedback, Code::kHeaderSize));
- __ xchg(feedback, Operand(esp, 0));
- __ ret(0);
+ __ mov(Operand::StaticVariable(virtual_register), feedback);
+ __ pop(feedback); // Pop "value".
+ __ jmp(Operand::StaticVariable(virtual_register));
__ bind(&transition_call);
// Oh holy hell this will be tough.
ExternalReference key_offset(isolate->stub_cache()->key_reference(table));
ExternalReference value_offset(isolate->stub_cache()->value_reference(table));
ExternalReference map_offset(isolate->stub_cache()->map_reference(table));
+ ExternalReference virtual_register =
+ ExternalReference::vector_store_virtual_register(masm->isolate());
Label miss;
bool is_vector_store =
DCHECK(extra.is(VectorStoreICDescriptor::SlotRegister()));
__ add(extra, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ pop(vector);
- __ xchg(extra, Operand(esp, 0));
+ __ mov(Operand::StaticVariable(virtual_register), extra);
+ __ pop(extra); // Pop "slot".
// Jump to the first instruction in the code stub.
- __ ret(0);
+ __ jmp(Operand::StaticVariable(virtual_register));
} else {
__ pop(LoadWithVectorDescriptor::VectorRegister());
__ pop(LoadDescriptor::SlotRegister());
Register vector = VectorStoreICDescriptor::VectorRegister();
DCHECK(offset.is(VectorStoreICDescriptor::SlotRegister()));
__ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag));
+ __ mov(Operand::StaticVariable(virtual_register), offset);
__ pop(vector);
- __ xchg(offset, Operand(esp, 0));
- __ ret(0);
+ __ pop(offset); // Pop "slot".
+ __ jmp(Operand::StaticVariable(virtual_register));
} else {
__ add(offset, Immediate(Code::kHeaderSize - kHeapObjectTag));
__ jmp(offset);