Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

am 20aeca6: Merge "Pad the 8 and 16 bit Jvalue members"

* commit '20aeca6e2b18c07d3840f4b09f09186511148d8c':
  Pad the 8 and 16 bit Jvalue members
  • Loading branch information...
commit ad4681b5d7f46bf8d672ddcd102b6e123bae37cd 2 parents 0b88861 + 20aeca6
@enh enh authored Android Git Automerger committed
Showing with 29 additions and 0 deletions.
  1. +25 −0 vm/Common.h
  2. +4 −0 vm/mterp/common/asm-constants.h
View
25 vm/Common.h
@@ -102,6 +102,7 @@ typedef int64_t s8;
struct Object;
union JValue {
+#if defined(HAVE_LITTLE_ENDIAN)
u1 z;
s1 b;
u2 c;
@@ -111,6 +112,30 @@ union JValue {
float f;
double d;
Object* l;
+#endif
+#if defined(HAVE_BIG_ENDIAN)
+ struct {
+ u1 _z[3];
+ u1 z;
+ };
+ struct {
+ s1 _b[3];
+ s1 b;
+ };
+ struct {
+ u2 _c;
+ u2 c;
+ };
+ struct {
+ s2 _s;
+ s2 s;
+ };
+ s4 i;
+ s8 j;
+ float f;
+ double d;
+ void* l;
+#endif
};
#define OFFSETOF_MEMBER(t, f) \
View
4 vm/mterp/common/asm-constants.h
@@ -152,7 +152,11 @@ MTERP_OFFSET(offThread_method, Thread, interpSave.method, 8)
MTERP_OFFSET(offThread_methodClassDex, Thread, interpSave.methodClassDex, 12)
/* make sure all JValue union members are stored at the same offset */
MTERP_OFFSET(offThread_retval, Thread, interpSave.retval, 16)
+#ifdef HAVE_BIG_ENDIAN
+MTERP_OFFSET(offThread_retval_z, Thread, interpSave.retval.z, 19)
+#else
MTERP_OFFSET(offThread_retval_z, Thread, interpSave.retval.z, 16)
+#endif
MTERP_OFFSET(offThread_retval_i, Thread, interpSave.retval.i, 16)
MTERP_OFFSET(offThread_retval_j, Thread, interpSave.retval.j, 16)
MTERP_OFFSET(offThread_retval_l, Thread, interpSave.retval.l, 16)
Please sign in to comment.
Something went wrong with that request. Please try again.