OSDN Git Service

AArch64: Clean up CalleeSaveMethod frame and the use of temp registers.
authorZheng Xu <zheng.xu@arm.com>
Fri, 25 Jul 2014 03:49:42 +0000 (11:49 +0800)
committerAndreas Gampe <agampe@google.com>
Tue, 29 Jul 2014 07:38:14 +0000 (00:38 -0700)
commitb551fdcda9eb128c80de37c4fb978968bec6d4b3
tree62942f412f2275e2e9188f71c370cd95ec91e17f
parent2815f1242c6c3ea1fc2df7bb5e4bd1924f4e75f7
AArch64: Clean up CalleeSaveMethod frame and the use of temp registers.

CalleeSaveMethod frame size changes :
SaveAll : 368 -> 176
RefOnly : 176 -> 96
RefsAndArgs : 304 -> 224

JNI register spill size changes :
160 -> 88

In the transition assembly, use registers following the rules:
1. x0-x7 as temp/argument registers.
2. IP0, IP1 as scratch registers.
3. After correct type of callee-save-frame has been setup, all registers
are scratch-able(probably except xSELF and xSUSPEND).
4. When restore callee-save-frame, IP0 and IP1 should be untouched.
5. From C to managed code, we assume all callee save register in AAPCS
will be restored by managed code except x19(SUSPEND).

In quick compiler:
1. Use IP0, IP1 as scratch register.
2. Use IP1 as hidden argument register(IP0 will be scratched by
 trampoline.)

Change-Id: I05ed9d418b01b9e87218a7608536f57e7a286e4c
13 files changed:
compiler/dex/quick/arm64/arm64_lir.h
compiler/dex/quick/arm64/call_arm64.cc
compiler/dex/quick/arm64/target_arm64.cc
compiler/jni/quick/arm64/calling_convention_arm64.cc
compiler/utils/arm64/assembler_arm64.cc
compiler/utils/arm64/constants_arm64.h
runtime/arch/arm/quick_method_frame_info_arm.h
runtime/arch/arm64/asm_support_arm64.S
runtime/arch/arm64/asm_support_arm64.h
runtime/arch/arm64/quick_entrypoints_arm64.S
runtime/arch/arm64/quick_method_frame_info_arm64.h
runtime/arch/arm64/registers_arm64.h
runtime/entrypoints/quick/quick_trampoline_entrypoints.cc