Commit d834db86 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Use weak cell to embed known map in CompareIC

Port 246a749a

BUG=v8:3663
LOG=N

Review URL: https://codereview.chromium.org/881533004

Cr-Commit-Position: refs/heads/master@{#26388}
parent 2379d34b
......@@ -3856,12 +3856,14 @@ void CompareICStub::GenerateObjects(MacroAssembler* masm) {
void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Label miss;
Handle<WeakCell> cell = Map::WeakCellForMap(known_map_);
__ And(a2, a1, a0);
__ JumpIfSmi(a2, &miss);
__ GetWeakValue(t0, cell);
__ lw(a2, FieldMemOperand(a0, HeapObject::kMapOffset));
__ lw(a3, FieldMemOperand(a1, HeapObject::kMapOffset));
__ Branch(&miss, ne, a2, Operand(known_map_));
__ Branch(&miss, ne, a3, Operand(known_map_));
__ Branch(&miss, ne, a2, Operand(t0));
__ Branch(&miss, ne, a3, Operand(t0));
__ Ret(USE_DELAY_SLOT);
__ subu(v0, a0, a1);
......
......@@ -3895,12 +3895,14 @@ void CompareICStub::GenerateObjects(MacroAssembler* masm) {
void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) {
Label miss;
Handle<WeakCell> cell = Map::WeakCellForMap(known_map_);
__ And(a2, a1, a0);
__ JumpIfSmi(a2, &miss);
__ GetWeakValue(a4, cell);
__ ld(a2, FieldMemOperand(a0, HeapObject::kMapOffset));
__ ld(a3, FieldMemOperand(a1, HeapObject::kMapOffset));
__ Branch(&miss, ne, a2, Operand(known_map_));
__ Branch(&miss, ne, a3, Operand(known_map_));
__ Branch(&miss, ne, a2, Operand(a4));
__ Branch(&miss, ne, a3, Operand(a4));
__ Ret(USE_DELAY_SLOT);
__ dsubu(v0, a0, a1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment