/hg/release/icedtea7-forest-2.1/hotspot: 3 new changesets

aph at icedtea.classpath.org aph at icedtea.classpath.org
Mon May 28 08:27:27 PDT 2012


changeset 73a07d24174e in /hg/release/icedtea7-forest-2.1/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=73a07d24174e
author: aph
date: Thu May 17 13:45:50 2012 -0400

	RTC Thumb2 JIT enhancements.
	2012-05-16  Andrew Haley  <aph at redhat.com>

		* src/cpu/zero/vm/thumb2.cpp:
		Throughout: T2EE_PRINT_* renamed to T2_PRINT_*.
		Route all debug info to stderr.
		We now do frameless compilation, so do all frame accesses relative
		to SP.
		Remove zombie detection pass.
		Remove dead code.
		Add OSPACE option.
		(H_LDC_W)
		(H_INVOKESTATIC_RESOLVED, H_INVOKESPECIAL_RESOLVED)
		(H_INVOKEVIRTUAL_RESOLVED, H_INVOKEVFINAL, H_MONITORENTER)
		(H_MONITOREXIT): New.
		(T2_* macros): Rename from T2EE_*.
		(SLOW_ENTRY_OFFSET, FAST_ENTRY_OFFSET): New.
		(THUMB2_CODEBUF_SIZE): Make this depend on PRODUCT.
		(H_GETSTATIC, H_PUTSTATIC, H_JSR, H_ZOMBIE, H_MONITOR): Delete.
		(H_DEADCODE, H_LDC_W, H_INVOKESTATIC_RESOLVED)
		(H_INVOKESPECIAL_RESOLVED, H_INVOKEVIRTUAL_RESOLVED)
		(H_INVOKEVFINAL): New.
		(DebugSwitch): New.
		(JAZ_V6): New local register.
		(Thumb2_pass1): Count reads and writes for register allocator.
		Delete zombie detection pass.
		(Thumb2_RegAlloc): New.
		(out_align, out_align_offset, nop_16, nop_32): New.
		(fullBarrier, storeBarrier): Chaeck for an MP OS.
		(load_local, store_local): Check for an istate reg.
		(load_istate, store_istate): New.
		(Thumb2_Load, Thumb2_LoadX2): Remove monitor stack adj.
		(Thumb2_Store, Thumb2_StoreX2): Likewise.
		(Debug): New.
		(Thumb2_save_locals, Thumb2_restore_locals, Thumb2_invoke_save)
		(Thumb2_invoke_restore, Thumb2_Exit): Remove monitor stackdepth
		adj.  Move here from below.
		(Thumb2_Accessor): Rewrite for new method header layout.
		(Thumb2_Enter): Likewise.
		Do frameless setup.
		(Thumb2_load_long): Use a single ldrexd instruction.
		(Thumb2_codegen): Align branches.
		Call Debug if we're about to enter a synchronized method.
		(opc_jsr) Add handler.
		(opc_monitorenter, opc_monitorexit): Call handler instead of
		generating code.
		(Thumb2_Initialize): Disassmble ARM and Thumb code separately.

		* src/cpu/zero/vm/cppInterpreter_arm.S:
		Throughout: the thread pointer is now in a register, so use it
		everywhere.  Set the thread pointer register at every entry point
		to the interpreter.
		Throughout: use the macros SLOW_ENTRY and FAST_ENTRY rather than
		ALIGN_CODE.
		Throughout: register tmp2 is no longer available, use other
		registers as appropriate.

		(T2JIT): Rename from THUMB2EE.
		(call_thumb2): Load all the thumb2 registers that have been
		allocated to locals.
		(accessor_entry): Check for stack overflow.
		(.fast_accessor_*): Delete dead code.
		(LOAD_FRAME): New.
		(Thumb2_invokevfinalresolved_stub)
		(Thumb2_invokevirtualresolved_stub): New.
		(Thumb2_invokestaticresolved_stub): New.
		(Thumb2_invokespecialresolved_stub): New.
		(Thumb2 stubs): Use FRAME_* rather than ISTATE_*; the frame
		pointer is no longer in a fixed register.
		(JAZ_REGSET, JAZ_*): Move delaration of JAZ registers here.
		(Thumb2_monitorenter): New.

		(normal_entry_synchronized): Rearrange so that we can load the
		thread pointer without exceeding the number of instructions that
		we can fit into the gap between SLOW_ENTRY and FAST_ENTRY.
		(normal_entry): Likewise.

		(MP_COMPILE_THRESHOLD, UP_COMPILE_THRESHOLD): Adjust.
		(TBIT): New.
		(FRAME_METHOD, FRAME_CONSTANTS, FRAME_BCP, FRAME_STACK_LIMIT)
		(FRAME_LOCALS, FRAME_STACK): New.
		(SLOW_ENTRY,  FAST_ENTRY, SLOW_ENTRY_OFFSET, FAST_ENTRY_OFFSET): New.
		(LOAD_ISTATE): New.
		(DECACHE_STACK_USING_FRAME, DECACHE_JPC_USING_FRAME): New.
		(TRACE): Save and restore IP.
		Pass istate to my_trace().

		(Opcode monitorenter): Remove all the assembler code and replace
		it with a call to Helper_monitorenter.

		* src/cpu/zero/vm/bytecodes_arm.def:
		Throughout: register tmp2 is no longer available, use other
		registers as appropriate.

		(lgetfield): Use ldrexd to load a jlong rather than an
		ldrexd/strexd loop.

		* src/cpu/zero/vm/asm_helper.cpp (ARCH_THUMB2): Renamed from
		ARCH_THUMBEE.
		(my_trace): New.
		(Helper_monitorenter): New.
		(Helper_monitorexit): New.


