Revision: 5843
Author: [email protected]
Date: Wed Nov 17 06:48:43 2010
Log: Landing for Martyn Capewell.
Replace some hard-coded return address calculations with Call.
BUG=none
TEST=none
Codereview URL: http://codereview.chromium.org/5158002/
http://code.google.com/p/v8/source/detail?r=5843
Modified:
/branches/bleeding_edge/src/arm/codegen-arm.cc
/branches/bleeding_edge/src/arm/full-codegen-arm.cc
/branches/bleeding_edge/src/arm/virtual-frame-arm.cc
=======================================
--- /branches/bleeding_edge/src/arm/codegen-arm.cc Wed Nov 17 05:59:07 2010
+++ /branches/bleeding_edge/src/arm/codegen-arm.cc Wed Nov 17 06:48:43 2010
@@ -1892,18 +1892,15 @@
frame_->SpillAll();
Comment cmnt(masm_, "[ check stack");
__ LoadRoot(ip, Heap::kStackLimitRootIndex);
- // Put the lr setup instruction in the delay slot. kInstrSize is added
to
- // the implicit 8 byte offset that always applies to operations with pc
and
- // gives a return address 12 bytes down.
- masm_->add(lr, pc, Operand(Assembler::kInstrSize));
masm_->cmp(sp, Operand(ip));
StackCheckStub stub;
// Call the stub if lower.
- masm_->mov(pc,
+ masm_->mov(ip,
Operand(reinterpret_cast<intptr_t>(stub.GetCode().location()),
RelocInfo::CODE_TARGET),
LeaveCC,
lo);
+ masm_->Call(ip, lo);
}
=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Wed Nov 17 05:59:07
2010
+++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Wed Nov 17 06:48:43
2010
@@ -172,19 +172,16 @@
}
// Check the stack for overflow or break request.
- // Put the lr setup instruction in the delay slot. The kInstrSize is
- // added to the implicit 8 byte offset that always applies to operations
- // with pc and gives a return address 12 bytes down.
{ Comment cmnt(masm_, "[ Stack check");
__ LoadRoot(r2, Heap::kStackLimitRootIndex);
- __ add(lr, pc, Operand(Assembler::kInstrSize));
__ cmp(sp, Operand(r2));
StackCheckStub stub;
- __ mov(pc,
+ __ mov(ip,
Operand(reinterpret_cast<intptr_t>(stub.GetCode().location()),
RelocInfo::CODE_TARGET),
LeaveCC,
lo);
+ __ Call(ip, lo);
}
if (FLAG_trace) {
=======================================
--- /branches/bleeding_edge/src/arm/virtual-frame-arm.cc Thu Jul 29
01:31:36 2010
+++ /branches/bleeding_edge/src/arm/virtual-frame-arm.cc Wed Nov 17
06:48:43 2010
@@ -245,18 +245,15 @@
__ LoadRoot(r2, Heap::kStackLimitRootIndex);
}
// Check the stack for overflow or a break request.
- // Put the lr setup instruction in the delay slot. The kInstrSize is
added
- // to the implicit 8 byte offset that always applies to operations with
pc
- // and gives a return address 12 bytes down.
- masm()->add(lr, pc, Operand(Assembler::kInstrSize));
masm()->cmp(sp, Operand(r2));
StackCheckStub stub;
// Call the stub if lower.
- masm()->mov(pc,
+ masm()->mov(ip,
Operand(reinterpret_cast<intptr_t>(stub.GetCode().location()),
RelocInfo::CODE_TARGET),
LeaveCC,
lo);
+ masm()->Call(ip, lo);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev