aboutsummaryrefslogtreecommitdiff
path: root/libdex
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-11-11 00:32:52 -0800
committerSteve Kondik <shade@chemlab.org>2013-11-11 00:32:52 -0800
commitbab417cc2aceee45238d5648975118bf3dd4c2e9 (patch)
tree39f1867dee9fe25cf7174917ef39ea3dd361fca4 /libdex
parent5531b23c1546fdf896db25f7412291bada6e723c (diff)
parente17852495a15ddad079305c725d067ac95e4d655 (diff)
Merge branch 'kk_2.7_rb1.9' of git://codeaurora.org/platform/dalvik into caf
Change-Id: I885fab2470352d0a625c9946d0d5c9111486b713
Diffstat (limited to 'libdex')
-rw-r--r--libdex/Android.mk11
-rw-r--r--libdex/DexOpcodes.h1
-rw-r--r--libdex/InstrUtils.cpp5
-rw-r--r--libdex/InstrUtils.h1
4 files changed, 17 insertions, 1 deletions
diff --git a/libdex/Android.mk b/libdex/Android.mk
index 3c112f0ab..81deb64da 100644
--- a/libdex/Android.mk
+++ b/libdex/Android.mk
@@ -14,6 +14,15 @@
LOCAL_PATH:= $(call my-dir)
+ifeq ($(ARCH_ARM_HAVE_ARMV7A),true)
+ target_inline_arg5_flag := -DINLINE_ARG_EXPANDED
+ host_inline_arg5_flag := -DINLINE_ARG_EXPANDED
+else
+ target_inline_arg5_flag :=
+ host_inline_arg5_flag :=
+endif
+
+
dex_src_files := \
CmdUtils.cpp \
DexCatch.cpp \
@@ -57,6 +66,7 @@ LOCAL_C_INCLUDES += $(dex_include_files)
LOCAL_STATIC_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libdex
+LOCAL_CFLAGS += $(target_inline_arg5_flag)
include $(BUILD_STATIC_LIBRARY)
endif # !SDK_ONLY
@@ -73,4 +83,5 @@ LOCAL_C_INCLUDES += $(dex_include_files)
LOCAL_STATIC_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libdex
+LOCAL_CFLAGS += $(host_inline_arg5_flag)
include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/libdex/DexOpcodes.h b/libdex/DexOpcodes.h
index 8a178419e..305c53db3 100644
--- a/libdex/DexOpcodes.h
+++ b/libdex/DexOpcodes.h
@@ -325,6 +325,7 @@ enum Opcode {
OP_SPUT_OBJECT_VOLATILE = 0xfe,
OP_UNUSED_FF = 0xff,
// END(libdex-opcode-enum)
+ // Note: The end of this list must match dvmVerifyDex() in vm/compiler/Frontend.cpp
};
/*
diff --git a/libdex/InstrUtils.cpp b/libdex/InstrUtils.cpp
index be343f0f2..d31d78624 100644
--- a/libdex/InstrUtils.cpp
+++ b/libdex/InstrUtils.cpp
@@ -356,7 +356,7 @@ static u1 gInstructionFormatTable[kNumPackedOpcodes] = {
kFmt22b, kFmt22b, kFmt22b, kFmt22b, kFmt22b, kFmt22b, kFmt22b,
kFmt22b, kFmt22b, kFmt22b, kFmt22c, kFmt22c, kFmt21c, kFmt21c,
kFmt22c, kFmt22c, kFmt22c, kFmt21c, kFmt21c, kFmt00x, kFmt20bc,
- kFmt35mi, kFmt3rmi, kFmt35c, kFmt10x, kFmt22cs, kFmt22cs, kFmt22cs,
+ kFmt35mi, kFmt3rmi, kFmt3rc, kFmt10x, kFmt22cs, kFmt22cs, kFmt22cs,
kFmt22cs, kFmt22cs, kFmt22cs, kFmt35ms, kFmt3rms, kFmt35ms, kFmt3rms,
kFmt22c, kFmt21c, kFmt21c, kFmt00x,
// END(libdex-formats)
@@ -495,6 +495,7 @@ void dexDecodeInstruction(const u2* insns, DecodedInstruction* pDec)
pDec->opcode = opcode;
pDec->indexType = dexGetIndexTypeFromOpcode(opcode);
+ pDec->extraData = NULL;
switch (format) {
case kFmt10x: // op
@@ -608,11 +609,13 @@ void dexDecodeInstruction(const u2* insns, DecodedInstruction* pDec)
*/
switch (count) {
case 5: {
+#ifndef INLINE_ARG_EXPANDED
if (format == kFmt35mi) {
/* A fifth arg is verboten for inline invokes. */
ALOGW("Invalid arg count in 35mi (5)");
goto bail;
}
+#endif
/*
* Per note at the top of this format decoder, the
* fifth argument comes from the A field in the
diff --git a/libdex/InstrUtils.h b/libdex/InstrUtils.h
index 76993a529..b98511656 100644
--- a/libdex/InstrUtils.h
+++ b/libdex/InstrUtils.h
@@ -134,6 +134,7 @@ struct DecodedInstruction {
u4 arg[5]; /* vC/D/E/F/G in invoke or filled-new-array */
Opcode opcode;
InstructionIndexType indexType;
+ void* extraData;
};
/*