Index: src/mips64/macro-assembler-mips64.cc |
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc |
index 006f15b967db2067bedc0142bc3848ca6213e499..9dfca3dfc9f08cb8daea7e7b288a28fbc7be2da1 100644 |
--- a/src/mips64/macro-assembler-mips64.cc |
+++ b/src/mips64/macro-assembler-mips64.cc |
@@ -4273,34 +4273,8 @@ void MacroAssembler::GetMapConstructor(Register result, Register map, |
} |
-void MacroAssembler::TryGetFunctionPrototype(Register function, |
- Register result, |
- Register scratch, |
- Label* miss, |
- bool miss_on_bound_function) { |
- Label non_instance; |
- if (miss_on_bound_function) { |
- // Check that the receiver isn't a smi. |
- JumpIfSmi(function, miss); |
- |
- // Check that the function really is a function. Load map into result reg. |
- GetObjectType(function, result, scratch); |
- Branch(miss, ne, scratch, Operand(JS_FUNCTION_TYPE)); |
- |
- ld(scratch, |
- FieldMemOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
- lwu(scratch, |
- FieldMemOperand(scratch, SharedFunctionInfo::kCompilerHintsOffset)); |
- And(scratch, scratch, |
- Operand(1 << SharedFunctionInfo::kBoundFunction)); |
- Branch(miss, ne, scratch, Operand(zero_reg)); |
- |
- // Make sure that the function has an instance prototype. |
- lbu(scratch, FieldMemOperand(result, Map::kBitFieldOffset)); |
- And(scratch, scratch, Operand(1 << Map::kHasNonInstancePrototype)); |
- Branch(&non_instance, ne, scratch, Operand(zero_reg)); |
- } |
- |
+void MacroAssembler::TryGetFunctionPrototype(Register function, Register result, |
+ Register scratch, Label* miss) { |
// Get the prototype or initial map from the function. |
ld(result, |
FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
@@ -4319,15 +4293,6 @@ void MacroAssembler::TryGetFunctionPrototype(Register function, |
// Get the prototype from the initial map. |
ld(result, FieldMemOperand(result, Map::kPrototypeOffset)); |
- if (miss_on_bound_function) { |
- jmp(&done); |
- |
- // Non-instance prototype: Fetch prototype from constructor field |
- // in initial map. |
- bind(&non_instance); |
- GetMapConstructor(result, result, scratch, scratch); |
- } |
- |
// All done. |
bind(&done); |
} |
@@ -5750,94 +5715,6 @@ void MacroAssembler::CallCFunctionHelper(Register function, |
#undef BRANCH_ARGS_CHECK |
-void MacroAssembler::PatchRelocatedValue(Register li_location, |
- Register scratch, |
- Register new_value) { |
- lwu(scratch, MemOperand(li_location)); |
- // At this point scratch is a lui(at, ...) instruction. |
- if (emit_debug_code()) { |
- And(scratch, scratch, kOpcodeMask); |
- Check(eq, kTheInstructionToPatchShouldBeALui, |
- scratch, Operand(LUI)); |
- lwu(scratch, MemOperand(li_location)); |
- } |
- dsrl32(t9, new_value, 0); |
- Ins(scratch, t9, 0, kImm16Bits); |
- sw(scratch, MemOperand(li_location)); |
- |
- lwu(scratch, MemOperand(li_location, kInstrSize)); |
- // scratch is now ori(at, ...). |
- if (emit_debug_code()) { |
- And(scratch, scratch, kOpcodeMask); |
- Check(eq, kTheInstructionToPatchShouldBeAnOri, |
- scratch, Operand(ORI)); |
- lwu(scratch, MemOperand(li_location, kInstrSize)); |
- } |
- dsrl(t9, new_value, kImm16Bits); |
- Ins(scratch, t9, 0, kImm16Bits); |
- sw(scratch, MemOperand(li_location, kInstrSize)); |
- |
- lwu(scratch, MemOperand(li_location, kInstrSize * 3)); |
- // scratch is now ori(at, ...). |
- if (emit_debug_code()) { |
- And(scratch, scratch, kOpcodeMask); |
- Check(eq, kTheInstructionToPatchShouldBeAnOri, |
- scratch, Operand(ORI)); |
- lwu(scratch, MemOperand(li_location, kInstrSize * 3)); |
- } |
- |
- Ins(scratch, new_value, 0, kImm16Bits); |
- sw(scratch, MemOperand(li_location, kInstrSize * 3)); |
- |
- // Update the I-cache so the new lui and ori can be executed. |
- FlushICache(li_location, 4); |
-} |
- |
-void MacroAssembler::GetRelocatedValue(Register li_location, |
- Register value, |
- Register scratch) { |
- lwu(value, MemOperand(li_location)); |
- if (emit_debug_code()) { |
- And(value, value, kOpcodeMask); |
- Check(eq, kTheInstructionShouldBeALui, |
- value, Operand(LUI)); |
- lwu(value, MemOperand(li_location)); |
- } |
- |
- // value now holds a lui instruction. Extract the immediate. |
- andi(value, value, kImm16Mask); |
- dsll32(value, value, kImm16Bits); |
- |
- lwu(scratch, MemOperand(li_location, kInstrSize)); |
- if (emit_debug_code()) { |
- And(scratch, scratch, kOpcodeMask); |
- Check(eq, kTheInstructionShouldBeAnOri, |
- scratch, Operand(ORI)); |
- lwu(scratch, MemOperand(li_location, kInstrSize)); |
- } |
- // "scratch" now holds an ori instruction. Extract the immediate. |
- andi(scratch, scratch, kImm16Mask); |
- dsll32(scratch, scratch, 0); |
- |
- or_(value, value, scratch); |
- |
- lwu(scratch, MemOperand(li_location, kInstrSize * 3)); |
- if (emit_debug_code()) { |
- And(scratch, scratch, kOpcodeMask); |
- Check(eq, kTheInstructionShouldBeAnOri, |
- scratch, Operand(ORI)); |
- lwu(scratch, MemOperand(li_location, kInstrSize * 3)); |
- } |
- // "scratch" now holds an ori instruction. Extract the immediate. |
- andi(scratch, scratch, kImm16Mask); |
- dsll(scratch, scratch, kImm16Bits); |
- |
- or_(value, value, scratch); |
- // Sign extend extracted address. |
- dsra(value, value, kImm16Bits); |
-} |
- |
- |
void MacroAssembler::CheckPageFlag( |
Register object, |
Register scratch, |