changeset f293db049783 in /hg/release/icedtea7-forest-2.1/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=f293db049783
author: aph
date: Mon May 28 08:01:18 2012 -0400

	Use ldrexd for atomic reads on ARMv7.
	2012-05-28  Andrew Haley  <aph at redhat.com>

		* os_linux_zero.hpp (atomic_copy64): Use ldrexd for atomic reads
		on ARMv7.


changeset 5b6a9a63a280 in /hg/release/icedtea7-forest-2.1/hotspot
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot?cmd=changeset;node=5b6a9a63a280
author: aph
date: Mon May 28 08:48:42 2012 -0400

	Adjust saved SP when safepointing.
	2012-05-28  Andrew Haley  <aph at redhat.com>

		* thumb2.cpp (Thumb2_Safepoint): Adjust saved SP when
		safepointing.


diffstat:

 src/cpu/zero/vm/asm_helper.cpp             |   116 +-
 src/cpu/zero/vm/bytecodes_arm.def          |  1564 ++++++++++----------
 src/cpu/zero/vm/cppInterpreter_arm.S       |  2060 ++++++++++++++-------------
 src/cpu/zero/vm/thumb2.cpp                 |  2041 ++++++++++-----------------
 src/os_cpu/linux_zero/vm/os_linux_zero.hpp |     6 +
 5 files changed, 2737 insertions(+), 3050 deletions(-)

diffs (truncated from 10805 to 500 lines):

diff -r 85de6921e39e -r 5b6a9a63a280 src/cpu/zero/vm/asm_helper.cpp
--- a/src/cpu/zero/vm/asm_helper.cpp	Wed May 16 11:21:07 2012 +0100
+++ b/src/cpu/zero/vm/asm_helper.cpp	Mon May 28 08:48:42 2012 -0400
@@ -19,7 +19,7 @@
 
 #ifdef __arm__
 
-#define	ARCH_THUMBEE	(1<<16)
+#define	ARCH_THUMB2	(1<<16)
 #define ARCH_VFP	(1<<17)
 #define ARCH_CLZ	(1<<18)
 
@@ -50,6 +50,31 @@
 
 #define VECBUFF_SIZE 64
 
