| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 4b05db1d6a0e4138446501a636d67ccc392721c5..ad415fa1d03cd4429a1c0d800f99d62bae2d51c0 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -145,6 +145,7 @@ bool LCodeGen::GeneratePrologue() {
|
|
|
| // r1: Callee's JS function.
|
| // cp: Callee's context.
|
| + // pp: Callee's constant pool pointer (if FLAG_enable_ool_constant_pool)
|
| // fp: Caller's frame pointer.
|
| // lr: Caller's pc.
|
|
|
| @@ -280,7 +281,7 @@ bool LCodeGen::GenerateDeferredCode() {
|
| ASSERT(!frame_is_built_);
|
| ASSERT(info()->IsStub());
|
| frame_is_built_ = true;
|
| - __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
|
| + __ PushFixedFrame();
|
| __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB)));
|
| __ push(scratch0());
|
| __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
|
| @@ -291,7 +292,7 @@ bool LCodeGen::GenerateDeferredCode() {
|
| Comment(";;; Destroy frame");
|
| ASSERT(frame_is_built_);
|
| __ pop(ip);
|
| - __ ldm(ia_w, sp, cp.bit() | fp.bit() | lr.bit());
|
| + __ PopFixedFrame();
|
| frame_is_built_ = false;
|
| }
|
| __ jmp(code->exit());
|
| @@ -342,7 +343,7 @@ bool LCodeGen::GenerateDeoptJumpTable() {
|
| __ b(&needs_frame);
|
| } else {
|
| __ bind(&needs_frame);
|
| - __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
|
| + __ PushFixedFrame();
|
| // This variant of deopt can only be used with stubs. Since we don't
|
| // have a function pointer to install in the stack frame that we're
|
| // building, install a special marker there instead.
|
| @@ -3591,6 +3592,7 @@ void LCodeGen::DoApplyArguments(LApplyArguments* instr) {
|
| ParameterCount actual(receiver);
|
| __ InvokeFunction(function, actual, CALL_FUNCTION,
|
| safepoint_generator, CALL_AS_METHOD);
|
| + __ RestoreConstantPoolPointer();
|
| }
|
|
|
|
|
| @@ -3691,8 +3693,10 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| // Invoke function.
|
| __ SetCallKind(r5, call_kind);
|
| __ ldr(ip, FieldMemOperand(r1, JSFunction::kCodeEntryOffset));
|
| + __ LoadConstantPoolPointer(r1);
|
| __ Call(ip);
|
|
|
| +
|
| // Set up deoptimization.
|
| RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT);
|
| } else {
|
| @@ -3702,6 +3706,7 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function,
|
| __ InvokeFunction(
|
| function, expected, count, CALL_FUNCTION, generator, call_kind);
|
| }
|
| + __ RestoreConstantPoolPointer();
|
| }
|
|
|
|
|
| @@ -4025,6 +4030,7 @@ void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
|
| SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt);
|
| ParameterCount count(instr->arity());
|
| __ InvokeFunction(r1, count, CALL_FUNCTION, generator, CALL_AS_METHOD);
|
| + __ RestoreConstantPoolPointer();
|
| } else {
|
| CallKnownFunction(known_function,
|
| instr->hydrogen()->formal_parameter_count(),
|
| @@ -4044,6 +4050,7 @@ void LCodeGen::DoCallKeyed(LCallKeyed* instr) {
|
| Handle<Code> ic =
|
| isolate()->stub_cache()->ComputeKeyedCallInitialize(arity);
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
|
| + __ RestoreConstantPoolPointer();
|
| }
|
|
|
|
|
| @@ -4057,6 +4064,7 @@ void LCodeGen::DoCallNamed(LCallNamed* instr) {
|
| isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
|
| __ mov(r2, Operand(instr->name()));
|
| CallCode(ic, mode, instr, NEVER_INLINE_TARGET_ADDRESS);
|
| + __ RestoreConstantPoolPointer();
|
| }
|
|
|
|
|
| @@ -4072,6 +4080,7 @@ void LCodeGen::DoCallFunction(LCallFunction* instr) {
|
| __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET);
|
| } else {
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| + __ RestoreConstantPoolPointer();
|
| }
|
| }
|
|
|
| @@ -4086,6 +4095,7 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) {
|
| isolate()->stub_cache()->ComputeCallInitialize(arity, mode);
|
| __ mov(r2, Operand(instr->name()));
|
| CallCode(ic, mode, instr, NEVER_INLINE_TARGET_ADDRESS);
|
| + __ RestoreConstantPoolPointer();
|
| }
|
|
|
|
|
|
|