summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix nested deoptimization.Mingyao Yang2015-06-181-1/+1
| | | | | | | | | | | | Handle nested deoptimization cases. Create a stacked shadow frame records to keep track of deoptimization shadow frames. Shadow frames under construction can be tracked in the same stack. Bug: 20845490 (cherry picked from commit 1f2d3ba6af52cf6f566deb38b7e07735c9a08fb6) Change-Id: I768285792c29e7c3cfcd21e7a2600802506024d8
* Move mirror::ArtMethod to nativeMathieu Chartier2015-06-021-97/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 (cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
* Add AbstractMethod, Constructor, MethodMathieu Chartier2015-04-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves functionality to ART from libcore. Precursor to moving ArtMethods to native. Mostly performance improvements. N5 perf before (irrelevant results removed): Class_getConstructor 962.87 =========== Class_getDeclaredMethod 2394.37 ============================ Class_getMethod 2509.20 ============================== Class_newInstance 1999.81 ======================= Method_invokeI 1439.02 ================= Method_invokePreBoxedI 1415.82 ================ Method_invokeStaticI 1456.24 ================= Method_invokeStaticPreBoxedI 1427.32 ================= Method_invokeStaticV 814.47 ========= Method_invokeV 816.56 ========= After: benchmark ns linear runtime Class_getConstructor 1302.04 ================ Class_getDeclaredMethod 1459.01 ================== Class_getMethod 1560.40 =================== Class_newInstance 2029.94 ========================= Method_invokeI 1312.89 ================ Method_invokePreBoxedI 1255.01 =============== Method_invokeStaticI 1289.13 =============== Method_invokeStaticPreBoxedI 1196.52 ============== Method_invokeStaticV 790.82 ========= Method_invokeV 791.73 ========= Performance improvements are more than just fixing regressions introduced in: http://android-review.googlesource.com/#/c/146069/ Bug: 19264997 Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce
* ARM64: Remove suspend register.Zheng Xu2015-04-141-1/+1
| | | | | | | | It also clean up build/remove frame used by JNI compiler and generates stp/ldp instead of str/ldr. Also x19 has been unblocked in both quick and optimizing compiler. Change-Id: Idbeac0942265f493266b2ef9b7a65bb4054f0e2d
* Unify ART's various implementations of bit_cast.Roland Levillain2015-03-241-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ART had several implementations of art::bit_cast: 1. one in runtime/base/casts.h, declared as: template <class Dest, class Source> inline Dest bit_cast(const Source& source); 2. another one in runtime/utils.h, declared as: template<typename U, typename V> static inline V bit_cast(U in); 3. and a third local version, in runtime/memory_region.h, similar to the previous one: template<typename Source, typename Destination> static Destination MemoryRegion::local_bit_cast(Source in); This CL removes versions 2. and 3. and changes their callers to use 1. instead. That version was chosen over the others as: - it was the oldest one in the code base; and - its syntax was closer to the standard C++ cast operators, as it supports the following use: bit_cast<Destination>(source) since `Source' can be deduced from `source'. Change-Id: I7334fd5d55bf0b8a0c52cb33cfbae6894ff83633
* JDWP: Optimized single step during debuggingDaniel Mihalyi2015-03-241-2/+34
| | | | | | | | | | | | | | | | | | | | | | | For single stepping full deoptimization and undeoptimizations were performed with significant overhead, because every code will be executed in interpreted mode during a single step, even if it is not strictly required. For example, if we have a computation heavy method call and we would like to step over it, that method (and all the methods called from it) will run in interpreter mode. This can take so long in some cases (e.g. multiple minutes) that it makes debugging process unusable. The solution for this limitation is not using full deoptimizations for single steps and force interpreter only for those methods that we are about to step into, and require stack deoptimization before step outs. Bug: 17750566 Bug: 18094282 Bug: https://code.google.com/p/android/issues/detail?id=77984 Change-Id: I683c52465883146c4c84ec47bf96f8efd920527f Signed-off-by: Daniel Mihalyi <daniel.mihalyi@mattakis.com>
* Initial support for quick compiler on MIPS64r6.Maja Gagic2015-03-061-2/+0
| | | | Change-Id: I6f43027b84e4a98ea320cddb972d9cf39bf7c4f8
* Fix a compilation error for Mips64.Douglas Leung2015-02-091-0/+1
| | | | Change-Id: I4f35750c4b840fce18c467995787e92bc38a7812
* ART: Change x86 long param ABI (Quick/JNI/Opt)Mark Mendell2015-01-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Ensure that we don't pass a long parameter across the last register and the stack: skip the register and allocate it only on the stack. This was requested to simplify the optimizing compiler code generation for x86. Optimizing (Baseline) compiler support for x86 longs: - Remove QuickParameter from Location, as there are no longer any uses of it. Bump oat.h version because we changed an ABI again. I changed IsParamALong() to return false for argument 0 (this argument). I am not sure why it differed from all other tests. I have not tested on ARM. I followed Nicolas's suggestions for setting the value of kSplitPairAcrossRegisterAndStack for different architectures. Change-Id: I2f16b33c1dac58dd4f4f503e9c2309d845f5fb7a Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* Force set resolved method for static invokesMathieu Chartier2015-01-281-0/+10
| | | | | | | | | | | | For static invokes, we may dispatch to the static method in the superclass but resolve using the subclass. To prevent getting slow paths on each invoke, we force set the resolved method for the super class dex method index if we are in the same dex file. Added test. Bug: 19175856 Change-Id: I26f8644a7f725f5c2dc2a94a8e9578f573792507
* Revert "Revert "ART: Implement X86 hard float (Quick/JNI/Baseline)""Mark P Mendell2015-01-271-5/+9
| | | | | | | | | | This reverts commit 949c91fb91f40a4a80b2b492913cf8541008975e. This time, don't clobber EBX before saving it. Redo some of the macros to make register usage explicit. Change-Id: I8db8662877cd006816e16a28f42444ab7c36bfef
* Revert "ART: Implement X86 hard float (Quick/JNI/Baseline)"Vladimir Marko2015-01-271-9/+5
| | | | | | | | | | | | | And the 3 Mac build fixes. Fix conflicts in context_x86.* . This reverts commits 3d2c8e74c27efee58e24ec31441124f3f21384b9 , 34eda1dd66b92a361797c63d57fa19e83c08a1b4 , f601d1954348b71186fa160a0ae6a1f4f1c5aee6 , bc503348a1da573488503cc2819c9e30807bea31 . Bug: 19150481 Change-Id: I6650ee30a7d261159380fe2119e14379e4dc9970
* ART: Implement X86 hard float (Quick/JNI/Baseline)Mark Mendell2015-01-231-5/+9
| | | | | | | | | | | | | | | | | Use XMM0-XMM3 as parameter registers for float/double on X86. X86_64 already uses XMM0-XMM7 for parameters. Change the 'hidden' argument register from XMM0 to XMM7 to avoid a conflict. Add support for FPR save/restore in runtime/arch/x86. Minimal support for Optimizing baseline compiler. Bump the version in runtime/oat.h because this is an ABI change. Change-Id: Ia6fe150e8488b9e582b0178c0dda65fc81d5a8ba Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* Merge "Fix refs_and_args callee save order for Mips32."Andreas Gampe2015-01-161-1/+1
|\
| * Fix refs_and_args callee save order for Mips32.Douglas Leung2015-01-121-1/+1
| | | | | | | | | | | | This patch fixes an ART crash while using the soft keyboard. Change-Id: Ib2d651c460ce2707356986cd733bed23b0cabb21
| * Merge "Revert "ART: Implement hard float for X86""Vladimir Marko2015-01-121-9/+5
| |\
| | * Revert "ART: Implement hard float for X86"Vladimir Marko2015-01-121-9/+5
| | | | | | | | | | | | | | | | | | This reverts commit 59b9cf7ec0ccc13df91be0bd5c723b8c52410739. Change-Id: I08333b528032480def474286dc368d916a07e17f
| * | Merge "ART: Implement hard float for X86"Vladimir Marko2015-01-121-5/+9
| |\ \ | | |/
| | * ART: Implement hard float for X86Mark Mendell2015-01-121-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use XMM0-XMM3 as parameter registers for float/double on X86. X86_64 already uses XMM0-XMM7 for parameters. Change the 'hidden' argument register from XMM0 to XMM7 to avoid a conflict. This change was requested to simplify the Optimizing compiler implementation. Change-Id: I89ba8ade99b9a8a5b1ad1ee5f5cbfd33d656bfaa Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* | | ART: Mips64 runtime supportAndreas Gampe2015-01-151-20/+114
| | | | | | | | | | | | | | | | | | Interpret-only Mips64 runtime support. Change-Id: Iee22d0c8c77105d9b2f03a67dc4e09957fe0ab0a
* | | Skip r1 on arm if first parameter is a long.Nicolas Geoffray2015-01-131-0/+10
|/ / | | | | | | Change-Id: I16d927ee0a0b55031ade4c92c0095fd74e18ed5b
* | Fix handling of long argument spanning register/memory.Nicolas Geoffray2015-01-121-8/+3
|/ | | | | | | | | | | | | | | | | | Comment in arm_lir.h says: * If a 64-bit argument would span the register/memory argument * boundary, it will instead be fully passed in the frame. This change implements such logic for all platforms. We still need to pass the low part in register as well because I haven't ported the jni compilers (x86 and mips) to it. Once the jni compilers are updated, we can remove the register assignment. Note that this greatly simplifies optimizing's register allocator by not having to understand a long spanning register and memory. Change-Id: I59706ca5d47269fc46e5489ac99bd6576e87e7f3
* Support proxy method in StackVisitor::GetThisObjectSebastien Hertz2014-12-091-0/+23
| | | | | | | | | | | Adds function artQuickGetProxyThisObject which returns the 'this' object of the proxy method using the QuickArgumentVisitor. Since proxy methods have the same layout than the kRefsAndArgs runtime method and 'this' is the 1st method argument, it is located in the first GPR. Bug: 17965861 Change-Id: Ic6ef6c83b9a549c25f9929d5e00ffe1d3a9a36f0
* Fix artQuickResolutionTrampoline.Ian Rogers2014-12-021-1/+4
| | | | | | Mistakenly updating dex method index of the non-receiver method. Change-Id: I42296e344a53e001bf37414852cd9f23f629ca40
* Move FindDexMethodIndexInOtherDexFile into ArtMethod.Ian Rogers2014-12-021-35/+39
| | | | | | | | | | | Move FindDexMethodIndexInOtherDexFile out of MethodHelper into ArtMethod in preparation for the removal of MethodHelper. Tidy ClassLinker::ResolveMethod so that all exception paths flow through the exception pending assertion. Tidy artQuickResolutionTrampoline to be more explicit about variable names and only update the dex cache if necessary. Change-Id: I3e48eb4f6c1291533067c1b53efe90c53bfcaea8
* Remove MethodHelper from the interpreter.Ian Rogers2014-12-021-7/+8
| | | | | | | | | Use ShadowFrame to get the executing method to avoid a handle for the current method. Various associated bits of header file clean-up and removal of an unnecessary use of MethodHelper in CompilerDriver. Change-Id: I3b6f4413701e8fc6b0c58b0041a0dd15472bedaa
* Merge "Add JNI trampoline for mips32."Ian Rogers2014-11-221-5/+4
|\
| * Add JNI trampoline for mips32.Douglas Leung2014-10-311-5/+4
| | | | | | | | | | | | This patch allows the browser to come up. Change-Id: Icad9da868be76d6a08e615807fad8678ac0a110f
* | Change 64 bit ArtMethod fields to be pointer sizedMathieu Chartier2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the 64 bit entrypoint and gc map fields in ArtMethod to be pointer sized. This saves a large amount of memory on 32 bit systems. Reduces ArtMethod size by 16 bytes on 32 bit. Total number of ArtMethod on low memory mako: 169957 Image size: 49203 methods -> 787248 image size reduction. Zygote space size: 1070 methods -> 17120 size reduction. App methods: ~120k -> 2 MB savings. Savings per app on low memory mako: 125K+ per app (less active apps -> more image methods per app). Savings depend on how often the shared methods are on dirty pages vs shared. TODO in another CL, delete gc map field from ArtMethod since we should be able to get it from the Oat method header. Bug: 17643507 Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8 (cherry picked from commit e832e64a7e82d7f72aedbd7d798fb929d458ee8f)
* | Instruction set features for ARM64, MIPS and X86.Ian Rogers2014-11-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Also, refactor how feature strings are handled so they are additive or subtractive. Make MIPS have features for FPU 32-bit and MIPS v2. Use in the quick compiler rather than #ifdefs that wouldn't have worked in cross-compilation. Add SIMD features for x86/x86-64 proposed in: https://android-review.googlesource.com/#/c/112370/ Bug: 18056890 Change-Id: Ic88ff84a714926bd277beb74a430c5c7d5ed7666
* | ART: More warningsAndreas Gampe2014-11-041-2/+2
| | | | | | | | | | | | | | Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
* | ART: Replace COMPILE_ASSERT with static_assert (runtime)Andreas Gampe2014-11-031-7/+8
| | | | | | | | | | | | Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
* | Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.Ian Rogers2014-11-031-14/+8
|/ | | | | | | | | | | Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
* Merge "Tidy logging code not using UNIMPLEMENTED."Ian Rogers2014-10-251-4/+3
|\
| * Tidy logging code not using UNIMPLEMENTED.Ian Rogers2014-10-241-4/+3
| | | | | | | | Change-Id: I7a79c1671a6ff8b2040887133b3e0925ef9a3cfe
* | ARM: Use hardfp calling convention between java to java call.Zheng Xu2014-10-241-59/+89
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | This patch default to use hardfp calling convention. Softfp can be enabled by setting kArm32QuickCodeUseSoftFloat to true. We get about -1 ~ +5% performance improvement with different benchmark tests. Hopefully, we should be able to get more performance by address the left TODOs, as some part of the code takes the original assumption which is not optimal. DONE: 1. Interpreter to quick code 2. Quick code to interpreter 3. Transition assembly and callee-saves 4. Trampoline(generic jni, resolution, invoke with access check and etc.) 5. Pass fp arg reg following aapcs(gpr and stack do not follow aapcs) 6. Quick helper assembly routines to handle ABI differences 7. Quick code method entry 8. Quick code method invocation 9. JNI compiler TODO: 10. Rework ArgMap, FlushIn, GenDalvikArgs and affected common code. 11. Rework CallRuntimeHelperXXX(). Change-Id: I9965d8a007f4829f2560b63bcbbde271bdcf6ec2
* Const-ify functions/variables in trampoline entrypoints.Ian Rogers2014-10-211-22/+23
| | | | Change-Id: I777600c7362ab3c1dd65a695e36a4633b43033fe
* Refactor quick entrypointsIan Rogers2014-10-201-9/+9
| | | | | | | | | | | Remove FinishCalleeSaveFrameSetup. Assembly routines write down anchor into TLS as well as placing runtime method in callee save frame. Simplify artSet64InstanceFromCode by not computing the referrer from the stack in the C++ code. Move assembly offset tests next to constant declaration and tidy arch_test. Change-Id: Iededeebc05e54a1e2bb7bb3572b8ba012cffa1c8
* Make ART compile with GCC -O0 again.Ian Rogers2014-10-161-1/+2
| | | | | | | | | | | | | Tidy up InstructionSetFeatures so that it has a type hierarchy dependent on architecture. Add to instruction_set_test to warn when InstructionSetFeatures don't agree with ones from system properties, AT_HWCAP and /proc/cpuinfo. Clean-up class linker entry point logic to not return entry points but to test whether the passed code is the particular entrypoint. This works around image trampolines that replicate entrypoints. Bug: 17993736 Change-Id: I5f4b49e88c3b02a79f9bee04f83395146ed7be23
* Work around ICE bugs with MIPS GCC and O1.Ian Rogers2014-10-101-19/+17
| | | | | | | | | Also, work around GCC warning bugs where array accesses with explicit bounds checks are flagged as being out-of-bounds. Significantly, clean-up the HandleScope so the array accesses don't appear out-of-bounds at compile time. Change-Id: I5d66567559cc1f97cd0aa02c0df8575ebadbfe3d
* stdint types all the way!Ian Rogers2014-10-091-11/+11
| | | | Change-Id: I4e4ef3a2002fc59ebd9097087f150eaf3f2a7e08
* Handlerize methods across some GC points.Hiroshi Yamauchi2014-10-061-6/+5
| | | | | Bug: 12687968 Change-Id: I0d5b0a78488ba76db4d25991d8db95b24bb624e9
* ART: Rename Handle hierarchyAndreas Gampe2014-09-151-2/+2
| | | | | | | Bring the names in line with normal OO principles: ConstHandle becomes Handle, and Handle becomes MutableHandle. Change-Id: I0f018eb7ba28bc422e3a23dd73a6cbe6fc2d2044
* Compile time performance improvements focusing on interpret-only.Ian Rogers2014-09-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce virtual method dispatch in the method verifier and make more code inline-able. Add a StringPiece with const char* equality operator to avoid redundant StringPieces and strlens. Remove back link from register line to verifier and pass as argument to reduce size of RegisterLine. Remove instruction length from instruction flags and compute from the instruction, again to reduce size. Add suspend checks to resolve and verify to allow for more easy monitor inflation and reduce contention on Locks::thread_list_suspend_thread_lock_. Change ThrowEarlierClassFailure to throw pre-allocated exception. Avoid calls to Thread::Current() by passing self. Template specialize IsValidClassName. Make ANR reporting with SIGQUIT run using checkpoints rather than suspending all threads. This makes the stack/lock analysis less lock error prone. Extra Barrier assertions and condition variable time out is now returned as a boolean both from Barrier and ConditionVariable::Wait. 2 threaded host x86-64 interpret-only numbers from 341 samples: Before change: Avg 176.137ms 99% CI 3.468ms to 1060.770ms After change: Avg 139.163% 99% CI 3.027ms to 838.257ms Reduction in average compile time after change is 20.9%. Slow-down without change is 26.5%. Bug: 17471626 - Fix bug where RegTypeCache::JavaLangObject/String/Class/Throwable could return unresolved type when class loading is disabled. Bug: 17398101 Change-Id: Id59ce3cc520701c6ecf612f7152498107bc40684
* Fix bugs in the x86 and arm versions of generic JNI.Nicolas Geoffray2014-08-141-1/+9
| | | | | | | | | Also fix the run script of 116-nodex2oat to use the non-prebuild script for target. Bug: 17000769 Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
* ART: Add guards to the dex cache and its shortcutsAndreas Gampe2014-08-061-3/+3
| | | | | | | | Do not return fields, methods or classes if the (declaring) class is erroneous. Bug: 16692788 Change-Id: If43c2414ad0eb22db5eba7cf66396c7f16c26597
* Fix proxy tracing and enable tests that now work with tracing.Jeff Hao2014-08-061-2/+1
| | | | | | | Also updates proxy_test to generate an image for GetQuickOatCodeFor. Bug: 16386215 Change-Id: Ie7daad3d73ea7b60187bc1e7037ade0df8277107
* Merge "Revert "Fix proxy tracing and enable tests that now work with tracing.""Nicolas Geoffray2014-07-231-1/+2
|\
| * Revert "Fix proxy tracing and enable tests that now work with tracing."Nicolas Geoffray2014-07-291-1/+2
| | | | | | | | | | | | This reverts commit 0398e171f206cd3b140a358ac31b0a3760380df1. Change-Id: I1346ab01485cc7207be0ecb4d8788c500c0df903
* | AArch64: Clean up CalleeSaveMethod frame and the use of temp registers.Zheng Xu2014-07-291-9/+15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | 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