+static char valuebuf[128];
+
+// Return the name of the current method.  Not multi-thread safe.
+extern "C" char*
+meth(interpreterState istate) {
+  istate->method()->name_and_sig_as_C_string(valuebuf, sizeof valuebuf);
+  char *p = valuebuf + strlen(valuebuf);
+  sprintf(p, ": " PTR_FORMAT " (bci %d)",
+	  (intptr_t) istate->bcp(),
+	  istate->method()->bci_from(istate->bcp()));
+  return valuebuf;
+}
+
+// Used for debugging the interpreter.  The macro TRACE in
+// cppInterpreter_arm.S calls this routine, and you can trap on a
+// particular method.
+#define NAME1 "sun.nio.ch.FileChannelImpl$Unmapper.run()V"
+#define EQ(S1, S2) (S1 && (strncmp(S1, S2, strlen(S2)) == 0))
+extern "C" void my_trace(void *jpc, void *istate)
+{
+  char *name = meth((interpreterState)istate);
+  if (EQ(name, NAME1));
+    asm volatile("nop");  // Somewhere to put a breakpoint
+}
+
 extern "C" unsigned hwcap(void)
 {
   int fd;
@@ -70,7 +95,7 @@
       unsigned value = *p++;
       if (tag == 0) goto fini;
       if (tag == AT_HWCAP) {
-	if (value & HWCAP_THUMBEE) rc |= ARCH_THUMBEE;
+	if (value & HWCAP_THUMBEE) rc |= ARCH_THUMB2;
 	if (value & HWCAP_VFP) rc |= ARCH_VFP;
       } else if (tag == AT_PLATFORM) {
 	const char *s = (const char *)value;
@@ -87,7 +112,7 @@
   close(fd);
 //  printf("arch = %d, rc = 0x%08x\n", arch, rc);
   if (arch >= 5) rc |= ARCH_CLZ;
-  if (arch >= 7) rc |= ARCH_THUMBEE;
+  if (arch >= 7) rc |= ARCH_THUMB2;
   return rc | (1<<arch);
 }
 
@@ -229,6 +254,89 @@
     return istate->thread()->pending_exception();
 }
 
