summaryrefslogtreecommitdiff
path: root/compiler/jni/quick/calling_convention.h
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-05-01 14:38:56 -0700
committer Andreas Gampe <agampe@google.com> 2014-05-01 14:55:57 -0700
commitd1104322e5156669767e8b2c3b843ffaff173381 (patch)
tree3b3e89afb1d616e958ac084a3e75c50d33deccb0 /compiler/jni/quick/calling_convention.h
parent69cf921f5ab4467fa2c109e30ea5caca2a20790c (diff)
ART: aarch64 jni compiler needs to extend small return types
As aarch64 calling convention does not mandate extension on return values anymore and leaves the upper bits undefined, the jni compiler needs to sign- or zero-extend the returned values when necessary. As three architectures need extension now, refactor this fact into a flag into a virtual method. Add tests to JniTest that exercise the required extension. Change-Id: Idebb7c4dedebb852e58ade63e1c2b1eeced23104
Diffstat (limited to 'compiler/jni/quick/calling_convention.h')
-rw-r--r--compiler/jni/quick/calling_convention.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h
index 4d25d1ce96..18afd5817f 100644
--- a/compiler/jni/quick/calling_convention.h
+++ b/compiler/jni/quick/calling_convention.h
@@ -287,6 +287,8 @@ class JniCallingConvention : public CallingConvention {
FrameOffset ReturnValueSaveLocation() const;
// Register that holds result if it is integer.
virtual ManagedRegister IntReturnRegister() = 0;
+ // Whether the compiler needs to ensure zero-/sign-extension of a small result type
+ virtual bool RequiresSmallResultTypeExtension() const = 0;
// Callee save registers to spill prior to native code (which may clobber)
virtual const std::vector<ManagedRegister>& CalleeSaveRegisters() const = 0;