view src/cpu/zero/vm/bytecodes_arm.def @ 2949:73a07d24174e

RTC Thumb2 JIT enhancements. 2012-05-16 Andrew Haley <aph@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.
author aph
date Thu, 17 May 2012 13:45:50 -0400
parents e93a90a2e36b
children
line wrap: on
line source

@ Copyright 2009, 2010 Edward Nevill
@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@
@ This code is free software; you can redistribute it and/or modify it
@ under the terms of the GNU General Public License version 2 only, as
@ published by the Free Software Foundation.
@
@ This code is distributed in the hope that it will be useful, but WITHOUT
@ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
@ version 2 for more details (a copy is included in the LICENSE file that
@ accompanied this code).
@
@ You should have received a copy of the GNU General Public License version
@ 2 along with this work; if not, write to the Free Software Foundation,
@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

#ifdef SHARK
#define DISABLE_NOTICE_SAFEPOINTS
#endif

#ifndef DISABLE_HW_FP
#define HW_FP
#endif
#ifndef DISABLE_NOTICE_SAFEPOINTS
#define NOTICE_SAFEPOINTS
#endif
#ifndef DISABLE_FAST_BYTECODES
#define FAST_BYTECODES
#endif

/*  WARNING: If you change any of these bytecodes, you must also
    change the safe_dispatch_table in cppInterpreter_arm.S to make it
    match.  */

nop                  = 0x00, 1
aconst_null          = 0x01, 1
iconst_m1            = 0x02, 1
iconst_0             = 0x03, 1
iconst_1             = 0x04, 1
iconst_2             = 0x05, 1
iconst_3             = 0x06, 1
iconst_4             = 0x07, 1
iconst_5             = 0x08, 1
lconst_0             = 0x09, 1
lconst_1             = 0x0a, 1
fconst_0             = 0x0b, 1
fconst_1             = 0x0c, 1
fconst_2             = 0x0d, 1
dconst_0             = 0x0e, 1
dconst_1             = 0x0f, 1
bipush               = 0x10, 2
sipush               = 0x11, 3
ldc                  = 0x12, 2
ldc_w                = 0x13, 3
ldc2_w               = 0x14, 3
iload                = 0x15, 2
lload                = 0x16, 2
fload                = 0x17, 2
dload                = 0x18, 2
aload                = 0x19, 2
iload_0              = 0x1a, 1
iload_1              = 0x1b, 1
iload_2              = 0x1c, 1
iload_3              = 0x1d, 1
lload_0              = 0x1e, 1
lload_1              = 0x1f, 1
lload_2              = 0x20, 1
lload_3              = 0x21, 1
fload_0              = 0x22, 1
fload_1              = 0x23, 1
fload_2              = 0x24, 1
fload_3              = 0x25, 1
dload_0              = 0x26, 1
dload_1              = 0x27, 1
dload_2              = 0x28, 1
dload_3              = 0x29, 1
aload_0              = 0x2a, 1
aload_1              = 0x2b, 1
aload_2              = 0x2c, 1
aload_3              = 0x2d, 1
iaload               = 0x2e, 1
laload               = 0x2f, 1
faload               = 0x30, 1
daload               = 0x31, 1
aaload               = 0x32, 1
baload               = 0x33, 1
caload               = 0x34, 1
saload               = 0x35, 1
istore               = 0x36, 2
lstore               = 0x37, 2
fstore               = 0x38, 2
dstore               = 0x39, 2
astore               = 0x3a, 2
istore_0             = 0x3b, 1
istore_1             = 0x3c, 1
istore_2             = 0x3d, 1
istore_3             = 0x3e, 1
lstore_0             = 0x3f, 1
lstore_1             = 0x40, 1
lstore_2             = 0x41, 1
lstore_3             = 0x42, 1
fstore_0             = 0x43, 1
fstore_1             = 0x44, 1
fstore_2             = 0x45, 1
fstore_3             = 0x46, 1
dstore_0             = 0x47, 1
dstore_1             = 0x48, 1
dstore_2             = 0x49, 1
dstore_3             = 0x4a, 1
astore_0             = 0x4b, 1
astore_1             = 0x4c, 1
astore_2             = 0x4d, 1
astore_3             = 0x4e, 1
iastore              = 0x4f, 1
lastore              = 0x50, 1
fastore              = 0x51, 1
dastore              = 0x52, 1
aastore              = 0x53, 1
bastore              = 0x54, 1
castore              = 0x55, 1
sastore              = 0x56, 1
pop                  = 0x57, 1
pop2                 = 0x58, 1
dup                  = 0x59, 1
dup_x1               = 0x5a, 1
dup_x2               = 0x5b, 1
dup2                 = 0x5c, 1
dup2_x1              = 0x5d, 1
dup2_x2              = 0x5e, 1
swap                 = 0x5f, 1
iadd                 = 0x60, 1
ladd                 = 0x61, 1
fadd                 = 0x62, 1
dadd                 = 0x63, 1
isub                 = 0x64, 1
lsub                 = 0x65, 1
fsub                 = 0x66, 1
dsub                 = 0x67, 1
imul                 = 0x68, 1
lmul                 = 0x69, 1
fmul                 = 0x6a, 1
dmul                 = 0x6b, 1
idiv                 = 0x6c, 1
ldiv                 = 0x6d, 1
fdiv                 = 0x6e, 1
ddiv                 = 0x6f, 1
irem                 = 0x70, 1
lrem                 = 0x71, 1
frem                 = 0x72, 1
drem                 = 0x73, 1
ineg                 = 0x74, 1
lneg                 = 0x75, 1
fneg                 = 0x76, 1
dneg                 = 0x77, 1
ishl                 = 0x78, 1
lshl                 = 0x79, 1
ishr                 = 0x7a, 1
lshr                 = 0x7b, 1
iushr                = 0x7c, 1
lushr                = 0x7d, 1
iand                 = 0x7e, 1
land                 = 0x7f, 1
ior                  = 0x80, 1
lor                  = 0x81, 1
ixor                 = 0x82, 1
lxor                 = 0x83, 1
iinc                 = 0x84, 3
i2l                  = 0x85, 1
i2f                  = 0x86, 1
i2d                  = 0x87, 1
l2i                  = 0x88, 1
l2f                  = 0x89, 1
l2d                  = 0x8a, 1
f2i                  = 0x8b, 1
f2l                  = 0x8c, 1
f2d                  = 0x8d, 1
d2i                  = 0x8e, 1
d2l                  = 0x8f, 1
d2f                  = 0x90, 1
i2b                  = 0x91, 1
i2c                  = 0x92, 1
i2s                  = 0x93, 1
lcmp                 = 0x94, 1
fcmpl                = 0x95, 1
fcmpg                = 0x96, 1
dcmpl                = 0x97, 1
dcmpg                = 0x98, 1
ifeq                 = 0x99, 0
ifne                 = 0x9a, 0
iflt                 = 0x9b, 0
ifge                 = 0x9c, 0
ifgt                 = 0x9d, 0
ifle                 = 0x9e, 0
if_icmpeq            = 0x9f, 0
if_icmpne            = 0xa0, 0
if_icmplt            = 0xa1, 0
if_icmpge            = 0xa2, 0
if_icmpgt            = 0xa3, 0
if_icmple            = 0xa4, 0
if_acmpeq            = 0xa5, 0
if_acmpne            = 0xa6, 0
goto                 = 0xa7, 0
jsr                  = 0xa8, 0
ret                  = 0xa9, 0
tableswitch          = 0xaa, 0
lookupswitch         = 0xab, 0
ireturn              = 0xac, 0
lreturn              = 0xad, 0
freturn              = 0xae, 0
dreturn              = 0xaf, 0
areturn              = 0xb0, 0
return               = 0xb1, 0
getstatic            = 0xb2, 3
putstatic            = 0xb3, 3
getfield             = 0xb4, 3
putfield             = 0xb5, 3
invokevirtual        = 0xb6, 3
invokespecial        = 0xb7, 3
invokestatic         = 0xb8, 3
invokeinterface      = 0xb9, 0
invokedynamic        = 0xba, 0
new                  = 0xbb, 3
newarray             = 0xbc, 2
anewarray            = 0xbd, 3
arraylength          = 0xbe, 1
athrow               = 0xbf, 0
checkcast            = 0xc0, 3
instanceof           = 0xc1, 3
monitorenter         = 0xc2, 1
monitorexit          = 0xc3, 1
wide                 = 0xc4, 1
multianewarray       = 0xc5, 4
ifnull               = 0xc6, 0
ifnonnull            = 0xc7, 0
goto_w               = 0xc8, 0
jsr_w                = 0xc9, 0
breakpoint           = 0xca, 0

#ifdef FAST_BYTECODES

@agetfield	= 0xcb, 3
bgetfield	= 0xcc, 3
cgetfield	= 0xcd, 3
@dgetfield	= 0xce, 3
@fgetfield	= 0xcf, 3
igetfield	= 0xd0, 3
lgetfield	= 0xd1, 3
sgetfield	= 0xd2, 3

aputfield	= 0xd3, 3
bputfield	= 0xd4, 3
cputfield	= 0xd5, 3
@dputfield	= 0xd6, 3
@fputfield	= 0xd7, 3
iputfield	= 0xd8, 3
lputfield	= 0xd9, 3
@sputfield	= 0xda, 3

iaccess_0	= 0xdb, 4
iaccess_1	= 0xdc, 4
iaccess_2	= 0xdd, 4
iaccess_3	= 0xde, 4

invokeresolved		= 0xdf, 3
invokespecialresolved	= 0xe0, 3
invokestaticresolved	= 0xe1, 3
invokevfinal 		= 0xe2, 3

iload_iload	= 0xe3, 4
iload_iload_N	= 0xe4, 3

fast_aldc	= 0xe5, 2
fast_aldc_w	= 0xe6, 3
@return_register_finalizer = 0xe7, 1

iload_0_iconst_N        = 0xe9, 2
iload_1_iconst_N        = 0xea, 2
iload_2_iconst_N        = 0xeb, 2
iload_3_iconst_N        = 0xec, 2
iload_iconst_N          = 0xed, 3
iadd_istore_N           = 0xee, 2
isub_istore_N           = 0xef, 2
iand_istore_N           = 0xf0, 2
ior_istore_N            = 0xf1, 2
ixor_istore_N           = 0xf2, 2
iadd_u4store            = 0xf3, 3
isub_u4store            = 0xf4, 3
iand_u4store            = 0xf5, 3
ior_u4store             = 0xf6, 3
ixor_u4store            = 0xf7, 3
iload_0_iload           = 0xf8, 3
iload_1_iload           = 0xf9, 3
iload_2_iload           = 0xfa, 3
iload_3_iload           = 0xfb, 3
iload_0_iload_N         = 0xfc, 2
iload_1_iload_N         = 0xfd, 2
iload_2_iload_N         = 0xfe, 2
iload_3_iload_N         = 0xff, 2

#endif

return_register_finalizer = 0xe7, 1

(nop) {
	DISPATCH	\seq_len
}

(aconst_null,fconst_0) u4const_0 {
	DISPATCH_START_R2
        mov     lr, #0
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5) iconst_N {
	sub	lr, r0, #opc_iconst_0
	DISPATCH_START_R2
	PUSH	lr
	DISPATCH_FINISH
}