+extern "C" oop Helper_monitorenter(interpreterState istate, oop lockee)
+{
+    BasicObjectLock* limit = istate->monitor_base();
+    BasicObjectLock* most_recent = (BasicObjectLock*) istate->stack_base();
+    BasicObjectLock* entry = NULL;
+    markOop displaced;
+    JavaThread *thread = istate->thread();
+
+    if (lockee == NULL) {
+      HELPER_THROW(istate->thread(), vmSymbols::java_lang_NullPointerException(), "");
+      goto handle_exception;
+    }
+    while (most_recent != limit ) {
+      if (most_recent->obj() == NULL) entry = most_recent;
+      else if (most_recent->obj() == lockee) break;
+      most_recent++;
+    }
+    if (entry == NULL) {
+      int monitor_words = frame::interpreter_frame_monitor_size();
+      ZeroStack *stack = thread->zero_stack();
+
+      if (monitor_words > stack->available_words()) {
+        InterpreterRuntime::throw_StackOverflowError(thread);
+	goto handle_exception;
+      } else {
+	stack->alloc(monitor_words * wordSize);
+
+	for (intptr_t *p = istate->stack() + 1; p < istate->stack_base(); p++)
+	  *(p - monitor_words) = *p;
+
+	istate->set_stack_limit(istate->stack_limit() - monitor_words);
+	istate->set_stack(istate->stack() - monitor_words);
+	istate->set_stack_base(istate->stack_base() - monitor_words);
+
+	entry = (BasicObjectLock *) istate->stack_base();
+      }
+    }
+    entry->set_obj(lockee);
+    displaced = lockee->mark()->set_unlocked();
+    entry->lock()->set_displaced_header(displaced);
+    if (Atomic::cmpxchg_ptr(entry, lockee->mark_addr(), displaced) != displaced) {
+      // Is it simple recursive case?
+      if (thread->is_lock_owned((address) displaced->clear_lock_bits())) {
+	entry->lock()->set_displaced_header(NULL);
+      } else {
+	InterpreterRuntime::monitorenter(thread, entry);
+      }
+    }
+handle_exception:
+    return thread->pending_exception();
+}
+
+extern "C" oop Helper_monitorexit(interpreterState istate, oop lockee)
+{
+    BasicObjectLock* limit = istate->monitor_base();
+    BasicObjectLock* most_recent = (BasicObjectLock*) istate->stack_base();
+    JavaThread *thread = istate->thread();
+
+    if (lockee == NULL) {
+      HELPER_THROW(istate->thread(), vmSymbols::java_lang_NullPointerException(), "");
+      goto handle_exception;
+    }
+    while (most_recent != limit ) {
+      if ((most_recent)->obj() == lockee) {
+	BasicLock* lock = most_recent->lock();
+	markOop header = lock->displaced_header();
+	most_recent->set_obj(NULL);
+	if (header != NULL) {
+	  if (Atomic::cmpxchg_ptr(header, lockee->mark_addr(), lock) != lock) {
+	    // restore object for the slow case
+	    most_recent->set_obj(lockee);
+	    InterpreterRuntime::monitorexit(thread, most_recent);
+	  }
+	}
+	return thread->pending_exception();
+      }
+      most_recent++;
+    }
+    InterpreterRuntime::throw_illegal_monitor_state_exception(thread);
+handle_exception:
+    return thread->pending_exception();
+}
+
 extern "C" oop Helper_aastore(interpreterState istate, oop value, int index, arrayOop arrayref)
 {
     if (arrayref == NULL) {
@@ -512,7 +620,7 @@
 int main(void)
 {
 	print_def("ARCH_VFP",			ARCH_VFP);
-	print_def("ARCH_THUMBEE",		ARCH_THUMBEE);
+	print_def("ARCH_THUMB2",		ARCH_THUMB2);
 	print_def("ARCH_CLZ",			ARCH_CLZ);
 	nl();
 	print_def("JVM_CONSTANT_Utf8",		JVM_CONSTANT_Utf8);
diff -r 85de6921e39e -r 5b6a9a63a280 src/cpu/zero/vm/bytecodes_arm.def
--- a/src/cpu/zero/vm/bytecodes_arm.def	Wed May 16 11:21:07 2012 +0100
+++ b/src/cpu/zero/vm/bytecodes_arm.def	Mon May 28 08:48:42 2012 -0400
@@ -335,13 +335,13 @@
 
 (lconst_1) lconst_1 {
 	DISPATCH_START_R2
-        mov     tmp2, #1
+        mov     r3, #1
 	DISPATCH_NEXT
         mov     tmp1, #0
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
-	PUSH	tmp2, tmp1
+	PUSH	r3, tmp1
 	DISPATCH_FINISH
 }
 
@@ -367,10 +367,10 @@
 	DISPATCH_NEXT
         orr     tmp1, tmp1, #0x00f00000
 	DISPATCH_NEXT
-        mov     tmp2, #0
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	PUSH	tmp2, tmp1
+        mov     r3, #0
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	PUSH	r3, tmp1
 	DISPATCH_FINISH
 }
 
@@ -419,11 +419,11 @@
 	DISPATCH_START	\seq_len
 	sub	r3, locals, r2, lsl #2
 	DISPATCH_NEXT
-	ldmda	r3, {tmp2, tmp1}
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	PUSH	tmp2, tmp1
+	ldmda	r3, {r3, tmp1}
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	PUSH	r3, tmp1
 	DISPATCH_FINISH
 }
 
@@ -465,49 +465,49 @@
 
 (lload_0,dload_0) u8load_0 {
 	DISPATCH_START_R2
-        ldmda   locals, {tmp2-tmp1}
+        ldmda   locals, {r3, tmp1}
 	DISPATCH_NEXT
 	PUSH	tmp1
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
-	PUSH	tmp2
+	PUSH	r3
 	DISPATCH_FINISH
 }
 
 (lload_1,dload_1) u8load_1 {
 	DISPATCH_START_R2
-        ldmdb   locals, {tmp2-tmp1}
+        ldmdb   locals, {r3, tmp1}
 	DISPATCH_NEXT
 	PUSH	tmp1
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
-	PUSH	tmp2
+	PUSH	r3
 	DISPATCH_FINISH
 }
 
 (lload_2,dload_2) u8load_2 {
 	DISPATCH_START_R2
-	ldr	tmp2, [locals, #-12]
+	ldr	r3, [locals, #-12]
 	DISPATCH_NEXT
 	ldr	tmp1, [locals, #-8]
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
-	PUSH	tmp2, tmp1
+	PUSH	r3, tmp1
 	DISPATCH_FINISH
 }
 
 (lload_3,dload_3) u8load_3 {
 	DISPATCH_START_R2
-	ldr	tmp2, [locals, #-16]
+	ldr	r3, [locals, #-16]
 	DISPATCH_NEXT
 	ldr	tmp1, [locals, #-12]
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
-	PUSH	tmp2, tmp1
+	PUSH	r3, tmp1
 	DISPATCH_FINISH
 }
 
@@ -546,12 +546,12 @@
 	bcs	array_bound_exception_jpc_1
 	DISPATCH_NEXT
 	add	r3, r3, r2, lsl #3
-	ldr	tmp2, [r3, #BASE_OFFSET_LONG]
+	ldr	r1, [r3, #BASE_OFFSET_LONG]
 	DISPATCH_NEXT
 	ldr	tmp1, [r3, #20]
 	DISPATCH_NEXT
 	PUT_STACK	1, tmp1
-	PUT_STACK	0, tmp2
+	PUT_STACK	0, r1
 	DISPATCH_FINISH
 }
 
@@ -634,13 +634,13 @@
 @ r2 = [jpc, #1]
 (lstore,dstore) u8store {
 	DISPATCH_START	\seq_len
-	POP	tmp2, tmp1
+	POP	r1, tmp1
 	DISPATCH_NEXT
 	sub	r3, locals, r2, lsl #2
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
-	stmda	r3, {tmp2, tmp1}
+	stmda	r3, {r1, tmp1}
 	DISPATCH_FINISH
 }
 
@@ -691,30 +691,30 @@
 (lstore_0,dstore_0) u8store_0 {
 	DISPATCH_START_R2
 	DISPATCH_NEXT
-	POP	tmp2, tmp1
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-        stmda   locals, {tmp2, tmp1}
+	POP	r1, tmp1
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+        stmda   locals, {r1, tmp1}
 	DISPATCH_FINISH
 }
 
 (lstore_1,dstore_1) u8store_1 {
 	DISPATCH_START_R2
 	DISPATCH_NEXT
-	POP	tmp2, tmp1
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-        stmdb   locals, {tmp2, tmp1}
+	POP	r1, tmp1
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+        stmdb   locals, {r1, tmp1}
 	DISPATCH_FINISH
 }
 
 (lstore_2,dstore_2) u8store_2 {
 	DISPATCH_START_R2
-	POP	tmp2, tmp1
-	DISPATCH_NEXT
-        str     tmp2, [locals, #-12]
+	POP	r1, tmp1
+	DISPATCH_NEXT
+        str     r1, [locals, #-12]
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
@@ -724,9 +724,9 @@
 
 (lstore_3,dstore_3) u8store_3 {
 	DISPATCH_START_R2
-	POP	tmp2, tmp1
-	DISPATCH_NEXT
-        str     tmp2, [locals, #-16]
+	POP	r1, tmp1
+	DISPATCH_NEXT
+        str     r1, [locals, #-16]
 	DISPATCH_NEXT
 	DISPATCH_NEXT
 	DISPATCH_NEXT
@@ -735,72 +735,72 @@
 }
 
 (iastore,fastore) u4astore {
-	POP	r3, tmp2, tmp1		@ r3 = value, tmp2 = index, tmp1 = arrayref
+	POP	r1, tmp1, lr		@ r1 = value, tmp1 = index, lr = arrayref
 	DISPATCH_START_R2
-	SW_NPC	cmp	tmp1, #0
+	SW_NPC	cmp	lr, #0
 	SW_NPC	beq	null_ptr_exception_jpc_1
 .abortentry10:
-	ldr	lr, [tmp1, #8]		@ lr = limit
-	DISPATCH_NEXT
-	cmp	tmp2, lr
-	bcs	array_bound_exception_jpc_1_tmp2
-	DISPATCH_NEXT
-	add	tmp1, tmp1, tmp2, lsl #2
-	DISPATCH_NEXT
-	str	r3, [tmp1, #BASE_OFFSET_WORD]
+	ldr	ip, [lr, #8]		@ lr = limit
+	DISPATCH_NEXT
+	cmp	tmp1, ip
+	bcs	array_bound_exception_jpc_1_tmp1
+	DISPATCH_NEXT
+	add	lr, lr, tmp1, lsl #2
+	DISPATCH_NEXT
+	str	r1, [lr, #BASE_OFFSET_WORD]
 	DISPATCH_FINISH
 }
 
 (lastore,dastore) u8astore {
-	POP	r1, r3, tmp2, tmp1		@ r1,r3 = value, tmp2 = index, tmp1 = arrayref
+	POP	r1, r3, tmp1, lr		@ r1,r3 = value, tmp1 = index, lr = arrayref
 	DISPATCH_START_R2
-	SW_NPC	cmp	tmp1, #0
+	SW_NPC	cmp	lr, #0
 	SW_NPC	beq	null_ptr_exception_jpc_1
 .abortentry11:
-	ldr	ip, [tmp1, #8]		@ ip = limit
-	cmp	tmp2, ip
-	DISPATCH_NEXT
-	bcs	array_bound_exception_jpc_1_tmp2
-	DISPATCH_NEXT
-	add	tmp2, tmp1, tmp2, lsl #3
-	str	r1, [tmp2, #BASE_OFFSET_LONG]
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	str	r3, [tmp2, #20]
+	ldr	ip, [lr, #8]		@ ip = limit
+	cmp	tmp1, ip
+	DISPATCH_NEXT
+	bcs	array_bound_exception_jpc_1_tmp1
+	DISPATCH_NEXT
+	add	tmp1, lr, tmp1, lsl #3
+	str	r1, [tmp1, #BASE_OFFSET_LONG]
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	str	r3, [tmp1, #BASE_OFFSET_LONG+4]
 	DISPATCH_FINISH
 }
 
 (bastore) bastore {
-	POP	r3, tmp2, tmp1		@ r3 = value, tmp2 = index, tmp1 = arrayref
+	POP	r3, tmp1, lr		@ r3 = value, tmp1 = index, lr = arrayref
 	DISPATCH_START_R2
-	SW_NPC	cmp	tmp1, #0
+	SW_NPC	cmp	lr, #0
 	SW_NPC	beq	null_ptr_exception_jpc_1
 .abortentry12:
-	ldr	lr, [tmp1, #8]		@ lr = limit
-	DISPATCH_NEXT
-	cmp	tmp2, lr
-	bcs	array_bound_exception_jpc_1_tmp2
-	DISPATCH_NEXT
-	add	tmp1, tmp1, tmp2
-	DISPATCH_NEXT
-	strb	r3, [tmp1, #BASE_OFFSET_BYTE]
+	ldr	ip, [lr, #8]		@ ip = limit
+	DISPATCH_NEXT
+	cmp	tmp1, ip
+	bcs	array_bound_exception_jpc_1_tmp1
+	DISPATCH_NEXT
+	add	lr, lr, tmp1
+	DISPATCH_NEXT
+	strb	r3, [lr, #BASE_OFFSET_BYTE]
 	DISPATCH_FINISH
 }
 
 (castore,sastore) u2astore {
-	POP	r3, tmp2, tmp1		@ r3 = value, tmp2 = index, tmp1 = arrayref
+	POP	r3, tmp1, lr		@ r3 = value, tmp1 = index, lr = arrayref
 	DISPATCH_START_R2
-	SW_NPC	cmp	tmp1, #0
+	SW_NPC	cmp	lr, #0
 	SW_NPC	beq	null_ptr_exception_jpc_1
 .abortentry13:
-	ldr	lr, [tmp1, #8]		@ lr = limit
-	DISPATCH_NEXT
-	cmp	tmp2, lr
-	bcs	array_bound_exception_jpc_1_tmp2
-	DISPATCH_NEXT
-	add	tmp1, tmp1, tmp2, lsl #1
-	DISPATCH_NEXT
-	strh	r3, [tmp1, #BASE_OFFSET_SHORT]
+	ldr	ip, [lr, #8]		@ ip = limit
+	DISPATCH_NEXT
+	cmp	tmp1, ip
+	bcs	array_bound_exception_jpc_1_tmp1
+	DISPATCH_NEXT
+	add	lr, lr, tmp1, lsl #1
+	DISPATCH_NEXT
+	strh	r3, [lr, #BASE_OFFSET_SHORT]
 	DISPATCH_FINISH
 }
 
@@ -884,13 +884,13 @@
 
 (iadd) iadd {
 	DISPATCH_START_R2
-	POP	tmp2, tmp1
-	DISPATCH_NEXT
-	add	tmp2, tmp2, tmp1
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	DISPATCH_NEXT
-	PUSH	tmp2
+	POP	r1, tmp1
+	DISPATCH_NEXT
+	add	r1, r1, tmp1
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	DISPATCH_NEXT
+	PUSH	r1
 	DISPATCH_FINISH
 }
 
@@ -907,13 +907,13 @@
 
 (isub) isub {
 	DISPATCH_START_R2
-	POP	tmp2, tmp1
-	DISPATCH_NEXT



More information about the distro-pkg-dev mailing list