summaryrefslogtreecommitdiffstats
path: root/vm/mterp/armv6t2
diff options
context:
space:
mode:
authorbuzbee <buzbee@google.com>2011-03-02 15:43:48 -0800
committerbuzbee <buzbee@google.com>2011-03-23 10:41:35 -0700
commit9a3147c7412f4794434b4c2604aa2ba784867774 (patch)
tree857eef2fd64a81a708d7c3b650b06b20794238e1 /vm/mterp/armv6t2
parentc28b465ea4d8d58d1bf3451b3f580a4197e52d9d (diff)
downloadandroid_dalvik-9a3147c7412f4794434b4c2604aa2ba784867774.tar.gz
android_dalvik-9a3147c7412f4794434b4c2604aa2ba784867774.tar.bz2
android_dalvik-9a3147c7412f4794434b4c2604aa2ba784867774.zip
Interpreter restructuring
This is a restructuring of the Dalvik ARM and x86 interpreters: o Combine the old portstd and portdbg interpreters into a single portable interpreter. o Add debug/profiling support to the fast (mterp) interpreters. o Delete old mechansim of switching between interpreters. Now, once you choose an interpreter at startup, you stick with it. o Allow JIT to co-exist with profiling & debugging (necessary for first-class support of debugging with the JIT active). o Adds single-step capability to the fast assembly interpreters without slowing them down (and, in fact, measurably improves their performance). o Remove old "polling for safe point" mechanism. Breakouts now achieved via modifying base of interpreter handler table. o Simplify interpeter control mechanism. o Allow thread-granularity control for profiling & debugging The primary motivation behind this change was to improve the responsiveness of debugging and profiling and to make it easier to add new debugging and profiling capabilities in the future. Instead of always bailing out to the slow debug portable interpreter, we can now stay in the fast interpreter. A nice side effect of the change is that the fast interpreters got a healthy speed boost because we were able to replace the polling safepoint check that involved a dozen or so instructions with a single table-base reload. When combined with the two earlier CLs related to this restructuring, we show a 5.6% performance improvement using libdvm_interp.so on the Checkers benchmark relative to Honeycomb. Change-Id: I8d37e866b3618def4e582fc73f1cf69ffe428f3c
Diffstat (limited to 'vm/mterp/armv6t2')
-rw-r--r--vm/mterp/armv6t2/bincmp.S21
1 files changed, 10 insertions, 11 deletions
diff --git a/vm/mterp/armv6t2/bincmp.S b/vm/mterp/armv6t2/bincmp.S
index 002eeedda..8d8c48d78 100644
--- a/vm/mterp/armv6t2/bincmp.S
+++ b/vm/mterp/armv6t2/bincmp.S
@@ -12,19 +12,18 @@
ubfx r0, rINST, #8, #4 @ r0<- A
GET_VREG(r3, r1) @ r3<- vB
GET_VREG(r2, r0) @ r2<- vA
- mov r9, #4 @ r0<- BYTE branch dist for not-taken
+ FETCH_S(r1, 1) @ r1<- branch offset, in code units
cmp r2, r3 @ compare (vA, vB)
- b${revcmp} 1f @ branch to 1 if comparison failed
- FETCH_S(r9, 1) @ r9<- branch offset, in code units
- movs r9, r9, asl #1 @ convert to bytes, check sign
- bmi common_backwardBranch @ yes, do periodic checks
-1:
+ mov${revcmp} r1, #2 @ r1<- BYTE branch dist for not-taken
+ adds r2, r1, r1 @ convert to bytes, check sign
+ FETCH_ADVANCE_INST_RB(r2) @ update rPC, load rINST
#if defined(WITH_JIT)
- GET_JIT_PROF_TABLE(r0)
- FETCH_ADVANCE_INST_RB(r9) @ update rPC, load rINST
- b common_testUpdateProfile
+ ldr r0, [rSELF, #offThread_pJitProfTable]
+ ldrmi rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh rIBASE
+ cmp r0, #0
+ bne common_updateProfile
#else
- FETCH_ADVANCE_INST_RB(r9) @ update rPC, load rINST
+ ldrmi rIBASE, [rSELF, #offThread_curHandlerTable] @ refresh rIBASE
+#endif
GET_INST_OPCODE(ip) @ extract opcode from rINST
GOTO_OPCODE(ip) @ jump to next instruction
-#endif