summaryrefslogtreecommitdiffstats
path: root/compiler/dex/quick/arm/call_arm.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-07-14 16:21:44 -0700
committerAndreas Gampe <agampe@google.com>2014-07-21 23:36:31 -0700
commit7ea6f79bbddd69d5db86a8656a31aaaf64ae2582 (patch)
treec64f89b15ca71e87317f6dd405ef4a5560b73e01 /compiler/dex/quick/arm/call_arm.cc
parente72ff8022968b23efedc56c0afdc1d24e8a928c2 (diff)
downloadart-7ea6f79bbddd69d5db86a8656a31aaaf64ae2582.tar.gz
art-7ea6f79bbddd69d5db86a8656a31aaaf64ae2582.tar.bz2
art-7ea6f79bbddd69d5db86a8656a31aaaf64ae2582.zip
ART: Throw StackOverflowError in native code
Initialize stack-overflow errors in native code to be able to reduce the preserved area size of the stack. Includes a refactoring away from constexpr in instruction_set.h to allow for easy changing of the values. Change-Id: I117cc8485f43da5f0a470f0f5e5b3dc3b5a06246
Diffstat (limited to 'compiler/dex/quick/arm/call_arm.cc')
-rw-r--r--compiler/dex/quick/arm/call_arm.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/dex/quick/arm/call_arm.cc b/compiler/dex/quick/arm/call_arm.cc
index 6b96e929aa..5059c5fc9a 100644
--- a/compiler/dex/quick/arm/call_arm.cc
+++ b/compiler/dex/quick/arm/call_arm.cc
@@ -358,7 +358,7 @@ void ArmMir2Lir::GenEntrySequence(RegLocation* ArgLocs, RegLocation rl_method) {
*/
bool skip_overflow_check = mir_graph_->MethodIsLeaf() && !IsLargeFrame(frame_size_, kArm);
NewLIR0(kPseudoMethodEntry);
- constexpr size_t kStackOverflowReservedUsableBytes = kArmStackOverflowReservedBytes -
+ const size_t kStackOverflowReservedUsableBytes = GetStackOverflowReservedBytes(kArm) -
Thread::kStackOverflowSignalReservedBytes;
bool large_frame = (static_cast<size_t>(frame_size_) > kStackOverflowReservedUsableBytes);
if (!skip_overflow_check) {
@@ -381,7 +381,7 @@ void ArmMir2Lir::GenEntrySequence(RegLocation* ArgLocs, RegLocation rl_method) {
// This is done before the callee save instructions to avoid any possibility
// of these overflowing. This uses r12 and that's never saved in a callee
// save.
- OpRegRegImm(kOpSub, rs_r12, rs_rARM_SP, kArmStackOverflowReservedBytes);
+ OpRegRegImm(kOpSub, rs_r12, rs_rARM_SP, GetStackOverflowReservedBytes(kArm));
Load32Disp(rs_r12, 0, rs_r12);
MarkPossibleStackOverflowException();
}