diff options
author | Calin Juravle <calin@google.com> | 2015-01-20 20:14:07 +0000 |
---|---|---|
committer | Calin Juravle <calin@google.com> | 2015-01-20 20:14:07 +0000 |
commit | 93edf73a5fecd526920fbd870068fa592376ac8a (patch) | |
tree | c24e0223e6ff0d1ec2eefeb1d863c1c32ca5f65c /compiler/optimizing/code_generator_arm.cc | |
parent | 97d9f286971a4c1eec70e08f9f18f990d21780d5 (diff) | |
download | art-93edf73a5fecd526920fbd870068fa592376ac8a.tar.gz art-93edf73a5fecd526920fbd870068fa592376ac8a.tar.bz2 art-93edf73a5fecd526920fbd870068fa592376ac8a.zip |
Use CompilerOptions for implicit stack overflow checks
Change-Id: I52744382a7e3d2c6c11a43e027d87bf43ec4e62b
Diffstat (limited to 'compiler/optimizing/code_generator_arm.cc')
-rw-r--r-- | compiler/optimizing/code_generator_arm.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/optimizing/code_generator_arm.cc b/compiler/optimizing/code_generator_arm.cc index 1ca1cee275..07c84bcc01 100644 --- a/compiler/optimizing/code_generator_arm.cc +++ b/compiler/optimizing/code_generator_arm.cc @@ -37,8 +37,6 @@ static DRegister FromLowSToD(SRegister reg) { return static_cast<DRegister>(reg / 2); } -static constexpr bool kExplicitStackOverflowCheck = false; - static constexpr int kNumberOfPushedRegistersAtEntry = 1 + 2; // LR, R6, R7 static constexpr int kCurrentMethodStackOffset = 0; @@ -514,17 +512,17 @@ void CodeGeneratorARM::GenerateFrameEntry() { bool skip_overflow_check = IsLeafMethod() && !FrameNeedsStackCheck(GetFrameSize(), InstructionSet::kArm); if (!skip_overflow_check) { - if (kExplicitStackOverflowCheck) { + if (GetCompilerOptions().GetImplicitStackOverflowChecks()) { + __ AddConstant(IP, SP, -static_cast<int32_t>(GetStackOverflowReservedBytes(kArm))); + __ LoadFromOffset(kLoadWord, IP, IP, 0); + RecordPcInfo(nullptr, 0); + } else { SlowPathCodeARM* slow_path = new (GetGraph()->GetArena()) StackOverflowCheckSlowPathARM(); AddSlowPath(slow_path); __ LoadFromOffset(kLoadWord, IP, TR, Thread::StackEndOffset<kArmWordSize>().Int32Value()); __ cmp(SP, ShifterOperand(IP)); __ b(slow_path->GetEntryLabel(), CC); - } else { - __ AddConstant(IP, SP, -static_cast<int32_t>(GetStackOverflowReservedBytes(kArm))); - __ LoadFromOffset(kLoadWord, IP, IP, 0); - RecordPcInfo(nullptr, 0); } } |