(lconst_0,dconst_0) u8const_0 {
	DISPATCH_START_R2
        mov     tmp1, #0
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(lconst_1) lconst_1 {
	DISPATCH_START_R2
        mov     r3, #1
	DISPATCH_NEXT
        mov     tmp1, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(fconst_1) fconst_1 {
	DISPATCH_START_R2
        mov     tmp1, #0x3f800000
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(fconst_2) fconst_2 {
	DISPATCH_START_R2
        mov     r2, #0x40000000
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(dconst_1) dconst_1 {
	DISPATCH_START_R2
        mov     tmp1, #0x3f000000
	DISPATCH_NEXT
        orr     tmp1, tmp1, #0x00f00000
	DISPATCH_NEXT
        mov     r3, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(bipush) bipush {
	DISPATCH_START	\seq_len
	mov	tmp1, r2, lsl #24
	DISPATCH_NEXT
	mov	tmp1, tmp1, asr #24
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
@ r1 = [jpc, #2]
(sipush) sipush {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	\seq_len
	DISPATCH_NEXT
	mov	r2, r2, lsl #24
        orr     tmp1, r1, r2, asr #16
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,fload,aload) u4load {
	DISPATCH_START	\seq_len
	rsb	tmp1, r2, #0
	DISPATCH_NEXT
        ldr     tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(lload,dload) u8load {
	DISPATCH_START	\seq_len
	sub	r3, locals, r2, lsl #2
	DISPATCH_NEXT
	ldmda	r3, {r3, tmp1}
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(aload_0,aload_1,aload_2,aload_3) {
	rsb	tmp1, r0, #opc_aload_0
	DISPATCH_START_R2
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3) {
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START_R2
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(fload_0,fload_1,fload_2,fload_3) {
	rsb	tmp1, r0, #opc_fload_0
	DISPATCH_START_R2
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(lload_0,dload_0) u8load_0 {
	DISPATCH_START_R2
        ldmda   locals, {r3, tmp1}
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(lload_1,dload_1) u8load_1 {
	DISPATCH_START_R2
        ldmdb   locals, {r3, tmp1}
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(lload_2,dload_2) u8load_2 {
	DISPATCH_START_R2
	ldr	r3, [locals, #-12]
	DISPATCH_NEXT
	ldr	tmp1, [locals, #-8]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(lload_3,dload_3) u8load_3 {
	DISPATCH_START_R2
	ldr	r3, [locals, #-16]
	DISPATCH_NEXT
	ldr	tmp1, [locals, #-12]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(iaload,faload,aaload) u4aload {
	GET_STACK	1, r3
	DISPATCH_START_R2_R0
	POP	r2
	DISPATCH_START_R2_JPC
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry5:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	DISPATCH_NEXT
	ldr	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUT_STACK	0, tmp1
	DISPATCH_FINISH
}

(laload,daload) u8aload {
	GET_STACK	1, r3
	DISPATCH_START_R2_R0
	GET_STACK	0, r2
	DISPATCH_START_R2_JPC
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry6:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #3
	ldr	r1, [r3, #BASE_OFFSET_LONG]
	DISPATCH_NEXT
	ldr	tmp1, [r3, #20]
	DISPATCH_NEXT
	PUT_STACK	1, tmp1
	PUT_STACK	0, r1
	DISPATCH_FINISH
}

(baload) baload {
	GET_STACK	1, r3
	DISPATCH_START_R2_R0
	POP	r2
	DISPATCH_START_R2_JPC
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry7:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2
	DISPATCH_NEXT
	ldrsb	tmp1, [r3, #BASE_OFFSET_BYTE]
	DISPATCH_NEXT
	PUT_STACK	0, tmp1
	DISPATCH_FINISH
}

(caload) caload {
	GET_STACK	1, r3
	DISPATCH_START_R2_R0
	POP	r2
	DISPATCH_START_R2_JPC
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry8:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #1
	DISPATCH_NEXT
	ldrh	tmp1, [r3, #BASE_OFFSET_SHORT]
	DISPATCH_NEXT
	PUT_STACK	0, tmp1
	DISPATCH_FINISH
}

(saload) saload {
	GET_STACK	1, r3
	DISPATCH_START_R2_R0
	POP	r2
	DISPATCH_START_R2_JPC
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry9:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #1
	DISPATCH_NEXT
	ldrsh	tmp1, [r3, #BASE_OFFSET_SHORT]
	DISPATCH_NEXT
	PUT_STACK	0, tmp1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(astore,istore,fstore) u4store {
	DISPATCH_START	\seq_len
	rsb	tmp1, r2, #0
	DISPATCH_NEXT
	POP	r3
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(lstore,dstore) u8store {
	DISPATCH_START	\seq_len
	POP	r1, tmp1
	DISPATCH_NEXT
	sub	r3, locals, r2, lsl #2
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	stmda	r3, {r1, tmp1}
	DISPATCH_FINISH
}

(astore_0,istore_0,fstore_0) u4store_0 {
	DISPATCH_START_R2
	DISPATCH_NEXT
	POP	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
        str     tmp1, [locals, #0]
	DISPATCH_FINISH
}

(astore_1,istore_1,fstore_1) u4store_1 {
	DISPATCH_START_R2
	DISPATCH_NEXT
	POP	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
        str     tmp1, [locals, #-4]
	DISPATCH_FINISH
}

(astore_2,istore_2,fstore_2) u4store_2 {
	DISPATCH_START_R2
	DISPATCH_NEXT
	POP	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
        str     tmp1, [locals, #-8]
	DISPATCH_FINISH
}

(astore_3,istore_3,fstore_3) u4store_3 {
	DISPATCH_START_R2
	DISPATCH_NEXT
	POP	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
        str     tmp1, [locals, #-12]
	DISPATCH_FINISH
}

(lstore_0,dstore_0) u8store_0 {
	DISPATCH_START_R2
	DISPATCH_NEXT
	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	r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
        stmdb   locals, {r1, tmp1}
	DISPATCH_FINISH
}

(lstore_2,dstore_2) u8store_2 {
	DISPATCH_START_R2
	POP	r1, tmp1
	DISPATCH_NEXT
        str     r1, [locals, #-12]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
        str     tmp1, [locals, #-8]
	DISPATCH_FINISH
}

(lstore_3,dstore_3) u8store_3 {
	DISPATCH_START_R2
	POP	r1, tmp1
	DISPATCH_NEXT
        str     r1, [locals, #-16]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
        str     tmp1, [locals, #-12]
	DISPATCH_FINISH
}

(iastore,fastore) u4astore {
	POP	r1, tmp1, lr		@ r1 = value, tmp1 = index, lr = arrayref
	DISPATCH_START_R2
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry10:
	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, tmp1, lr		@ r1,r3 = value, tmp1 = index, lr = arrayref
	DISPATCH_START_R2
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry11:
	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, tmp1, lr		@ r3 = value, tmp1 = index, lr = arrayref
	DISPATCH_START_R2
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry12:
	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, tmp1, lr		@ r3 = value, tmp1 = index, lr = arrayref
	DISPATCH_START_R2
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry13:
	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
}

(pop) jpop {
	DISPATCH_START_R2
        add     stack, stack, #4
	DISPATCH_FINISH
}

(pop2) jpop2 {
	DISPATCH_START_R2
        add     stack, stack, #8
	DISPATCH_FINISH
}

(dup) dup {
	DISPATCH_START_R2
	ldr	lr, [stack, #4]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(dup_x1) dup_x1 {
	DISPATCH_START_R2
	POP	r2, r3
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(dup_x2) dup_x2 {
	DISPATCH_START_R2
	POP	r2, r3, lr
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_NEXT
	PUSH	r2, r3, lr
	DISPATCH_FINISH
}

(dup2) dup2 {
	DISPATCH_START_R2
	ldmib	stack, {r2, r3}
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(dup2_x1) dup2_x1 {
	DISPATCH_START_R2
	POP	r2, r3, lr
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_NEXT
	PUSH	r2, r3, lr
	DISPATCH_FINISH
}

(dup2_x2) dup2_x2 {
	DISPATCH_START_R2
	POP	r2, r3, tmp1, lr
	DISPATCH_NEXT
	PUSH	r2, r3
	PUSH	r2, r3, tmp1, lr
	DISPATCH_FINISH
}

(swap) swap {
	DISPATCH_START_R2
	POP	r2, r3
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}


(iadd) iadd {
	DISPATCH_START_R2
	POP	r1, tmp1
	DISPATCH_NEXT
	add	r1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(ladd) ladd {
	DISPATCH_START_R2
	POP	r2, r3, tmp1, lr
	DISPATCH_NEXT
	adds	r2, r2, tmp1
	adc	r3, r3, lr
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(isub) isub {
	DISPATCH_START_R2
	POP	r1, tmp1
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(lsub) lsub {
	DISPATCH_START_R2
	POP	r2, r3, tmp1, lr
	DISPATCH_NEXT
	subs	r2, tmp1, r2
	sbc	r3, lr, r3
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(imul) imul {
	DISPATCH_START_R2
	POP	r2, tmp1
	DISPATCH_NEXT
	mul	r1, r2, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(lmul) lmul {
	POP	r1, tmp1, ip, lr
        umull   r3, r0, ip, r1
        mla     tmp1, ip, tmp1, r0
	DISPATCH_START_R2
        mla     tmp1, lr, r1, tmp1
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(ldiv) ldiv {
	POP	r2, r3
	POP	r0, r1
	orrs	lr, r2, r3
	beq	.ldiv_0
	bl	__aeabi_ldivmod
	PUSH	r0, r1
	DISPATCH	\seq_len
}

(lrem) lrem {
	POP	r2, r3
	POP	r0, r1
	orrs	lr, r2, r3
	beq	.lrem_0
	bl	__aeabi_ldivmod
	PUSH	r2, r3
	DISPATCH	\seq_len
}

(frem) frem {
	POPF1
	POPF0
        bl      fmodf
	PUSHF0
	DISPATCH	\seq_len
}

(drem) drem {
	POPD1
        POPD0
        bl      fmod
	PUSHD0
	DISPATCH	\seq_len
}

(ineg) ineg {
	DISPATCH_START_R2
	POP	tmp1
	DISPATCH_NEXT
        rsb     tmp1, tmp1, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(lneg) lneg {
	DISPATCH_START_R2
	POP	r2, r3
	DISPATCH_NEXT
	rsbs	r2, r2, #0
	rsc	r3, r3, #0
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(fneg) fneg {
	DISPATCH_START_R2
	POP	r2
	DISPATCH_NEXT
	eor	r2, r2, #0x80000000
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(dneg) dneg {
	DISPATCH_START_R2
	GET_STACK	1, r2
	DISPATCH_NEXT
	eor	r2, r2, #0x80000000
	DISPATCH_NEXT
	PUT_STACK	1, r2
	DISPATCH_FINISH
}

(ishl) ishl {
	DISPATCH_START_R2
	POP	r2, r3
	DISPATCH_NEXT
	and	r2, r2, #31
	mov	r2, r3, lsl r2
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(lshl) lshl {
	DISPATCH_START_R2
	POP	r2, r3, lr
	DISPATCH_NEXT
	tst	r2, #32
	and	r2, r2, #31
	movne	tmp1, #0
	movne	lr, r3, lsl r2
	moveq	tmp1, r3, lsl r2
	moveq	lr, lr, lsl r2
	rsbeq	r2, r2, #32
	orreq	lr, lr, r3, lsr r2
	PUSH	tmp1, lr
	DISPATCH_FINISH
}

(ishr) ishr {
	DISPATCH_START_R2
	POP	r2, r3
	DISPATCH_NEXT
	and	r2, r2, #31
	mov	r2, r3, asr r2
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(lshr) lshr {
	DISPATCH_START_R2
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	tst	r2, #32
	and	r2, r2, #31
	movne	lr, tmp1, asr #31
	movne	r3, tmp1, asr r2
	moveq	lr, tmp1, asr r2
	moveq	r3, r3, lsr r2
	rsbeq	r2, r2, #32
	orreq	r3, r3, tmp1, lsl r2
	PUSH	r3, lr
	DISPATCH_FINISH
}

(iushr) iushr {
	DISPATCH_START_R2
	POP	r2, r3
	DISPATCH_NEXT
	and	r2, r2, #31
	mov	r2, r3, lsr r2
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(lushr) lushr {
	DISPATCH_START_R2
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	tst	r2, #32
	and	r2, r2, #31
	movne	lr, #0
	movne	r3, tmp1, lsr r2
	moveq	lr, tmp1, lsr r2
	moveq	r3, r3, lsr r2
	rsbeq	r2, r2, #32
	orreq	r3, r3, tmp1, lsl r2
	PUSH	r3, lr
	DISPATCH_FINISH
}

(iand) iand {
	DISPATCH_START_R2
	POP	r1, tmp1
	DISPATCH_NEXT
	and	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(land) land {
	DISPATCH_START_R2
	POP	r2, r3, tmp1, lr
	DISPATCH_NEXT
	and	r2, tmp1, r2
	and	r3, lr, r3
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(ior) ior {
	DISPATCH_START_R2
	POP	r1, tmp1
	DISPATCH_NEXT
	orr	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(lor) lor {
	DISPATCH_START_R2
	POP	r2, r3, tmp1, lr
	DISPATCH_NEXT
	orr	r2, tmp1, r2
	orr	r3, lr, r3
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(ixor) ixor {
	DISPATCH_START_R2
	POP	r1, tmp1
	DISPATCH_NEXT
	eor	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(lxor) lxor {
	DISPATCH_START_R2
	POP	r2, r3, tmp1, lr
	DISPATCH_NEXT
	eor	r2, tmp1, r2
	eor	r3, lr, r3
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iinc) iinc {
	ldrsb	lr, [jpc, #2]
	DISPATCH_START	\seq_len
	rsb	tmp1, r2, #0
	DISPATCH_NEXT
	ldr	r3, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	add	r3, r3, lr
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(i2l) i2l {
	DISPATCH_START_R2
	POP	r2
	DISPATCH_NEXT
	mov	r3, r2, asr #31
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(i2f) i2f {
	POP	r0
        bl      __aeabi_i2f
	PUSH	r0
	DISPATCH	\seq_len
}

(i2d) i2d {
	POP	r0
        bl      __aeabi_i2d
	PUSH	r0, r1
	DISPATCH	\seq_len
}

(l2i) l2i {
	DISPATCH_START_R2
	POP	r3
	DISPATCH_NEXT
	PUT_STACK	0, r3
	DISPATCH_FINISH
}

(l2f) l2f {
	POP	r0, r1
        bl      __aeabi_l2f
	PUSH	r0
	DISPATCH	\seq_len
}

(l2d) l2d {
	POP	r0, r1
        bl      __aeabi_l2d
	PUSH	r0, r1
	DISPATCH	\seq_len
}

(f2i) f2i {
	POPF0
        bl      _ZN13SharedRuntime3f2iEf
	PUSH	r0
	DISPATCH	\seq_len
}

(f2l) f2l {
	POPF0
        bl      _ZN13SharedRuntime3f2lEf
	PUSH	r0, r1
	DISPATCH	\seq_len
}

(f2d) f2d {
	POP	r0
        bl      __aeabi_f2d
	PUSH	r0, r1
	DISPATCH	\seq_len
}

(d2i) d2i {
	POPD0
        bl      _ZN13SharedRuntime3d2iEd
	PUSH	r0
	DISPATCH	\seq_len
}

(d2l) d2l {
	POPD0
        bl      _ZN13SharedRuntime3d2lEd
	PUSH	r0, r1
	DISPATCH	\seq_len
}

(d2f) d2f {
	POP	r0, r1
        bl      __aeabi_d2f
	PUSH	r0
	DISPATCH	\seq_len
}

(i2b) i2b {
	DISPATCH_START_R2
	POP	r3
	DISPATCH_NEXT
        mov     r3, r3, asl #24
        mov     r3, r3, asr #24
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(i2c) i2c {
	DISPATCH_START_R2
	POP	r3
	DISPATCH_NEXT
        mov     r3, r3, asl #16
        mov     r3, r3, lsr #16
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(i2s) i2s {
	DISPATCH_START_R2
	POP	r3
	DISPATCH_NEXT
        mov     r3, r3, asl #16
        mov     r3, r3, asr #16
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(lcmp) lcmp {
	POP	r1, r3, tmp1, lr
	DISPATCH_START_R2
	subs	r1, tmp1, r1
	movne	r1, #1
	sbcs	lr, lr, r3
	DISPATCH_NEXT
	movne	r1, #1
	rsblt	r1, r1, #0
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

#ifdef NOTICE_SAFEPOINTS

@ r2 = [jpc, #1]
@ r1 = [jpc, #2]
(ifeq,ifnull) ifeq_unsafe {
	POP	r3
	ldrb	r1, [jpc, #2]
        cmp     r3, #0
	beq	branch_taken_unsafe
	DISPATCH 3
}

(ifne,ifnonnull) ifne_unsafe {
	POP	r3
	ldrb	r1, [jpc, #2]
        cmp     r3, #0
	bne	branch_taken_unsafe
	DISPATCH 3
}

(iflt) iflt_unsafe {
	POP	r3
	ldrb	r1, [jpc, #2]
        cmp     r3, #0
	blt	branch_taken_unsafe
	DISPATCH 3
}

(ifge) ifge_unsafe {
	POP	r3
	ldrb	r1, [jpc, #2]
        cmp     r3, #0
	bge	branch_taken_unsafe
	DISPATCH 3
}

(ifgt) ifgt_unsafe {
	POP	r3
	ldrb	r1, [jpc, #2]
        cmp     r3, #0
	bgt	branch_taken_unsafe
	DISPATCH 3
}

(ifle) ifle_unsafe {
	POP	r3
	ldrb	r1, [jpc, #2]
        cmp     r3, #0
	ble	branch_taken_unsafe
	DISPATCH 3
}

(if_icmpeq,if_acmpeq) if_icmpeq_unsafe {
	POP	r3, tmp1
	ldrb	r1, [jpc, #2]
        cmp     tmp1, r3
	beq	branch_taken_unsafe
	DISPATCH 3
}

(if_icmpne,if_acmpne) if_icmpne_unsafe {
	POP	r3, tmp1
	ldrb	r1, [jpc, #2]
        cmp     tmp1, r3
	bne	branch_taken_unsafe
	DISPATCH 3
}

(if_icmplt) if_icmplt_unsafe {
	POP	r3, tmp1
	ldrb	r1, [jpc, #2]
        cmp     tmp1, r3
	blt	branch_taken_unsafe
	DISPATCH 3
}

(if_icmpge) if_icmpge_unsafe {
	POP	r3, tmp1
	ldrb	r1, [jpc, #2]
        cmp     tmp1, r3
	bge	branch_taken_unsafe
	DISPATCH 3
}

(if_icmpgt) if_icmpgt_unsafe {
	POP	r3, tmp1
	ldrb	r1, [jpc, #2]
        cmp     tmp1, r3
	bgt	branch_taken_unsafe
	DISPATCH 3
}

(if_icmple) if_icmple_unsafe {
	POP	r3, tmp1
	ldrb	r1, [jpc, #2]
        cmp     tmp1, r3
	ble	branch_taken_unsafe
	DISPATCH 3
}

(goto) goto_unsafe {
	ldrb	r1, [jpc, #2]
	mov	r2, r2, lsl #24
        orr     tmp1, r1, r2, asr #16
        DISPATCH_START_REG	tmp1
  USEC  cmp     tmp1, #0
  USEC  ble     do_backedge
	DISPATCH_BYTECODE
}

#endif // NOTICE_SAFEPOINTS

(jsr) jsr {
	ldr	r3, [istate, #ISTATE_METHOD]
	ldr	r1, [r3, #METHOD_CONSTMETHOD]
	rsb	r2, r1, jpc
	sub	r2, r2, #CONSTMETHOD_CODEOFFSET - 3
	PUSH	r2
	b	do_goto
}

@ r2 = [jpc, #1]
@ r1 = [jpc, #2]
(ret) ret {
	ldr	r0, [istate, #ISTATE_METHOD]
	ldr	r3, [r0, #METHOD_CONSTMETHOD]
	ldr	r1, [locals, -r2, lsl #2]
	add	jpc, r3, r1
	DISPATCH	CONSTMETHOD_CODEOFFSET
}

@ We dont do safe and unsafe versions of tableswitch and lookupswitch
(tableswitch) tableswitch {
	POP	a2
        bic     a1, jpc, #3
        ldr     a4,[a1,#8]
@       BYTESEX_REVERSE a3, a4, a3

        eor     a3, a4, a4, ror #16
        bic     a3, a3, #0xff0000
        mov     a4, a4, ror #8
        eor     a3, a4, a3, lsr #8

        ldr     a4,[a1,#12]
@       BYTESEX_REVERSE a4, a4, ip

        eor     ip, a4, a4, ror #16
        bic     ip, ip, #0xff0000
        mov     a4, a4, ror #8
        eor     a4, a4, ip, lsr #8

        sub     a2,a2,a3
        sub     a4,a4,a3
        cmp     a4,a2
        ldrcc   a1,[a1,#4]
        addcs   a1,a1,a2,LSL #2
        ldrcs   a1,[a1,#16]
@       BYTESEX_REVERSE a1, a1, a4

        eor     a4, a1, a1, ror #16
        bic     a4, a4, #0xff0000
        mov     a1, a1, ror #8
        eors    ip, a1, a4, lsr #8

        DISPATCH_START_REG	ip
	DISPATCH_BYTECODE
}

(lookupswitch) lookupswitch {
	POP	a2
        bic     a1, jpc, #3
@       BYTESEX_REVERSE a2, a2, ip

        eor     ip, a2, a2, ror #16
        bic     ip, ip, #0xff0000
        mov     a2, a2, ror #8
        eor     a2, a2, ip, lsr #8

        ldr     a3,[a1,#8]
@       BYTESEX_REVERSE a3, a3, ip

        eor     ip, a3, a3, ror #16
        bic     ip, ip, #0xff0000
        mov     a3, a3, ror #8
        eor     a3, a3, ip, lsr #8

        subs    a4,a3,#1
        bmi     1f
        add     a1, a1, #4
0:
        ldr      a3,[a1,#8]!
        cmp     a3,a2
        beq     2f
        subs    a4,a4,#1
        bpl     0b
1:
        bic     a1, jpc, #3
2:
        ldr      a2,[a1,#4]
@       BYTESEX_REVERSE a2, a2, ip

        eor     ip, a2, a2, ror #16
        bic     ip, ip, #0xff0000
        mov     a2, a2, ror #8
        eors    ip, a2, ip, lsr #8

        DISPATCH_START_REG	ip
	DISPATCH_BYTECODE
}

#ifdef FAST_BYTECODES
(igetfield) igetfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	tmp1
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r3, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry78:
	ldr	r1, [tmp1, r1]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry78_v:
	ldr	r1, [tmp1, r1]
	FullBarrier
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(bgetfield) bgetfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	tmp1
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r3, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry79:
	ldrsb	r1, [tmp1, r1]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry79_v:
	ldrsb	r1, [tmp1, r1]
	FullBarrier
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(cgetfield) cgetfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	tmp1
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r3, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry80:
	ldrh	r1, [tmp1, r1]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry80_v:
	ldrh	r1, [tmp1, r1]
	FullBarrier
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(sgetfield) sgetfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	tmp1
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r3, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry81:
	ldrsh	r1, [tmp1, r1]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry81_v:
	ldrsh	r1, [tmp1, r1]
	FullBarrier
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(lgetfield) lgetfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	tmp1
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r3, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
.abortentry82:
	ldmia	r1, {r1, tmp1}
	DISPATCH_NEXT
	PUSH	r1, tmp1
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	add	r1, tmp1, r1
#ifndef	__ARM_ARCH_7A__
.abortentry82_v:
	ldmia	r1, {r2, r3}
#else
.abortentry82_v:
	ldrexd	r2, r3 , [r1]
#endif
	// Be very careful here: you must be certain that
	// DISPATCH_NEXT does not corrupt R2 or R3.
	DISPATCH_NEXT
	FullBarrier
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iputfield) iputfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	r3, tmp1		@ r3 = value, tmp1 = object
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r2, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
.abortentry83:
	str	r3, [tmp1, r1]
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	StoreStoreBarrier
.abortentry83_v:
	str	r3, [tmp1, r1]
	StoreLoadBarrier
	DISPATCH_FINISH
}

(cputfield) cputfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	r3, tmp1		@ r3 = value, tmp1 = object
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r2, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
.abortentry84:
	strh	r3, [tmp1, r1]
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	StoreStoreBarrier
.abortentry84_v:
	strh	r3, [tmp1, r1]
	StoreLoadBarrier
	DISPATCH_FINISH
}

(bputfield) bputfield {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	3
	POP	r3, tmp1		@ r3 = value, tmp1 = object
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r2, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
.abortentry85:
	strb	r3, [tmp1, r1]
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	StoreStoreBarrier
.abortentry85_v:
	strb	r3, [tmp1, r1]
	StoreLoadBarrier
	DISPATCH_FINISH
}

(aputfield) aputfield {
	ldrb	r1, [jpc, #2]
	POP	r3, tmp1		@ r3 = value, tmp1 = object
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r2, r1, 3f
	ldr	r1, [r1, #CP_OFFSET+8]
.abortentry113:
	str	r3, [tmp1, r1]
	mov	r0, tmp1
	bl	Helper_aputfield
	DISPATCH 3
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	StoreStoreBarrier
.abortentry113_v:
	str	r3, [tmp1, r1]
	StoreLoadBarrier
	mov	r0, tmp1
	bl	Helper_aputfield
	DISPATCH 3
}

(lputfield) lputfield {
	ldrb	r1, [jpc, #2]
	POP	r3, tmp1, lr		@ r3, tmp1 = value, lr = object
        add     r1, constpool, r1, lsl #12
	add	r1, r1, r2, lsl #4
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE	r2, r1, 3f
	DISPATCH_START	3
	ldr	r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	add	r1, lr, r1
	DISPATCH_NEXT
.abortentry86:
	stm	r1, {r3, tmp1}
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	ldr	r1, [r1, #CP_OFFSET+8]
	add	r1, lr, r1
	StoreStoreBarrier
#ifndef	__ARM_ARCH_7A__
.abortentry86_v:
	stm	r1, {r3, tmp1}
#else
	mov	ip, r1
	mov	r1, r3
	// Data in tmp1 & r1, address in ip, r2 & r3 scratch
	mov	r0, r1
	mov	r1, tmp1
.abortentry86_v:
	ldrexd	r2, r3, [ip]
	strexd	r2, r0, r1, [ip]
	teq	r2, #0
	bne	.abortentry86_v
#endif
	DISPATCH_START	3
	DISPATCH_NEXT
	DISPATCH_NEXT
	StoreLoadBarrier
	DISPATCH_FINISH
}

#endif // FAST_BYTECODES

@ r2 = [jpc, #1]
@ r1 = [jpc, #2]
(getstatic) getstatic {
	ldrb	r1, [jpc, #2]
        add     tmp1, constpool, r1, lsl #12
	add	tmp1, tmp1, r2, lsl #4
        ldr     r3, [tmp1, #CP_OFFSET]
	and	r3, r3, #0x00ff0000
	cmp	r3, #opc_getstatic << 16
	blne	resolve_get_put
	GO_IF_VOLATILE	r2, tmp1, 3f
	ldr	r3, [tmp1, #CP_OFFSET+4]
	ldr	r2, [tmp1, #CP_OFFSET+12]
        ldr     lr, [tmp1, #CP_OFFSET+8]
        movs    r2, r2, lsr #29
	bhi	getstatic_w		@ C = 1, Z = 0 => R2 == 3, 5, 7
	bcs	getstatic_h		@ C = 1 => R2 = 1
	beq	getstatic_sb		@ Z = 1 => R2 = 0
	tst	r2, #2
	bne	getstatic_dw
	b	getstatic_sh
3:
	VOLATILE_VERSION
	ldr	r3, [tmp1, #CP_OFFSET+4]
	ldr	r2, [tmp1, #CP_OFFSET+12]
        ldr     lr, [tmp1, #CP_OFFSET+8]
        movs    r2, r2, lsr #29
	bhi	getstatic_volatile_w		@ C = 1, Z = 0 => R2 == 3, 5, 7
	bcs	getstatic_volatile_h		@ C = 1 => R2 = 1
	beq	getstatic_volatile_sb		@ Z = 1 => R2 = 0
	tst	r2, #2
	bne	getstatic_volatile_dw
	b	getstatic_volatile_sh
}

@ r2 = [jpc, #1]
@ r1 = [jpc, #2]
(putstatic) putstatic {
	ldrb	r1, [jpc, #2]
        add     tmp1, constpool, r1, lsl #12
	add	tmp1, tmp1, r2, lsl #4
        ldr     r3, [tmp1, #CP_OFFSET]
        and     r3, r3, #0xff000000
        cmp     r3, #opc_putstatic << 24
	blne	resolve_get_put
	GO_IF_VOLATILE	r2, tmp1, 3f
	ldr	r3, [tmp1, #CP_OFFSET+4]		@ r3 = object
        ldr     lr, [tmp1, #CP_OFFSET+12]           @ lr = tos_type
        ldr     r2, [tmp1, #CP_OFFSET+8]            @ r2 = offset
	movs	lr, lr, lsr #29
	bhi	putstatic_w		@ C = 1, Z = 0 => R2 == 3, 5, 7
	bcs	putstatic_h		@ C = 1 => R2 = 1
	beq	putstatic_sb		@ Z = 1 => R2 = 0
	tst	lr, #2
	bne	putstatic_dw
	b	putstatic_sh
3:
	VOLATILE_VERSION
	ldr	r3, [tmp1, #CP_OFFSET+4]		@ r3 = object
        ldr     lr, [tmp1, #CP_OFFSET+12]           @ lr = tos_type
        ldr     r2, [tmp1, #CP_OFFSET+8]            @ r2 = offset
	movs	lr, lr, lsr #29
	bhi	putstatic_volatile_w		@ C = 1, Z = 0 => R2 == 3, 5, 7
	bcs	putstatic_volatile_h		@ C = 1 => R2 = 1
	beq	putstatic_volatile_sb		@ Z = 1 => R2 = 0
	tst	lr, #2
	bne	putstatic_volatile_dw
	b	putstatic_volatile_sh
}

#ifdef NOTICE_SAFEPOINTS

(return) return_unsafe {

	ldr	r9, [istate, #ISTATE_MONITOR_BASE]	@ r9 = base
	ldr	tmp1, [istate, #ISTATE_STACK_BASE]	@ tmp1 = end

	cmp	tmp1, r9
	bcc	1f
2:
	mov	r3, #0

	ldr	r2, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r3, [thread, #THREAD_LAST_JAVA_SP]
	ldr	r0, [istate, #ISTATE_METHOD]
	ldr	r3, [r2, #0]
	ldrh	r0, [r0, #40]
	add	r1, r2, #4
	str	r3, [thread, #THREAD_TOP_ZERO_FRAME]

	add	stack, r1, r0, lsl #2

	str	stack, [thread, #THREAD_JAVA_SP]

	mov	r0, #0	@ deoptimized_frames = 0
	ldmfd	arm_sp!, {fast_regset, pc}
1:
	bl	return_check_monitors
	b	2b
}

(ireturn,areturn,freturn) ireturn_unsafe {

	ldr	r9, [istate, #ISTATE_MONITOR_BASE]	@ r9 = base
	ldr	tmp1, [istate, #ISTATE_STACK_BASE]	@ tmp1 = end

	cmp	tmp1, r9
	bcc	1f
2:
	mov	r3, #0

	POP	r1					@ pop result before we lose stack

	ldr	stack, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r3, [thread, #THREAD_LAST_JAVA_SP]
	ldr	r0, [istate, #ISTATE_METHOD]
	ldr	r3, [stack, #0]
	ldrh	r0, [r0, #40]

	str	r3, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r1, [stack, r0, lsl #2]!

	str	stack, [thread, #THREAD_JAVA_SP]

	mov	r0, #0	@ deoptimized_frames = 0
	ldmfd	arm_sp!, {fast_regset, pc}
1:
	bl	return_check_monitors
	b	2b
}

(lreturn,dreturn) lreturn_unsafe {

	ldr	r9, [istate, #ISTATE_MONITOR_BASE]	@ r9 = base
	ldr	tmp1, [istate, #ISTATE_STACK_BASE]	@ tmp1 = end
	cmp	tmp1, r9
	bcc	1f
2:
	mov	r3, #0

	ldr	r2, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r3, [thread, #THREAD_LAST_JAVA_SP]
	ldr	r0, [istate, #ISTATE_METHOD]
	ldr	r3, [r2, #0]
	ldrh	r0, [r0, #40]
	add	r1, r2, #4
	str	r3, [thread, #THREAD_TOP_ZERO_FRAME]

	POP	r2, r3

	add	stack, r1, r0, lsl #2
	stmdb	stack!, {r2, r3}

	str	stack, [thread, #THREAD_JAVA_SP]

	mov	r0, #0	@ deoptimized_frames = 0
	ldmfd	arm_sp!, {fast_regset, pc}
1:
	bl	return_check_monitors
	b	2b
}

#endif // NOTICE_SAFEPOINTS

(ldc) ldc {
	ldr	r3, [istate, #ISTATE_METHOD]			@ method
	ldrb	lr, [jpc, #1]

	ldr	tmp1, [r3, #METHOD_CONSTANTS]			@ constants

	DISPATCH_START	\seq_len

	ldr	r3, [tmp1, #8]
	DISPATCH_NEXT
	add	r3, r3, #12
	ldrb	r3, [r3, lr]

	DISPATCH_NEXT
	DISPATCH_NEXT

	cmp	r3, #JVM_CONSTANT_Integer
	cmpne	r3, #JVM_CONSTANT_Float
	cmpne	r3, #JVM_CONSTANT_String
	bne	1f

	add	r3, tmp1, lr, lsl #2
	ldr	r3, [r3, #CONSTANTPOOL_BASE]
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
1:
	cmp	r3, #JVM_CONSTANT_Class
	bne	2f
	add	r0, tmp1, #CONSTANTPOOL_BASE
	ldr	r0, [r0, lr, lsl #2]
	ldr	r1, [r0, #KLASS_PART + KLASS_JAVA_MIRROR]
	PUSH	r1
	DISPATCH	0
2:
	sub	jpc, jpc, #\seq_len
	mov	r0, thread
        DECACHE_JPC
        DECACHE_STACK
	mov	r1, #0
        bl      _ZN18InterpreterRuntime3ldcEP10JavaThreadb
	CACHE_CP
	ldr	r1, [thread, #THREAD_PENDING_EXC]
	CACHE_JPC
	cmp	r1, #0
	bne	handle_exception
	ldr	r3, [thread, #THREAD_VM_RESULT]
	mov	r2, #0
	PUSH	r3
	str	r2, [thread, #THREAD_VM_RESULT]
	DISPATCH	\seq_len
}

(ldc_w) ldc_w {
	ldrb	lr, [jpc, #1]

	ldr	r3, [istate, #ISTATE_METHOD]			@ method
	ldrb	ip, [jpc, #2]
	ldr	r2, [r3, #METHOD_CONSTANTS]			@ constants

	DISPATCH_START	\seq_len

	ldr	r3, [r2, #8]
	orr	lr, ip, lr, lsl #8
	add	r3, r3, #12
	ldrb	r3, [r3, lr]

	DISPATCH_NEXT
	DISPATCH_NEXT

	cmp	r3, #JVM_CONSTANT_Integer
	cmpne	r3, #JVM_CONSTANT_Float
	cmpne	r3, #JVM_CONSTANT_String
	bne	1f

	add	r3, r2, lr, lsl #2
	ldr	r3, [r3, #CONSTANTPOOL_BASE]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
1:
	cmp	r3, #JVM_CONSTANT_Class
	bne	2f
	add	r0, r2, #CONSTANTPOOL_BASE
	ldr	r0, [r0, lr, lsl #2]
	ldr	r1, [r0, #KLASS_PART + KLASS_JAVA_MIRROR]
	PUSH	r1
	DISPATCH	0
2:
	sub	jpc, jpc, #\seq_len
	mov	r0, thread
        DECACHE_JPC
        DECACHE_STACK
	mov	r1, #1
        bl      _ZN18InterpreterRuntime3ldcEP10JavaThreadb
	CACHE_CP
	ldr	r1, [thread, #THREAD_PENDING_EXC]
	CACHE_JPC
	cmp	r1, #0
	ldr	r3, [thread, #THREAD_VM_RESULT]
	bne	handle_exception
	mov	r2, #0
	PUSH	r3
	str	r2, [thread, #THREAD_VM_RESULT]
	DISPATCH	\seq_len
}

(ldc2_w) ldc2_w {
	ldrb	r3, [jpc, #1]

	ldr	tmp1, [istate, #ISTATE_METHOD]			@ method
	ldrb	lr, [jpc, #2]
	ldr	r2, [tmp1, #METHOD_CONSTANTS]			@ constants

	DISPATCH_START	\seq_len

	ldr	tmp1, [r2, #8]
	orr	r3, lr, r3, lsl #8
	add	tmp1, tmp1, #12
	ldrb	tmp1, [tmp1, r3]

	DISPATCH_NEXT
	DISPATCH_NEXT

	add	tmp1, r2, r3, lsl #2
	ldr	r3, [tmp1, #CONSTANTPOOL_BASE]
	ldr	tmp1, [tmp1, #CONSTANTPOOL_BASE+4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

#ifdef FAST_BYTECODES
(iadd_u4store) {
	ldrb	r3, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r1, tmp1
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	rsb	r3, r3, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(isub_u4store) {
	ldrb	r3, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r1, tmp1
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	rsb	r3, r3, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(iand_u4store) {
	ldrb	r3, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r1, tmp1
	DISPATCH_NEXT
	and	r1, tmp1, r1
	DISPATCH_NEXT
	rsb	r3, r3, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(ior_u4store) {
	ldrb	r3, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r1, tmp1
	DISPATCH_NEXT
	orr	r1, tmp1, r1
	DISPATCH_NEXT
	rsb	r3, r3, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(ixor_u4store) {
	ldrb	r3, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r1, tmp1
	DISPATCH_NEXT
	eor	r1, tmp1, r1
	DISPATCH_NEXT
	rsb	r3, r3, #0
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(iadd_istore_N) {
	ldrb	lr, [jpc, #1]
	DISPATCH_START	\seq_len
	DISPATCH_NEXT
	rsb	r3, lr, #opc_istore_0
	POP	r1, tmp1
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(isub_istore_N) {
	ldrb	lr, [jpc, #1]
	DISPATCH_START	\seq_len
	DISPATCH_NEXT
	rsb	r3, lr, #opc_istore_0
	POP	r1, tmp1
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(iand_istore_N) {
	ldrb	lr, [jpc, #1]
	DISPATCH_START	\seq_len
	DISPATCH_NEXT
	rsb	r3, lr, #opc_istore_0
	POP	r1, tmp1
	DISPATCH_NEXT
	and	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(ior_istore_N) {
	ldrb	lr, [jpc, #1]
	DISPATCH_START	\seq_len
	DISPATCH_NEXT
	rsb	r3, lr, #opc_istore_0
	POP	r1, tmp1
	DISPATCH_NEXT
	orr	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

(ixor_istore_N) {
	ldrb	lr, [jpc, #1]
	DISPATCH_START	\seq_len
	DISPATCH_NEXT
	rsb	r3, lr, #opc_istore_0
	POP	r1, tmp1
	DISPATCH_NEXT
	eor	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, r3, lsl #2]
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iconst_N)
{
        ldrb    r3, [jpc, #2]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
        DISPATCH_NEXT
        sub     r3, r3, #opc_iconst_0
        ldr     tmp1, [locals, r2, lsl #2]
        DISPATCH_NEXT
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH   r3, tmp1
        DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
        ldrb    r2, [jpc, #1-\seq_len]
        DISPATCH_NEXT
        ldr     tmp1, [locals, r3, lsl #2]
        DISPATCH_NEXT
        sub     r1, r2, #opc_iconst_0
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH   r1, tmp1
        DISPATCH_FINISH
}

@ (aload_N)(getfield)
(iaccess_0,iaccess_1,iaccess_2,iaccess_3)
{
	ldrb	r2, [jpc, #3]
	rsb	tmp1, r0, #opc_iaccess_0
	ldrb	r3, [jpc, #2]
	add	r1, constpool, r2, lsl #12
	DISPATCH_START	4
	ldr	tmp1, [locals, tmp1, lsl #2]
	add	r1, r3, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	GO_IF_VOLATILE r3, r1, 3f
	DISPATCH_NEXT
        ldr     r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry87:
	ldr	r1, [tmp1, r1]
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
	DISPATCH_NEXT
        ldr     r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry87_v:
	ldr	r1, [tmp1, r1]
	FullBarrier
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iload) fast_iload_iload
{
	ldrb	r3, [jpc, #3]
	DISPATCH_START	\seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
	rsb	r3, r3, #0
	DISPATCH_NEXT
	ldr	tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iload_N) fast_iload_iload_N
{
	ldrb	r3, [jpc, #2]
	DISPATCH_START	\seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	ldr	tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload) fast_iload_N_iload
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
	DISPATCH_START	\seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	ldr	tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N) fast_iload_N_iload_N
{
	rsb	r3, r0, #opc_iload_0_iload_N
	DISPATCH_START	\seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
	ldr	tmp1, [locals, r3, lsl #2]
	DISPATCH_NEXT
	ldr	r3, [locals, r2, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

#endif // FAST_BYTECODE

#ifdef HW_FP

(fadd) fadd_vfp {
	DISPATCH_START_R2
	vldr	s15, [stack, #8]
	vldr	s14, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fadds	s15, s15, s14
	DISPATCH_NEXT
	DISPATCH_NEXT
	vstr	s15, [stack, #8]
	add	stack, stack, #4
	DISPATCH_FINISH
}

(dadd) dadd_vfp {
	DISPATCH_START_R2
	vldr	d7, [stack, #12]
	vldr	d6, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	faddd	d0, d7, d6
	DISPATCH_NEXT
	DISPATCH_NEXT
	vstr	d0, [stack, #12]
	add	stack, stack, #8
	DISPATCH_FINISH
}

(fsub) fsub_vfp {
	DISPATCH_START_R2
	vldr	s15, [stack, #8]
	vldr	s14, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fsubs	s15, s15, s14
	DISPATCH_NEXT
	DISPATCH_NEXT
	vstr	s15, [stack, #8]
	add	stack, stack, #4
	DISPATCH_FINISH
}

(fmul) fmul_vfp {
	DISPATCH_START_R2
	vldr	s15, [stack, #8]
	vldr	s14, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fmuls	s15, s15, s14
	DISPATCH_NEXT
	DISPATCH_NEXT
	vstr	s15, [stack, #8]
	add	stack, stack, #4
	DISPATCH_FINISH
}

(dmul) dmul_vfp {
	DISPATCH_START_R2
	vldr	d7, [stack, #12]
	vldr	d6, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fmuld	d0, d7, d6
	DISPATCH_NEXT
	DISPATCH_NEXT
	vstr	d0, [stack, #12]
	add	stack, stack, #8
	DISPATCH_FINISH
}

(fdiv) fdiv_vfp {
	DISPATCH_START_R2
	vldr	s15, [stack, #8]
	vldr	s14, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fdivs	s15, s15, s14
	DISPATCH_NEXT
	DISPATCH_NEXT
	vstr	s15, [stack, #8]
	add	stack, stack, #4
	DISPATCH_FINISH
}

(ddiv) ddiv_vfp {
	DISPATCH_START_R2
	vldr	d7, [stack, #12]
	vldr	d6, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fdivd	d0, d7, d6
	DISPATCH_NEXT
	DISPATCH_NEXT
	vstr	d0, [stack, #12]
	add	stack, stack, #8
	DISPATCH_FINISH
}

(fcmpl) fcmpl_vfp {
	DISPATCH_START_R2
	flds	s14, [stack, #8]
	flds	s15, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fcmpes	s14, s15
	add	stack, stack, #8
	fmstat
	mvnmi	r3, #0
	bmi	1f
	movgt	r3, #1
	bgt	1f
	fcmps	s14, s15
	fmstat
	moveq	r3, #0
	mvnne	r3, #0
1:
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(fcmpg) fcmpg_vfp {
	DISPATCH_START_R2
	flds	s14, [stack, #8]
	flds	s15, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fcmpes	s14, s15
	add	stack, stack, #8
	fmstat
	mvnmi	r3, #0
	bmi	1f
	movgt	r3, #1
	bgt	1f
	fcmps	s14, s15
	fmstat
	moveq	r3, #0
	movne	r3, #1
1:
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(dcmpl) dcmpl_vfp {
	DISPATCH_START_R2
	fldd	d6, [stack, #12]
	fldd	d7, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fcmped	d6, d7
	fmstat
	mvnmi	r3, #0
	bmi	1f
	movgt	r3, #1
	bgt	1f
	fcmpd	d6, d7
	fmstat
	moveq	r3, #0
	mvnne	r3, #0
1:
	add	stack, stack, #16
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(dcmpg) dcmpg_vfp {
	DISPATCH_START_R2
	fldd	d6, [stack, #12]
	fldd	d7, [stack, #4]
	DISPATCH_NEXT
	DISPATCH_NEXT
	fcmped	d6, d7
	fmstat
	mvnmi	r3, #0
	bmi	1f
	movgt	r3, #1
	bgt	1f
	fcmpd	d6, d7
	fmstat
	moveq	r3, #0
	movne	r3, #1
1:
	add	stack, stack, #16
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

#endif // HW_FP

#ifdef FAST_BYTECODES

@##############################################################################
@ Optimised bytecode pairs
@##############################################################################

@ --- load; iaccess ------------------------------------------------------

(iload_0,iload_1,iload_2,iload_3)
(iaccess_0,iaccess_1,iaccess_2,iaccess_3)
{
	rsb	lr, r0, #opc_iload_0
	ldrb	r2, [jpc, #4]
	rsb	tmp1, r1, #opc_iaccess_0
	ldrb	r3, [jpc, #3]
	ldr	lr, [locals, lr, lsl #2]
	add	r1, constpool, r2, lsl #12
	DISPATCH_START	\seq_len
	PUSH	lr
	ldr	tmp1, [locals, tmp1, lsl #2]
	add	r1, r3, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	DISPATCH_NEXT
        ldr     r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry111:
	ldr	r1, [tmp1, r1]
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iload,aload,fload)
(iaccess_0,iaccess_1,iaccess_2,iaccess_3)
{
	rsb	lr, r2, #0
	ldrb	r2, [jpc, #5]
	rsb	tmp1, r1, #opc_iaccess_0
	ldrb	r3, [jpc, #4]
	ldr	lr, [locals, lr, lsl #2]
	add	r1, constpool, r2, lsl #12
	DISPATCH_START	\seq_len
	PUSH	lr
	ldr	tmp1, [locals, tmp1, lsl #2]
	add	r1, r3, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	DISPATCH_NEXT
        ldr     r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry112:
	ldr	r1, [tmp1, r1]
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

@ --- load; load ---------------------------------------------------------

(aload_0,aload_1,aload_2,aload_3)
(aload_0,aload_1,aload_2,aload_3)
{
	rsb	tmp1, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_aload_0
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, tmp1
	DISPATCH_FINISH
}

(aload_0,aload_1,aload_2,aload_3)
(iload_0,iload_1,iload_2,iload_3)
{
	rsb	tmp1, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_iload_0
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, tmp1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(aload_0,aload_1,aload_2,aload_3)
{
	rsb	tmp1, r0, #opc_iload_0
        DISPATCH_START  \seq_len
	rsb	r1, r1, #opc_aload_0
        DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	cmp	r0, #opc_igetfield
	ldr	r1, [locals, r1, lsl #2]
        beq     1f
2:
        DISPATCH_NEXT
        DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, tmp1
        DISPATCH_FINISH
1:
	ldrb	lr, [jpc, #-1]
	add	lr, lr, #opc_iaccess_0-opc_aload_0
	REWRITE_PAIRS	strb	lr, [jpc, #-1]
	b	2b
}

@ 7 cycles
(iload_0,iload_1,iload_2,iload_3)
(iload_0,iload_1,iload_2,iload_3)
{
	add	r0, r0, #opc_iload_0_iload_N-opc_iload_0
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_fast_iload_N_iload_N
}

(aload_0,aload_1,aload_2,aload_3)
(iload,aload,fload)
{
	ldrb	r3, [jpc, #2]
	rsb	tmp1, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	rsb	r3, r3, #0
	DISPATCH_NEXT
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(aload,fload)
{
	ldrb	r3, [jpc, #2]
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	rsb	r3, r3, #0
	DISPATCH_NEXT
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(iload)
{
	add	r0, r0, #opc_iload_0_iload-opc_iload_0
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_fast_iload_N_iload
}

@ r2 = [jpc, #1]
(iload,aload,fload)
(aload_0,aload_1,aload_2,aload_3)
{
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_aload_0
	DISPATCH_NEXT
	rsb	tmp1, r2, #0
	ldr	r1, [locals, r1, lsl #2]
	cmp	r0, #opc_igetfield
	DISPATCH_NEXT
	beq	1f
2:
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, tmp1
	DISPATCH_FINISH
1:
	ldrb	lr, [jpc, #-1]
	add	lr, lr, #opc_iaccess_0-opc_aload_0
	REWRITE_PAIRS	strb	lr, [jpc, #-1]
	b	2b
}

@ r2 = [jpc, #1]
(aload,fload)
(iload_0,iload_1,iload_2,iload_3)
{
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_iload_0
	DISPATCH_NEXT
	rsb	tmp1, r2, #0
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, tmp1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload)
(iload_0,iload_1,iload_2,iload_3)
{
	mov	r0, #opc_iload_iload_N
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_fast_iload_iload_N
}

@ r2 = [jpc, #1]
(aload,fload)(iload,aload,fload) {
	ldrb	r1, [jpc, #3]
	rsb	tmp1, r2, #0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #0
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, tmp1
	DISPATCH_FINISH
}

(iload)(iload) {
	mov	r0, #opc_iload_iload
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_fast_iload_iload
}

(iload)(aload,fload) {
	ldrb	r1, [jpc, #3]
	rsb	tmp1, r2, #0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #0
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, tmp1
	DISPATCH_FINISH
}

@ --- load; store --------------------------------------------------------

(aload_0,aload_1,aload_2,aload_3)
(astore_0,astore_1,astore_2,astore_3)
{
	rsb	tmp1, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_astore_0
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	tmp1, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(istore_0,istore_1,istore_2,istore_3)
{
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_istore_0
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	tmp1, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(aload_0,aload_1,aload_2,aload_3)
(astore,istore,fstore)
{
	ldrb	r1, [jpc, #2]
	rsb	tmp1, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #0
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	tmp1, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(astore,istore,fstore)
{
	ldrb	r1, [jpc, #2]
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	rsb	r1, r1, #0
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	tmp1, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)
(astore_0,astore_1,astore_2,astore_3)
{
	DISPATCH_START	\seq_len
	rsb	tmp1, r1, #opc_astore_0
	DISPATCH_NEXT
	rsb	r1, r2, #0
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)
(istore_0,istore_1,istore_2,istore_3)
{
	DISPATCH_START	\seq_len
	rsb	tmp1, r1, #opc_istore_0
	DISPATCH_NEXT
	rsb	r1, r2, #0
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)(astore,istore,fstore) {
	ldrb	tmp1, [jpc, #3]
	rsb	r1, r2, #0
	DISPATCH_START	\seq_len
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r1, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

@ --- load; const -------------------------------------------------------

(aload_0,aload_1,aload_2,aload_3)
(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)
{
	rsb	tmp1, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	sub	r1, r1, #opc_iconst_0
	DISPATCH_NEXT
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)
{
        add     r0, r0, #opc_iload_0_iconst_N-opc_iload_0
        REWRITE_PAIRS	strb    r0, [jpc]
	b	do_iload_0_iconst_N
}

@ r2 = [jpc, #1]
(iload,aload,fload)
(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)
{
        cmp     r0, #opc_iload
        DISPATCH_START  \seq_len
        sub     r1, r1, #opc_iconst_0
        DISPATCH_NEXT
        ldr     r3, [locals, -r2, lsl #2]
        DISPATCH_NEXT
        beq     1f
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH   r1, r3
        DISPATCH_FINISH
1:
        mov     tmp1, #opc_iload_iconst_N
        REWRITE_PAIRS	strb    tmp1, [jpc, #-\seq_len]
	add	jpc, #-\seq_len
	b	do_iload_iconst_N
}

(aload_0,aload_1,aload_2,aload_3)
(bipush)
{
	ldrsb	r2, [jpc, #2]
	rsb	r3, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(bipush)
{
	ldrsb	r2, [jpc, #2]
	rsb	r3, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(aload_0,aload_1,aload_2,aload_3)
(sipush)
{
        ldrsb   r2, [jpc, #2]   @ zero_extendqisi2
        ldrb    lr, [jpc, #3]   @ zero_extendqisi2
	rsb	r3, r0, #opc_aload_0
	DISPATCH_START	\seq_len
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        orr     r2, lr, r2, asl #8
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(sipush)
{
        ldrsb   r2, [jpc, #2]   @ zero_extendqisi2
        ldrb    lr, [jpc, #3]   @ zero_extendqisi2
	rsb	r3, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        orr     r2, lr, r2, asl #8
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)(bipush) {
	ldrsb	r3, [jpc, #3]
	DISPATCH_START	\seq_len
	ldr	lr, [locals, -r2, lsl #2]
	DISPATCH_NEXT
	PUSH	r3, lr
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)(sipush) {
	ldrsb	r3, [jpc, #3]
	ldrb	lr, [jpc, #4]
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, -r2, lsl #2]
        orr     r3, lr, r3, asl #8
	DISPATCH_NEXT
	PUSH	r3, tmp1
	DISPATCH_FINISH
}

@ --- load; Xaload -------------------------------------------------------

(iload_0,iload_1,iload_2,iload_3)
(iaload,aaload,faload)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	r2, [locals, r2, lsl #2]
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry19:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2, lsl #2
	ldr	lr, [r3, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)(iaload,aaload,faload) {
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_START	\seq_len
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry20:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2, lsl #2
	ldr	lr, [r3, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(baload)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	r2, [locals, r2, lsl #2]
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry21:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2
	ldrsb	lr, [r3, #BASE_OFFSET_BYTE]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(caload)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	r2, [locals, r2, lsl #2]
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry22:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2, lsl #1
	ldrh	lr, [r3, #BASE_OFFSET_SHORT]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(saload)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	r2, [locals, r2, lsl #2]
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry23:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2, lsl #1
	ldrsh	lr, [r3, #BASE_OFFSET_SHORT]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)(baload) {
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_START	\seq_len
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry24:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2
	ldrsb	lr, [r3, #BASE_OFFSET_BYTE]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)(caload) {
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_START	\seq_len
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry25:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2, lsl #1
	ldrh	lr, [r3, #BASE_OFFSET_SHORT]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload,aload,fload)(saload) {
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_START	\seq_len
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry26:
	ldr	lr, [r3, #8]		@ lr = length
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	add	r3, r3, r2, lsl #1
	ldrsh	lr, [r3, #BASE_OFFSET_SHORT]
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

@ --- load; Xastore -------------------------------------------------------

(iload_0,iload_1,iload_2,iload_3)
(iastore,fastore)
{
	POP	r2, r3
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry27:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	str	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(bastore)
{
	POP	r2, r3
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry28:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2
	strb	tmp1, [r3, #BASE_OFFSET_BYTE]
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(castore,sastore)
{
	POP	r2, r3
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry29:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #1
	strh	tmp1, [r3, #BASE_OFFSET_SHORT]
	DISPATCH_FINISH
}

(iload,aload,fload)(iastore,fastore) {
	POP	r3, tmp1
	DISPATCH_START	\seq_len
	ldr	r2, [locals, -r2, lsl #2]
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry30:
	ldr	lr, [tmp1, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r3, lr
	bcs	array_bound_exception_jpc_1_r3
	DISPATCH_NEXT
	add	tmp1, tmp1, r3, lsl #2
	str	r2, [tmp1, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(iload,aload,fload)(bastore) {
	POP	r3, tmp1
	DISPATCH_START	\seq_len
	ldr	r2, [locals, -r2, lsl #2]
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry31:
	ldr	lr, [tmp1, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r3, lr
	bcs	array_bound_exception_jpc_1_r3
	DISPATCH_NEXT
	add	tmp1, tmp1, r3
	strb	r2, [tmp1, #BASE_OFFSET_BYTE]
	DISPATCH_FINISH
}

(iload,aload,fload)(castore,sastore) {
	POP	r3, tmp1
	DISPATCH_START	\seq_len
	ldr	r2, [locals, -r2, lsl #2]
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry32:
	ldr	lr, [tmp1, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r3, lr
	bcs	array_bound_exception_jpc_1_r3
	DISPATCH_NEXT
	add	tmp1, tmp1, r3, lsl #1
	strh	r2, [tmp1, #BASE_OFFSET_SHORT]
	DISPATCH_FINISH
}

@ --- load; dataop -------------------------------------------------------

(iload_0,iload_1,iload_2,iload_3)
(iadd)
{
	POP	r1
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	add	tmp1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iload,aload,fload)(iadd) {
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	POP	tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(isub)
{
	POP	r1
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	sub	tmp1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iload,aload,fload)(isub) {
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	POP	tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(imul)
{
	POP	r2
	rsb	lr, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	lr, [locals, lr, lsl #2]
	DISPATCH_NEXT
	mul	r3, r2, lr
	DISPATCH_NEXT
	PUSH	r3
	DISPATCH_FINISH
}

(iload,aload,fload)(imul) {
	DISPATCH_START	\seq_len
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_NEXT
	mul	lr, r3, r2
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(ineg)
{
	rsb	lr, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	lr, [locals, lr, lsl #2]
	DISPATCH_NEXT
	rsb	lr, lr, #0
	PUSH	lr
	DISPATCH_FINISH
}

(iload,aload,fload)(ineg) {
	DISPATCH_START	\seq_len
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_NEXT
	rsb	r2, r2, #0
	PUSH	r2
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(ishl)
{
	POP	r2
	rsb	lr, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	lr, [locals, lr, lsl #2]
	DISPATCH_NEXT
	mov	lr, r2, lsl lr
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iload,aload,fload)(ishl) {
	DISPATCH_START	\seq_len
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_NEXT
	mov	r2, r3, lsl r2
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(ishr)
{
	POP	r2
	rsb	lr, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	lr, [locals, lr, lsl #2]
	DISPATCH_NEXT
	mov	lr, r2, asr lr
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iload,aload,fload)(ishr) {
	DISPATCH_START	\seq_len
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_NEXT
	mov	r2, r3, asr r2
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(iushr)
{
	POP	r2
	rsb	lr, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	lr, [locals, lr, lsl #2]
	DISPATCH_NEXT
	mov	lr, r2, lsr lr
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_FINISH
}

(iload,aload,fload)(iushr) {
	ldrb	r2, [jpc, #1]
	DISPATCH_START	\seq_len
	POP	r3
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_NEXT
	mov	r2, r3, lsr r2
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(iand)
{
	POP	r1
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	and	tmp1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iload,aload,fload)(iand) {
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	POP	tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	and	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(ior)
{
	POP	r1
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	orr	tmp1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iload,aload,fload)(ior) {
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	POP	tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	orr	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(ixor)
{
	POP	r1
	rsb	tmp1, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	eor	tmp1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iload,aload,fload)(ixor) {
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	POP	tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	eor	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iload_0,iload_1,iload_2,iload_3)
(i2c)
{
	rsb	lr, r0, #opc_iload_0
	DISPATCH_START	\seq_len
	ldr	lr, [locals, lr, lsl #2]
	DISPATCH_NEXT
        mov     lr, lr, asl #16
        mov     lr, lr, lsr #16
	PUSH	lr
	DISPATCH_FINISH
}

(iload,aload,fload)(i2c) {
	DISPATCH_START	\seq_len
	ldr	r2, [locals, -r2, lsl #2]
	DISPATCH_NEXT
        mov     r2, r2, asl #16
        mov     r2, r2, lsr #16
	PUSH	r2
	DISPATCH_FINISH
}

#ifdef NOTICE_SAFEPOINTS

@ --- load; branch -------------------------------------------------------

(iload_0,iload_1,iload_2,iload_3)
(ifeq,ifnull)
{
	rsb	r3, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r3, [locals, r3, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, #0
	beq	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(ifeq,ifnull) {
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r3, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, #0
	beq	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(ifne,ifnonnull)
{
	rsb	r3, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r3, [locals, r3, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, #0
	bne	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(ifne,ifnonnull) {
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r3, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, #0
	bne	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(iflt)
{
	rsb	r3, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r3, [locals, r3, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, #0
	blt	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(iflt) {
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r3, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, #0
	blt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(ifge)
{
	rsb	r3, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r3, [locals, r3, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, #0
	bge	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(ifge) {
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r3, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, #0
	bge	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(ifgt)
{
	rsb	r3, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r3, [locals, r3, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, #0
	bgt	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(ifgt) {
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r3, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, #0
	bgt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(ifle)
{
	rsb	r3, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r3, [locals, r3, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, #0
	ble	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(ifle) {
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r3, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, #0
	ble	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(if_icmpeq,if_acmpeq)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, r2
	beq	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(if_icmpeq,if_acmpeq) {
	POP	r3
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, r2
	beq	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(if_icmpne,if_acmpne)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, r2
	bne	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(if_icmpne,if_acmpne) {
	POP	r3
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, r2
	bne	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(if_icmplt)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, r2
	blt	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(if_icmplt) {
	POP	r3
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, r2
	blt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(if_icmpge)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, r2
	bge	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(if_icmpge) {
	POP	r3
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, r2
	bge	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(if_icmpgt)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, r2
	bgt	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(if_icmpgt) {
	POP	r3
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, r2
	bgt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_0,iload_1,iload_2,iload_3)
(if_icmple)
{
	POP	r3
	rsb	r2, r0, #opc_iload_0
        ldrsb   r1, [jpc, #2]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #3]
        cmp     r3, r2
	ble	branch_taken_unsafe_1
	DISPATCH 4
}

(iload,aload,fload)(if_icmple) {
	POP	r3
	rsb	r2, r2, #0
        ldrsb   r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
        ldrb    ip, [jpc, #4]
        cmp     r3, r2
	ble	branch_taken_unsafe_2
	DISPATCH 5
}

@ --- load; return/invoke -------------------------------------------------

(iload_0,iload_1,iload_2,iload_3)
(ireturn,areturn,freturn)
{
	rsb	r0, r0, #opc_iload_0
	ldr	r9, [istate, #ISTATE_MONITOR_BASE]	@ r9 = base
	ldr	tmp1, [istate, #ISTATE_STACK_BASE]	@ tmp1 = end
	ldr	r1, [locals, r0, lsl #2]
	cmp	tmp1, r9
	bcc	1f
2:
	mov	r3, #0
	ldr	stack, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r3, [thread, #THREAD_LAST_JAVA_SP]
	ldr	r0, [istate, #ISTATE_METHOD]
	ldr	r3, [stack, #0]
	ldrh	r0, [r0, #40]
	str	r3, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r1, [stack, r0, lsl #2]!

	str	stack, [thread, #THREAD_JAVA_SP]

	mov	r0, #0	@ deoptimized_frames = 0
	ldmfd	arm_sp!, {fast_regset, pc}
1:
	PUSH	r1
	add	jpc, jpc, #1
	bl	return_check_monitors
	POP	r1
	b	2b
}

(iload,aload,fload)(ireturn,areturn,freturn) {

	ldr	r9, [istate, #ISTATE_MONITOR_BASE]	@ r9 = base
	ldr	tmp1, [istate, #ISTATE_STACK_BASE]	@ tmp1 = end
	ldr	r1, [locals, -r2, lsl #2]
	cmp	tmp1, r9
	bcc	1f
2:
	mov	r3, #0
	ldr	stack, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r3, [thread, #THREAD_LAST_JAVA_SP]
	ldr	r0, [istate, #ISTATE_METHOD]
	ldr	r3, [stack, #0]
	ldrh	r0, [r0, #40]
	str	r3, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r1, [stack, r0, lsl #2]!

	str	stack, [thread, #THREAD_JAVA_SP]

	mov	r0, #0	@ deoptimized_frames = 0
	ldmfd	arm_sp!, {fast_regset, pc}
1:
	PUSH	r1
	add	jpc, jpc, #2
	bl	return_check_monitors
	POP	r1
	b	2b
}

#endif // NOTICE_SAFEPOINTS

(iload_0,iload_1,iload_2,iload_3)
(invokeresolved)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_iload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokeresolved
}

(aload_0,aload_1,aload_2,aload_3)
(invokeresolved)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_aload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokeresolved
}

(iload,aload,fload)(invokeresolved) {
	ldr	r0, [locals, -r2, lsl #2]
	add	jpc, jpc, #2
        ldrb     r2, [jpc, #1]
        ldrb     r1, [jpc, #2]
	PUSH	r0
	b	do_invokeresolved
}

(iload_0,iload_1,iload_2,iload_3)
(invokevfinal)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_iload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokevfinal
}

(aload_0,aload_1,aload_2,aload_3)
(invokevfinal)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_aload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokevfinal
}

(iload,aload,fload)(invokevfinal) {
	ldr	r0, [locals, -r2, lsl #2]
	add	jpc, jpc, #2
        ldrb     r2, [jpc, #1]
        ldrb     r1, [jpc, #2]
	PUSH	r0
	b	do_invokevfinal
}

(iload_0,iload_1,iload_2,iload_3)
(invokespecialresolved)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_iload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokespecialresolved
}

(aload_0,aload_1,aload_2,aload_3)
(invokespecialresolved)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_aload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokespecialresolved
}

(iload,aload,fload)(invokespecialresolved) {
	ldr	r0, [locals, -r2, lsl #2]
	add	jpc, jpc, #2
        ldrb     r2, [jpc, #1]
        ldrb     r1, [jpc, #2]
	PUSH	r0
	b	do_invokespecialresolved
}

(iload_0,iload_1,iload_2,iload_3)
(invokestaticresolved)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_iload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokestaticresolved
}

(aload_0,aload_1,aload_2,aload_3)
(invokestaticresolved)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_aload_0
	ldr	r0, [locals, r0, lsl #2]
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokestaticresolved
}

(iload,aload,fload)(invokestaticresolved) {
	ldr	r0, [locals, -r2, lsl #2]
	add	jpc, jpc, #2
        ldrb     r2, [jpc, #1]
        ldrb     r1, [jpc, #2]
	PUSH	r0
	b	do_invokestaticresolved

}

(iload_0,iload_1,iload_2,iload_3)
(invokeinterface)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_iload_0
	ldr	r0, [locals, r0, lsl #2]
        ldrb     r2, [jpc, #1]
        ldrb     r1, [jpc, #2]
	PUSH	r0
	b	do_invokeinterface
}

(aload_0,aload_1,aload_2,aload_3)
(invokeinterface)
{
	add	jpc, jpc, #1
	rsb	r0, r0, #opc_aload_0
	ldr	r0, [locals, r0, lsl #2]
        ldrb     r2, [jpc, #1]
        ldrb     r1, [jpc, #2]
	PUSH	r0
	b	do_invokeinterface
}

(iload,aload,fload)(invokeinterface) {
	ldr	r0, [locals, -r2, lsl #2]
	add	jpc, jpc, #2
        ldrb     r2, [jpc, #1]
        ldrb     r1, [jpc, #2]
	PUSH	r0
	b	do_invokeinterface
}

(aload_0,aload_1,aload_2,aload_3)
(igetfield)
{
	add	r0, r0, #opc_iaccess_0-opc_aload_0
	REWRITE_PAIRS	strb	r0, [jpc]
	DISPATCH_BYTECODE
}

@ 13 cycles
(iload,aload,fload)(igetfield) {
	ldrb	ip, [jpc, #4]
	rsb	tmp1, r2, #0
	ldrb	r3, [jpc, #3]
	add	r1, constpool, ip, lsl #12
	DISPATCH_START	5
	ldr	tmp1, [locals, tmp1, lsl #2]
	add	r1, r3, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
	DISPATCH_NEXT
	GO_IF_VOLATILE r3, r1, 3f
        ldr     r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry88:
	ldr	r1, [tmp1, r1]
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
3:
	VOLATILE_VERSION
        ldr     r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry88_v:
	ldr	r1, [tmp1, r1]
	FullBarrier
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

@ --- iconst; store -------------------------------------------------

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)
(istore_0,istore_1,istore_2,istore_3)
{
	sub	r3, r0, #opc_iconst_0
	DISPATCH_START	\seq_len
	rsb	r2, r1, #opc_istore_0
	str	r3, [locals, r2, lsl #2]
	DISPATCH_BYTECODE
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(astore,istore,fstore) {
	ldrb	r2, [jpc, #2]
	sub	r3, r0, #opc_iconst_0
	DISPATCH_START	\seq_len
	str	r3, [locals, -r2, lsl #2]
	DISPATCH_BYTECODE
}

@ --- iconst; dataop -------------------------------------------------

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(iadd) {
	sub	tmp1, r0, #opc_iconst_0
	DISPATCH_START	\seq_len
	POP	r1
	DISPATCH_NEXT
	add	tmp1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(isub) {
	sub	tmp1, r0, #opc_iconst_0
	DISPATCH_START	\seq_len
	POP	r1
	DISPATCH_NEXT
	sub	tmp1, r1, tmp1
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(idiv) {
	subs	lr, r0, #opc_iconst_2
	DISPATCH_START	\seq_len
	POP	tmp1
	DISPATCH_NEXT
	beq	5f
	bcc	3f
	cmp	lr, #(opc_iconst_4-opc_iconst_2)
	beq	4f
	bcc	2f
@ divide by 5
1:
	mvn	lr, #0x198		@ Form 0x66666667 in lr
	bic	lr, lr, #0x9800
	add	lr, lr, lr, lsl #16
	smull	a3, a4, tmp1, lr
	mov	a3, tmp1, asr #31
	rsb	tmp1, a3, a4, asr #1
	b	6f
@ divide by 3
2:
	mvn	lr, #0xa9		@ Form 0x55555556 in lr
	bic	lr, lr, #0xaa00
	add	lr, lr, lr, lsl #16
        smull   a3, a4, tmp1, lr
        sub     tmp1, a4, tmp1, asr #31
	b	6f
3:
	cmp	lr, #(opc_iconst_0-opc_iconst_2)
	beq	div_zero_jpc_1
	rsbcc	tmp1, tmp1, #0		@ Divide by -1 or 1
	b	6f
@ divide by 4
4:	movs	a4, tmp1
	addmi	a4, a4, #3
	mov	tmp1, a4, asr #2
	b	6f
@ divide by 2
5:
	add	tmp1, tmp1, tmp1, lsr #31
	mov	tmp1, tmp1, asr #1
6:
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(ishl) {
	sub	tmp1, r0, #opc_iconst_0
	DISPATCH_START	\seq_len
	POP	r2
	DISPATCH_NEXT
	mov	tmp1, r2, lsl tmp1
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

@ --- iconst; branch -------------------------------------------------

#ifdef NOTICE_SAFEPOINTS

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(if_icmpeq) {
	POP	r3
	sub	r2, r0, #opc_iconst_0
        ldrsb   r1, [jpc, #2]
        cmp     r3, r2
        ldrb    ip, [jpc, #3]
	beq	branch_taken_unsafe_1
	DISPATCH 4
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(if_icmpne) {
	POP	r3
	sub	r2, r0, #opc_iconst_0
        ldrsb   r1, [jpc, #2]
        cmp     r3, r2
        ldrb    ip, [jpc, #3]
	bne	branch_taken_unsafe_1
	DISPATCH 4
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(if_icmplt) {
	POP	r3
	sub	r2, r0, #opc_iconst_0
        ldrsb   r1, [jpc, #2]
        cmp     r3, r2
        ldrb    ip, [jpc, #3]
	blt	branch_taken_unsafe_1
	DISPATCH 4
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(if_icmpge) {
	POP	r3
	sub	r2, r0, #opc_iconst_0
        ldrsb   r1, [jpc, #2]
        cmp     r3, r2
        ldrb    ip, [jpc, #3]
	bge	branch_taken_unsafe_1
	DISPATCH 4
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(if_icmpgt) {
	POP	r3
	sub	r2, r0, #opc_iconst_0
        ldrsb   r1, [jpc, #2]
        cmp     r3, r2
        ldrb    ip, [jpc, #3]
	bgt	branch_taken_unsafe_1
	DISPATCH 4
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(if_icmple) {
	POP	r3
	sub	r2, r0, #opc_iconst_0
        ldrsb   r1, [jpc, #2]
        cmp     r3, r2
        ldrb    ip, [jpc, #3]
	ble	branch_taken_unsafe_1
	DISPATCH 4
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(ireturn) {
	ldr	r9, [istate, #ISTATE_MONITOR_BASE]	@ r9 = base
	ldr	tmp1, [istate, #ISTATE_STACK_BASE]	@ tmp1 = end
	sub	r1, r0, #opc_iconst_0
	cmp	tmp1, r9
	bcc	1f
2:
	mov	r3, #0
	ldr	stack, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r3, [thread, #THREAD_LAST_JAVA_SP]
	ldr	r0, [istate, #ISTATE_METHOD]
	ldr	r3, [stack, #0]
	ldrh	r0, [r0, #40]
	str	r3, [thread, #THREAD_TOP_ZERO_FRAME]
	str	r1, [stack, r0, lsl #2]!

	str	stack, [thread, #THREAD_JAVA_SP]

	mov	r0, #0	@ deoptimized_frames = 0
	ldmfd	arm_sp!, {fast_regset, pc}
1:
	PUSH	r1
	add	jpc, jpc, #1
	bl	return_check_monitors
	POP	r1
	b	2b
}

#endif // NOTICE_SAFEPOINTS

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(invokeresolved) {
	add	jpc, jpc, #1
	sub	r0, r0, #opc_iconst_0
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokeresolved
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(invokevfinal) {
	add	jpc, jpc, #1
	sub	r0, r0, #opc_iconst_0
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokevfinal
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(invokestaticresolved) {
	add	jpc, jpc, #1
	sub	r0, r0, #opc_iconst_0
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokestaticresolved
}

(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5)(invokespecialresolved) {
	add	jpc, jpc, #1
	sub	r0, r0, #opc_iconst_0
	ldrb	r2, [jpc, #1]
	ldrb	r1, [jpc, #2]
	PUSH	r0
	b	do_invokespecialresolved
}

@# --- Bytecode sequences iaload; xxx -----------------------------------------------

(iaload,faload,aaload)(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5) {
	sub	r2, r1, #opc_iconst_0
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_2
.abortentry38:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_2_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #12]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iaload,faload,aaload)(bipush) {
	ldrsb	r2, [jpc, #2]
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
.abortentry39:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_3_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #12]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iaload,faload,aaload)(sipush) {
	ldrsb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #3]
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	orr	r2, tmp1, r2, lsl #8
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_4
.abortentry40:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_4_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #12]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iaload,faload,aaload)(iload,fload,aload) {
	ldrb	r2, [jpc, #2]
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	ldr	r2, [locals, -r2, lsl #2]
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
.abortentry41:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_3_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iaload,faload,aaload)
(iload_0,iload_1,iload_2,iload_3)
{
	rsb	r2, r1, #opc_iload_0
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	ldr	r2, [locals, r2, lsl #2]
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_2
.abortentry42:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_2_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iaload,faload,aaload)
(aload_0,aload_1,aload_2,aload_3)
{
	rsb	r2, r1, #opc_aload_0
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	ldr	r2, [locals, r2, lsl #2]
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_2
.abortentry42_1:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_2_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	r2, r3
	DISPATCH_FINISH
}

(iaload,faload,aaload)(iaload,faload,aaload)
{
	POP	r2, r3			@ r2 = index, r3 = arrayref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_0
.abortentry43:
	ldr	tmp1, [r3, #8]		@ tmp1 = length
	DISPATCH_START	\seq_len
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_2
	add	r3, r3, r2, lsl #2
	POP	lr			@ r2 = index, lr = arrayref
	ldr	r2, [r3, #BASE_OFFSET_WORD]
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry44:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_1
	add	lr, lr, r2, lsl #2
	ldr	r2, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	r2
	DISPATCH_FINISH
}

(iaload,faload,aaload)(astore,istore,fstore) {
	ldrb	r2, [jpc, #2]
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_3
.abortentry45:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_3_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	str	r3, [locals, -r2, lsl #2]
	DISPATCH_FINISH
}

(iaload,faload,aaload)
(istore_0,istore_1,istore_2,istore_3) {
	rsb	r2, r1, #opc_istore_0
	POP	r3, lr			@ r3 = index, lr = arrayref
	DISPATCH_START	\seq_len
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_2
.abortentry46:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_2_r3
	add	lr, lr, r3, lsl #2
	ldr	r3, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	str	r3, [locals, r2, lsl #2]
	DISPATCH_FINISH
}

(iaload,faload,aaload)(iastore,fastore) {
	POP	r3, lr			@ r3 = index, lr = arrayref
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_0
.abortentry47:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_START	\seq_len
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_2_r3
	add	lr, lr, r3, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]

	POP	r2, r3		@ tmp1 = value, r2 = index, r3 = arrayref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry48:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	str	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(iaload,faload,aaload)(bastore) {
	POP	r3, lr			@ r3 = index, lr = arrayref
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_0
.abortentry49:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_START	\seq_len
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_2_r3
	add	lr, lr, r3, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]

	POP	r2, r3		@ tmp1 = value, r2 = index, r3 = arrayref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry50:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2
	strb	tmp1, [r3, #BASE_OFFSET_BYTE]
	DISPATCH_FINISH
}

(iaload,faload,aaload)(castore,sastore) {
	POP	r3, lr			@ r3 = index, lr = arrayref
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_0
.abortentry51:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_START	\seq_len
	cmp	r3, tmp1
	bcs	array_bound_exception_jpc_2_r3
	add	lr, lr, r3, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]

	POP	r2, r3		@ tmp1 = value, r2 = index, r3 = arrayref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry52:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #1
	strh	tmp1, [r3, #BASE_OFFSET_BYTE]
	DISPATCH_FINISH
}

(iaload,faload,aaload)(iand) {
	POP	r2, r3			@ r2 = index, r3 = arrayref
	DISPATCH_START	\seq_len
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_2
.abortentry58:
	ldr	tmp1, [r3, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_2
	add	r3, r3, r2, lsl #2
	ldr	tmp1, [r3, #BASE_OFFSET_WORD]		@ tmp1 = tos
	POP	r2			@ r2 = tosm1
	DISPATCH_NEXT
	and	tmp1, r2, tmp1		@ tosm1 <dop> tos
	PUSH	tmp1
	DISPATCH_FINISH
}

(iaload,faload,aaload)(ior) {
	POP	r2, r3			@ r2 = index, r3 = arrayref
	DISPATCH_START	\seq_len
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_2
.abortentry59:
	ldr	tmp1, [r3, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_2
	add	r3, r3, r2, lsl #2
	ldr	tmp1, [r3, #BASE_OFFSET_WORD]		@ tmp1 = tos
	POP	r2			@ r2 = tosm1
	DISPATCH_NEXT
	orr	tmp1, r2, tmp1		@ tosm1 <dop> tos
	PUSH	tmp1
	DISPATCH_FINISH
}

(iaload,faload,aaload)(ixor) {
	POP	r2, r3			@ r2 = index, r3 = arrayref
	DISPATCH_START	\seq_len
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_2
.abortentry60:
	ldr	tmp1, [r3, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_2
	add	r3, r3, r2, lsl #2
	ldr	tmp1, [r3, #BASE_OFFSET_WORD]		@ tmp1 = tos
	POP	r2			@ r2 = tosm1
	DISPATCH_NEXT
	eor	tmp1, r2, tmp1		@ tosm1 <dop> tos
	PUSH	tmp1
	DISPATCH_FINISH
}

@ ---- iadd; xxx ------------------------------------------------------------

(iadd)(iload,fload,aload) {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r3, tmp1
	DISPATCH_NEXT
	rsb	r1, r1, #0
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	add	r3, tmp1, r3
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(iadd)
(iload_0,iload_1,iload_2,iload_3)
{
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_iload_0
	POP	r3, tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	add	r3, tmp1, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(iadd)(iaload,aaload,faload) {
	POP	r2, r3, lr		@ lr = ref
	DISPATCH_START	\seq_len
	add	r2, r3, r2		@ r2 = index
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry73:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_1
	add	lr, lr, r2, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iadd)(istore) {
	mov	r0, #opc_iadd_u4store
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_iadd_u4store
}

(iadd)
(istore_0,istore_1,istore_2,istore_3) {
	mov	r0, #opc_iadd_istore_N
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_iadd_istore_N
}

(iadd)(iastore,fastore) {
	POP	r2, r3
	DISPATCH_START	\seq_len
	add	tmp1, r3, r2		@ tmp1 = value
	POP	r2, r3			@ r2, index, r3 = ref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry106:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	str	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(iadd)(iadd) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	add	r1, r3, r2
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iadd)(isub) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	add	r1, r3, r2
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iadd)(iinc) {
	POP	tmp1, lr
	DISPATCH_START	\seq_len
	add	tmp1, lr, tmp1
        ldrb    r3, [jpc, #-2]	@ jpc now points to next bc
        ldrsb   r2, [jpc, #-1]
	DISPATCH_NEXT
	PUSH	tmp1
	ldr	tmp1, [locals, -r3, lsl #2]
	DISPATCH_NEXT
	add	tmp1, tmp1, r2
	str	tmp1, [locals, -r3, lsl #2]
	DISPATCH_FINISH
}
@ ---- sub; xxx ------------------------------------------------------------

(isub)(iload,fload,aload) {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r3, tmp1
	DISPATCH_NEXT
	rsb	r1, r1, #0
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	sub	r3, tmp1, r3
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(isub)
(iload_0,iload_1,iload_2,iload_3)
{
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_iload_0
	POP	r3, tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	sub	r3, tmp1, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(isub)(iaload,aaload,faload) {
	POP	r2, r3, lr		@ lr = ref
	DISPATCH_START	\seq_len
	sub	r2, r3, r2		@ r2 = index
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry74:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_1
	add	lr, lr, r2, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(isub)(istore) {
	mov	r0, #opc_isub_u4store
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_isub_u4store
}

(isub)
(istore_0,istore_1,istore_2,istore_3) {
	mov	r0, #opc_isub_istore_N
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_isub_istore_N
}

(isub)(iastore,fastore) {
	POP	r2, r3
	DISPATCH_START	\seq_len
	sub	tmp1, r3, r2		@ tmp1 = value
	POP	r2, r3			@ r2, index, r3 = ref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry105:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	str	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(isub)(iadd) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	sub	r1, r3, r2
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(isub)(isub) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	sub	r1, r3, r2
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(isub)(iinc) {
	POP	tmp1, lr
	DISPATCH_START	\seq_len
	sub	tmp1, lr, tmp1
        ldrb    r3, [jpc, #-2]	@ jpc now points to next bc
        ldrsb   r2, [jpc, #-1]
	DISPATCH_NEXT
	PUSH	tmp1
	ldr	tmp1, [locals, -r3, lsl #2]
	DISPATCH_NEXT
	add	tmp1, tmp1, r2
	str	tmp1, [locals, -r3, lsl #2]
	DISPATCH_FINISH
}
@ ---- iand; xxx ------------------------------------------------------------

(iand)(iload,fload,aload) {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r3, tmp1
	DISPATCH_NEXT
	rsb	r1, r1, #0
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	and	r3, tmp1, r3
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(iand)
(iload_0,iload_1,iload_2,iload_3)
{
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_iload_0
	POP	r3, tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	and	r3, tmp1, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(iand)(iaload,aaload,faload) {
	POP	r2, r3, lr		@ lr = ref
	DISPATCH_START	\seq_len
	and	r2, r3, r2		@ r2 = index
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry75:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_1
	add	lr, lr, r2, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iand)(istore) {
	mov	r0, #opc_iand_u4store
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_iand_u4store
}

(iand)
(istore_0,istore_1,istore_2,istore_3) {
	mov	r0, #opc_iand_istore_N
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_iand_istore_N
}

(iand)(iastore,fastore) {
	POP	r2, r3
	DISPATCH_START	\seq_len
	and	tmp1, r3, r2		@ tmp1 = value
	POP	r2, r3			@ r2, index, r3 = ref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry107:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	str	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(iand)(iadd) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	and	r1, r3, r2
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iand)(isub) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	and	r1, r3, r2
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(iand)(iinc) {
	POP	tmp1, lr
	DISPATCH_START	\seq_len
	and	tmp1, lr, tmp1
        ldrb    r3, [jpc, #-2]	@ jpc now points to next bc
        ldrsb   r2, [jpc, #-1]
	DISPATCH_NEXT
	PUSH	tmp1
	ldr	tmp1, [locals, -r3, lsl #2]
	DISPATCH_NEXT
	add	tmp1, tmp1, r2
	str	tmp1, [locals, -r3, lsl #2]
	DISPATCH_FINISH
}
@ ---- ior; xxx ------------------------------------------------------------

(ior)(iload,fload,aload) {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r3, tmp1
	DISPATCH_NEXT
	rsb	r1, r1, #0
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	orr	r3, tmp1, r3
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(ior)
(iload_0,iload_1,iload_2,iload_3)
{
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_iload_0
	POP	r3, tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	orr	r3, tmp1, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(ior)(iaload,aaload,faload) {
	POP	r2, r3, lr		@ lr = ref
	DISPATCH_START	\seq_len
	orr	r2, r3, r2		@ r2 = index
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry76:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_1
	add	lr, lr, r2, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(ior)(istore) {
	mov	r0, #opc_ior_u4store
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_ior_u4store
}

(ior)
(istore_0,istore_1,istore_2,istore_3) {
	mov	r0, #opc_ior_istore_N
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_ior_istore_N
}

(ior)(iastore,fastore) {
	POP	r2, r3
	DISPATCH_START	\seq_len
	orr	tmp1, r3, r2		@ tmp1 = value
	POP	r2, r3			@ r2, index, r3 = ref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry108:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	str	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(ior)(iadd) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	orr	r1, r3, r2
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(ior)(isub) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	orr	r1, r3, r2
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(ior)(iinc) {
	POP	tmp1, lr
	DISPATCH_START	\seq_len
	orr	tmp1, lr, tmp1
        ldrb    r3, [jpc, #-2]	@ jpc now points to next bc
        ldrsb   r2, [jpc, #-1]
	DISPATCH_NEXT
	PUSH	tmp1
	ldr	tmp1, [locals, -r3, lsl #2]
	DISPATCH_NEXT
	add	tmp1, tmp1, r2
	str	tmp1, [locals, -r3, lsl #2]
	DISPATCH_FINISH
}

@ ---- ixor; xxx ------------------------------------------------------------

(ixor)(iload,fload,aload) {
	ldrb	r1, [jpc, #2]
	DISPATCH_START	\seq_len
	POP	r3, tmp1
	DISPATCH_NEXT
	rsb	r1, r1, #0
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	eor	r3, tmp1, r3
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(ixor)
(iload_0,iload_1,iload_2,iload_3)
{
	DISPATCH_START	\seq_len
	rsb	r1, r1, #opc_iload_0
	POP	r3, tmp1
	DISPATCH_NEXT
	ldr	r1, [locals, r1, lsl #2]
	eor	r3, tmp1, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(ixor)(iaload,aaload,faload) {
	POP	r2, r3, lr		@ lr = ref
	DISPATCH_START	\seq_len
	eor	r2, r3, r2		@ r2 = index
	SW_NPC	cmp	lr, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry77:
	ldr	tmp1, [lr, #8]		@ tmp1 = length
	DISPATCH_NEXT
	cmp	r2, tmp1
	bcs	array_bound_exception_jpc_1
	add	lr, lr, r2, lsl #2
	ldr	tmp1, [lr, #BASE_OFFSET_WORD]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(ixor)(istore) {
	mov	r0, #opc_ixor_u4store
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_ixor_u4store
}

(ixor)
(istore_0,istore_1,istore_2,istore_3) {
	mov	r0, #opc_ixor_istore_N
	REWRITE_PAIRS	strb	r0, [jpc]
	b	do_ixor_istore_N
}

(ixor)(iastore,fastore) {
	POP	r2, r3
	DISPATCH_START	\seq_len
	eor	tmp1, r3, r2		@ tmp1 = value
	POP	r2, r3			@ r2, index, r3 = ref
	SW_NPC	cmp	r3, #0
	SW_NPC	beq	null_ptr_exception_jpc_1
.abortentry109:
	ldr	lr, [r3, #8]		@ lr = limit
	DISPATCH_NEXT
	cmp	r2, lr
	bcs	array_bound_exception_jpc_1
	DISPATCH_NEXT
	add	r3, r3, r2, lsl #2
	str	tmp1, [r3, #BASE_OFFSET_WORD]
	DISPATCH_FINISH
}

(ixor)(iadd) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	eor	r1, r3, r2
	DISPATCH_NEXT
	add	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
        DISPATCH_FINISH
}

(ixor)(isub) {
	DISPATCH_START	\seq_len
	POP	r2, r3, tmp1
	DISPATCH_NEXT
	eor	r1, r3, r2
	DISPATCH_NEXT
	sub	r1, tmp1, r1
	DISPATCH_NEXT
	DISPATCH_NEXT
	PUSH	r1
	DISPATCH_FINISH
}

(ixor)(iinc) {
	POP	tmp1, lr
	DISPATCH_START	\seq_len
	eor	tmp1, lr, tmp1
        ldrb    r3, [jpc, #-2]	@ jpc now points to next bc
        ldrsb   r2, [jpc, #-1]
	DISPATCH_NEXT
	PUSH	tmp1
	ldr	tmp1, [locals, -r3, lsl #2]
	DISPATCH_NEXT
	add	tmp1, tmp1, r2
	str	tmp1, [locals, -r3, lsl #2]
	DISPATCH_FINISH
}

@ --- iinc; xxx --------------------------------------------------------------

(iinc)(iconst_m1,iconst_0,iconst_1,iconst_2,iconst_3,iconst_4,iconst_5) {
        ldrsb   tmp1, [jpc, #2]
	sub	lr, r1, #opc_iconst_0
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	ldr	r3, [locals, r1, lsl #2]
	DISPATCH_NEXT
	add	r3, r3, tmp1
	DISPATCH_NEXT
	PUSH	lr
	DISPATCH_NEXT
	DISPATCH_NEXT
	str	r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iinc)(iload,aload,fload) {
	ldrb	lr, [jpc, #4]
        ldrsb   tmp1, [jpc, #2]
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	ldr	r3, [locals, r1, lsl #2]
	DISPATCH_NEXT
	rsb	lr, lr, #0
	DISPATCH_NEXT
	add	r3, r3, tmp1
	DISPATCH_NEXT
	str	r3, [locals, r1, lsl #2]
	ldr	tmp1, [locals, lr, lsl #2]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iinc)
(iload_0,iload_1,iload_2,iload_3)
{
	rsb	lr, r1, #opc_iload_0
        ldrsb   tmp1, [jpc, #2]
	DISPATCH_START	\seq_len
	rsb	r1, r2, #0
	ldr	r3, [locals, r1, lsl #2]
	DISPATCH_NEXT
	add	r3, r3, tmp1
	DISPATCH_NEXT
	str	r3, [locals, r1, lsl #2]
	DISPATCH_NEXT
	ldr	tmp1, [locals, lr, lsl #2]
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

@###############################################################################
@# Optimised bytecode triples
@###############################################################################

(iaccess_0,iaccess_1,iaccess_2,iaccess_3)
(iload,fload,aload) {
	ldrb	r2, [jpc, #3]
	rsb	tmp1, r0, #opc_iaccess_0
	ldrb	r1, [jpc, #2]
	add	r3, constpool, r2, lsl #12
	DISPATCH_START	6
	ldr	tmp1, [locals, tmp1, lsl #2]
	add	r3, r1, lsl #4
	ldrb	r1, [jpc, #-1]
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_5
	DISPATCH_NEXT
        ldr     r3, [r3, #CP_OFFSET+8]
	DISPATCH_NEXT
	rsb	r1, r1, #0
.abortentry89:
	ldr	r3, [tmp1, r3]
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(iaccess_0,iaccess_1,iaccess_2,iaccess_3)
(iload_0,iload_1,iload_2,iload_3) {
	ldrb	r2, [jpc, #3]
	rsb	tmp1, r0, #opc_iaccess_0
	ldrb	ip, [jpc, #2]
	add	r3, constpool, r2, lsl #12
	DISPATCH_START	5
	rsb	r1, r1, #opc_iload_0
	ldr	tmp1, [locals, tmp1, lsl #2]
	add	r3, ip, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_4
	DISPATCH_NEXT
        ldr     r3, [r3, #CP_OFFSET+8]
	DISPATCH_NEXT
.abortentry90:
	ldr	r3, [tmp1, r3]
	ldr	r1, [locals, r1, lsl #2]
	DISPATCH_NEXT
	PUSH	r1, r3
	DISPATCH_FINISH
}

(iaccess_0,iaccess_1,iaccess_2,iaccess_3)
(iadd) {
	ldrb	r2, [jpc, #3]
	rsb	tmp1, r0, #opc_iaccess_0
	ldrb	ip, [jpc, #2]
	add	r1, constpool, r2, lsl #12
	DISPATCH_START	5
	ldr	tmp1, [locals, tmp1, lsl #2]
	add	r1, ip, lsl #4
	DISPATCH_NEXT
	SW_NPC	cmp	tmp1, #0
	SW_NPC	beq	null_ptr_exception_jpc_4
	DISPATCH_NEXT
        ldr     r1, [r1, #CP_OFFSET+8]
	DISPATCH_NEXT
	POP	r3
.abortentry91:
	ldr	r1, [tmp1, r1]
	DISPATCH_NEXT
	add	r1, r1, r3
	PUSH	r1
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(iadd)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
        ldrb    r2, [jpc, #1-\seq_len]
        DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        sub     tmp1, r2, #opc_iconst_0
        DISPATCH_NEXT
        add     r3, r3, tmp1
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(isub)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
        ldrb    r2, [jpc, #1-\seq_len]
        DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        sub     tmp1, r2, #opc_iconst_0
        DISPATCH_NEXT
        sub     r3, r3, tmp1
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(iand)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
        ldrb    r2, [jpc, #1-\seq_len]
        DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        sub     tmp1, r2, #opc_iconst_0
        DISPATCH_NEXT
        and     r3, r3, tmp1
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(ior)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
        ldrb    r2, [jpc, #1-\seq_len]
        DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        sub     tmp1, r2, #opc_iconst_0
        DISPATCH_NEXT
        orr     r3, r3, tmp1
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(ixor)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
        ldrb    r2, [jpc, #1-\seq_len]
        DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        sub     tmp1, r2, #opc_iconst_0
        DISPATCH_NEXT
        eor     r3, r3, tmp1
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(idiv)
{
	rsb	tmp1, r0, #opc_iload_0_iconst_N
	subs	lr, r2, #opc_iconst_2
	DISPATCH_START	\seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	DISPATCH_NEXT
	beq	5f
	bcc	3f
	cmp	lr, #(opc_iconst_4-opc_iconst_2)
	beq	4f
	bcc	2f
@ divide by 5
1:
	mvn	lr, #0x198		@ Form 0x66666667 in lr
	bic	lr, lr, #0x9800
	add	lr, lr, lr, lsl #16
	smull	a3, a4, tmp1, lr
	mov	a3, tmp1, asr #31
	rsb	tmp1, a3, a4, asr #1
	b	6f
@ divide by 3
2:
	mvn	lr, #0xa9		@ Form 0x55555556 in lr
	bic	lr, lr, #0xaa00
	add	lr, lr, lr, lsl #16
        smull   a3, a4, tmp1, lr
        sub     tmp1, a4, tmp1, asr #31
	b	6f
3:
	cmp	lr, #(opc_iconst_0-opc_iconst_2)
	beq	div_zero_jpc_1
	rsbcc	tmp1, tmp1, #0		@ Divide by -1 or 1
	b	6f
@ divide by 4
4:	movs	a4, tmp1
	addmi	a4, a4, #3
	mov	tmp1, a4, asr #2
	b	6f
@ divide by 2
5:
	add	tmp1, tmp1, tmp1, lsr #31
	mov	tmp1, tmp1, asr #1
6:
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iconst_N)
(iadd)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        DISPATCH_NEXT
        ldr     r2, [locals, r2, lsl #2]
        sub     r3, r3, #opc_iconst_0
        DISPATCH_NEXT
        add     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iconst_N)
(isub)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        DISPATCH_NEXT
        ldr     r2, [locals, r2, lsl #2]
        sub     r3, r3, #opc_iconst_0
        DISPATCH_NEXT
        sub     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iconst_N)
(iand)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        DISPATCH_NEXT
        ldr     r2, [locals, r2, lsl #2]
        sub     r3, r3, #opc_iconst_0
        DISPATCH_NEXT
        and     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iconst_N)
(ior)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        DISPATCH_NEXT
        ldr     r2, [locals, r2, lsl #2]
        sub     r3, r3, #opc_iconst_0
        DISPATCH_NEXT
        orr     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

@ r2 = [jpc, #1]
(iload_iconst_N)
(ixor)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        DISPATCH_NEXT
        ldr     r2, [locals, r2, lsl #2]
        sub     r3, r3, #opc_iconst_0
        DISPATCH_NEXT
        eor     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_iconst_N)
(idiv)
{
	ldrb	lr, [jpc, #2]
	rsb	tmp1, r2, #0
        DISPATCH_START  \seq_len
	ldr	tmp1, [locals, tmp1, lsl #2]
	subs	lr, lr, #opc_iconst_2
	DISPATCH_NEXT
	beq	5f
	bcc	3f
	cmp	lr, #(opc_iconst_4-opc_iconst_2)
	beq	4f
	bcc	2f
@ divide by 5
1:
	mvn	lr, #0x198		@ Form 0x66666667 in lr
	bic	lr, lr, #0x9800
	add	lr, lr, lr, lsl #16
	smull	a3, a4, tmp1, lr
	mov	a3, tmp1, asr #31
	rsb	tmp1, a3, a4, asr #1
	b	6f
@ divide by 3
2:
	mvn	lr, #0xa9		@ Form 0x55555556 in lr
	bic	lr, lr, #0xaa00
	add	lr, lr, lr, lsl #16
        smull   a3, a4, tmp1, lr
        sub     tmp1, a4, tmp1, asr #31
	b	6f
3:
	cmp	lr, #(opc_iconst_0-opc_iconst_2)
	beq	div_zero_jpc_1
	rsbcc	tmp1, tmp1, #0		@ Divide by -1 or 1
	b	6f
@ divide by 4
4:	movs	a4, tmp1
	addmi	a4, a4, #3
	mov	tmp1, a4, asr #2
	b	6f
@ divide by 2
5:
	add	tmp1, tmp1, tmp1, lsr #31
	mov	tmp1, tmp1, asr #1
6:
	DISPATCH_NEXT
	PUSH	tmp1
	DISPATCH_FINISH
}

(iload_iload)
(iadd)
{
        ldrb    r3, [jpc, #3]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        add     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload_N)
(iadd)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #opc_iload_0
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        add     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(iadd)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        add     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(iadd)
{
	rsb	r3, r2, #opc_iload_0
	rsb	r2, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        add     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload)
(isub)
{
        ldrb    r3, [jpc, #3]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        sub     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload_N)
(isub)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #opc_iload_0
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        sub     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(isub)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        sub     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(isub)
{
	rsb	r3, r2, #opc_iload_0
	rsb	r2, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        sub     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload)
(iand)
{
        ldrb    r3, [jpc, #3]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        and     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload_N)
(iand)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #opc_iload_0
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        and     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(iand)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        and     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(iand)
{
	rsb	r3, r2, #opc_iload_0
	rsb	r2, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        and     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload)
(ior)
{
        ldrb    r3, [jpc, #3]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        orr     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload_N)
(ior)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #opc_iload_0
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        orr     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(ior)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        orr     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(ior)
{
	rsb	r3, r2, #opc_iload_0
	rsb	r2, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
        ldr     r2, [locals, r2, lsl #2]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        orr     r3, r2, r3
	DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

(iload_iload)
(ixor)
{
        ldrb    r3, [jpc, #3]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
        eor     r3, r2, r3
	DISPATCH_NEXT
	DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_iload_N)
(ixor)
{
        ldrb    r3, [jpc, #2]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
        rsb     r3, r3, #opc_iload_0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        DISPATCH_NEXT
        eor     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(ixor)
{
        ldrb    r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
        DISPATCH_START  \seq_len
        rsb     r3, r3, #0
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        DISPATCH_NEXT
        eor     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
        DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(ixor)
{
	rsb	r3, r2, #opc_iload_0
	rsb	r2, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
        ldr     r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
        DISPATCH_NEXT
        DISPATCH_NEXT
        eor     r3, r2, r3
        DISPATCH_NEXT
        DISPATCH_NEXT
        PUSH    r3
	DISPATCH_FINISH
}

@ Former quads

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(iadd_u4store)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        add     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(iadd_u4store)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #5]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        add     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(iadd_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        add     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(iadd_istore_N)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #4]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #opc_istore_0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        add     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(isub_u4store)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        sub     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(isub_u4store)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #5]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        sub     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(isub_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        sub     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(isub_istore_N)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #4]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #opc_istore_0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        sub     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(iand_u4store)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        and     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(iand_u4store)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #5]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        and     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(iand_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        and     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(iand_istore_N)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #4]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #opc_istore_0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        and     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(ior_u4store)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        orr     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(ior_u4store)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #5]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        orr     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(ior_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        orr     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(ior_istore_N)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #4]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #opc_istore_0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        orr     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(ixor_u4store)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        eor     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(ixor_u4store)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #5]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        eor     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(ixor_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iconst_N
        DISPATCH_START  \seq_len
	sub	r2, r2, #opc_iconst_0
	DISPATCH_NEXT
        ldrb    tmp1, [jpc, #-1]
        ldr     r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
        eor     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iconst_N)
(ixor_istore_N)
{
	ldrb	r3, [jpc, #2]
        ldrb    lr, [jpc, #4]
        rsb     r2, r2, #0
        DISPATCH_START  \seq_len
	sub	r3, r3, #opc_iconst_0
	DISPATCH_NEXT
        rsb     r1, lr, #opc_istore_0
	DISPATCH_NEXT
        ldr     tmp1, [locals, r2, lsl #2]
	DISPATCH_NEXT
        eor     r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

#ifdef NOTICE_SAFEPOINTS

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(if_icmpeq,if_acmpeq)
{
	ldrb	r3, [jpc, #1]
	rsb	r2, r0, #opc_iload_0_iconst_N
	ldrsb	r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	beq	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iconst_N)
(if_icmpeq,if_acmpeq)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	beq	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(if_icmpne,if_acmpne)
{
	ldrb	r3, [jpc, #1]
	rsb	r2, r0, #opc_iload_0_iconst_N
	ldrsb	r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	bne	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iconst_N)
(if_icmpne,if_acmpne)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bne	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(if_icmplt)
{
	ldrb	r3, [jpc, #1]
	rsb	r2, r0, #opc_iload_0_iconst_N
	ldrsb	r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	blt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iconst_N)
(if_icmplt)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	blt	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(if_icmpge)
{
	ldrb	r3, [jpc, #1]
	rsb	r2, r0, #opc_iload_0_iconst_N
	ldrsb	r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	bge	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iconst_N)
(if_icmpge)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bge	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(if_icmpgt)
{
	ldrb	r3, [jpc, #1]
	rsb	r2, r0, #opc_iload_0_iconst_N
	ldrsb	r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	bgt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iconst_N)
(if_icmpgt)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bgt	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iconst_N,iload_1_iconst_N,iload_2_iconst_N,iload_3_iconst_N)
(if_icmple)
{
	ldrb	r3, [jpc, #1]
	rsb	r2, r0, #opc_iload_0_iconst_N
	ldrsb	r1, [jpc, #3]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	ble	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iconst_N)
(if_icmple)
{
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	ldr	r2, [locals, r2, lsl #2]
	sub	r3, r3, #opc_iconst_0
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	ble	branch_taken_unsafe_3
	DISPATCH 6
}

#endif // NOTICE_SAFEPOINTS

(iload_iload)
(iadd_istore_N)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	add	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(iadd_istore_N)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #4]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	add	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(iadd_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #4]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        add     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(iadd_istore_N)
{
	ldrb	tmp1, [jpc, #3]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        add     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(isub_istore_N)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	sub	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(isub_istore_N)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #4]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	sub	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(isub_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #4]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        sub     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(isub_istore_N)
{
	ldrb	tmp1, [jpc, #3]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        sub     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(iand_istore_N)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	and	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(iand_istore_N)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #4]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	and	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(iand_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #4]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        and     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(iand_istore_N)
{
	ldrb	tmp1, [jpc, #3]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        and     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(ior_istore_N)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	orr	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(ior_istore_N)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #4]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	orr	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(ior_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #4]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        orr     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(ior_istore_N)
{
	ldrb	tmp1, [jpc, #3]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        orr     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(ixor_istore_N)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	eor	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(ixor_istore_N)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #4]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #opc_istore_0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	eor	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(ixor_istore_N)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #4]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        eor     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(ixor_istore_N)
{
	ldrb	tmp1, [jpc, #3]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        eor     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #opc_istore_0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(iadd_u4store)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #6]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	add	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(iadd_u4store)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	add	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(iadd_u4store)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #5]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        add     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(iadd_u4store)
{
	ldrb	tmp1, [jpc, #4]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        add     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(isub_u4store)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #6]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	sub	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(isub_u4store)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	sub	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(isub_u4store)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #5]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        sub     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(isub_u4store)
{
	ldrb	tmp1, [jpc, #4]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        sub     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(iand_u4store)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #6]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	and	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(iand_u4store)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	and	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(iand_u4store)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #5]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        and     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(iand_u4store)
{
	ldrb	tmp1, [jpc, #4]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        and     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(ior_u4store)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #6]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	orr	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(ior_u4store)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	orr	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(ior_u4store)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #5]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        orr     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(ior_u4store)
{
	ldrb	tmp1, [jpc, #4]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        orr     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload)
(ixor_u4store)
{
	ldrb	r3, [jpc, #3]
	ldrb	lr, [jpc, #6]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	eor	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_iload_N)
(ixor_u4store)
{
	ldrb	r3, [jpc, #2]
	ldrb	lr, [jpc, #5]
	rsb	r2, r2, #0
        DISPATCH_START  \seq_len
	rsb	r3, r3, #opc_iload_0
	DISPATCH_NEXT
	rsb	r1, lr, #0
	ldr	tmp1, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	DISPATCH_NEXT
	DISPATCH_NEXT
	eor	r3, tmp1, r3
	DISPATCH_NEXT
        str     r3, [locals, r1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(ixor_u4store)
{
        rsb     r3, r0, #opc_iload_0_iload
	ldrb	r2, [jpc, #2]
	ldrb	tmp1, [jpc, #5]
        DISPATCH_START  \seq_len
	rsb	r2, r2, #0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        eor     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(ixor_u4store)
{
	ldrb	tmp1, [jpc, #4]
	rsb	r3, r0, #opc_iload_0_iload_N
        DISPATCH_START  \seq_len
	rsb	r2, r2, #opc_iload_0
	DISPATCH_NEXT
        ldr     r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	DISPATCH_NEXT
        eor     r3, r3, r2
	DISPATCH_NEXT
	rsb	tmp1, tmp1, #0
	DISPATCH_NEXT
        str     r3, [locals, tmp1, lsl #2]
	DISPATCH_FINISH
}

#ifdef NOTICE_SAFEPOINTS

(iload_iload)
(if_icmpeq,if_acmpeq) {
	ldrb	r3, [jpc, #3]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #5]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #6]
	cmp	r2, r3
	beq	branch_taken_unsafe_4
	DISPATCH 7
}

(iload_iload_N)
(if_icmpeq,if_acmpeq) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #opc_iload_0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	beq	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(if_icmpeq,if_acmpeq) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	beq	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(if_icmpeq,if_acmpeq) {
	rsb	r3, r2, #opc_iload_0
	ldrsb	r1, [jpc, #3]
	rsb	r2, r0, #opc_iload_0_iload_N
	ldr	r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	beq	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iload)
(if_icmpne,if_acmpne) {
	ldrb	r3, [jpc, #3]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #5]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #6]
	cmp	r2, r3
	bne	branch_taken_unsafe_4
	DISPATCH 7
}

(iload_iload_N)
(if_icmpne,if_acmpne) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #opc_iload_0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bne	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(if_icmpne,if_acmpne) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bne	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(if_icmpne,if_acmpne) {
	rsb	r3, r2, #opc_iload_0
	ldrsb	r1, [jpc, #3]
	rsb	r2, r0, #opc_iload_0_iload_N
	ldr	r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	bne	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iload)
(if_icmplt) {
	ldrb	r3, [jpc, #3]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #5]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #6]
	cmp	r2, r3
	blt	branch_taken_unsafe_4
	DISPATCH 7
}

(iload_iload_N)
(if_icmplt) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #opc_iload_0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	blt	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(if_icmplt) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	blt	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(if_icmplt) {
	rsb	r3, r2, #opc_iload_0
	ldrsb	r1, [jpc, #3]
	rsb	r2, r0, #opc_iload_0_iload_N
	ldr	r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	blt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iload)
(if_icmpge) {
	ldrb	r3, [jpc, #3]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #5]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #6]
	cmp	r2, r3
	bge	branch_taken_unsafe_4
	DISPATCH 7
}

(iload_iload_N)
(if_icmpge) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #opc_iload_0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bge	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(if_icmpge) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bge	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(if_icmpge) {
	rsb	r3, r2, #opc_iload_0
	ldrsb	r1, [jpc, #3]
	rsb	r2, r0, #opc_iload_0_iload_N
	ldr	r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	bge	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iload)
(if_icmpgt) {
	ldrb	r3, [jpc, #3]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #5]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #6]
	cmp	r2, r3
	bgt	branch_taken_unsafe_4
	DISPATCH 7
}

(iload_iload_N)
(if_icmpgt) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #opc_iload_0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bgt	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(if_icmpgt) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	bgt	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(if_icmpgt) {
	rsb	r3, r2, #opc_iload_0
	ldrsb	r1, [jpc, #3]
	rsb	r2, r0, #opc_iload_0_iload_N
	ldr	r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	bgt	branch_taken_unsafe_2
	DISPATCH 5
}

(iload_iload)
(if_icmple) {
	ldrb	r3, [jpc, #3]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #5]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #6]
	cmp	r2, r3
	ble	branch_taken_unsafe_4
	DISPATCH 7
}

(iload_iload_N)
(if_icmple) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r2, #0
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #opc_iload_0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	ble	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload,iload_1_iload,iload_2_iload,iload_3_iload)
(if_icmple) {
	ldrb	r3, [jpc, #2]
	rsb	r2, r0, #opc_iload_0_iload
	ldrsb	r1, [jpc, #4]
	rsb	r3, r3, #0
	ldr	r2, [locals, r2, lsl #2]
	ldr	r3, [locals, r3, lsl #2]
	ldrb	ip, [jpc, #5]
	cmp	r2, r3
	ble	branch_taken_unsafe_3
	DISPATCH 6
}

(iload_0_iload_N,iload_1_iload_N,iload_2_iload_N,iload_3_iload_N)
(if_icmple) {
	rsb	r3, r2, #opc_iload_0
	ldrsb	r1, [jpc, #3]
	rsb	r2, r0, #opc_iload_0_iload_N
	ldr	r3, [locals, r3, lsl #2]
	ldr	r2, [locals, r2, lsl #2]
	ldrb	ip, [jpc, #4]
	cmp	r2, r3
	ble	branch_taken_unsafe_2
	DISPATCH 5
}

#endif

#endif // FAST_BYTECODES