Commit f9aa377d authored by Vasili Skurydzin's avatar Vasili Skurydzin Committed by Commit Bot

[ptr-compr], [s390x] kPointerSize changed to kSystemPointerSize in src to

prepare for ptr compression

Change-Id: Ia459ad18a30fbfd8e51bd99735f0d63644d30b8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1831788Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#64051}
parent f1bd1b6b
This diff is collapsed.
This diff is collapsed.
......@@ -515,26 +515,26 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
}
void push(DoubleRegister src) {
lay(sp, MemOperand(sp, -kPointerSize));
lay(sp, MemOperand(sp, -kSystemPointerSize));
StoreDouble(src, MemOperand(sp));
}
void push(Register src) {
lay(sp, MemOperand(sp, -kPointerSize));
lay(sp, MemOperand(sp, -kSystemPointerSize));
StoreP(src, MemOperand(sp));
}
void pop(DoubleRegister dst) {
LoadDouble(dst, MemOperand(sp));
la(sp, MemOperand(sp, kPointerSize));
la(sp, MemOperand(sp, kSystemPointerSize));
}
void pop(Register dst) {
LoadP(dst, MemOperand(sp));
la(sp, MemOperand(sp, kPointerSize));
la(sp, MemOperand(sp, kSystemPointerSize));
}
void pop() { la(sp, MemOperand(sp, kPointerSize)); }
void pop() { la(sp, MemOperand(sp, kSystemPointerSize)); }
void Push(Register src) { push(src); }
......@@ -544,25 +544,25 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// Push two registers. Pushes leftmost register first (to highest address).
void Push(Register src1, Register src2) {
lay(sp, MemOperand(sp, -kPointerSize * 2));
StoreP(src1, MemOperand(sp, kPointerSize));
lay(sp, MemOperand(sp, -kSystemPointerSize * 2));
StoreP(src1, MemOperand(sp, kSystemPointerSize));
StoreP(src2, MemOperand(sp, 0));
}
// Push three registers. Pushes leftmost register first (to highest address).
void Push(Register src1, Register src2, Register src3) {
lay(sp, MemOperand(sp, -kPointerSize * 3));
StoreP(src1, MemOperand(sp, kPointerSize * 2));
StoreP(src2, MemOperand(sp, kPointerSize));
lay(sp, MemOperand(sp, -kSystemPointerSize * 3));
StoreP(src1, MemOperand(sp, kSystemPointerSize * 2));
StoreP(src2, MemOperand(sp, kSystemPointerSize));
StoreP(src3, MemOperand(sp, 0));
}
// Push four registers. Pushes leftmost register first (to highest address).
void Push(Register src1, Register src2, Register src3, Register src4) {
lay(sp, MemOperand(sp, -kPointerSize * 4));
StoreP(src1, MemOperand(sp, kPointerSize * 3));
StoreP(src2, MemOperand(sp, kPointerSize * 2));
StoreP(src3, MemOperand(sp, kPointerSize));
lay(sp, MemOperand(sp, -kSystemPointerSize * 4));
StoreP(src1, MemOperand(sp, kSystemPointerSize * 3));
StoreP(src2, MemOperand(sp, kSystemPointerSize * 2));
StoreP(src3, MemOperand(sp, kSystemPointerSize));
StoreP(src4, MemOperand(sp, 0));
}
......@@ -580,11 +580,11 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
DCHECK(src3 != src5);
DCHECK(src4 != src5);
lay(sp, MemOperand(sp, -kPointerSize * 5));
StoreP(src1, MemOperand(sp, kPointerSize * 4));
StoreP(src2, MemOperand(sp, kPointerSize * 3));
StoreP(src3, MemOperand(sp, kPointerSize * 2));
StoreP(src4, MemOperand(sp, kPointerSize));
lay(sp, MemOperand(sp, -kSystemPointerSize * 5));
StoreP(src1, MemOperand(sp, kSystemPointerSize * 4));
StoreP(src2, MemOperand(sp, kSystemPointerSize * 3));
StoreP(src3, MemOperand(sp, kSystemPointerSize * 2));
StoreP(src4, MemOperand(sp, kSystemPointerSize));
StoreP(src5, MemOperand(sp, 0));
}
......@@ -593,36 +593,36 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
// Pop two registers. Pops rightmost register first (from lower address).
void Pop(Register src1, Register src2) {
LoadP(src2, MemOperand(sp, 0));
LoadP(src1, MemOperand(sp, kPointerSize));
la(sp, MemOperand(sp, 2 * kPointerSize));
LoadP(src1, MemOperand(sp, kSystemPointerSize));
la(sp, MemOperand(sp, 2 * kSystemPointerSize));
}
// Pop three registers. Pops rightmost register first (from lower address).
void Pop(Register src1, Register src2, Register src3) {
LoadP(src3, MemOperand(sp, 0));
LoadP(src2, MemOperand(sp, kPointerSize));
LoadP(src1, MemOperand(sp, 2 * kPointerSize));
la(sp, MemOperand(sp, 3 * kPointerSize));
LoadP(src2, MemOperand(sp, kSystemPointerSize));
LoadP(src1, MemOperand(sp, 2 * kSystemPointerSize));
la(sp, MemOperand(sp, 3 * kSystemPointerSize));
}
// Pop four registers. Pops rightmost register first (from lower address).
void Pop(Register src1, Register src2, Register src3, Register src4) {
LoadP(src4, MemOperand(sp, 0));
LoadP(src3, MemOperand(sp, kPointerSize));
LoadP(src2, MemOperand(sp, 2 * kPointerSize));
LoadP(src1, MemOperand(sp, 3 * kPointerSize));
la(sp, MemOperand(sp, 4 * kPointerSize));
LoadP(src3, MemOperand(sp, kSystemPointerSize));
LoadP(src2, MemOperand(sp, 2 * kSystemPointerSize));
LoadP(src1, MemOperand(sp, 3 * kSystemPointerSize));
la(sp, MemOperand(sp, 4 * kSystemPointerSize));
}
// Pop five registers. Pops rightmost register first (from lower address).
void Pop(Register src1, Register src2, Register src3, Register src4,
Register src5) {
LoadP(src5, MemOperand(sp, 0));
LoadP(src4, MemOperand(sp, kPointerSize));
LoadP(src3, MemOperand(sp, 2 * kPointerSize));
LoadP(src2, MemOperand(sp, 3 * kPointerSize));
LoadP(src1, MemOperand(sp, 4 * kPointerSize));
la(sp, MemOperand(sp, 5 * kPointerSize));
LoadP(src4, MemOperand(sp, kSystemPointerSize));
LoadP(src3, MemOperand(sp, 2 * kSystemPointerSize));
LoadP(src2, MemOperand(sp, 3 * kSystemPointerSize));
LoadP(src1, MemOperand(sp, 4 * kSystemPointerSize));
la(sp, MemOperand(sp, 5 * kSystemPointerSize));
}
// Push a fixed frame, consisting of lr, fp, constant pool.
......@@ -1183,11 +1183,11 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
void SmiToPtrArrayOffset(Register dst, Register src) {
#if defined(V8_COMPRESS_POINTERS) || defined(V8_31BIT_SMIS_ON_64BIT_ARCH)
STATIC_ASSERT(kSmiTag == 0 && kSmiShift < kPointerSizeLog2);
ShiftLeftP(dst, src, Operand(kPointerSizeLog2 - kSmiShift));
STATIC_ASSERT(kSmiTag == 0 && kSmiShift < kSystemPointerSizeLog2);
ShiftLeftP(dst, src, Operand(kSystemPointerSizeLog2 - kSmiShift));
#else
STATIC_ASSERT(kSmiTag == 0 && kSmiShift > kPointerSizeLog2);
ShiftRightArithP(dst, src, Operand(kSmiShift - kPointerSizeLog2));
STATIC_ASSERT(kSmiTag == 0 && kSmiShift > kSystemPointerSizeLog2);
ShiftRightArithP(dst, src, Operand(kSmiShift - kSystemPointerSizeLog2));
#endif
}
......@@ -1208,7 +1208,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
#endif
#if V8_TARGET_LITTLE_ENDIAN
#define SmiWordOffset(offset) (offset + kPointerSize / 2)
#define SmiWordOffset(offset) (offset + kSystemPointerSize / 2)
#else
#define SmiWordOffset(offset) offset
#endif
......
......@@ -40,7 +40,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
}
// Push all GPRs onto the stack
__ lay(sp, MemOperand(sp, -kNumberOfRegisters * kPointerSize));
__ lay(sp, MemOperand(sp, -kNumberOfRegisters * kSystemPointerSize));
__ StoreMultipleP(r0, sp, MemOperand(sp)); // Save all 16 registers
__ mov(r1, Operand(ExternalReference::Create(
......@@ -48,7 +48,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
__ StoreP(fp, MemOperand(r1));
const int kSavedRegistersAreaSize =
(kNumberOfRegisters * kPointerSize) + kDoubleRegsSize;
(kNumberOfRegisters * kSystemPointerSize) + kDoubleRegsSize;
// The bailout id is passed using r10
__ LoadRR(r4, r10);
......@@ -79,7 +79,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
// r6: Fp-to-sp delta.
// Parm6: isolate is passed on the stack.
__ mov(r7, Operand(ExternalReference::isolate_address(isolate)));
__ StoreP(r7, MemOperand(sp, kStackFrameExtraParamSlot * kPointerSize));
__ StoreP(r7, MemOperand(sp, kStackFrameExtraParamSlot * kSystemPointerSize));
// Call Deoptimizer::New().
{
......@@ -94,13 +94,14 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
// Copy core registers into FrameDescription::registers_[kNumRegisters].
// DCHECK_EQ(Register::kNumRegisters, kNumberOfRegisters);
// __ mvc(MemOperand(r3, FrameDescription::registers_offset()),
// MemOperand(sp), kNumberOfRegisters * kPointerSize);
// MemOperand(sp), kNumberOfRegisters * kSystemPointerSize);
// Copy core registers into FrameDescription::registers_[kNumRegisters].
// TODO(john.yan): optimize the following code by using mvc instruction
DCHECK_EQ(Register::kNumRegisters, kNumberOfRegisters);
for (int i = 0; i < kNumberOfRegisters; i++) {
int offset = (i * kPointerSize) + FrameDescription::registers_offset();
__ LoadP(r4, MemOperand(sp, i * kPointerSize));
int offset =
(i * kSystemPointerSize) + FrameDescription::registers_offset();
__ LoadP(r4, MemOperand(sp, i * kSystemPointerSize));
__ StoreP(r4, MemOperand(r3, offset));
}
......@@ -110,7 +111,8 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
int code = config->GetAllocatableDoubleCode(i);
int dst_offset = code * kDoubleSize + double_regs_offset;
int src_offset = code * kDoubleSize + kNumberOfRegisters * kPointerSize;
int src_offset =
code * kDoubleSize + kNumberOfRegisters * kSystemPointerSize;
// TODO(joransiu): MVC opportunity
__ LoadDouble(d0, MemOperand(sp, src_offset));
__ StoreDouble(d0, MemOperand(r3, dst_offset));
......@@ -145,7 +147,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
__ bind(&pop_loop);
__ pop(r6);
__ StoreP(r6, MemOperand(r5, 0));
__ la(r5, MemOperand(r5, kPointerSize));
__ la(r5, MemOperand(r5, kSystemPointerSize));
__ bind(&pop_loop_header);
__ CmpP(r4, sp);
__ bne(&pop_loop);
......@@ -169,7 +171,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
// r3 = one past the last FrameDescription**.
__ LoadlW(r3, MemOperand(r2, Deoptimizer::output_count_offset()));
__ LoadP(r6, MemOperand(r2, Deoptimizer::output_offset())); // r6 is output_.
__ ShiftLeftP(r3, r3, Operand(kPointerSizeLog2));
__ ShiftLeftP(r3, r3, Operand(kSystemPointerSizeLog2));
__ AddP(r3, r6, r3);
__ b(&outer_loop_header, Label::kNear);
......@@ -189,7 +191,7 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
__ CmpP(r5, Operand::Zero());
__ bne(&inner_push_loop); // test for gt?
__ AddP(r6, r6, Operand(kPointerSize));
__ AddP(r6, r6, Operand(kSystemPointerSize));
__ bind(&outer_loop_header);
__ CmpP(r6, r3);
__ blt(&outer_push_loop);
......@@ -211,7 +213,8 @@ void Deoptimizer::GenerateDeoptimizationEntries(MacroAssembler* masm,
// Restore the registers from the last output frame.
__ LoadRR(r1, r4);
for (int i = kNumberOfRegisters - 1; i > 0; i--) {
int offset = (i * kPointerSize) + FrameDescription::registers_offset();
int offset =
(i * kSystemPointerSize) + FrameDescription::registers_offset();
if ((restored_regs & (1 << i)) != 0) {
__ LoadP(ToRegister(i), MemOperand(r1, offset));
}
......
......@@ -14,7 +14,7 @@ namespace internal {
class EntryFrameConstants : public AllStatic {
public:
static constexpr int kCallerFPOffset =
-(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize);
-(StandardFrameConstants::kFixedFrameSizeFromFp + kSystemPointerSize);
// Stack offsets for arguments passed to JSEntry.
static constexpr int kArgvOffset = 20 * kSystemPointerSize;
};
......@@ -25,13 +25,13 @@ class ExitFrameConstants : public TypedFrameConstants {
DEFINE_TYPED_FRAME_SIZES(1);
// The caller fields are below the frame pointer on the stack.
static constexpr int kCallerFPOffset = 0 * kPointerSize;
static constexpr int kCallerFPOffset = 0 * kSystemPointerSize;
// The calling JS function is below FP.
static constexpr int kCallerPCOffset = 1 * kPointerSize;
static constexpr int kCallerPCOffset = 1 * kSystemPointerSize;
// FP-relative displacement of the caller's SP. It points just
// below the saved PC.
static constexpr int kCallerSPDisplacement = 2 * kPointerSize;
static constexpr int kCallerSPDisplacement = 2 * kSystemPointerSize;
};
class WasmCompileLazyFrameConstants : public TypedFrameConstants {
......@@ -47,7 +47,7 @@ class WasmCompileLazyFrameConstants : public TypedFrameConstants {
static constexpr int kWasmInstanceOffset = TYPED_FRAME_PUSHED_VALUE_OFFSET(0);
static constexpr int kFixedFrameSizeFromFp =
TypedFrameConstants::kFixedFrameSizeFromFp +
kNumberOfSavedGpParamRegs * kPointerSize +
kNumberOfSavedGpParamRegs * kSystemPointerSize +
kNumberOfSavedFpParamRegs * kDoubleSize;
};
......@@ -56,13 +56,13 @@ class JavaScriptFrameConstants : public AllStatic {
// FP-relative.
static constexpr int kLocal0Offset =
StandardFrameConstants::kExpressionsOffset;
static constexpr int kLastParameterOffset = +2 * kPointerSize;
static constexpr int kLastParameterOffset = +2 * kSystemPointerSize;
static constexpr int kFunctionOffset =
StandardFrameConstants::kFunctionOffset;
// Caller SP-relative.
static constexpr int kParam0Offset = -2 * kPointerSize;
static constexpr int kReceiverOffset = -1 * kPointerSize;
static constexpr int kParam0Offset = -2 * kSystemPointerSize;
static constexpr int kReceiverOffset = -1 * kSystemPointerSize;
};
} // namespace internal
......
......@@ -208,7 +208,7 @@ void RegExpMacroAssemblerS390::CheckGreedyLoop(Label* on_equal) {
Label backtrack_non_equal;
__ CmpP(current_input_offset(), MemOperand(backtrack_stackpointer(), 0));
__ bne(&backtrack_non_equal);
__ AddP(backtrack_stackpointer(), Operand(kPointerSize));
__ AddP(backtrack_stackpointer(), Operand(kSystemPointerSize));
BranchOrBacktrack(al, on_equal);
__ bind(&backtrack_non_equal);
......@@ -639,11 +639,11 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
// Requires us to save the callee-preserved registers r6-r13
// General convention is to also save r14 (return addr) and
// sp/r15 as well in a single STM/STMG
__ StoreMultipleP(r6, sp, MemOperand(sp, 6 * kPointerSize));
__ StoreMultipleP(r6, sp, MemOperand(sp, 6 * kSystemPointerSize));
// Load stack parameters from caller stack frame
__ LoadMultipleP(r7, r9,
MemOperand(sp, kStackFrameExtraParamSlot * kPointerSize));
__ LoadMultipleP(
r7, r9, MemOperand(sp, kStackFrameExtraParamSlot * kSystemPointerSize));
// r7 = capture array size
// r8 = stack area base
// r9 = direct call
......@@ -658,7 +658,7 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
// Set frame pointer in space for it if this is not a direct call
// from generated code.
__ LoadRR(frame_pointer(), sp);
__ lay(sp, MemOperand(sp, -10 * kPointerSize));
__ lay(sp, MemOperand(sp, -10 * kSystemPointerSize));
__ mov(r1, Operand::Zero()); // success counter
__ LoadRR(r0, r1); // offset of location
__ StoreMultipleP(r0, r9, MemOperand(sp, 0));
......@@ -676,7 +676,7 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
__ ble(&stack_limit_hit);
// Check if there is room for the variable number of registers above
// the stack limit.
__ CmpLogicalP(r2, Operand(num_registers_ * kPointerSize));
__ CmpLogicalP(r2, Operand(num_registers_ * kSystemPointerSize));
__ bge(&stack_ok);
// Exit with OutOfMemory exception. There is not enough space on the stack
// for our working registers.
......@@ -692,7 +692,7 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
__ bind(&stack_ok);
// Allocate space on stack for registers.
__ lay(sp, MemOperand(sp, (-num_registers_ * kPointerSize)));
__ lay(sp, MemOperand(sp, (-num_registers_ * kSystemPointerSize)));
// Load string end.
__ LoadP(end_of_input_address(), MemOperand(frame_pointer(), kInputEnd));
// Load input start.
......@@ -735,12 +735,13 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
// Fill saved registers with initial value = start offset - 1
if (num_saved_registers_ > 8) {
// One slot beyond address of register 0.
__ lay(r3, MemOperand(frame_pointer(), kRegisterZero + kPointerSize));
__ lay(r3,
MemOperand(frame_pointer(), kRegisterZero + kSystemPointerSize));
__ Load(r4, Operand(num_saved_registers_));
Label init_loop;
__ bind(&init_loop);
__ StoreP(r1, MemOperand(r3, -kPointerSize));
__ lay(r3, MemOperand(r3, -kPointerSize));
__ StoreP(r1, MemOperand(r3, -kSystemPointerSize));
__ lay(r3, MemOperand(r3, -kSystemPointerSize));
__ BranchOnCount(r4, &init_loop);
} else {
for (int i = 0; i < num_saved_registers_; i++) {
......@@ -875,7 +876,7 @@ Handle<HeapObject> RegExpMacroAssemblerS390::GetCode(Handle<String> source) {
// Skip sp past regexp registers and local variables..
__ LoadRR(sp, frame_pointer());
// Restore registers r6..r15.
__ LoadMultipleP(r6, sp, MemOperand(sp, 6 * kPointerSize));
__ LoadMultipleP(r6, sp, MemOperand(sp, 6 * kSystemPointerSize));
__ b(r14);
......@@ -1091,17 +1092,19 @@ void RegExpMacroAssemblerS390::CallCheckStackGuardState(Register scratch) {
// Code of self.
__ mov(r3, Operand(masm_->CodeObject()));
// r2 becomes return address pointer.
__ lay(r2, MemOperand(sp, kStackFrameRASlot * kPointerSize));
__ lay(r2, MemOperand(sp, kStackFrameRASlot * kSystemPointerSize));
ExternalReference stack_guard_check =
ExternalReference::re_check_stack_guard_state(isolate());
__ mov(ip, Operand(stack_guard_check));
__ StoreReturnAddressAndCall(ip);
if (base::OS::ActivationFrameAlignment() > kPointerSize) {
__ LoadP(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize)));
if (base::OS::ActivationFrameAlignment() > kSystemPointerSize) {
__ LoadP(
sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kSystemPointerSize)));
} else {
__ la(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize)));
__ la(sp,
MemOperand(sp, (kNumRequiredStackFrameSlots * kSystemPointerSize)));
}
__ mov(code_pointer(), Operand(masm_->CodeObject()));
......@@ -1110,7 +1113,7 @@ void RegExpMacroAssemblerS390::CallCheckStackGuardState(Register scratch) {
// Helper function for reading a value out of a stack frame.
template <typename T>
static T& frame_entry(Address re_frame, int frame_offset) {
DCHECK_EQ(kPointerSize, sizeof(T));
DCHECK_EQ(kSystemPointerSize, sizeof(T));
#ifdef V8_TARGET_ARCH_S390X
return reinterpret_cast<T&>(Memory<uint64_t>(re_frame + frame_offset));
#else
......@@ -1144,7 +1147,7 @@ MemOperand RegExpMacroAssemblerS390::register_location(int register_index) {
num_registers_ = register_index + 1;
}
return MemOperand(frame_pointer(),
kRegisterZero - register_index * kPointerSize);
kRegisterZero - register_index * kSystemPointerSize);
}
void RegExpMacroAssemblerS390::CheckPosition(int cp_offset,
......@@ -1204,7 +1207,7 @@ void RegExpMacroAssemblerS390::SafeCallTarget(Label* name) {
void RegExpMacroAssemblerS390::Push(Register source) {
DCHECK(source != backtrack_stackpointer());
__ lay(backtrack_stackpointer(),
MemOperand(backtrack_stackpointer(), -kPointerSize));
MemOperand(backtrack_stackpointer(), -kSystemPointerSize));
__ StoreP(source, MemOperand(backtrack_stackpointer()));
}
......@@ -1212,7 +1215,7 @@ void RegExpMacroAssemblerS390::Pop(Register target) {
DCHECK(target != backtrack_stackpointer());
__ LoadP(target, MemOperand(backtrack_stackpointer()));
__ la(backtrack_stackpointer(),
MemOperand(backtrack_stackpointer(), kPointerSize));
MemOperand(backtrack_stackpointer(), kSystemPointerSize));
}
void RegExpMacroAssemblerS390::CheckPreemption() {
......@@ -1239,13 +1242,15 @@ void RegExpMacroAssemblerS390::CallCFunctionUsingStub(
__ mov(code_pointer(), Operand(function));
Label ret;
__ larl(r14, &ret);
__ StoreP(r14, MemOperand(sp, kStackFrameRASlot * kPointerSize));
__ StoreP(r14, MemOperand(sp, kStackFrameRASlot * kSystemPointerSize));
__ b(code_pointer());
__ bind(&ret);
if (base::OS::ActivationFrameAlignment() > kPointerSize) {
__ LoadP(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize)));
if (base::OS::ActivationFrameAlignment() > kSystemPointerSize) {
__ LoadP(
sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kSystemPointerSize)));
} else {
__ la(sp, MemOperand(sp, (kNumRequiredStackFrameSlots * kPointerSize)));
__ la(sp,
MemOperand(sp, (kNumRequiredStackFrameSlots * kSystemPointerSize)));
}
__ mov(code_pointer(), Operand(masm_->CodeObject()));
}
......
......@@ -95,26 +95,27 @@ class V8_EXPORT_PRIVATE RegExpMacroAssemblerS390
kStoredRegisters + kCalleeRegisterSaveAreaSize;
// Stack parameters placed by caller.
static const int kCaptureArraySize = kCallerFrame;
static const int kStackAreaBase = kCallerFrame + kPointerSize;
static const int kStackAreaBase = kCallerFrame + kSystemPointerSize;
// kDirectCall again
static const int kIsolate = kStackAreaBase + 2 * kPointerSize;
static const int kIsolate = kStackAreaBase + 2 * kSystemPointerSize;
// Below the frame pointer.
// Register parameters stored by setup code.
static const int kDirectCall = kFramePointer - kPointerSize;
static const int kStackHighEnd = kDirectCall - kPointerSize;
static const int kNumOutputRegisters = kStackHighEnd - kPointerSize;
static const int kRegisterOutput = kNumOutputRegisters - kPointerSize;
static const int kInputEnd = kRegisterOutput - kPointerSize;
static const int kInputStart = kInputEnd - kPointerSize;
static const int kStartIndex = kInputStart - kPointerSize;
static const int kInputString = kStartIndex - kPointerSize;
static const int kDirectCall = kFramePointer - kSystemPointerSize;
static const int kStackHighEnd = kDirectCall - kSystemPointerSize;
static const int kNumOutputRegisters = kStackHighEnd - kSystemPointerSize;
static const int kRegisterOutput = kNumOutputRegisters - kSystemPointerSize;
static const int kInputEnd = kRegisterOutput - kSystemPointerSize;
static const int kInputStart = kInputEnd - kSystemPointerSize;
static const int kStartIndex = kInputStart - kSystemPointerSize;
static const int kInputString = kStartIndex - kSystemPointerSize;
// When adding local variables remember to push space for them in
// the frame in GetCode.
static const int kSuccessfulCaptures = kInputString - kPointerSize;
static const int kStringStartMinusOne = kSuccessfulCaptures - kPointerSize;
static const int kSuccessfulCaptures = kInputString - kSystemPointerSize;
static const int kStringStartMinusOne =
kSuccessfulCaptures - kSystemPointerSize;
// First register address. Following registers are below it on the stack.
static const int kRegisterZero = kStringStartMinusOne - kPointerSize;
static const int kRegisterZero = kStringStartMinusOne - kSystemPointerSize;
// Initial size of code buffer.
static const int kRegExpCodeSize = 1024;
......
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