summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2020-06-19 15:31:23 +0100
committerVladimir Marko <vmarko@google.com>2020-06-22 08:05:28 +0000
commitdec7817522eeaf8f88dcae9ce065969aeebda3b3 (patch)
treea15fd16ccb4a1929ec60584ead8f095b565c9e3e /compiler/optimizing/code_generator.cc
parentea4d7d2d52dd9795cf39eccd46cb07551c62392f (diff)
Optimizing: Introduce {Increase,Decrease}Frame().
And use it to clean up code generators. Also fix CFI in MaybeIncrementHotness() for arm/arm64/x86. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: testrunner.py --host --debuggable --ndebuggable \ --optimizing --jit --jit-on-first-use -t 178 Test: aosp_cf_x86_phone-userdebug boots. Test: aosp_cf_x86_phone-userdebug/jitzygote boots. Test: # On blueline: testrunner.py --target --debuggable --ndebuggable \ --optimizing --jit --jit-on-first-use -t 178 Bug: 112189621 Change-Id: I524e6c3054ffe1b05e2860fd7988cd9995df2963
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index f74a938d4a..8e64e1819e 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -545,8 +545,10 @@ void CodeGenerator::PrepareCriticalNativeArgumentMoves(
}
}
-void CodeGenerator::AdjustCriticalNativeArgumentMoves(size_t out_frame_size,
- /*inout*/HParallelMove* parallel_move) {
+void CodeGenerator::FinishCriticalNativeFrameSetup(size_t out_frame_size,
+ /*inout*/HParallelMove* parallel_move) {
+ DCHECK_NE(out_frame_size, 0u);
+ IncreaseFrame(out_frame_size);
// Adjust the source stack offsets by `out_frame_size`, i.e. the additional
// frame size needed for outgoing stack arguments.
for (size_t i = 0, num = parallel_move->NumMoves(); i != num; ++i) {
@@ -558,6 +560,8 @@ void CodeGenerator::AdjustCriticalNativeArgumentMoves(size_t out_frame_size,
operands->SetSource(Location::DoubleStackSlot(source.GetStackIndex() + out_frame_size));
}
}
+ // Emit the moves.
+ GetMoveResolver()->EmitNativeCode(parallel_move);
}
const char* CodeGenerator::GetCriticalNativeShorty(HInvokeStaticOrDirect* invoke,