From dec7817522eeaf8f88dcae9ce065969aeebda3b3 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Fri, 19 Jun 2020 15:31:23 +0100 Subject: 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 --- compiler/optimizing/code_generator.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') 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, -- cgit v1.2.3-59-g8ed1b