[cleanup] Remove some obsolete macro-assembler decls and defs.

R=jarin@chromium.org

Bug: 
Change-Id: I97c2d73ea4ac83802421be85da327e214939d5a1
Reviewed-on: https://chromium-review.googlesource.com/610006
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47341}
This commit is contained in:
Georg Neis 2017-08-14 19:53:42 +02:00 committed by Commit Bot
parent 5fba86ced5
commit 6917f9a5b8
25 changed files with 7 additions and 846 deletions

View File

@ -9,9 +9,6 @@ namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one-byte strings and returns result in r0.

View File

@ -220,14 +220,6 @@ void TurboAssembler::Push(Smi* smi) {
push(scratch);
}
void MacroAssembler::PushObject(Handle<Object> handle) {
if (handle->IsHeapObject()) {
Push(Handle<HeapObject>::cast(handle));
} else {
Push(Smi::cast(*handle));
}
}
void TurboAssembler::Move(Register dst, Smi* smi) { mov(dst, Operand(smi)); }
void TurboAssembler::Move(Register dst, Handle<HeapObject> value) {
@ -353,29 +345,6 @@ void MacroAssembler::Sbfx(Register dst, Register src1, int lsb, int width,
}
void MacroAssembler::Bfi(Register dst,
Register src,
Register scratch,
int lsb,
int width,
Condition cond) {
DCHECK(0 <= lsb && lsb < 32);
DCHECK(0 <= width && width < 32);
DCHECK(lsb + width < 32);
DCHECK(!scratch.is(dst));
if (width == 0) return;
if (!CpuFeatures::IsSupported(ARMv7) || predictable_code_size()) {
int mask = (1 << (width + lsb)) - 1 - ((1 << lsb) - 1);
bic(dst, dst, Operand(mask));
and_(scratch, src, Operand((1 << width) - 1));
mov(scratch, Operand(scratch, LSL, lsb));
orr(dst, dst, scratch);
} else {
CpuFeatureScope scope(this, ARMv7);
bfi(dst, src, lsb, width, cond);
}
}
void TurboAssembler::Bfc(Register dst, Register src, int lsb, int width,
Condition cond) {
DCHECK(lsb < 32);
@ -734,20 +703,6 @@ int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
return reg_code;
}
MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) {
return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
}
MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) {
// Number of d-regs not known at snapshot time.
DCHECK(!serializer_enabled());
// General purpose registers are pushed last on the stack.
const RegisterConfiguration* config = RegisterConfiguration::Default();
int doubles_size = config->num_allocatable_double_registers() * kDoubleSize;
int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize;
return MemOperand(sp, doubles_size + register_offset);
}
void TurboAssembler::VFPCanonicalizeNaN(const DwVfpRegister dst,
const DwVfpRegister src,
const Condition cond) {
@ -2102,16 +2057,6 @@ void MacroAssembler::SmiTag(Register dst, Register src, SBit s) {
add(dst, src, Operand(src), s);
}
void MacroAssembler::JumpIfNotBothSmi(Register reg1,
Register reg2,
Label* on_not_both_smi) {
STATIC_ASSERT(kSmiTag == 0);
tst(reg1, Operand(kSmiTagMask));
tst(reg2, Operand(kSmiTagMask), eq);
b(ne, on_not_both_smi);
}
void MacroAssembler::UntagAndJumpIfSmi(
Register dst, Register src, Label* smi_case) {
STATIC_ASSERT(kSmiTag == 0);
@ -2236,13 +2181,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
if (emit_debug_code()) {
CompareRoot(reg, index);
Check(eq, kHeapNumberMapRegisterClobbered);
}
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
@ -2257,19 +2195,6 @@ void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
scratch2, failure);
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register first,
Register second,
Register scratch1,
Register scratch2,
Label* failure) {
// Check that neither is a smi.
and_(scratch1, first, Operand(second));
JumpIfSmi(scratch1, failure);
JumpIfNonSmisNotBothSequentialOneByteStrings(first, second, scratch1,
scratch2, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Register reg,
Label* not_unique_name) {
STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);

View File

@ -575,13 +575,6 @@ class MacroAssembler : public TurboAssembler {
Condition cond = al);
void Sbfx(Register dst, Register src, int lsb, int width,
Condition cond = al);
// The scratch register is not used for ARMv7.
// scratch can be the same register as src (in which case it is trashed), but
// not the same as dst.
void Bfi(Register dst, Register src, Register scratch, int lsb, int width,
Condition cond = al);
void PushObject(Handle<Object> object);
void Load(Register dst, const MemOperand& src, Representation r);
void Store(Register src, const MemOperand& dst, Representation r);
@ -589,9 +582,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// GC Support
void IncrementalMarkingRecordWriteHelper(Register object, Register value,
Register address);
enum RememberedSetFinalAction { kReturnAtEnd, kFallThroughAtEnd };
// Record in the remembered set the fact that we have a pointer to new space
@ -925,8 +915,6 @@ class MacroAssembler : public TurboAssembler {
void SmiTst(Register value);
// Jump if either of the registers contain a non-smi.
void JumpIfNotSmi(Register value, Label* not_smi_label);
// Jump if either of the registers contain a non-smi.
void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi);
// Jump if either of the registers contain a smi.
void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi);
@ -952,10 +940,6 @@ class MacroAssembler : public TurboAssembler {
// via --debug-code.
void AssertUndefinedOrAllocationSite(Register object, Register scratch);
// Abort execution if reg is not the root value with the given index,
// enabled via --debug-code.
void AssertIsRoot(Register reg, Heap::RootListIndex index);
// ---------------------------------------------------------------------------
// String utilities
@ -967,13 +951,6 @@ class MacroAssembler : public TurboAssembler {
Register scratch2,
Label* failure);
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not.
void JumpIfNotBothSequentialOneByteStrings(Register first, Register second,
Register scratch1,
Register scratch2,
Label* not_flat_one_byte_strings);
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
@ -1020,8 +997,6 @@ class MacroAssembler : public TurboAssembler {
// Compute memory operands for safepoint stack slots.
static int SafepointRegisterStackIndex(int reg_code);
MemOperand SafepointRegisterSlot(Register reg);
MemOperand SafepointRegistersAndDoublesSlot(Register reg);
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.

View File

@ -9,9 +9,6 @@ namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one-byte strings and returns result in x0.

View File

@ -1258,14 +1258,6 @@ void TurboAssembler::Push(Smi* smi) {
Push(tmp);
}
void MacroAssembler::PushObject(Handle<Object> handle) {
if (handle->IsHeapObject()) {
Push(Handle<HeapObject>::cast(handle));
} else {
Push(Smi::cast(*handle));
}
}
void TurboAssembler::Claim(int64_t count, uint64_t unit_size) {
DCHECK(count >= 0);
uint64_t size = count * unit_size;

View File

@ -3011,10 +3011,6 @@ void MacroAssembler::PushSafepointRegisters() {
PushXRegList(kSafepointSavedRegisters);
}
void MacroAssembler::StoreToSafepointRegisterSlot(Register src, Register dst) {
Poke(src, SafepointRegisterStackIndex(dst.code()) * kPointerSize);
}
int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
// Make sure the safepoint registers list is what we expect.
DCHECK(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff);

View File

@ -1597,8 +1597,6 @@ class MacroAssembler : public TurboAssembler {
void PushMultipleTimes(CPURegister src, Register count);
void PushMultipleTimes(CPURegister src, int count);
inline void PushObject(Handle<Object> handle);
// Sometimes callers need to push or pop multiple registers in a way that is
// difficult to structure efficiently for fixed Push or Pop calls. This scope
// allows push requests to be queued up, then flushed at once. The
@ -2133,9 +2131,6 @@ class MacroAssembler : public TurboAssembler {
void PushSafepointRegisters();
void PopSafepointRegisters();
// Store value in register src in the safepoint stack slot for register dst.
void StoreToSafepointRegisterSlot(Register src, Register dst);
void CheckPageFlag(const Register& object, const Register& scratch, int mask,
Condition cc, Label* condition_met);

View File

@ -9,11 +9,6 @@ namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm,
bool construct_call,
Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one byte strings and returns result in eax.

View File

@ -82,7 +82,12 @@ void MacroAssembler::CompareRoot(const Operand& with,
void MacroAssembler::PushRoot(Heap::RootListIndex index) {
DCHECK(isolate()->heap()->RootCanBeTreatedAsConstant(index));
PushObject(isolate()->heap()->root_handle(index));
Handle<Object> object = isolate()->heap()->root_handle(index);
if (object->IsHeapObject()) {
Push(Handle<HeapObject>::cast(object));
} else {
Push(Smi::cast(*object));
}
}
#define REG(Name) \
@ -1343,10 +1348,6 @@ void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
}
}
Operand MacroAssembler::SafepointRegisterSlot(Register reg) {
return Operand(esp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
}
int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
// The registers are pushed starting with the lowest encoding,
// which means that lowest encodings are furthest away from
@ -1355,18 +1356,6 @@ int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
return kNumSafepointRegisters - reg_code - 1;
}
void MacroAssembler::CmpHeapObject(Register reg, Handle<HeapObject> object) {
cmp(reg, object);
}
void MacroAssembler::PushObject(Handle<Object> object) {
if (object->IsHeapObject()) {
Push(Handle<HeapObject>::cast(object));
} else {
Push(Smi::cast(*object));
}
}
void MacroAssembler::GetWeakValue(Register value, Handle<WeakCell> cell) {
mov(value, cell);
mov(value, FieldOperand(value, WeakCell::kValueOffset));
@ -1777,17 +1766,6 @@ void MacroAssembler::LoadAccessor(Register dst, Register holder,
mov(dst, FieldOperand(dst, offset));
}
void MacroAssembler::LoadPowerOf2(XMMRegister dst,
Register scratch,
int power) {
DCHECK(is_uintn(power + HeapNumber::kExponentBias,
HeapNumber::kExponentBits));
mov(scratch, Immediate(power + HeapNumber::kExponentBias));
movd(dst, scratch);
psllq(dst, HeapNumber::kMantissaBits);
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register object1,
Register object2,
Register scratch1,
@ -1821,7 +1799,6 @@ void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register object1,
j(not_equal, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Operand operand,
Label* not_unique_name,
Label::Distance distance) {

View File

@ -476,13 +476,10 @@ class MacroAssembler : public TurboAssembler {
void PushSafepointRegisters() { pushad(); }
void PopSafepointRegisters() { popad(); }
void CmpHeapObject(Register reg, Handle<HeapObject> object);
void PushObject(Handle<Object> object);
void CmpObject(Register reg, Handle<Object> object) {
AllowDeferredHandleDereference heap_object_check;
if (object->IsHeapObject()) {
CmpHeapObject(reg, Handle<HeapObject>::cast(object));
cmp(reg, Handle<HeapObject>::cast(object));
} else {
cmp(reg, Immediate(Smi::cast(*object)));
}
@ -585,8 +582,6 @@ class MacroAssembler : public TurboAssembler {
and_(reg, Immediate(mask));
}
void LoadPowerOf2(XMMRegister dst, Register scratch, int power);
// Abort execution if argument is not a smi, enabled via --debug-code.
void AssertSmi(Register object);
@ -732,7 +727,6 @@ class MacroAssembler : public TurboAssembler {
void JumpIfNotUniqueNameInstanceType(Operand operand, Label* not_unique_name,
Label::Distance distance = Label::kFar);
static int SafepointRegisterStackIndex(Register reg) {
return SafepointRegisterStackIndex(reg.code());
}
@ -772,7 +766,6 @@ class MacroAssembler : public TurboAssembler {
Register mask_reg);
// Compute memory operands for safepoint stack slots.
Operand SafepointRegisterSlot(Register reg);
static int SafepointRegisterStackIndex(int reg_code);
// Needs access to SafepointRegisterStackIndex for compiled frame

View File

@ -9,9 +9,6 @@ namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one-byte strings and returns result in v0.

View File

@ -85,20 +85,6 @@ int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
}
MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) {
return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
}
MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) {
UNIMPLEMENTED_MIPS();
// General purpose registers are pushed last on the stack.
int doubles_size = DoubleRegister::kMaxNumRegisters * kDoubleSize;
int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize;
return MemOperand(sp, doubles_size + register_offset);
}
void MacroAssembler::InNewSpace(Register object,
Register scratch,
Condition cc,
@ -1279,19 +1265,6 @@ void TurboAssembler::MultiPush(RegList regs) {
}
void MacroAssembler::MultiPushReversed(RegList regs) {
int16_t num_to_push = base::bits::CountPopulation(regs);
int16_t stack_offset = num_to_push * kPointerSize;
Subu(sp, sp, Operand(stack_offset));
for (int16_t i = 0; i < kNumRegisters; i++) {
if ((regs & (1 << i)) != 0) {
stack_offset -= kPointerSize;
sw(ToRegister(i), MemOperand(sp, stack_offset));
}
}
}
void TurboAssembler::MultiPop(RegList regs) {
int16_t stack_offset = 0;
@ -1305,18 +1278,6 @@ void TurboAssembler::MultiPop(RegList regs) {
}
void MacroAssembler::MultiPopReversed(RegList regs) {
int16_t stack_offset = 0;
for (int16_t i = kNumRegisters - 1; i >= 0; i--) {
if ((regs & (1 << i)) != 0) {
lw(ToRegister(i), MemOperand(sp, stack_offset));
stack_offset += kPointerSize;
}
}
addiu(sp, sp, stack_offset);
}
void TurboAssembler::MultiPushFPU(RegList regs) {
int16_t num_to_push = base::bits::CountPopulation(regs);
int16_t stack_offset = num_to_push * kDoubleSize;
@ -1331,19 +1292,6 @@ void TurboAssembler::MultiPushFPU(RegList regs) {
}
void MacroAssembler::MultiPushReversedFPU(RegList regs) {
int16_t num_to_push = base::bits::CountPopulation(regs);
int16_t stack_offset = num_to_push * kDoubleSize;
Subu(sp, sp, Operand(stack_offset));
for (int16_t i = 0; i < kNumRegisters; i++) {
if ((regs & (1 << i)) != 0) {
stack_offset -= kDoubleSize;
Sdc1(FPURegister::from_code(i), MemOperand(sp, stack_offset));
}
}
}
void TurboAssembler::MultiPopFPU(RegList regs) {
int16_t stack_offset = 0;
@ -1357,18 +1305,6 @@ void TurboAssembler::MultiPopFPU(RegList regs) {
}
void MacroAssembler::MultiPopReversedFPU(RegList regs) {
int16_t stack_offset = 0;
for (int16_t i = kNumRegisters - 1; i >= 0; i--) {
if ((regs & (1 << i)) != 0) {
Ldc1(FPURegister::from_code(i), MemOperand(sp, stack_offset));
stack_offset += kDoubleSize;
}
}
addiu(sp, sp, stack_offset);
}
void TurboAssembler::AddPair(Register dst_low, Register dst_high,
Register left_low, Register left_high,
Register right_low, Register right_high) {
@ -3764,14 +3700,6 @@ void TurboAssembler::Push(Smi* smi) {
push(scratch);
}
void MacroAssembler::PushObject(Handle<Object> handle) {
if (handle->IsHeapObject()) {
Push(Handle<HeapObject>::cast(handle));
} else {
Push(Smi::cast(*handle));
}
}
void MacroAssembler::MaybeDropFrames() {
// Check whether we need to drop frames to restart a function on the stack.
ExternalReference restart_fp =
@ -5053,18 +4981,6 @@ void MacroAssembler::JumpIfNotSmi(Register value,
}
void MacroAssembler::JumpIfNotBothSmi(Register reg1,
Register reg2,
Label* on_not_both_smi) {
STATIC_ASSERT(kSmiTag == 0);
DCHECK_EQ(1, kSmiTagMask);
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
or_(scratch, reg1, reg2);
JumpIfNotSmi(scratch, on_not_both_smi);
}
void MacroAssembler::JumpIfEitherSmi(Register reg1,
Register reg2,
Label* on_either_smi) {
@ -5165,27 +5081,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
if (emit_debug_code()) {
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
DCHECK(!reg.is(scratch));
LoadRoot(scratch, index);
Check(eq, kHeapNumberMapRegisterClobbered, reg, Operand(scratch));
}
}
void MacroAssembler::JumpIfNotHeapNumber(Register object,
Register heap_number_map,
Register scratch,
Label* on_not_heap_number) {
lw(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
Branch(on_not_heap_number, ne, scratch, Operand(heap_number_map));
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
@ -5201,19 +5096,6 @@ void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register first,
Register second,
Register scratch1,
Register scratch2,
Label* failure) {
// Check that neither is a smi.
STATIC_ASSERT(kSmiTag == 0);
And(scratch1, first, Operand(second));
JumpIfSmi(scratch1, failure);
JumpIfNonSmisNotBothSequentialOneByteStrings(first, second, scratch1,
scratch2, failure);
}
void TurboAssembler::Float32Max(FPURegister dst, FPURegister src1,
FPURegister src2, Label* out_of_line) {
if (src1.is(src2)) {

View File

@ -1023,14 +1023,6 @@ class MacroAssembler : public TurboAssembler {
void Pref(int32_t hint, const MemOperand& rs);
void PushObject(Handle<Object> handle);
void MultiPushReversed(RegList regs);
void MultiPushReversedFPU(RegList regs);
void MultiPopReversed(RegList regs);
void MultiPopReversedFPU(RegList regs);
// Push and pop the registers that can hold pointers, as defined by the
// RegList constant kSafepointSavedRegisters.
void PushSafepointRegisters();
@ -1192,8 +1184,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
#undef COND_ARGS
void CallJSExitStub(CodeStub* stub);
// Call a runtime routine.
void CallRuntime(const Runtime::Function* f, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs,
@ -1222,12 +1212,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
BranchDelaySlot bd = PROTECT,
bool builtin_exit_frame = false);
struct Unresolved {
int pc;
uint32_t flags; // See Bootstrapper::FixupFlags decoders/encoders.
const char* name;
};
// -------------------------------------------------------------------------
// StatsCounter support.
@ -1260,8 +1244,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
Register scratch = at,
BranchDelaySlot bd = PROTECT);
// Jump if either of the registers contain a non-smi.
void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi);
// Jump if either of the registers contain a smi.
void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi);
@ -1287,18 +1269,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// via --debug-code.
void AssertUndefinedOrAllocationSite(Register object, Register scratch);
// Abort execution if reg is not the root value with the given index,
// enabled via --debug-code.
void AssertIsRoot(Register reg, Heap::RootListIndex index);
// ---------------------------------------------------------------------------
// HeapNumber utilities.
void JumpIfNotHeapNumber(Register object,
Register heap_number_map,
Register scratch,
Label* on_not_heap_number);
// -------------------------------------------------------------------------
// String utilities.
@ -1318,13 +1288,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
Register scratch2,
Label* failure);
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not.
void JumpIfNotBothSequentialOneByteStrings(Register first, Register second,
Register scratch1,
Register scratch2,
Label* not_flat_one_byte_strings);
void LoadInstanceDescriptors(Register map, Register descriptors);
void LoadAccessor(Register dst, Register holder, int accessor_index,
AccessorComponent accessor);
@ -1363,8 +1326,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// Compute memory operands for safepoint stack slots.
static int SafepointRegisterStackIndex(int reg_code);
MemOperand SafepointRegisterSlot(Register reg);
MemOperand SafepointRegistersAndDoublesSlot(Register reg);
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.

View File

@ -9,9 +9,6 @@ namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one-byte strings and returns result in v0.

View File

@ -85,19 +85,6 @@ int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
}
MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) {
return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
}
MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) {
UNIMPLEMENTED_MIPS();
// General purpose registers are pushed last on the stack.
int doubles_size = DoubleRegister::kMaxNumRegisters * kDoubleSize;
int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize;
return MemOperand(sp, doubles_size + register_offset);
}
void MacroAssembler::InNewSpace(Register object,
Register scratch,
Condition cc,
@ -1836,19 +1823,6 @@ void TurboAssembler::MultiPush(RegList regs) {
}
void MacroAssembler::MultiPushReversed(RegList regs) {
int16_t num_to_push = base::bits::CountPopulation(regs);
int16_t stack_offset = num_to_push * kPointerSize;
Dsubu(sp, sp, Operand(stack_offset));
for (int16_t i = 0; i < kNumRegisters; i++) {
if ((regs & (1 << i)) != 0) {
stack_offset -= kPointerSize;
Sd(ToRegister(i), MemOperand(sp, stack_offset));
}
}
}
void TurboAssembler::MultiPop(RegList regs) {
int16_t stack_offset = 0;
@ -1862,18 +1836,6 @@ void TurboAssembler::MultiPop(RegList regs) {
}
void MacroAssembler::MultiPopReversed(RegList regs) {
int16_t stack_offset = 0;
for (int16_t i = kNumRegisters - 1; i >= 0; i--) {
if ((regs & (1 << i)) != 0) {
Ld(ToRegister(i), MemOperand(sp, stack_offset));
stack_offset += kPointerSize;
}
}
daddiu(sp, sp, stack_offset);
}
void TurboAssembler::MultiPushFPU(RegList regs) {
int16_t num_to_push = base::bits::CountPopulation(regs);
int16_t stack_offset = num_to_push * kDoubleSize;
@ -1888,19 +1850,6 @@ void TurboAssembler::MultiPushFPU(RegList regs) {
}
void MacroAssembler::MultiPushReversedFPU(RegList regs) {
int16_t num_to_push = base::bits::CountPopulation(regs);
int16_t stack_offset = num_to_push * kDoubleSize;
Dsubu(sp, sp, Operand(stack_offset));
for (int16_t i = 0; i < kNumRegisters; i++) {
if ((regs & (1 << i)) != 0) {
stack_offset -= kDoubleSize;
Sdc1(FPURegister::from_code(i), MemOperand(sp, stack_offset));
}
}
}
void TurboAssembler::MultiPopFPU(RegList regs) {
int16_t stack_offset = 0;
@ -1914,18 +1863,6 @@ void TurboAssembler::MultiPopFPU(RegList regs) {
}
void MacroAssembler::MultiPopReversedFPU(RegList regs) {
int16_t stack_offset = 0;
for (int16_t i = kNumRegisters - 1; i >= 0; i--) {
if ((regs & (1 << i)) != 0) {
Ldc1(FPURegister::from_code(i), MemOperand(sp, stack_offset));
stack_offset += kDoubleSize;
}
}
daddiu(sp, sp, stack_offset);
}
void TurboAssembler::Ext(Register rt, Register rs, uint16_t pos,
uint16_t size) {
DCHECK(pos < 32);
@ -4002,38 +3939,6 @@ void TurboAssembler::Push(Handle<HeapObject> handle) {
push(scratch);
}
void MacroAssembler::PushObject(Handle<Object> handle) {
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
if (handle->IsHeapObject()) {
li(scratch, Operand(Handle<HeapObject>::cast(handle)));
} else {
li(scratch, Operand(Smi::cast(*handle)));
}
push(scratch);
}
void MacroAssembler::PushRegisterAsTwoSmis(Register src, Register scratch) {
DCHECK(!src.is(scratch));
mov(scratch, src);
dsrl32(src, src, 0);
dsll32(src, src, 0);
push(src);
dsll32(scratch, scratch, 0);
push(scratch);
}
void MacroAssembler::PopRegisterAsTwoSmis(Register dst, Register scratch) {
DCHECK(!dst.is(scratch));
pop(scratch);
dsrl32(scratch, scratch, 0);
pop(dst);
dsrl32(dst, dst, 0);
dsll32(dst, dst, 0);
or_(dst, dst, scratch);
}
void MacroAssembler::MaybeDropFrames() {
// Check whether we need to drop frames to restart a function on the stack.
ExternalReference restart_fp =
@ -5305,23 +5210,6 @@ void MacroAssembler::JumpIfNotSmi(Register value,
}
void MacroAssembler::JumpIfNotBothSmi(Register reg1,
Register reg2,
Label* on_not_both_smi) {
STATIC_ASSERT(kSmiTag == 0);
// TODO(plind): Find some better to fix this assert issue.
#if defined(__APPLE__)
DCHECK_EQ(1, kSmiTagMask);
#else
DCHECK_EQ((int64_t)1, kSmiTagMask);
#endif
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
or_(scratch, reg1, reg2);
JumpIfNotSmi(scratch, on_not_both_smi);
}
void MacroAssembler::JumpIfEitherSmi(Register reg1,
Register reg2,
Label* on_either_smi) {
@ -5427,27 +5315,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
if (emit_debug_code()) {
UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire();
DCHECK(!reg.is(scratch));
LoadRoot(scratch, index);
Check(eq, kHeapNumberMapRegisterClobbered, reg, Operand(scratch));
}
}
void MacroAssembler::JumpIfNotHeapNumber(Register object,
Register heap_number_map,
Register scratch,
Label* on_not_heap_number) {
Ld(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
Branch(on_not_heap_number, ne, scratch, Operand(heap_number_map));
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
@ -5463,19 +5330,6 @@ void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register first,
Register second,
Register scratch1,
Register scratch2,
Label* failure) {
// Check that neither is a smi.
STATIC_ASSERT(kSmiTag == 0);
And(scratch1, first, Operand(second));
JumpIfSmi(scratch1, failure);
JumpIfNonSmisNotBothSequentialOneByteStrings(first, second, scratch1,
scratch2, failure);
}
void TurboAssembler::Float32Max(FPURegister dst, FPURegister src1,
FPURegister src2, Label* out_of_line) {
if (src1.is(src2)) {

View File

@ -1097,17 +1097,6 @@ class MacroAssembler : public TurboAssembler {
void LoadWordPair(Register rd, const MemOperand& rs, Register scratch = at);
void StoreWordPair(Register rd, const MemOperand& rs, Register scratch = at);
void MultiPushReversed(RegList regs);
void MultiPushReversedFPU(RegList regs);
void PushObject(Handle<Object> handle);
void PushRegisterAsTwoSmis(Register src, Register scratch = at);
void PopRegisterAsTwoSmis(Register dst, Register scratch = at);
void MultiPopReversed(RegList regs);
void MultiPopReversedFPU(RegList regs);
// Push and pop the registers that can hold pointers, as defined by the
// RegList constant kSafepointSavedRegisters.
void PushSafepointRegisters();
@ -1288,8 +1277,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
#undef COND_ARGS
void CallJSExitStub(CodeStub* stub);
// Call a runtime routine.
void CallRuntime(const Runtime::Function* f, int num_arguments,
SaveFPRegsMode save_doubles = kDontSaveFPRegs,
@ -1318,12 +1305,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
BranchDelaySlot bd = PROTECT,
bool builtin_exit_frame = false);
struct Unresolved {
int pc;
uint32_t flags; // See Bootstrapper::FixupFlags decoders/encoders.
const char* name;
};
// -------------------------------------------------------------------------
// StatsCounter support.
@ -1377,8 +1358,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
Register scratch = at,
BranchDelaySlot bd = PROTECT);
// Jump if either of the registers contain a non-smi.
void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi);
// Jump if either of the registers contain a smi.
void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi);
@ -1404,18 +1383,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// via --debug-code.
void AssertUndefinedOrAllocationSite(Register object, Register scratch);
// Abort execution if reg is not the root value with the given index,
// enabled via --debug-code.
void AssertIsRoot(Register reg, Heap::RootListIndex index);
// ---------------------------------------------------------------------------
// HeapNumber utilities.
void JumpIfNotHeapNumber(Register object,
Register heap_number_map,
Register scratch,
Label* on_not_heap_number);
// -------------------------------------------------------------------------
// String utilities.
@ -1435,13 +1402,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
Register scratch2,
Label* failure);
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not.
void JumpIfNotBothSequentialOneByteStrings(Register first, Register second,
Register scratch1,
Register scratch2,
Label* not_flat_one_byte_strings);
void LoadInstanceDescriptors(Register map, Register descriptors);
void LoadAccessor(Register dst, Register holder, int accessor_index,
AccessorComponent accessor);
@ -1479,8 +1439,6 @@ const Operand& rt = Operand(zero_reg), BranchDelaySlot bd = PROTECT
// Compute memory operands for safepoint stack slots.
static int SafepointRegisterStackIndex(int reg_code);
MemOperand SafepointRegisterSlot(Register reg);
MemOperand SafepointRegistersAndDoublesSlot(Register reg);
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.

View File

@ -9,9 +9,6 @@ namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one-byte strings and returns result in r0.

View File

@ -166,14 +166,6 @@ void TurboAssembler::Push(Smi* smi) {
push(r0);
}
void MacroAssembler::PushObject(Handle<Object> handle) {
if (handle->IsHeapObject()) {
Push(Handle<HeapObject>::cast(handle));
} else {
Push(Smi::cast(*handle));
}
}
void TurboAssembler::Move(Register dst, Handle<HeapObject> value) {
mov(dst, Operand(value));
}
@ -574,19 +566,6 @@ int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
}
MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) {
return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
}
MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) {
// General purpose registers are pushed last on the stack.
const RegisterConfiguration* config = RegisterConfiguration::Default();
int doubles_size = config->num_allocatable_double_registers() * kDoubleSize;
int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize;
return MemOperand(sp, doubles_size + register_offset);
}
void TurboAssembler::CanonicalizeNaN(const DoubleRegister dst,
const DoubleRegister src) {
// Turn potential sNaN into qNaN.
@ -1955,14 +1934,6 @@ void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
}
}
void MacroAssembler::JumpIfNotBothSmi(Register reg1, Register reg2,
Label* on_not_both_smi) {
STATIC_ASSERT(kSmiTag == 0);
orx(r0, reg1, reg2, LeaveRC);
JumpIfNotSmi(r0, on_not_both_smi);
}
void MacroAssembler::UntagAndJumpIfSmi(Register dst, Register src,
Label* smi_case) {
STATIC_ASSERT(kSmiTag == 0);
@ -2072,25 +2043,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
if (emit_debug_code()) {
CompareRoot(reg, index);
Check(eq, kHeapNumberMapRegisterClobbered);
}
}
void MacroAssembler::JumpIfNotHeapNumber(Register object,
Register heap_number_map,
Register scratch,
Label* on_not_heap_number) {
LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
cmp(scratch, heap_number_map);
bne(on_not_heap_number);
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
@ -2105,19 +2057,6 @@ void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
scratch2, failure);
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register first,
Register second,
Register scratch1,
Register scratch2,
Label* failure) {
// Check that neither is a smi.
and_(scratch1, first, second);
JumpIfSmi(scratch1, failure);
JumpIfNonSmisNotBothSequentialOneByteStrings(first, second, scratch1,
scratch2, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Register reg,
Label* not_unique_name) {
STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
@ -2287,34 +2226,6 @@ void TurboAssembler::CallCFunctionHelper(Register function,
}
void MacroAssembler::DecodeConstantPoolOffset(Register result,
Register location) {
Label overflow_access, done;
DCHECK(!AreAliased(result, location, r0));
// Determine constant pool access type
// Caller has already placed the instruction word at location in result.
ExtractBitRange(r0, result, 31, 26);
cmpi(r0, Operand(ADDIS >> 26));
beq(&overflow_access);
// Regular constant pool access
// extract the load offset
andi(result, result, Operand(kImm16Mask));
b(&done);
bind(&overflow_access);
// Overflow constant pool access
// shift addis immediate
slwi(r0, result, Operand(16));
// sign-extend and add the load offset
lwz(result, MemOperand(location, kInstrSize));
extsh(result, result);
add(result, r0, result);
bind(&done);
}
void TurboAssembler::CheckPageFlag(
Register object,
Register scratch, // scratch may be same register as object
@ -3244,55 +3155,6 @@ void TurboAssembler::StoreSingleU(DoubleRegister src, const MemOperand& mem,
}
}
void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
Register scratch_reg,
Register scratch2_reg,
Label* no_memento_found) {
Label map_check;
Label top_check;
ExternalReference new_space_allocation_top_adr =
ExternalReference::new_space_allocation_top_address(isolate());
const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
const int kMementoLastWordOffset =
kMementoMapOffset + AllocationMemento::kSize - kPointerSize;
Register mask = scratch2_reg;
DCHECK(!AreAliased(receiver_reg, scratch_reg, mask));
// Bail out if the object is not in new space.
JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0);
lis(mask, Operand((~Page::kPageAlignmentMask >> 16)));
addi(scratch_reg, receiver_reg, Operand(kMementoLastWordOffset));
// If the object is in new space, we need to check whether it is on the same
// page as the current top.
mov(ip, Operand(new_space_allocation_top_adr));
LoadP(ip, MemOperand(ip));
Xor(r0, scratch_reg, Operand(ip));
and_(r0, r0, mask, SetRC);
beq(&top_check, cr0);
// The object is on a different page than allocation top. Bail out if the
// object sits on the page boundary as no memento can follow and we cannot
// touch the memory following it.
xor_(r0, scratch_reg, receiver_reg);
and_(r0, r0, mask, SetRC);
bne(no_memento_found, cr0);
// Continue with the actual map check.
b(&map_check);
// If top is on the same page as the current object, we need to check whether
// we are below top.
bind(&top_check);
cmp(scratch_reg, ip);
bge(no_memento_found);
// Memento map check.
bind(&map_check);
LoadP(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
Cmpi(scratch_reg, Operand(isolate()->factory()->allocation_memento_map()),
r0);
}
Register GetRegisterThatIsNotOneOf(Register reg1, Register reg2, Register reg3,
Register reg4, Register reg5,
Register reg6) {

View File

@ -718,7 +718,6 @@ class MacroAssembler : public TurboAssembler {
PointersToHereCheck pointers_to_here_check_for_value =
kPointersToHereMaybeInteresting);
void PushObject(Handle<Object> handle);
// Push and pop the registers that can hold pointers, as defined by the
// RegList constant kSafepointSavedRegisters.
void PushSafepointRegisters();
@ -1030,8 +1029,6 @@ class MacroAssembler : public TurboAssembler {
TestIfSmi(value, r0);
bne(not_smi_label, cr0);
}
// Jump if either of the registers contain a non-smi.
void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi);
// Jump if either of the registers contain a smi.
void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi);
@ -1070,16 +1067,6 @@ class MacroAssembler : public TurboAssembler {
// via --debug-code.
void AssertUndefinedOrAllocationSite(Register object, Register scratch);
// Abort execution if reg is not the root value with the given index,
// enabled via --debug-code.
void AssertIsRoot(Register reg, Heap::RootListIndex index);
// ---------------------------------------------------------------------------
// HeapNumber utilities
void JumpIfNotHeapNumber(Register object, Register heap_number_map,
Register scratch, Label* on_not_heap_number);
// ---------------------------------------------------------------------------
// String utilities
@ -1091,13 +1078,6 @@ class MacroAssembler : public TurboAssembler {
Register scratch2,
Label* failure);
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not.
void JumpIfNotBothSequentialOneByteStrings(Register first, Register second,
Register scratch1,
Register scratch2,
Label* not_flat_one_byte_strings);
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
@ -1109,10 +1089,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// Patching helpers.
// Decode offset from constant pool load instruction(s).
// Caller must place the instruction word at <location> in <result>.
void DecodeConstantPoolOffset(Register result, Register location);
void LoadInstanceDescriptors(Register map, Register descriptors);
void LoadAccessor(Register dst, Register holder, int accessor_index,
AccessorComponent accessor);
@ -1131,17 +1107,6 @@ class MacroAssembler : public TurboAssembler {
void EnterBuiltinFrame(Register context, Register target, Register argc);
void LeaveBuiltinFrame(Register context, Register target, Register argc);
// AllocationMemento support. Arrays may have an associated
// AllocationMemento object that can be checked for in order to pretransition
// to another type.
// On entry, receiver_reg should point to the array object.
// scratch_reg gets clobbered.
// If allocation info is present, condition flags are set to eq.
void TestJSArrayForAllocationMemento(Register receiver_reg,
Register scratch_reg,
Register scratch2_reg,
Label* no_memento_found);
private:
static const int kSmiShift = kSmiTagSize + kSmiShiftSize;
@ -1166,9 +1131,6 @@ class MacroAssembler : public TurboAssembler {
// Compute memory operands for safepoint stack slots.
static int SafepointRegisterStackIndex(int reg_code);
MemOperand SafepointRegisterSlot(Register reg);
MemOperand SafepointRegistersAndDoublesSlot(Register reg);
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.

View File

@ -8,8 +8,6 @@
namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one-byte strings and returns result in r0.

View File

@ -169,14 +169,6 @@ void TurboAssembler::Push(Smi* smi) {
push(r0);
}
void MacroAssembler::PushObject(Handle<Object> handle) {
if (handle->IsHeapObject()) {
Push(Handle<HeapObject>::cast(handle));
} else {
Push(Smi::cast(*handle));
}
}
void TurboAssembler::Move(Register dst, Handle<HeapObject> value) {
mov(dst, Operand(value));
}
@ -549,18 +541,6 @@ int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
return index;
}
MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) {
return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize);
}
MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) {
// General purpose registers are pushed last on the stack.
const RegisterConfiguration* config = RegisterConfiguration::Default();
int doubles_size = config->num_allocatable_double_registers() * kDoubleSize;
int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize;
return MemOperand(sp, doubles_size + register_offset);
}
void TurboAssembler::CanonicalizeNaN(const DoubleRegister dst,
const DoubleRegister src) {
// Turn potential sNaN into qNaN
@ -1792,13 +1772,6 @@ void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
}
}
void MacroAssembler::JumpIfNotBothSmi(Register reg1, Register reg2,
Label* on_not_both_smi) {
STATIC_ASSERT(kSmiTag == 0);
OrP(r0, reg1, reg2 /*, LeaveRC*/); // should be okay to remove LeaveRC
JumpIfNotSmi(r0, on_not_both_smi);
}
void MacroAssembler::UntagAndJumpIfSmi(Register dst, Register src,
Label* smi_case) {
STATIC_ASSERT(kSmiTag == 0);
@ -1908,23 +1881,6 @@ void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
}
}
void MacroAssembler::AssertIsRoot(Register reg, Heap::RootListIndex index) {
if (emit_debug_code()) {
CompareRoot(reg, index);
Check(eq, kHeapNumberMapRegisterClobbered);
}
}
void MacroAssembler::JumpIfNotHeapNumber(Register object,
Register heap_number_map,
Register scratch,
Label* on_not_heap_number) {
LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
CmpP(scratch, heap_number_map);
bne(on_not_heap_number);
}
void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
Register first, Register second, Register scratch1, Register scratch2,
Label* failure) {
@ -1939,18 +1895,6 @@ void MacroAssembler::JumpIfNonSmisNotBothSequentialOneByteStrings(
scratch2, failure);
}
void MacroAssembler::JumpIfNotBothSequentialOneByteStrings(Register first,
Register second,
Register scratch1,
Register scratch2,
Label* failure) {
// Check that neither is a smi.
AndP(scratch1, first, second);
JumpIfSmi(scratch1, failure);
JumpIfNonSmisNotBothSequentialOneByteStrings(first, second, scratch1,
scratch2, failure);
}
void MacroAssembler::JumpIfNotUniqueNameInstanceType(Register reg,
Label* not_unique_name) {
STATIC_ASSERT(kInternalizedTag == 0 && kStringTag == 0);
@ -2296,52 +2240,6 @@ void MacroAssembler::StoreRepresentation(Register src, const MemOperand& mem,
}
}
void MacroAssembler::TestJSArrayForAllocationMemento(Register receiver_reg,
Register scratch_reg,
Register scratch2_reg,
Label* no_memento_found) {
Label map_check;
Label top_check;
ExternalReference new_space_allocation_top_adr =
ExternalReference::new_space_allocation_top_address(isolate());
const int kMementoMapOffset = JSArray::kSize - kHeapObjectTag;
const int kMementoLastWordOffset =
kMementoMapOffset + AllocationMemento::kSize - kPointerSize;
DCHECK(!AreAliased(receiver_reg, scratch_reg));
// Bail out if the object is not in new space.
JumpIfNotInNewSpace(receiver_reg, scratch_reg, no_memento_found);
DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0);
// If the object is in new space, we need to check whether it is on the same
// page as the current top.
AddP(scratch_reg, receiver_reg, Operand(kMementoLastWordOffset));
mov(ip, Operand(new_space_allocation_top_adr));
LoadP(ip, MemOperand(ip));
XorP(r0, scratch_reg, ip);
AndP(r0, r0, Operand(~Page::kPageAlignmentMask));
beq(&top_check, Label::kNear);
// The object is on a different page than allocation top. Bail out if the
// object sits on the page boundary as no memento can follow and we cannot
// touch the memory following it.
XorP(r0, scratch_reg, receiver_reg);
AndP(r0, r0, Operand(~Page::kPageAlignmentMask));
bne(no_memento_found);
// Continue with the actual map check.
b(&map_check, Label::kNear);
// If top is on the same page as the current object, we need to check whether
// we are below top.
bind(&top_check);
CmpP(scratch_reg, ip);
bge(no_memento_found);
// Memento map check.
bind(&map_check);
LoadP(scratch_reg, MemOperand(receiver_reg, kMementoMapOffset));
CmpP(scratch_reg, Operand(isolate()->factory()->allocation_memento_map()));
}
Register GetRegisterThatIsNotOneOf(Register reg1, Register reg2, Register reg3,
Register reg4, Register reg5,
Register reg6) {

View File

@ -1241,8 +1241,6 @@ class MacroAssembler : public TurboAssembler {
TestIfSmi(value);
bne(not_smi_label /*, cr0*/);
}
// Jump if either of the registers contain a non-smi.
void JumpIfNotBothSmi(Register reg1, Register reg2, Label* on_not_both_smi);
// Jump if either of the registers contain a smi.
void JumpIfEitherSmi(Register reg1, Register reg2, Label* on_either_smi);
@ -1279,16 +1277,6 @@ class MacroAssembler : public TurboAssembler {
// via --debug-code.
void AssertUndefinedOrAllocationSite(Register object, Register scratch);
// Abort execution if reg is not the root value with the given index,
// enabled via --debug-code.
void AssertIsRoot(Register reg, Heap::RootListIndex index);
// ---------------------------------------------------------------------------
// HeapNumber utilities
void JumpIfNotHeapNumber(Register object, Register heap_number_map,
Register scratch, Label* on_not_heap_number);
// ---------------------------------------------------------------------------
// String utilities
@ -1300,13 +1288,6 @@ class MacroAssembler : public TurboAssembler {
Register scratch2,
Label* failure);
// Checks if both objects are sequential one-byte strings and jumps to label
// if either is not.
void JumpIfNotBothSequentialOneByteStrings(Register first, Register second,
Register scratch1,
Register scratch2,
Label* not_flat_one_byte_strings);
// Checks if both instance types are sequential one-byte strings and jumps to
// label if either is not.
void JumpIfBothInstanceTypesAreNotSequentialOneByte(
@ -1332,17 +1313,6 @@ class MacroAssembler : public TurboAssembler {
// ---------------------------------------------------------------------------
// GC Support
// AllocationMemento support. Arrays may have an associated
// AllocationMemento object that can be checked for in order to pretransition
// to another type.
// On entry, receiver_reg should point to the array object.
// scratch_reg gets clobbered.
// If allocation info is present, condition flags are set to eq.
void TestJSArrayForAllocationMemento(Register receiver_reg,
Register scratch_reg,
Register scratch2_reg,
Label* no_memento_found);
void IncrementalMarkingRecordWriteHelper(Register object, Register value,
Register address);
@ -1360,7 +1330,6 @@ class MacroAssembler : public TurboAssembler {
static int CallSizeNotPredictableCodeSize(Address target,
RelocInfo::Mode rmode,
Condition cond = al);
void PushObject(Handle<Object> handle);
void JumpToJSEntry(Register target);
// Check if object is in new space. Jumps if the object is not in new space.
@ -1461,8 +1430,6 @@ class MacroAssembler : public TurboAssembler {
// Compute memory operands for safepoint stack slots.
static int SafepointRegisterStackIndex(int reg_code);
MemOperand SafepointRegisterSlot(Register reg);
MemOperand SafepointRegistersAndDoublesSlot(Register reg);
// Needs access to SafepointRegisterStackIndex for compiled frame
// traversal.

View File

@ -9,9 +9,6 @@ namespace v8 {
namespace internal {
void ArrayNativeCode(MacroAssembler* masm, Label* call_generic_code);
class StringHelper : public AllStatic {
public:
// Compares two flat one-byte strings and returns result in rax.

View File

@ -1952,15 +1952,6 @@ void MacroAssembler::Cmp(const Operand& dst, Handle<Object> source) {
}
}
void MacroAssembler::PushObject(Handle<Object> source) {
AllowDeferredHandleDereference smi_check;
if (source->IsSmi()) {
Push(Smi::cast(*source));
} else {
Push(Handle<HeapObject>::cast(source));
}
}
void TurboAssembler::Push(Handle<HeapObject> source) {
Move(kScratchRegister, source);
Push(kScratchRegister);

View File

@ -866,7 +866,6 @@ class MacroAssembler : public TurboAssembler {
void Cmp(const Operand& dst, Handle<Object> source);
void Cmp(Register dst, Smi* src);
void Cmp(const Operand& dst, Smi* src);
void PushObject(Handle<Object> source);
void GetWeakValue(Register value, Handle<WeakCell> cell);
@ -1185,7 +1184,6 @@ class MacroAssembler : public TurboAssembler {
Register mask_reg);
// Compute memory operands for safepoint stack slots.
Operand SafepointRegisterSlot(Register reg);
static int SafepointRegisterStackIndex(int reg_code) {
return kNumSafepointRegisters - kSafepointPushRegisterIndices[reg_code] - 1;
}