Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 5371afcdfef0a9a7893ca818215b62064cec29d1..02a6898dfe7b7b488fc7cfab345ec9a537bd259a 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -312,42 +312,6 @@ void MacroAssembler::RecordWriteField( |
} |
-void MacroAssembler::RecordWriteArray( |
- Register object, |
- Register value, |
- Register index, |
- SaveFPRegsMode save_fp, |
- RememberedSetAction remembered_set_action, |
- SmiCheck smi_check, |
- PointersToHereCheck pointers_to_here_check_for_value) { |
- // First, check if a write barrier is even needed. The tests below |
- // catch stores of Smis. |
- Label done; |
- |
- // Skip barrier if writing a smi. |
- if (smi_check == INLINE_SMI_CHECK) { |
- JumpIfSmi(value, &done); |
- } |
- |
- // Array access: calculate the destination address. Index is not a smi. |
- Register dst = index; |
- leap(dst, Operand(object, index, times_pointer_size, |
- FixedArray::kHeaderSize - kHeapObjectTag)); |
- |
- RecordWrite(object, dst, value, save_fp, remembered_set_action, |
- OMIT_SMI_CHECK, pointers_to_here_check_for_value); |
- |
- bind(&done); |
- |
- // Clobber clobbered input registers when running with the debug-code flag |
- // turned on to provoke errors. |
- if (emit_debug_code()) { |
- Move(value, kZapValue, Assembler::RelocInfoNone()); |
- Move(index, kZapValue, Assembler::RelocInfoNone()); |
- } |
-} |
- |
- |
void MacroAssembler::RecordWriteForMap(Register object, |
Register map, |
Register dst, |
@@ -578,24 +542,6 @@ void MacroAssembler::Assert(Condition cc, BailoutReason reason) { |
} |
-void MacroAssembler::AssertFastElements(Register elements) { |
- if (emit_debug_code()) { |
- Label ok; |
- CompareRoot(FieldOperand(elements, HeapObject::kMapOffset), |
- Heap::kFixedArrayMapRootIndex); |
- j(equal, &ok, Label::kNear); |
- CompareRoot(FieldOperand(elements, HeapObject::kMapOffset), |
- Heap::kFixedDoubleArrayMapRootIndex); |
- j(equal, &ok, Label::kNear); |
- CompareRoot(FieldOperand(elements, HeapObject::kMapOffset), |
- Heap::kFixedCOWArrayMapRootIndex); |
- j(equal, &ok, Label::kNear); |
- Abort(kJSObjectWithFastElementsMapHasSlowElements); |
- bind(&ok); |
- } |
-} |
- |
- |
void MacroAssembler::Check(Condition cc, BailoutReason reason) { |
Label L; |
j(cc, &L, Label::kNear); |
@@ -620,18 +566,6 @@ void MacroAssembler::CheckStackAlignment() { |
} |
-void MacroAssembler::NegativeZeroTest(Register result, |
- Register op, |
- Label* then_label) { |
- Label ok; |
- testl(result, result); |
- j(not_zero, &ok, Label::kNear); |
- testl(op, op); |
- j(sign, then_label); |
- bind(&ok); |
-} |
- |
- |
void MacroAssembler::Abort(BailoutReason reason) { |
#ifdef DEBUG |
const char* msg = GetBailoutReason(reason); |
@@ -675,12 +609,6 @@ void MacroAssembler::TailCallStub(CodeStub* stub) { |
} |
-void MacroAssembler::StubReturn(int argc) { |
- DCHECK(argc >= 1 && generating_stub()); |
- ret((argc - 1) * kPointerSize); |
-} |
- |
- |
bool MacroAssembler::AllowThisStubCall(CodeStub* stub) { |
return has_frame_ || !stub->SometimesSetsUpAFrame(); |
} |
@@ -1350,17 +1278,6 @@ void MacroAssembler::Cmp(const Operand& dst, Smi* src) { |
} |
-void MacroAssembler::SmiCompareInteger32(const Operand& dst, Register src) { |
- if (SmiValuesAre32Bits()) { |
- cmpl(Operand(dst, kSmiShift / kBitsPerByte), src); |
- } else { |
- DCHECK(SmiValuesAre31Bits()); |
- SmiToInteger32(kScratchRegister, dst); |
- cmpl(kScratchRegister, src); |
- } |
-} |
- |
- |
void MacroAssembler::PositiveSmiTimesPowerOfTwoToInteger64(Register dst, |
Register src, |
int power) { |
@@ -1381,36 +1298,6 @@ void MacroAssembler::PositiveSmiTimesPowerOfTwoToInteger64(Register dst, |
} |
-void MacroAssembler::PositiveSmiDivPowerOfTwoToInteger32(Register dst, |
- Register src, |
- int power) { |
- DCHECK((0 <= power) && (power < 32)); |
- if (dst.is(src)) { |
- shrp(dst, Immediate(power + kSmiShift)); |
- } else { |
- UNIMPLEMENTED(); // Not used. |
- } |
-} |
- |
- |
-void MacroAssembler::SmiOrIfSmis(Register dst, Register src1, Register src2, |
- Label* on_not_smis, |
- Label::Distance near_jump) { |
- if (dst.is(src1) || dst.is(src2)) { |
- DCHECK(!src1.is(kScratchRegister)); |
- DCHECK(!src2.is(kScratchRegister)); |
- movp(kScratchRegister, src1); |
- orp(kScratchRegister, src2); |
- JumpIfNotSmi(kScratchRegister, on_not_smis, near_jump); |
- movp(dst, kScratchRegister); |
- } else { |
- movp(dst, src1); |
- orp(dst, src2); |
- JumpIfNotSmi(dst, on_not_smis, near_jump); |
- } |
-} |
- |
- |
Condition MacroAssembler::CheckSmi(Register src) { |
STATIC_ASSERT(kSmiTag == 0); |
testb(src, Immediate(kSmiTagMask)); |
@@ -1511,27 +1398,6 @@ Condition MacroAssembler::CheckUInteger32ValidSmiValue(Register src) { |
} |
-void MacroAssembler::CheckSmiToIndicator(Register dst, Register src) { |
- if (dst.is(src)) { |
- andl(dst, Immediate(kSmiTagMask)); |
- } else { |
- movl(dst, Immediate(kSmiTagMask)); |
- andl(dst, src); |
- } |
-} |
- |
- |
-void MacroAssembler::CheckSmiToIndicator(Register dst, const Operand& src) { |
- if (!(src.AddressUsesRegister(dst))) { |
- movl(dst, Immediate(kSmiTagMask)); |
- andl(dst, src); |
- } else { |
- movl(dst, src); |
- andl(dst, Immediate(kSmiTagMask)); |
- } |
-} |
- |
- |
void MacroAssembler::JumpIfValidSmiValue(Register src, |
Label* on_valid, |
Label::Distance near_jump) { |
@@ -3054,24 +2920,6 @@ void MacroAssembler::MoveHeapObject(Register result, |
} |
-void MacroAssembler::LoadGlobalCell(Register dst, Handle<Cell> cell) { |
- if (dst.is(rax)) { |
- AllowDeferredHandleDereference embedding_raw_address; |
- load_rax(cell.location(), RelocInfo::CELL); |
- } else { |
- Move(dst, cell, RelocInfo::CELL); |
- movp(dst, Operand(dst, 0)); |
- } |
-} |
- |
- |
-void MacroAssembler::CmpWeakValue(Register value, Handle<WeakCell> cell, |
- Register scratch) { |
- Move(scratch, cell, RelocInfo::EMBEDDED_OBJECT); |
- cmpp(value, FieldOperand(scratch, WeakCell::kValueOffset)); |
-} |
- |
- |
void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) { |
Move(value, cell, RelocInfo::EMBEDDED_OBJECT); |
movp(value, FieldOperand(value, WeakCell::kValueOffset)); |
@@ -3213,22 +3061,6 @@ void MacroAssembler::LoadSharedFunctionInfoSpecialField(Register dst, |
} |
-void MacroAssembler::TestBitSharedFunctionInfoSpecialField(Register base, |
- int offset, |
- int bits) { |
- DCHECK(offset > SharedFunctionInfo::kLengthOffset && |
- offset <= SharedFunctionInfo::kSize && |
- (((offset - SharedFunctionInfo::kLengthOffset) / kIntSize) % 2 == 1)); |
- if (kPointerSize == kInt32Size) { |
- // On x32, this field is represented by SMI. |
- bits += kSmiShift; |
- } |
- int byte_offset = bits / kBitsPerByte; |
- int bit_in_byte = bits & (kBitsPerByte - 1); |
- testb(FieldOperand(base, offset + byte_offset), Immediate(1 << bit_in_byte)); |
-} |
- |
- |
void MacroAssembler::Jump(ExternalReference ext) { |
LoadAddress(kScratchRegister, ext); |
jmp(kScratchRegister); |
@@ -3564,11 +3396,6 @@ void MacroAssembler::Popad() { |
} |
-void MacroAssembler::Dropad() { |
- addp(rsp, Immediate(kNumSafepointRegisters * kPointerSize)); |
-} |
- |
- |
// Order general registers are pushed by Pushad: |
// rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r14, r15. |
const int |
@@ -3843,43 +3670,6 @@ void MacroAssembler::LoadAccessor(Register dst, Register holder, |
} |
-void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1, |
- Register scratch2, Handle<WeakCell> cell, |
- Handle<Code> success, |
- SmiCheckType smi_check_type) { |
- Label fail; |
- if (smi_check_type == DO_SMI_CHECK) { |
- JumpIfSmi(obj, &fail); |
- } |
- movq(scratch1, FieldOperand(obj, HeapObject::kMapOffset)); |
- CmpWeakValue(scratch1, cell, scratch2); |
- j(equal, success, RelocInfo::CODE_TARGET); |
- bind(&fail); |
-} |
- |
- |
-void MacroAssembler::AssertNumber(Register object) { |
- if (emit_debug_code()) { |
- Label ok; |
- Condition is_smi = CheckSmi(object); |
- j(is_smi, &ok, Label::kNear); |
- Cmp(FieldOperand(object, HeapObject::kMapOffset), |
- isolate()->factory()->heap_number_map()); |
- Check(equal, kOperandIsNotANumber); |
- bind(&ok); |
- } |
-} |
- |
-void MacroAssembler::AssertNotNumber(Register object) { |
- if (emit_debug_code()) { |
- Condition is_smi = CheckSmi(object); |
- Check(NegateCondition(is_smi), kOperandIsANumber); |
- Cmp(FieldOperand(object, HeapObject::kMapOffset), |
- isolate()->factory()->heap_number_map()); |
- Check(not_equal, kOperandIsANumber); |
- } |
-} |
- |
void MacroAssembler::AssertNotSmi(Register object) { |
if (emit_debug_code()) { |
Condition is_smi = CheckSmi(object); |
@@ -3914,32 +3704,6 @@ void MacroAssembler::AssertZeroExtended(Register int32_register) { |
} |
-void MacroAssembler::AssertString(Register object) { |
- if (emit_debug_code()) { |
- testb(object, Immediate(kSmiTagMask)); |
- Check(not_equal, kOperandIsASmiAndNotAString); |
- Push(object); |
- movp(object, FieldOperand(object, HeapObject::kMapOffset)); |
- CmpInstanceType(object, FIRST_NONSTRING_TYPE); |
- Pop(object); |
- Check(below, kOperandIsNotAString); |
- } |
-} |
- |
- |
-void MacroAssembler::AssertName(Register object) { |
- if (emit_debug_code()) { |
- testb(object, Immediate(kSmiTagMask)); |
- Check(not_equal, kOperandIsASmiAndNotAName); |
- Push(object); |
- movp(object, FieldOperand(object, HeapObject::kMapOffset)); |
- CmpInstanceType(object, LAST_NAME_TYPE); |
- Pop(object); |
- Check(below_equal, kOperandIsNotAName); |
- } |
-} |
- |
- |
void MacroAssembler::AssertFunction(Register object) { |
if (emit_debug_code()) { |
testb(object, Immediate(kSmiTagMask)); |
@@ -3974,19 +3738,6 @@ void MacroAssembler::AssertGeneratorObject(Register object) { |
} |
} |
-void MacroAssembler::AssertReceiver(Register object) { |
- if (emit_debug_code()) { |
- testb(object, Immediate(kSmiTagMask)); |
- Check(not_equal, kOperandIsASmiAndNotAReceiver); |
- Push(object); |
- STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); |
- CmpObjectType(object, FIRST_JS_RECEIVER_TYPE, object); |
- Pop(object); |
- Check(above_equal, kOperandIsNotAReceiver); |
- } |
-} |
- |
- |
void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
if (emit_debug_code()) { |
Label done_checking; |
@@ -4000,19 +3751,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { |
} |
-void MacroAssembler::AssertRootValue(Register src, |
- Heap::RootListIndex root_value_index, |
- BailoutReason reason) { |
- if (emit_debug_code()) { |
- DCHECK(!src.is(kScratchRegister)); |
- LoadRoot(kScratchRegister, root_value_index); |
- cmpp(src, kScratchRegister); |
- Check(equal, reason); |
- } |
-} |
- |
- |
- |
Condition MacroAssembler::IsObjectStringType(Register heap_object, |
Register map, |
Register instance_type) { |
@@ -4024,16 +3762,6 @@ Condition MacroAssembler::IsObjectStringType(Register heap_object, |
} |
-Condition MacroAssembler::IsObjectNameType(Register heap_object, |
- Register map, |
- Register instance_type) { |
- movp(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
- movzxbl(instance_type, FieldOperand(map, Map::kInstanceTypeOffset)); |
- cmpb(instance_type, Immediate(static_cast<uint8_t>(LAST_NAME_TYPE))); |
- return below_equal; |
-} |
- |
- |
void MacroAssembler::SetCounter(StatsCounter* counter, int value) { |
if (FLAG_native_code_counters && counter->Enabled()) { |
Operand counter_operand = ExternalOperand(ExternalReference(counter)); |